/* Babata GPT shop, design B "会员卡" (V picked it 2026-12-04; tokens and rules in docs/DESIGN.md).
   White page, near-black ink, one memorable thing: the membership card in titanium, graphite or black.
   Everything else stays quiet: no resting shadows, no colour except WeChat green and Alipay blue at payment. */
:root {
  --page: #ffffff;
  --soft: #f4f4f5;
  --ink: #17171a;
  --ink-hover: #333338;
  --muted: #6f6f76;
  --faint: #9a9aa1;
  --line: #e6e6e9;
  --line-strong: #d6d6da;
  --ok: #157a4f;
  --ok-bg: #ecf6f0;
  --warn: #8a5300;
  --warn-bg: #fbf4e6;
  --bad: #b3342b;
  --bad-bg: #fbeeed;
  --wx: #07c160;
  --ali: #1677ff;
  --radius-lg: 24px;
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  /* kept for older markup */
  --bg: var(--page);
  --surface: #ffffff;
  --link: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: #fff; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 720px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { color: var(--ink); font: 600 20px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); font-size: 14px; padding: 12px 0; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- type ---------- */
h1 { text-wrap: balance; font-family: var(--display); font-size: clamp(26px, 3.2vw, 34px); line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 22px; line-height: 1.35; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 17px; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 0;
  cursor: pointer; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease);
}
.btn:active:not([disabled]) { transform: scale(.985); }
.btn-primary, .btn-ink { background: var(--ink); color: #fff; }
.btn-primary:hover, .btn-ink:hover { background: var(--ink-hover); }
.btn-ghost, .btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover, .btn-line:hover { background: #fafafa; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 16px; border-radius: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn .spin, .btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; flex: none; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .8s linear infinite;
}
.btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.btn[aria-busy="true"] .dot { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-wx { background: var(--wx); }
.dot-ali { background: var(--ali); }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.input, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; font-size: 16px; padding: 12px 14px; min-height: 48px;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 23, 26, .08); }
.input-code { font-family: var(--mono); font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.textarea { min-height: 150px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.5; }

/* ---------- panels & notes ---------- */
.panel { background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: inset 0 0 0 1px var(--line); }
.note { border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin: 0 0 14px; }
.note-ok { background: var(--ok-bg); color: #0f5e3c; }
.note-warn { background: var(--warn-bg); color: #6a4000; }
.note-bad { background: var(--bad-bg); color: #8a241d; }
.note-info { background: var(--soft); color: var(--ink); }
.note strong { font-weight: 600; }
.note .check { margin: 10px 0 0; background: rgba(255, 255, 255, .6); box-shadow: none; }
.qr-box .note { margin: 12px 0 8px; text-align: left; font-size: 13px; }

/* ---------- the membership card (the one bold thing) ---------- */
.tier {
  container-type: inline-size;
  position: relative; isolation: isolate; aspect-ratio: 1.586; border-radius: 6.8% / 10.8%; padding: 6% 7%;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  box-shadow: 0 30px 44px -30px rgba(0, 0, 0, .42), 0 12px 22px -14px rgba(0, 0, 0, .22);
}
.tier::after { /* fine grain, like brushed metal */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tier::before { /* one soft sheen */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%);
}
.tier-head, .tier-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 4cqi; }
.tier-foot { align-items: flex-end; }
.tier-name { font: 600 7cqi/1.1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.tier-name small { display: block; font-size: .5em; font-weight: 500; letter-spacing: 0; opacity: .8; margin-bottom: .5cqi; }
.tier-period { font-size: 3.6cqi; white-space: nowrap; }
.tier-code { font: 500 4.6cqi/1 var(--display); letter-spacing: .18em; white-space: nowrap; }
.tier-code[data-code], .tier-code.reveal { font: 600 5cqi/1 var(--mono); letter-spacing: .04em; }
.tier-brand { font: 600 3.9cqi/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.tier-plus { background: linear-gradient(115deg, #fdfdfd 0%, #e6e6e9 36%, #f8f8f9 52%, #d9d9dd 100%); color: #8d8d93; text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
.tier-plus .tier-name { color: #6c6c72; }
.tier-plus .tier-code[data-code], .tier-plus .tier-code.reveal { color: #3d3d42; }
.tier-pro100 { background: linear-gradient(115deg, #74767b 0%, #45474c 38%, #5d5f64 54%, #2c2e31 100%); color: rgba(255, 255, 255, .62); text-shadow: 0 -1px 0 rgba(0, 0, 0, .3); }
.tier-pro100 .tier-name, .tier-pro100 .tier-code[data-code], .tier-pro100 .tier-code.reveal { color: rgba(255, 255, 255, .92); }
.tier-pro200 { background: linear-gradient(115deg, #2e2e31 0%, #121213 42%, #1f1f21 56%, #050506 100%); color: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 44px -30px rgba(0, 0, 0, .55), 0 12px 22px -14px rgba(0, 0, 0, .3); }
.tier-pro200 .tier-name, .tier-pro200 .tier-code[data-code], .tier-pro200 .tier-code.reveal { color: #e8e3d8; }

/* the code "prints" onto the card when delivered */
.tier-code.reveal span { display: inline-block; opacity: 0; transform: translateY(6px); animation: print .35s var(--ease) forwards; }
@keyframes print { to { opacity: 1; transform: none; } }

/* ---------- home: one screen, one price ---------- */
.first { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding: 40px 0 24px; min-height: min(calc(100vh - 108px), 760px); }
.first h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.16; margin: 0; }
.first .sub { margin: 16px 0 0; color: var(--muted); font-size: 17px; max-width: 26em; }
.first .note { margin: 20px 0 0; }
.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 36px 0 0; padding: 5px; border: 0; border-radius: 18px; background: var(--soft); min-height: 64px; }
.picker label { position: relative; cursor: pointer; }
.picker input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.picker span { display: block; padding: 10px 8px; border-radius: 13px; text-align: center; transition: background-color .25s var(--ease), box-shadow .25s var(--ease); }
.picker b { display: block; font: 600 16px/1.3 var(--display); letter-spacing: -0.01em; }
.picker i { display: block; font-style: normal; font-size: 13px; line-height: 1.3; color: var(--muted); }
.picker input:checked + span { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px -4px rgba(0, 0, 0, .08); }
.picker input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.picker-skel { border-radius: 13px; background: linear-gradient(90deg, #ececee, #f7f7f8, #ececee); background-size: 200% 100%; animation: shimmer 1.4s infinite; min-height: 54px; }
.offer { margin-top: 28px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.price { font: 600 72px/1 var(--display); letter-spacing: -0.04em; white-space: nowrap; }
.price sup { font-size: 30px; letter-spacing: 0; vertical-align: .95em; margin-right: 2px; font-weight: 500; }
.period { color: var(--muted); font-size: 16px; display: flex; gap: 10px; align-items: baseline; }
.period s { color: var(--faint); }
.feats { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feats li { font-size: 14px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.stock-out { margin: 16px 0 0; color: var(--warn); font-size: 14px; }
.perks { display: grid; gap: 10px; margin: 20px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--soft); font-size: 15px; }
.perk { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; cursor: pointer; }
label.perk { justify-content: flex-start; }
.perk input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.perk-note { margin: 0; color: var(--muted); font-size: 13px; }
.pay-password { margin: 20px 0 0; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.pay .btn { min-height: 56px; border-radius: 16px; font-size: 16px; }
.pay-free { grid-column: 1 / -1; }
.first .pay + .note, .first .note + .note { margin-top: 14px; }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.stage { position: relative; aspect-ratio: 1 / .92; border-radius: 32px; background: radial-gradient(120% 80% at 50% 0%, #fbfbfb 0%, #f0f0f2 60%, #e9e9ec 100%); display: grid; place-items: center; overflow: hidden; perspective: 1400px; }
.stage .tier { position: absolute; width: 74%; opacity: 0; transform: rotateX(14deg) rotateY(-16deg) rotateZ(4deg) translateY(16px); transition: transform .7s var(--ease), opacity .5s var(--ease); box-shadow: 0 50px 70px -40px rgba(0, 0, 0, .45), 0 18px 30px -18px rgba(0, 0, 0, .25); }
.stage .tier-pro200 { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 50px 70px -40px rgba(0, 0, 0, .6), 0 18px 30px -18px rgba(0, 0, 0, .35); }
.stage .tier.on { opacity: 1; transform: rotateX(14deg) rotateY(-16deg) rotateZ(4deg) translateY(0); }

.band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 64px 0; border-top: 1px solid var(--line); margin-top: 48px; }
.band b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.band p { margin: 0; color: var(--muted); font-size: 15px; }
.block { padding: 24px 0 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; }
.block h2 { margin: 0; font-size: 28px; }
.block + .block { padding-top: 88px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font: 600 22px/1.3 var(--display); color: var(--faint); }
.steps h3 { margin: 0 0 4px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 17px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--faint); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 0 20px; color: var(--muted); max-width: 40em; font-size: 15px; }

.foot { padding: 96px 0 48px; color: var(--faint); font-size: 13px; }
.mobile-pay { display: none; }

/* ---------- pay dialog ---------- */
dialog.sheet { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(420px, calc(100vw - 24px)); background: #fff; color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); }
dialog.sheet::backdrop { background: rgba(23, 23, 26, .4); }
.sheet-inner { padding: 22px 24px 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.qr-box { text-align: center; }
.qr-frame { width: 220px; height: 220px; margin: 6px auto 12px; padding: 10px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; position: relative; }
.qr-frame img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-frame .qr-mask { position: absolute; inset: 0; border-radius: 16px; background: rgba(255, 255, 255, .95); display: grid; place-items: center; padding: 16px; font-weight: 600; }
.qr-amount { font: 600 36px/1.2 var(--display); letter-spacing: -0.02em; margin: 0; }
.qr-meta { color: var(--muted); font-size: 14px; }
.countdown { font-variant-numeric: tabular-nums; }

/* ---------- order page ---------- */
.order-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 48px; align-items: start; padding: 32px 0 40px; }
.order-grid.is-topup { grid-template-columns: minmax(0, 560px); }
.status-line { list-style: none; padding: 0; margin: 0 0 22px; display: flex; }
.status-line li { flex: 1; font-size: 13px; color: var(--faint); padding-top: 10px; border-top: 2px solid var(--line); margin-right: 6px; }
.status-line li.done, .status-line li.now { color: var(--ink); border-color: var(--ink); }
.status-line li.now { font-weight: 600; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; font-size: 14px; margin: 18px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.copy-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 14px; }
.skeleton { background: linear-gradient(90deg, #ececee, #f7f7f8, #ececee); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- redeem ---------- */
.redeem-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 32px 0 40px; align-items: start; }
.stepper { list-style: none; margin: 0; padding: 0; position: sticky; top: 16px; }
.stepper li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--faint); font-size: 15px; }
.stepper .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: #fff; }
.stepper li.now { color: var(--ink); font-weight: 600; }
.stepper li.now .dot { background: var(--ink); color: #fff; box-shadow: none; }
.stepper li.done { color: var(--ink); }
.stepper li.done .dot { background: var(--soft); color: var(--ink); box-shadow: none; }
.plan-strip { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); margin-bottom: 18px; }
.plan-strip .tier { width: 84px; flex: none; padding: 7px 9px; justify-content: center; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .35); }
.plan-strip .tier .tier-name { font-size: 17cqi; }
.plan-strip .tier .tier-name small, .plan-strip .tier .tier-period, .plan-strip .tier .tier-foot { display: none; }
.how { list-style: none; counter-reset: how; margin: 4px 0 12px; padding: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.how li { counter-increment: how; display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.how li + li { border-top: 1px solid var(--line); }
.how li::before { content: counter(how); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); }
.how li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.how b { font-size: 14px; font-weight: 600; }
.how span { color: var(--muted); font-size: 12px; }
.how .btn { flex: none; min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.used-box { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--warn-bg); color: #6a4000; font-size: 14px; }
.used-box p { margin: 0 0 4px; }
.used-box b { font-weight: 600; }
.used-box .copy-row { margin: 10px 0 4px; }
.used-box .qr-box { margin-top: 10px; padding: 14px; border-radius: var(--radius); background: #fff; text-align: center; color: var(--ink); }
.used-box .qr-box img { display: block; margin: 0 auto 8px; }
.share-link { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); font-size: 13px; color: var(--muted); }
.share-link p { margin: 0 0 8px; }
.share-link b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.share-row { display: flex; align-items: center; gap: 10px; }
.share-url { flex: 1; min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.share-row .btn { flex: none; min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.parsed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; font-size: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); margin: 0 0 14px; }
.parsed dt { color: var(--muted); }
.parsed dd { margin: 0; font-weight: 600; word-break: break-all; }
.confirm-big { font-size: 19px; line-height: 1.5; margin: 0 0 16px; }
.confirm-big b { word-break: break-all; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; margin-bottom: 16px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.result-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.result-icon.ok { background: var(--ok-bg); color: var(--ok); }
.result-icon.wait { background: var(--soft); color: var(--ink); }
.result-icon.bad { background: var(--bad-bg); color: var(--bad); }
.result-icon.warn { background: var(--warn-bg); color: var(--warn); }
.progress { height: 4px; border-radius: 2px; background: var(--soft); overflow: hidden; margin: 14px 0; }
.progress i { display: block; height: 100%; width: 40%; background: var(--ink); border-radius: 2px; animation: indeterminate 1.6s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- query / my orders ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.panel.list { padding: 6px 28px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- help ---------- */
.section { padding: 48px 0 8px; }
.guide { counter-reset: g; list-style: none; padding: 0; margin: 0; }
.guide > li { counter-increment: g; position: relative; padding: 0 0 26px 52px; }
.guide > li::before { content: counter(g); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; }
.guide > li::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 2px; background: var(--line); }
.guide > li:last-child::after { display: none; }
.mock-json { font-family: var(--mono); font-size: 12px; background: var(--soft); border-radius: var(--radius); padding: 12px 14px; color: var(--muted); overflow-x: auto; white-space: pre; margin: 10px 0 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }

/* ---------- accounts ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 32px 0 8px; }
.auth h1 { font-size: 30px; }
.center { text-align: center; }
.linklike { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; font-size: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linklike:hover { text-decoration-color: currentColor; }
.key { font-family: var(--mono); font-size: 19px; letter-spacing: .06em; text-align: center; padding: 16px 12px; margin: 14px 0 12px; border-radius: var(--radius); background: var(--soft); word-break: break-all; user-select: all; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 14px; margin: 14px 0 16px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
#account > .panel { margin-top: 18px; }
.coupon-total { margin: 0; font-size: 15px; }
.coupon-total b { font: 600 30px/1.2 var(--display); letter-spacing: -0.02em; margin-right: 2px; }
.link-box { display: flex; gap: 8px; margin-top: 4px; }
.link-box .input { font-family: var(--mono); font-size: 13px; min-width: 0; }
.stats { display: flex; gap: 40px; margin-top: 20px; }
.stat b { display: block; font: 600 30px/1.2 var(--display); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.count-stepper { display: inline-flex; align-items: center; gap: 6px; }
.count-stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink); }
.count-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.count-stepper output { min-width: 24px; text-align: center; font-weight: 600; }

/* Email code: the input and its send button share one row */
.code-row { display: flex; gap: 10px; }
.code-row .input { flex: 1; min-width: 0; letter-spacing: .12em; }
.code-row .btn { flex: none; min-width: 118px; white-space: nowrap; }

/* Customer-service contacts: footer IDs copy on click; help page has a card */
.cs { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.cs:hover { color: var(--ink); }
.cs-card { display: grid; gap: 12px; }
.cs-line { display: flex; align-items: center; gap: 14px; }
.cs-line > span { width: 36px; }
.cs-line > strong { flex: 1; font-size: 17px; }
.cs-card p { margin: 2px 0 0; }

/* ---------- admin: dense and quiet, the data is the content ---------- */
.wide { max-width: 1360px; }
.admin-title { font-size: 26px; margin: 18px 0 14px; }
.admin-h2 { margin: 30px 0 10px; font-size: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.tile { background: #fff; padding: 16px 18px; }
.tile span { display: block; color: var(--muted); font-size: 13px; }
.tile b { font: 600 24px/1.3 var(--display); letter-spacing: -0.01em; }
.tile small { color: var(--muted); margin-left: 3px; }
.admin-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.admin-cols .panel { padding: 20px 22px; }
.admin-cols h2 { font-size: 17px; margin-bottom: 8px; }
table.mini { border-collapse: collapse; width: 100%; font-size: 14px; }
.mini th, .mini td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.mini thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.mini td { font-variant-numeric: tabular-nums; }
.import-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.import-row .field { margin-bottom: 0; }
.import-row .btn { min-width: 110px; }
#import-form { margin-bottom: 26px; }
#import-form h2 { font-size: 18px; }
#import-count { margin: 10px 0 0; }
#import-result { margin-top: 14px; }
#import-result .list { max-height: 240px; overflow: auto; }
.grow { flex: 1 1 220px; min-width: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.toolbar .input { min-height: 42px; }
.select { width: auto; padding-right: 28px; }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; min-width: 1080px; font-size: 13.5px; }
.grid td.nw, .grid td.nw .mono { white-space: nowrap; word-break: normal; }
.grid th { position: sticky; top: 0; background: #fafafa; text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.grid td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.5; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: #fafafa; }
.grid .mono { font-size: 12.5px; }
.gpt { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.gpt b { font-weight: 600; word-break: break-all; }
.gpt .mono { color: var(--muted); font-size: 11.5px; }
.warn-text { color: var(--warn); }
.wrap-text { max-width: 260px; }
.empty { margin: 14px 2px; }
.more { margin: 14px 0 0; }
.grant { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.grant .input { min-height: 42px; width: 130px; }
.grant .grow { width: auto; }
#user-detail .kv { margin: 0 0 4px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .first { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-top: 8px; }
  .stage { order: -1; aspect-ratio: 1 / .7; border-radius: 26px; }
  .stage .tier { width: 70%; }
  .band, .block { grid-template-columns: 1fr; gap: 24px; }
  .band { padding: 48px 0; margin-top: 16px; }
  .block + .block { padding-top: 56px; }
  .order-grid, .redeem-grid { grid-template-columns: 1fr; gap: 24px; }
  .order-grid > :first-child { max-width: 420px; }
  .stepper { position: static; display: flex; justify-content: space-between; }
  .stepper li { flex-direction: column; gap: 4px; font-size: 12px; padding: 0; }
}
@media (max-width: 760px) {
  .admin-cols { grid-template-columns: 1fr; }
  /* tables turn into one block per row, each cell labelled */
  .grid thead { display: none; }
  table.grid, .grid tbody, .grid tr, .grid td { display: block; width: 100%; min-width: 0; }
  .grid td.nw, .grid td.nw .mono { white-space: normal; word-break: break-all; }
  .grid tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .grid td { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; padding: 3px 0; border: 0; }
  .grid td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; }
  .grid td[data-label=""]::before { content: none; }
  .grid tbody tr:hover td { background: none; }
  .wrap-text { max-width: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .top { min-height: 60px; }
  .nav { gap: 18px; }
  .nav a { font-size: 14px; }
  .panel { padding: 22px 18px; border-radius: 20px; }
  .panel.list { padding: 4px 18px; }
  .how li { flex-wrap: wrap; row-gap: 10px; }
  .how li > div { flex: 1 1 calc(100% - 36px); }
  .how li .btn { margin-left: 36px; }
  .price { font-size: 60px; }
  .picker { margin-top: 24px; }
  .home .pay-inline { display: none; }
  .home .mobile-pay {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 -1px 0 var(--line);
  }
  .mobile-pay .btn { flex: 1; min-height: 50px; border-radius: 14px; font-size: 15px; padding: 0 12px; }
  .home .foot { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .home .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .nav a.hide-sm:not([aria-current]) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage .tier, .btn, .picker span, .faq summary::after { transition: none; }
  .tier-code.reveal span { animation: none; opacity: 1; transform: none; }
  .btn .spin, .btn[aria-busy="true"]::before { animation-duration: 2s; }
  .skeleton, .picker-skel { animation: none; }
  .progress i { animation: none; width: 100%; opacity: .35; }
}
.brand small { margin-left: 10px; font: 400 13px/1 var(--font); letter-spacing: 0; color: var(--muted); }
.nw { white-space: nowrap; }
/* narrow pages: the header stays as wide as the home page's, only the content narrows */
.wrap.narrow { max-width: 1180px; }
.wrap.narrow > :not(.top) { max-width: 720px; margin-left: auto; margin-right: auto; }
.link-box .btn { flex: none; white-space: nowrap; }
@media (max-width: 360px) {
  .nav a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .wrap.wide .top { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
  .wrap.wide .nav { width: 100%; overflow-x: auto; gap: 20px; }
}

/* invite offer: a quiet pill above the headline, and a section under the first screen */
.promo { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 5px 5px 5px 14px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 14px; text-decoration: none; transition: background-color .2s var(--ease); }
.promo:hover { background: #ececee; }
.promo b { font-weight: 600; }
.promo span { padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.promo[data-state="loading"] span { visibility: hidden; }
.invite-list { list-style: none; margin: 0; padding: 0; }
.invite-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 20px 0; border-top: 1px solid var(--line); font-size: 17px; }
.invite-list li:last-child { border-bottom: 1px solid var(--line); }
.invite-list b { font-weight: 600; }
.invite-list span { color: var(--muted); }
#invite .fine { margin-top: 12px; }
.invite-cta { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
@media (max-width: 900px) { .first-copy { display: flex; flex-direction: column; } .promo { align-self: flex-start; } }
@media (max-width: 560px) { .promo { margin-bottom: 18px; } .invite-list li { font-size: 16px; } }

/* 客服 in the top nav: looks like the nav links, opens the contact dialog */
.nav .nav-cs { border: 0; background: none; padding: 12px 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.nav .nav-cs:hover { color: var(--ink); }
.cs-sheet .cs-line > strong { font-size: 16px; }
.cs-sheet .cs-card { padding-top: 4px; }
.cs-line > strong { white-space: nowrap; word-break: normal; }
@media (max-width: 360px) { .cs-line { gap: 10px; } .cs-line > span { width: 30px; } .cs-line .btn { padding: 0 14px; } }
