/* ============================================================
   密令通行证 · 单屏界面（按设计稿复刻）
   深色底 + 金色强调，左右双栏卡片
   ============================================================ */

:root {
  --bg: #0a1120;
  --bg-glow: rgba(233, 196, 127, .07);
  --panel-left-1: #17284a;
  --panel-left-2: #101c33;
  --panel-right-1: #172540;
  --panel-right-2: #0e1829;
  --gold: #e9c47f;
  --gold-strong: #f7dfae;
  --gold-deep: #c9a153;
  --ink: #e9eef8;
  --ink-strong: #ffffff;
  --muted: #8b98ae;
  --muted-2: #6d7a91;
  --line: rgba(233, 196, 127, .3);
  --line-soft: rgba(255, 255, 255, .09);
  --green: #54d6a2;
  --radius: 18px;
  --font: 'Guide Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@font-face {
  font-family: 'Guide Sans';
  src: url('../guide-sans-664465914ee7.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% 42%, var(--bg-glow), transparent 66%),
    radial-gradient(700px 500px at 82% 18%, rgba(48, 92, 168, .16), transparent 62%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 屏幕容器 ---------- */

.screen {
  min-height: calc(100vh - var(--nav-h, 68px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 20px 56px;
}

[hidden] { display: none !important; }

.screen-head {
  position: relative;
  width: min(920px, 100%);
  margin-bottom: 74px;
  transition: opacity .22s ease;
}

.head-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.brand-line {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .26em;
  text-indent: .26em;
}

.close-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .06);
  color: #cfd8e7;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.close-btn:hover {
  color: var(--gold);
  border-color: var(--line);
  background: rgba(233, 196, 127, .1);
}

/* ---------- 通行证卡片 ---------- */

.pass-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  width: min(920px, 100%);
  filter: drop-shadow(0 30px 66px rgba(0, 0, 0, .55));
  transition: opacity .22s ease, transform .22s ease;
}

.pass-card.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.pane {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}

.pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(
    116deg,
    rgba(255, 255, 255, .03) 0 1px,
    transparent 1px 12px
  );
  pointer-events: none;
}

.pane-left {
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 462px;
  padding: 28px 32px 20px;
  background: linear-gradient(158deg, var(--panel-left-1) 0%, #13223f 48%, var(--panel-left-2) 100%);
}

/* 右栏被左栏压住一点，制造层叠关系 */
.pane-right {
  margin-left: -16px;
  padding: 20px 18px 14px 34px;
  background: linear-gradient(166deg, var(--panel-right-1) 0%, var(--panel-right-2) 100%);
  display: flex;
  flex-direction: column;
}

/* ---------- 左栏内容 ---------- */

.pane-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pass-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1em;
}

.pass-tag .star { font-size: 14px; letter-spacing: 0; }

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--green);
  background: rgba(84, 214, 162, .14);
  border: 1px solid rgba(84, 214, 162, .34);
  white-space: nowrap;
}

.state-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.pass-heading {
  margin: 30px 0 0;
  font-size: 31px;
  line-height: 1.24;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--ink-strong);
}

.pass-sub {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.field-label {
  display: block;
  margin: 40px 0 9px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .05em;
}

.field {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(233, 196, 127, .34);
  background: rgba(6, 12, 22, .55);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .1em;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input::placeholder { color: #5a677e; letter-spacing: .04em; }

.field input:focus {
  border-color: rgba(233, 196, 127, .7);
  box-shadow: 0 0 0 3px rgba(233, 196, 127, .12);
}

.btn-gold {
  flex: 0 0 auto;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(160deg, #f9e3b4, var(--gold) 56%, #dfb975);
  color: #241a08;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(233, 196, 127, .22);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(233, 196, 127, .3); }
.btn-gold:disabled { opacity: .62; cursor: default; transform: none; }

.pass-hint {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
  transition: color .18s ease;
}

.pass-hint.is-error {
  color: #ff9b9b;
  font-weight: 500;
}

.pass-hint.is-shake {
  animation: hintShake .34s ease;
}

@keyframes hintShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .pass-hint.is-shake { animation: none; }
}

.link-underline {
  display: inline-block;
  align-self: flex-start;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #b9c4d6;
  font-family: var(--font);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(233, 196, 127, .5);
  cursor: pointer;
}

.link-underline:hover { color: var(--gold); }

.pass-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.pass-foot a {
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
}

.pass-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 右栏内容 ---------- */

.right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.group-label {
  margin: 15px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(233, 196, 127, .3);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .14em;
}

.group-label.is-free {
  color: var(--muted-2);
  border-bottom-color: var(--line-soft);
  margin-top: 18px;
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.benefits li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.tick {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-strong), var(--gold-deep));
  position: relative;
  box-shadow: 0 4px 10px rgba(233, 196, 127, .22);
}

.tick::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 4.5px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #231906;
  border-bottom: 2px solid #231906;
  transform: rotate(-45deg);
}

.benefits b {
  display: block;
  color: var(--ink-strong);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.45;
}

.benefits b code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-left: 7px;
  letter-spacing: .08em;
}

.benefits em {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-style: normal;
  line-height: 1.6;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.chips span {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.partners {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.dots { display: inline-flex; }

.dots i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-left: -5px;
  background: linear-gradient(150deg, #2b3c5c, #16203a);
  border: 1px solid rgba(233, 196, 127, .4);
}

.dots i:first-child { margin-left: 0; }

.dots i:nth-child(1) { background: linear-gradient(150deg, #f3bd83, #8a5527); }
.dots i:nth-child(2) { background: linear-gradient(150deg, #9cd2ed, #335f7c); }
.dots i:nth-child(3) { background: linear-gradient(150deg, #bfe3ac, #4a7539); }
.dots i:nth-child(4) { background: linear-gradient(150deg, #dcc0f2, #57406f); }

/* ---------- 关闭后的提示 ---------- */

.reopen-hint {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted-2);
  font-size: 13px;
}

.reopen-hint.show { display: grid; }

.reopen-hint button {
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(233, 196, 127, .08);
  color: var(--gold);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- 已开启态（验证成功后） ---------- */

.screen.is-open .screen-head { margin-bottom: 30px; }

.screen-head.is-hidden { opacity: 0; pointer-events: none; }

.open-head { margin-top: 6px; text-align: center; }

.open-title {
  margin: 0;
  color: var(--gold);
  font-size: 29px;
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.35;
}

.open-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.pane-left-open {
  min-height: 496px;
  padding: 30px 30px 26px;
}

.badge-verified {
  position: absolute;
  top: 74px;
  right: 46px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(233, 196, 127, .75);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .14em;
  text-align: center;
  box-shadow: inset 0 0 0 3px rgba(233, 196, 127, .07);
}

.badge-verified::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(233, 196, 127, .34);
}

.open-title-left {
  margin: 66px 0 0;
  color: var(--ink-strong);
  font-size: 33px;
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.25;
}

.id-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.id-card {
  padding: 16px 20px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
}

.id-label {
  display: block;
  color: #8f9cb4;
  font-size: 12px;
  letter-spacing: .04em;
}

.id-value {
  display: block;
  margin-top: 9px;
  color: var(--ink-strong);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.id-code {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .1em;
  color: var(--gold-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn-main,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

.btn-main {
  border: 0;
  background: linear-gradient(160deg, #f9e3b4, var(--gold) 56%, #dfb975);
  color: #241a08;
  box-shadow: 0 8px 20px rgba(233, 196, 127, .22);
}

.btn-main:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(233, 196, 127, .3); }

.btn-ghost {
  border: 1px solid rgba(233, 196, 127, .4);
  background: rgba(233, 196, 127, .06);
  color: #eed9b0;
}

.btn-ghost:hover { background: rgba(233, 196, 127, .14); color: var(--gold-strong); }

.links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.link-gold {
  color: var(--gold);
  font-size: 12.8px;
  font-weight: 700;
  text-decoration: none;
}

.link-gold:hover { text-decoration: underline; text-underline-offset: 3px; }

.link-muted {
  padding: 0;
  border: 0;
  background: none;
  color: #99a5b8;
  font-family: var(--font);
  font-size: 12.8px;
  cursor: pointer;
}

.link-muted:hover { color: var(--ink); }

.foot-open {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.pass-code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: #7d8aa0;
  white-space: nowrap;
}

.state-pill.is-off {
  color: #9aa6b9;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
}

.state-pill.is-off i { background: #9aa6b9; }

/* ---------- 响应式 ---------- */

@media (max-width: 940px) {
  .screen-head { margin-bottom: 46px; }
  .open-title { font-size: 24px; }
  .open-title-left { font-size: 28px; margin-top: 30px; }
  .badge-verified { top: 62px; right: 26px; }
  .pass-card { grid-template-columns: 1fr; }
  .pane-left {
    min-height: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .pane-right {
    margin-left: 0;
    margin-top: -12px;
    padding: 34px 20px 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

@media (max-width: 620px) {
  .screen { padding: 34px 16px 40px; }
  .screen-head { margin-bottom: 36px; padding: 0 8px 0 0; }
  .brand-line { font-size: 12px; letter-spacing: .18em; }
  .close-btn { width: 30px; height: 30px; }
  .pane-left { padding: 22px 20px 18px; }
  .pane-right { padding: 34px 20px 20px; }
  .pass-heading { font-size: 26px; margin-top: 26px; }
  .id-cards { grid-template-columns: 1fr; gap: 12px; }
  .badge-verified { top: 56px; right: 18px; width: 56px; height: 56px; font-size: 11px; }
  .open-title-left { font-size: 24px; margin-top: 26px; }
  .foot-open { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 16px; }
  .pane-left-open { padding: 22px 20px 22px; }
  .actions > * { flex: 1 1 auto; padding: 0 12px; }
  .links-row { gap: 12px; margin-top: 14px; }
  .open-sub { font-size: 12.5px; }
  .id-value { font-size: 16px; }
  .field { flex-direction: column; }
  .btn-gold { width: 100%; }
  .pass-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .chips span { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
