:root {
  --bg-0: #02050a;
  --bg-1: #04070d;
  --bg-2: #07101a;
  --surface: rgba(9, 16, 24, .84);
  --surface-hover: rgba(12, 21, 31, .96);
  --line: rgba(227, 234, 240, .09);
  --line-strong: rgba(227, 234, 240, .17);
  --text: #f2f5f7;
  --muted: #a3afb8;
  --subtle: #768693;
  --steel: #88a9c4;
  --steel-soft: rgba(136, 169, 196, .09);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-0); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 54%, var(--bg-0) 100%);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.visual-field .ambient::after {
  content: "";
  position: absolute;
  left: -5vw;
  right: -5vw;
  bottom: -12vh;
  height: min(61vh, 660px);
  background: url("assets/field-lines.webp") center bottom / cover no-repeat;
  opacity: .20;
  filter: saturate(.86) brightness(.95) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.10) 18%, rgba(0,0,0,.88) 58%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.10) 18%, rgba(0,0,0,.88) 58%, #000 100%);
}
.visual-clean .ambient::after,
.visual-clean .ambient::before { display: none; }

.page {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(52px, env(safe-area-inset-top)) 44px max(42px, env(safe-area-inset-bottom));
  display: flex;
  align-items: stretch;
}

.layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(350px, .76fr);
  gap: clamp(60px, 7vw, 102px);
  align-items: center;
}

.identity-panel { min-width: 0; align-self: center; }
.brand { margin-bottom: clamp(48px, 6vh, 74px); }
.brand-lockup {
  display: block;
  width: min(100%, 520px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.identity-copy h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(42px, 4.9vw, 66px);
  line-height: 1.01;
  letter-spacing: -.043em;
  font-weight: 570;
  white-space: nowrap;
}
.role {
  margin: 24px 0 0;
  max-width: 590px;
  color: #cfd6db;
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.46;
  font-weight: 400;
}
.identity-rule {
  width: 52px;
  height: 1px;
  margin-top: 30px;
  background: rgba(136, 169, 196, .70);
}
.descriptor {
  margin: 14px 0 0;
  color: #8ea2b2;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.contact-panel { width: 100%; max-width: 460px; justify-self: end; margin-top: 26px; }
.actions { display: grid; gap: 10px; }
.action {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.action:hover, .action:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
  outline: none;
}
.action.primary {
  border-color: rgba(136, 169, 196, .24);
  background: linear-gradient(135deg, rgba(136,169,196,.065), rgba(9,16,24,.92));
}
.action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.022);
  border: 1px solid rgba(255,255,255,.03);
}
.action-icon img { width: 21px; height: 21px; display: block; }
.action-icon.brand-color img { width: 22px; height: 22px; display: block; }
.action-copy { min-width: 0; }
.action-copy strong, .action-copy small { display: block; }
.action-copy strong { font-size: 14px; font-weight: 640; letter-spacing: -.01em; }
.action-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arrow { color: #81919c; font-size: 17px; }
.hidden { display: none !important; }

.desktop-qr {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 15px;
  align-items: center;
}
.desktop-qr img {
  width: 70px;
  height: 70px;
  padding: 5px;
  border-radius: 10px;
  background: #fff;
}
.desktop-qr strong, .desktop-qr span { display: block; }
.desktop-qr strong { font-size: 12.5px; font-weight: 640; }
.desktop-qr span { margin-top: 4px; color: var(--muted); font-size: 10.8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 200;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #e3e8eb;
  background: rgba(5, 10, 15, .96);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  place-items: center;
  padding: 20px;
}
.modal.open { display: grid; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 7, .86);
  backdrop-filter: blur(10px);
}
.modal-panel {
  position: relative;
  width: min(100%, 405px);
  padding: 29px;
  border: 1px solid var(--line-strong);
  border-radius: 21px;
  background: linear-gradient(180deg, #0a131c 0%, #060b11 100%);
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.022);
  color: #dce2e6;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.modal-brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 2px auto 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}
.modal-brand-icon img { width: 23px; height: 23px; }
.modal-panel h2 { margin: 0 0 22px; font-size: 24px; font-weight: 590; letter-spacing: -.025em; }
.wechat-id-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.016);
  text-align: left;
}
.wechat-id-card > div { min-width: 0; }
.wechat-id-card span { display: block; color: var(--muted); font-size: 10.5px; }
.wechat-id-card strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(136,169,196,.22);
  border-radius: 9px;
  background: var(--steel-soft);
  color: #e2e8ec;
  font-size: 11px;
  font-weight: 640;
  cursor: pointer;
  white-space: nowrap;
}
.mini-button.secondary { background: transparent; border-color: var(--line-strong); }
.wechat-qr-block { margin-top: 20px; }
.wechat-qr {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto;
  padding: 9px;
  border-radius: 14px;
  background: white;
}
.wechat-qr-block p { max-width: 270px; margin: 10px auto 12px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }

@media (max-width: 900px) {
  body {
    background: linear-gradient(165deg, #07101a 0%, #04070d 58%, #02050a 100%);
  }
  .visual-field .ambient::after {
    left: -35%;
    right: -35%;
    bottom: -4vh;
    height: 43vh;
    opacity: .14;
    background-size: auto 100%;
  }
  .page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(29px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
    align-items: flex-start;
  }
  .layout { display: block; }
  .identity-panel { width: 100%; }
   .brand { margin-bottom: 42px; }
  .brand-lockup { width: min(100%, 405px); }
  .identity-copy h1 { font-size: clamp(37px, 10.5vw, 54px); white-space: normal; }
  .role { max-width: 560px; margin-top: 18px; font-size: 17px; }
  .identity-rule { margin-top: 25px; }
  .descriptor { margin-top: 12px; font-size: 10.5px; }
  .contact-panel { max-width: none; margin-top: 41px; }
  .action { min-height: 67px; border-radius: 14px; padding: 10px 13px; }
  .desktop-qr { display: none; }
}

@media (max-width: 430px) {
  .page { padding-left: 17px; padding-right: 17px; }
  .brand { margin-bottom: 38px; }
  .brand-lockup { width: 100%; }
  .identity-copy h1 { font-size: clamp(35px, 10.7vw, 46px); white-space: normal; }
  .action { grid-template-columns: 39px 1fr auto; gap: 12px; }
  .action-icon { width: 37px; height: 37px; }
  .action-icon img { width: 20px; height: 20px; }
  .modal-panel { padding: 26px 19px 23px; }
  .wechat-id-card { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
