/* ══════════════════════════════════════════════════════════
   入场申请处 · 复古毛玻璃主题
   ══════════════════════════════════════════════════════════ */

:root {
  --ink: #1a1611;
  --ink-2: #3b3126;
  --ink-3: #6a5c49;
  --paper: #f6ecda;
  --paper-2: #efe2c8;
  --paper-dim: #ddcdaa;
  --amber: #c98a3c;
  --amber-lt: #e6b673;
  --wine: #8a2f27;
  --wine-lt: #b7473c;
  --teal: #2f5b50;
  --bg: #0f0c09;
  --line: rgba(58, 44, 28, .22);
  --line-soft: rgba(58, 44, 28, .1);

  --serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-lg: 22px;
  --r-md: 14px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: rgba(201, 138, 60, .38); color: #fff; }

/* ───────────────────────── 背景舞台 ───────────────────────── */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 12% 0%, #24180f 0%, transparent 55%),
    radial-gradient(90% 80% at 92% 12%, #17231f 0%, transparent 52%),
    linear-gradient(168deg, #161009 0%, #0d0b08 58%, #120d09 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .72;
  will-change: transform;
}
.orb-a {
  width: 46vw; height: 46vw; left: -8vw; top: -10vw;
  background: radial-gradient(circle, rgba(214, 143, 58, .62), transparent 66%);
  animation: drift 26s var(--ease) infinite alternate;
}
.orb-b {
  width: 40vw; height: 40vw; right: -6vw; top: 14vh;
  background: radial-gradient(circle, rgba(52, 108, 93, .68), transparent 68%);
  animation: drift 32s var(--ease) infinite alternate-reverse;
}
.orb-c {
  width: 34vw; height: 34vw; left: 28vw; bottom: -14vw;
  background: radial-gradient(circle, rgba(150, 52, 42, .5), transparent 68%);
  animation: drift 38s var(--ease) infinite alternate;
}

/* 细密点阵：让毛玻璃有可折射的细节 */
.stage::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(246, 236, 218, .07) 1px, transparent 1.2px);
  background-size: 20px 20px;
  opacity: .55;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 6vh, 0) scale(1.16); }
}

.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .055;
  mix-blend-mode: overlay;
}

.scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  opacity: .5;
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 40%, transparent 40%, rgba(0, 0, 0, .62) 100%);
}

/* ───────────────────────── 顶栏 ───────────────────────── */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(246, 236, 218, .1);
}

.brand { display: flex; align-items: center; gap: 12px; }
.seal { color: var(--amber-lt); display: grid; place-items: center; }
.seal svg { display: block; transform: rotate(-8deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: .18em; color: var(--paper); }
.brand-text i {
  font-style: normal; font-size: 9px; letter-spacing: .34em;
  color: rgba(246, 236, 218, .45);
}

.nav {
  display: flex; gap: 4px; margin-left: auto;
  padding: 4px;
  border-radius: 999px;
  background: rgba(246, 236, 218, .06);
  border: 1px solid rgba(246, 236, 218, .1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav a {
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; letter-spacing: .06em;
  color: rgba(246, 236, 218, .62);
  transition: color .25s, background .25s;
}
.nav a:hover { color: var(--paper); }
.nav a.is-current {
  color: #1a1611;
  background: linear-gradient(180deg, var(--amber-lt), var(--amber));
  box-shadow: 0 4px 14px rgba(201, 138, 60, .34);
}

.topbar-meta {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px;
  color: rgba(246, 236, 218, .5);
  letter-spacing: .08em;
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: #67c48f;
  box-shadow: 0 0 0 0 rgba(103, 196, 143, .7);
  animation: pulse 2.4s infinite;
}
.dot-live.is-off { background: #b7473c; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(103, 196, 143, .6); }
  70% { box-shadow: 0 0 0 7px rgba(103, 196, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(103, 196, 143, 0); }
}

/* ───────────────────────── 主区 ───────────────────────── */
#view {
  position: relative; z-index: 1;
  padding: clamp(22px, 4vw, 52px) clamp(18px, 4vw, 56px) 40px;
  min-height: calc(100vh - 190px);
}
.page[hidden] { display: none; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
}

/* ───────── 门厅左栏 ───────── */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--amber-lt);
}
.eyebrow .rule { width: 34px; height: 1px; background: currentColor; opacity: .5; }

.title {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(54px, 9vw, 118px);
  line-height: .98;
  letter-spacing: .16em;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28), 0 22px 60px rgba(0, 0, 0, .5);
}
.title span { display: block; }
.title-line2 {
  color: transparent;
  background: linear-gradient(96deg, #fff8ec 0%, #f2c98f 38%, #dd9a63 68%, #c1543f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding-bottom: .08em;
  filter: drop-shadow(0 10px 34px rgba(201, 138, 60, .3));
}

.lede {
  margin: 0 0 34px;
  max-width: 44ch;
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.95;
  color: rgba(246, 236, 218, .7);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 42px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px; letter-spacing: .06em;
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .28s, background .28s, color .22s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary {
  color: #1c1409;
  background: linear-gradient(178deg, #f0c489 0%, var(--amber) 62%, #a86c26 100%);
  box-shadow: 0 10px 26px rgba(201, 138, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .55);
  font-weight: 600;
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(201, 138, 60, .42), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-primary:disabled {
  opacity: .42; cursor: not-allowed;
  box-shadow: none; filter: grayscale(.35);
}
.btn-ghost {
  color: rgba(246, 236, 218, .82);
  border-color: rgba(246, 236, 218, .22);
  background: rgba(246, 236, 218, .05);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(246, 236, 218, .1); color: var(--paper); }

.stats {
  display: flex; gap: clamp(18px, 3vw, 46px);
  margin: 0 0 38px;
  padding: 20px 0;
  border-top: 1px solid rgba(246, 236, 218, .12);
  border-bottom: 1px solid rgba(246, 236, 218, .12);
}
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { font-size: 11px; letter-spacing: .18em; color: rgba(246, 236, 218, .42); }
.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  color: var(--amber-lt);
  font-variant-numeric: tabular-nums;
}

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; max-width: 52ch; }
.notes li {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px;
  font-size: 13px; line-height: 1.75;
  color: rgba(246, 236, 218, .55);
}
.notes span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: var(--amber); padding-top: 3px;
}

/* ───────── 实时票券墙 ───────── */
.ticket-wall {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 22px 20px 16px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 120px),
    linear-gradient(158deg, rgba(246, 236, 218, .16), rgba(246, 236, 218, .05));
  border: 1px solid rgba(246, 236, 218, .22);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(0, 0, 0, .2);
  overflow: hidden;
  position: sticky;
  top: 22px;
}
.ticket-wall::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 50% -10%, rgba(230, 182, 115, .22), transparent 60%);
  pointer-events: none;
}
.ticket-wall::after {
  content: "";
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  pointer-events: none;
}

.wall-head { display: flex; align-items: center; justify-content: space-between; }
.wall-head h2 {
  margin: 0;
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  letter-spacing: .16em; color: var(--paper);
}
.live-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: #9fe0bb;
  background: rgba(103, 196, 143, .12);
  border: 1px solid rgba(103, 196, 143, .3);
}
.live-tag i { width: 5px; height: 5px; border-radius: 50%; background: #67c48f; animation: pulse 2s infinite; }
.wall-sub { margin: 6px 0 16px; font-size: 11.5px; color: rgba(246, 236, 218, .38); letter-spacing: .06em; }

.ticket-scroll {
  flex: 1;
  max-height: min(52vh, 470px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 182, 115, .3) transparent;
  contain: layout paint;
  padding-right: 4px;
  mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%);
}
.ticket-scroll::-webkit-scrollbar { width: 4px; }
.ticket-scroll::-webkit-scrollbar-thumb { background: rgba(230, 182, 115, .26); border-radius: 4px; }

.ticket-list {
  display: grid;
  gap: 12px;
  padding: 2px 0 12px;
  min-height: 100%;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0 73px,
    rgba(246, 236, 218, .08) 73px 74px
  );
}

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 13px 18px;
  border-radius: 10px;
  background:
    linear-gradient(140deg, rgba(250, 242, 226, .88), rgba(233, 218, 192, .74));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .72);
  -webkit-mask-image: radial-gradient(circle at 0 50%, transparent 8px, #000 8.5px);
  mask-image: radial-gradient(circle at 0 50%, transparent 8px, #000 8.5px);
  contain: content;
}
.ticket::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px dashed rgba(58, 44, 28, .18);
  border-radius: 6px;
  pointer-events: none;
}
.ticket .t-name {
  font-family: var(--serif);
  font-size: 14.5px; letter-spacing: .05em;
  display: flex; align-items: baseline; gap: 8px;
}
.ticket .t-name b { font-weight: 600; }
.ticket .t-role {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .12em; color: var(--ink-3);
  border: 1px solid rgba(58, 44, 28, .25);
  padding: 0 5px; border-radius: 3px;
}
.ticket .t-meta {
  margin-top: 3px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .08em; color: var(--ink-3);
  display: flex; gap: 9px;
}
.ticket .t-status {
  font-family: var(--serif);
  font-size: 11px; letter-spacing: .14em;
  padding: 3px 8px; border-radius: 3px;
  border: 1.4px solid currentColor;
  transform: rotate(-4deg);
  white-space: nowrap;
}
.t-status.st-pending { color: #9a6a1e; }
.t-status.st-approved { color: var(--wine); }
.t-status.st-rejected { color: #4d5347; }

.ticket.skeleton {
  height: 62px;
  display: block;
  background: linear-gradient(100deg, rgba(246, 236, 218, .1) 30%, rgba(246, 236, 218, .18) 50%, rgba(246, 236, 218, .1) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
  box-shadow: none;
}

/* 空位：像登记簿里还没填写的横格 */
.ticket.ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  background: transparent;
  border: 1px dashed rgba(246, 236, 218, .24);
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  color: rgba(246, 236, 218, .36);
}
.ticket.ghost::after { display: none; }
@keyframes shimmer { to { background-position: -180% 0; } }

.ticket.is-new { animation: ticketIn .62s var(--ease) both; }
.ticket.is-new .t-status { animation: stampSmall .55s .2s var(--ease) both; }
@keyframes stampSmall {
  0% { opacity: 0; transform: rotate(-4deg) scale(2.4); }
  70% { opacity: 1; transform: rotate(-4deg) scale(.92); }
  100% { opacity: 1; transform: rotate(-4deg) scale(1); }
}
@keyframes ticketIn {
  from { opacity: 0; transform: translateY(-14px) rotate(-1.2deg) scale(.96); }
  to { opacity: 1; transform: none; }
}

.wall-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(246, 236, 218, .16);
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  color: rgba(246, 236, 218, .38);
}
.wall-foot b { color: var(--amber-lt); }
.stamp-mini {
  color: rgba(183, 71, 60, .9);
  border: 1px solid rgba(183, 71, 60, .5);
  padding: 1px 7px; border-radius: 2px;
  transform: rotate(-3deg);
  letter-spacing: .2em;
}

/* ───────────────────────── 申请书 ───────────────────────── */
.sheet {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0) 160px),
    linear-gradient(158deg, rgba(250, 242, 226, .9), rgba(232, 217, 189, .84));
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow:
    0 44px 96px rgba(0, 0, 0, .55),
    0 2px 0 rgba(255, 255, 255, .3) inset,
    inset 0 40px 60px -50px rgba(255, 255, 255, .9);
  position: relative;
  overflow: hidden;
}
.sheet.narrow { max-width: 620px; }
.sheet::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .05; mix-blend-mode: multiply; pointer-events: none;
}
.sheet > * { position: relative; z-index: 1; }
.sheet::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(125% 95% at 50% 3%, transparent 50%, rgba(112, 78, 34, .18) 100%);
  mix-blend-mode: multiply;
  z-index: 0;
}

.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sheet-head h2 {
  margin: 0;
  font-family: var(--serif); font-size: clamp(24px, 3vw, 32px);
  font-weight: 600; letter-spacing: .1em;
}
.sheet-head .eyebrow { color: var(--wine); margin-bottom: 8px; letter-spacing: .2em; }
.sheet-no {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  white-space: nowrap;
}

.steps {
  display: flex; list-style: none; margin: 0 0 30px; padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps li {
  flex: 1;
  display: flex; align-items: center; gap: 9px;
  padding: 13px 10px;
  font-size: 13px; letter-spacing: .12em;
  color: var(--ink-3);
  border-right: 1px dashed var(--line-soft);
  transition: color .3s, background .3s;
}
.steps li:last-child { border-right: 0; }
.steps b {
  font-family: var(--serif); font-size: 12px; font-weight: 500;
  width: 21px; height: 21px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid currentColor;
  transition: background .3s, color .3s, border-color .3s;
}
.steps li.is-active { color: var(--ink); background: rgba(201, 138, 60, .1); }
.steps li.is-active b { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.steps li.is-done { color: var(--teal); }
.steps li.is-done b { background: var(--teal); color: #f2e9d6; border-color: var(--teal); }

.step-pane { animation: paneIn .42s var(--ease) both; }
@keyframes paneIn {
  from { opacity: 0; transform: translateX(16px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

.field { margin-bottom: 22px; }
.field > label {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px; letter-spacing: .16em;
  color: var(--ink-2);
}
.field > label em {
  font-style: normal; font-size: 9px; letter-spacing: .1em;
  color: var(--wine); border: 1px solid rgba(138, 47, 39, .35);
  padding: 0 4px; border-radius: 2px;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans); font-size: 15px;
  color: var(--ink);
  background: rgba(255, 253, 246, .6);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
textarea { resize: vertical; min-height: 108px; line-height: 1.7; font-family: var(--serif); }
input::placeholder, textarea::placeholder { color: rgba(58, 44, 28, .32); }
input:focus, textarea:focus {
  border-color: var(--amber);
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(201, 138, 60, .14);
}
input.is-bad, textarea.is-bad { border-color: var(--wine-lt); box-shadow: 0 0 0 3px rgba(183, 71, 60, .12); }

.hint { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.field-foot { display: flex; align-items: center; justify-content: space-between; }
.counter { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, .45);
  color: var(--ink-2);
  font-size: 13.5px; letter-spacing: .08em;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.chip:hover { border-color: var(--amber); }
.chip.is-on {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
  box-shadow: 0 6px 16px rgba(26, 22, 17, .22);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.slider-row { display: flex; align-items: center; gap: 18px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px;
  background: linear-gradient(90deg, var(--amber) var(--pct, 50%), rgba(58, 44, 28, .18) var(--pct, 50%));
  border-radius: 4px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fdf4e3, #c98a3c 68%);
  border: 1px solid #8a5b1e;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .3);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #c98a3c; border: 1px solid #8a5b1e; cursor: grab;
}
#levelOut {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .08em; color: var(--ink-2);
  min-width: 74px; text-align: right;
}
.scale {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .14em; color: var(--ink-3);
}

.check {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px;
  align-items: start;
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  cursor: pointer;
  margin: 6px 0 4px;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 18px; height: 18px; margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 253, 246, .7);
  position: relative;
  transition: all .2s;
}
.check input:checked + .box { background: var(--teal); border-color: var(--teal); }
.check input:checked + .box::after {
  content: "";
  position: absolute; left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid #f4ead7; border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(47, 91, 80, .22); }
.check.is-bad { color: var(--wine); }

.pane-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 30px; padding-top: 20px;
  border-top: 1px dashed var(--line);
}

/* ───────── 人机核验 ───────── */
.verify-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 253, 246, .55);
  border: 1px solid var(--line);
}
.verify-head { display: flex; align-items: center; justify-content: space-between; }
.verify-head h3 {
  margin: 0; font-family: var(--serif); font-size: 16px;
  letter-spacing: .14em; font-weight: 600;
}
.badge {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(58, 44, 28, .08);
  color: var(--ink-3);
}
.badge.ok { background: rgba(47, 91, 80, .14); color: var(--teal); }
.badge.bad { background: rgba(138, 47, 39, .12); color: var(--wine); }
.verify-sub { margin: 8px 0 16px; font-size: 12px; color: var(--ink-3); }

.captcha {
  position: relative;
  height: 148px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(58, 44, 28, .28);
  background: #1d1710;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .6);
  user-select: none;
  touch-action: pan-y;
}
.captcha canvas { width: 100%; height: 100%; display: block; }
.notch {
  position: absolute; top: 50%; left: 0;
  width: 34px; height: 46px;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(230, 182, 115, .95);
  border-radius: 4px;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .9), 0 0 14px rgba(230, 182, 115, .22);
  background: rgba(0, 0, 0, .55);
  pointer-events: none;
}
.piece {
  position: absolute; top: 50%; left: 0;
  width: 34px; height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  border: 1px solid rgba(255, 246, 230, .92);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 4px, transparent 4px 8px),
    linear-gradient(140deg, #f3cd97, #c98a3c 68%, #a86c26);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .72);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.piece.is-on { opacity: 1; }
.cap-hint {
  position: absolute; right: 10px; bottom: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: rgba(246, 236, 218, .45);
}

.rail {
  position: relative;
  height: 50px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(58, 44, 28, .09);
  border: 1px solid rgba(58, 44, 28, .2);
  overflow: hidden;
}
.rail-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(201, 138, 60, .28), rgba(230, 182, 115, .5));
}
.rail-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12.5px; letter-spacing: .16em;
  color: var(--ink-3);
  pointer-events: none;
  transition: opacity .2s;
}
.knob {
  position: absolute; left: 3px; top: 3px;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #2a1c0c;
  background: radial-gradient(circle at 34% 28%, #fdf3e0, #d9a24a 62%, #a86c26);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
  cursor: grab;
  touch-action: none;
  transition: box-shadow .2s;
}
.knob:active { cursor: grabbing; box-shadow: 0 3px 10px rgba(0, 0, 0, .45), inset 0 2px 6px rgba(0, 0, 0, .18); }
.knob:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.rail.is-ok .rail-fill { background: linear-gradient(90deg, rgba(47, 91, 80, .3), rgba(47, 91, 80, .55)); }
.rail.is-ok .knob { background: radial-gradient(circle at 34% 28%, #eafbf0, #6fb98c 60%, #2f5b50); }
.rail.is-bad .knob { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.pow-bar {
  margin-top: 14px; height: 3px; border-radius: 3px;
  background: rgba(58, 44, 28, .1);
  overflow: hidden;
}
.pow-bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .25s linear; }
.pow-note { margin: 7px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-3); }

/* ───────────────────────── 回执 ───────────────────────── */
.receipt-wrap { max-width: 520px; margin: 0 auto; text-align: center; }
#page-done:not([hidden]) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64vh;
}
.receipt {
  position: relative;
  padding: 30px 28px 22px;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)' opacity='.5'/%3E%3C/svg%3E"),
    linear-gradient(165deg, #f8efdd, #e8d9bc);
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
  text-align: left;
  overflow: hidden;
  animation: receiptIn .7s var(--ease) both;
}
/* 顶部齿孔 */
.receipt::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 11px;
  background-image: radial-gradient(circle at 7px 6px, rgba(12, 9, 6, .62) 3.2px, transparent 3.8px);
  background-size: 15px 11px;
  pointer-events: none;
}
@keyframes receiptIn {
  from { opacity: 0; transform: translateY(24px) rotate(-1.4deg) scale(.97); }
  to { opacity: 1; transform: none; }
}
.receipt-top {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  color: var(--ink-3);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.receipt h2 {
  margin: 22px 0 4px;
  font-family: var(--serif); font-size: 26px; letter-spacing: .12em; font-weight: 600;
}
.receipt-sub { margin: 0 0 24px; font-size: 12.5px; color: var(--ink-3); }
.receipt-id {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.receipt-id span { font-size: 12px; letter-spacing: .18em; color: var(--ink-3); }
.receipt-id strong { font-family: var(--mono); font-size: 15px; letter-spacing: .1em; }
.receipt-id strong.mono { font-size: 13px; color: var(--teal); }
.receipt-actions { display: flex; gap: 10px; margin: 24px 0 20px; }
.receipt-actions .btn { height: 40px; font-size: 12.5px; flex: 1; }
.receipt-actions .btn-ghost { color: var(--ink-2); border-color: var(--line); background: rgba(255, 253, 246, .5); }
.receipt-actions .btn-ghost:hover { background: rgba(255, 253, 246, .9); }
.tear {
  height: 1px;
  margin: 0 -28px 16px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}
.receipt-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink-3);
}
.receipt-bottom b { color: var(--wine); }
.stamp {
  font-family: var(--serif); font-size: 13px; letter-spacing: .2em;
  color: rgba(138, 47, 39, .78);
  border: 2px solid rgba(138, 47, 39, .55);
  border-radius: 4px;
  padding: 3px 9px;
  transform: rotate(-7deg);
  animation: stampIn .6s .45s var(--ease) both;
}
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(-7deg) scale(2.2); }
  70% { opacity: 1; transform: rotate(-7deg) scale(.94); }
  100% { opacity: 1; transform: rotate(-7deg) scale(1); }
}
.receipt-tip { margin: 22px 0 0; font-size: 11.5px; color: rgba(246, 236, 218, .4); letter-spacing: .06em; }

/* ───────────────────────── 查进度 ───────────────────────── */
.status-form { display: grid; gap: 16px; }
.status-form .btn { justify-self: start; margin-top: 4px; }
.status-result { margin-top: 30px; padding-top: 24px; border-top: 1px dashed var(--line); animation: paneIn .5s var(--ease) both; }

.progress-line { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.pl-node { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pl-node i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--line);
  background: rgba(255, 253, 246, .8);
  transition: all .4s;
}
.pl-node span { font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; }
.pl-node.is-done i { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(47, 91, 80, .12); }
.pl-node.is-done span { color: var(--teal); }
.pl-node.is-bad i { background: var(--wine); border-color: var(--wine); box-shadow: 0 0 0 4px rgba(138, 47, 39, .12); }
.pl-node.is-bad span { color: var(--wine); }
.pl-bar { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.pl-bar i { position: absolute; inset: 0; width: 0; background: var(--teal); transition: width .6s var(--ease); }

.status-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.status-detail p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.status-detail p.wide { grid-column: 1 / -1; }
.status-detail span { font-size: 10.5px; letter-spacing: .16em; color: var(--ink-3); }
.status-detail b { font-family: var(--mono); font-size: 13.5px; letter-spacing: .04em; font-weight: 500; }

/* ───────────────────────── 页脚 / 提示 ───────────────────────── */
.foot {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: 10px;
  padding: 26px 20px 34px;
  font-size: 11px; letter-spacing: .1em;
  color: rgba(246, 236, 218, .3);
}
.foot-sep { opacity: .4; }

.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(26, 22, 17, .88);
  color: var(--paper);
  border: 1px solid rgba(246, 236, 218, .16);
  backdrop-filter: blur(16px);
  font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  z-index: 100;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { border-color: rgba(183, 71, 60, .5); color: #ffd9d4; }

/* ───────────────────────── 页面转场 ───────────────────────── */
@keyframes vtOutUp {
  to { opacity: 0; transform: translateY(-18px) scale(.985); filter: blur(5px); }
}
@keyframes vtInUp {
  from { opacity: 0; transform: translateY(24px) scale(.99); filter: blur(5px); }
}
@keyframes vtOutLeft {
  to { opacity: 0; transform: translateX(-26px) scale(.98); filter: blur(6px); }
}
@keyframes vtInRight {
  from { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(6px); }
}
@keyframes vtOutRight {
  to { opacity: 0; transform: translateX(26px) scale(.98); filter: blur(6px); }
}
@keyframes vtInLeft {
  from { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(6px); }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .42s;
  animation-timing-function: cubic-bezier(.22, .8, .28, 1);
  animation-fill-mode: both;
}

html[data-dir="fwd"]::view-transition-old(root) { animation-name: vtOutLeft; }
html[data-dir="fwd"]::view-transition-new(root) { animation-name: vtInRight; animation-duration: .5s; }
html[data-dir="back"]::view-transition-old(root) { animation-name: vtOutRight; }
html[data-dir="back"]::view-transition-new(root) { animation-name: vtInLeft; animation-duration: .5s; }
html[data-dir="up"]::view-transition-old(root) { animation-name: vtOutUp; }
html[data-dir="up"]::view-transition-new(root) { animation-name: vtInUp; animation-duration: .5s; }

/* 不支持 View Transitions 时的兜底 */
@supports not (view-transition-name: none) {
  .page.is-entering { animation: vtInUp .45s var(--ease) both; }
}

/* ───────────────────────── 响应式 ───────────────────────── */
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr; }
  .ticket-wall { position: static; }
  .ticket-scroll { height: 340px; }
}

@media (max-width: 700px) {
  .topbar { gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
  .brand-text b { font-size: 15px; letter-spacing: .12em; }
  .nav { order: 3; width: 100%; justify-content: space-between; margin: 0; }
  .nav a { flex: 1; text-align: center; padding: 7px 8px; font-size: 12.5px; }
  .topbar-meta { margin-left: auto; font-size: 11px; }
  .title { font-size: clamp(44px, 13.5vw, 62px); letter-spacing: .06em; }
  .lede { font-size: 14.5px; line-height: 1.85; }
  .stats { gap: 18px; }
  .sheet { padding: 22px 18px; border-radius: 16px; }
  .ticket-wall { min-height: 320px; margin-top: 8px; }
  .steps li { padding: 11px 4px; font-size: 11.5px; gap: 6px; justify-content: center; }
  .steps li span { display: inline; font-size: 11px; letter-spacing: .06em; }
  .steps li b { width: 22px; height: 22px; font-size: 11px; }
  .pane-actions { flex-direction: column-reverse; align-items: stretch; }
  .pane-actions .btn { width: 100%; }
  .status-detail { grid-template-columns: 1fr; }
  .receipt-actions { flex-direction: column; }
  .captcha { height: 118px; }
  .notch, .piece { height: 38px; width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .orb { animation: none; }
}
