/* ============================================================
   ThetaIO · 庆中秋 迎国庆
   全屏分屏翻页 · 近黑基础设施 / 单色精确
   ============================================================ */

:root {
  --brand-black: #090909;
  --brand-black-deep: #050505;
  --brand-black-soft: #101010;
  --brand-white: #ffffff;
  --brand-paper: #f3f2ee;
  --brand-paper-deep: #e7e5df;
  --brand-line: #cfcdc6;
  --brand-sage: #b9c7a7;

  --surface-dark: #09090b;
  --surface-dark-elevated: #18181b;
  --surface-dark-soft: #27272a;
  --on-dark: #fafafa;
  --on-dark-body: #d4d4d8;
  --on-dark-muted: #a1a1aa;

  --success: #059669;
  --warning: #f59e0b;
  --error: #dc2626;
  --error-soft: #f87171;

  --font-display: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-brand: "Outfit", "Plus Jakarta Sans", sans-serif;
  --font-editorial: Georgia, "Songti SC", "STSong", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;

  --r-xs: 3px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-2xl: 16px;
  --r-full: 9999px;

  --m-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --m-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-page: 760ms cubic-bezier(0.65, 0, 0.35, 1);

  --shell: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* hidden 属性必须永远生效，避免被 display:flex 等规则覆盖 */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--brand-black-deep);
  color: var(--on-dark-body);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
/* 颗粒 / 网格氛围 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 80%);
}

::selection { background: var(--brand-sage); color: var(--brand-black); }
a { color: inherit; text-decoration: none; }

/* ---------------- Topbar ---------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 64px;
  padding: 0 clamp(20px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.wordmark {
  font-family: var(--font-brand);
  font-weight: 750;
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-flex;
}
.wm-theta { color: var(--brand-white); }
.wm-io { color: #6b6b70; }

.topbar-tag {
  font-family: var(--font-brand);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #6b6b70;
}

/* ---------------- Pager ---------------- */

.pager {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pager-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pager-dot span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: #3f3f46;
  transition: background var(--m-normal), transform var(--m-normal);
}
.pager-dot:hover span { background: #6b6b70; }
.pager-dot.is-active span {
  background: var(--brand-white);
  transform: scale(1.5);
}

/* ---------------- Deck / pages ---------------- */

/* 原生 scroll-snap 翻页：滚动完全交给浏览器，不存在多余高度 */
.deck {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.page-inner {
  width: 100%;
  max-width: var(--shell);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 88px clamp(20px, 5vw, 56px) 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 每屏内容随翻页淡入位移 */
.page .reveal,
.page .eyebrow,
.page .hero-say,
.page .hero-lede,
.page .hero-cta,
.page .how-title,
.page .step,
.page .odds,
.page .pool-board,
.page .draw-title,
.page .draw-sub,
.page .draw-form,
.page .page-foot {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.page.is-active .reveal { opacity: 1; transform: none; }
.page.is-active .eyebrow { opacity: 1; transform: none; transition-delay: 40ms; }
.page.is-active .hero-say { opacity: 1; transform: none; transition-delay: 180ms; }
.page.is-active .hero-lede { opacity: 1; transform: none; transition-delay: 260ms; }
.page.is-active .hero-cta { opacity: 1; transform: none; transition-delay: 340ms; }
.page.is-active .how-title { opacity: 1; transform: none; transition-delay: 80ms; }
.page.is-active .step:nth-child(1) { opacity: 1; transform: none; transition-delay: 160ms; }
.page.is-active .step:nth-child(2) { opacity: 1; transform: none; transition-delay: 230ms; }
.page.is-active .step:nth-child(3) { opacity: 1; transform: none; transition-delay: 300ms; }
.page.is-active .step:nth-child(4) { opacity: 1; transform: none; transition-delay: 370ms; }
.page.is-active .odds { opacity: 1; transform: none; transition-delay: 160ms; }
.page.is-active .pool-board { opacity: 1; transform: none; transition-delay: 240ms; }
.page.is-active .draw-title { opacity: 1; transform: none; transition-delay: 60ms; }
.page.is-active .draw-sub { opacity: 1; transform: none; transition-delay: 130ms; }
.page.is-active .draw-form { opacity: 1; transform: none; transition-delay: 210ms; }
.page.is-active .page-foot { opacity: 1; transform: none; transition-delay: 300ms; }

/* ---------------- Shared type ---------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: var(--on-dark-muted);
  margin: 0 0 var(--s-lg);
}
.eyebrow-rule { width: 36px; height: 1px; background: var(--brand-line); opacity: 0.45; }

/* ---------------- 01 Hero ---------------- */

.hero-inner { max-width: var(--shell); }

.hero-title {
  margin: 0 0 var(--s-lg);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 9.4vw, 118px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
}
.hero-title > span { display: block; }
.hero-em {
  font-family: var(--font-editorial);
  font-style: italic;
  color: var(--brand-white);
}

.hero-say {
  margin: 0 0 var(--s-md);
  font-family: var(--font-editorial);
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.5;
  color: var(--brand-paper);
  letter-spacing: -0.01em;
}

.hero-lede {
  max-width: 46ch;
  margin: 0 0 var(--s-xxl);
  font-size: clamp(14.5px, 1.35vw, 16.5px);
  line-height: 1.9;
  color: var(--on-dark-body);
}
.hero-lede b { color: var(--on-dark); font-weight: 600; }
.hero-lede em {
  font-family: var(--font-editorial);
  color: var(--on-dark);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 26px;
  border: 1px solid var(--brand-white);
  border-radius: var(--r-lg);
  background: var(--brand-white);
  color: var(--brand-black);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--m-fast), background var(--m-fast), opacity var(--m-fast);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); background: #f0f0ef; }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-arrow { font-family: var(--font-brand); transition: transform var(--m-fast); }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }

.btn-ghost {
  height: 48px;
  padding: 0 22px;
  border: 1px solid #3f3f46;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--on-dark-body);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--m-fast), color var(--m-fast), background var(--m-fast);
}
.btn-ghost:hover { border-color: #71717a; color: var(--on-dark); background: rgba(255,255,255,0.03); }

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-brand);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #6b6b70;
  transition: color var(--m-fast);
}
.scroll-cue:hover { color: var(--on-dark-muted); }
.scroll-cue i {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, #3f3f46, transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: linear-gradient(to bottom, transparent, var(--brand-sage));
  animation: cue 2.4s ease-in-out infinite;
}

/* ---------------- 02 How ---------------- */

.how-inner { max-width: var(--shell); }
.prizes-inner { max-width: 900px; }

.how-title {
  margin: 0 0 var(--s-xxl);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--on-dark);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #1c1c1f;
  border: 1px solid #1c1c1f;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.step {
  background: var(--brand-black-deep);
  padding: var(--s-xl) var(--s-lg) var(--s-lg);
  transition: background var(--m-normal);
}
.step:hover { background: var(--brand-black-soft); }
.step-num {
  display: block;
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: #6b6b70;
  margin-bottom: var(--s-lg);
}
.step h3 {
  margin: 0 0 var(--s-xs);
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: 19px;
  color: var(--on-dark);
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--on-dark-body);
}

.odds {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 72px);
  margin-top: var(--s-xxl);
  padding-top: var(--s-xl);
  border-top: 1px solid #1c1c1f;
}
.odds-figure { display: flex; flex-direction: column; }
.odds-num {
  font-family: var(--font-brand);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1;
  color: var(--on-dark);
  letter-spacing: -0.03em;
}
.odds-unit { font-size: 0.44em; font-weight: 500; color: var(--on-dark-muted); margin-left: 2px; }
.odds-label {
  margin-top: 8px;
  font-family: var(--font-brand);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b6b70;
}

/* ---------------- Pool board ---------------- */

.pool-board {
  margin-top: var(--s-xl);
  border: 1px solid #1c1c1f;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.pool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  padding: 12px var(--s-md);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid #1c1c1f;
}
.pool-label {
  font-family: var(--font-brand);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.pool-remain {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--on-dark-body);
}
.pool-rows { list-style: none; margin: 0; padding: 0; }
.pool-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 120px;
  align-items: center;
  gap: var(--s-md);
  padding: 11px var(--s-md);
  border-bottom: 1px solid #141416;
}
.pool-rows li:last-child { border-bottom: 0; }
.pool-name {
  font-size: 13.5px;
  color: var(--on-dark-body);
  display: flex;
  align-items: center;
  gap: var(--s-xs);
}
.pool-kind {
  font-family: var(--font-brand);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: #6b6b70;
  border: 1px solid #27272a;
  border-radius: var(--r-sm);
  padding: 1px 6px;
  flex: none;
}
.pool-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-muted);
  text-align: right;
}
.pool-bar {
  position: relative;
  height: 4px;
  border-radius: var(--r-full);
  background: #1c1c1f;
  overflow: hidden;
}
.pool-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  background: var(--brand-sage);
  border-radius: var(--r-full);
  transition: width var(--m-normal);
}
.pool-rows li.is-empty .pool-name { color: #52525b; }
.pool-rows li.is-empty .pool-bar i { background: #3f3f46; }
.pool-rows li.is-hidden .pool-left { color: #52525b; letter-spacing: 0.14em; }
.pool-rows li.is-hidden .pool-bar i { background: #3f3f46; }

/* ---------------- 03 Draw ---------------- */

.draw-inner {
  max-width: 620px;
  padding-bottom: 64px;
}

.draw-title {
  margin: 0 0 var(--s-xs);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--on-dark);
}
.draw-sub {
  margin: 0 0 var(--s-xl);
  font-size: 15px;
  color: var(--on-dark-muted);
}

.draw-form { display: flex; flex-direction: column; gap: var(--s-md); }

.field { display: flex; flex-direction: column; gap: var(--s-xs); }
.field-label {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.field input {
  height: 54px;
  width: 100%;
  padding: 0 18px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--on-dark);
  background: var(--brand-black-deep);
  border: 1px solid var(--surface-dark-soft);
  border-radius: var(--r-lg);
  outline: none;
  transition: border-color var(--m-fast), box-shadow var(--m-fast);
}
.field input::placeholder { color: #52525b; }
.field input:hover { border-color: #3f3f46; }
.field input:focus {
  border-color: var(--on-dark);
  box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.12);
}
.field input.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.field-hint { margin: 0; font-size: 12.5px; color: var(--on-dark-muted); }
.field-hint.error { color: var(--error-soft); }

.btn-draw {
  height: 54px;
  width: 100%;
  margin-top: 4px;
  font-size: 15px;
}
.btn-draw:disabled {
  background: #232326;
  border-color: #232326;
  color: #6b6b70;
  cursor: not-allowed;
  transform: none;
}
.btn-draw.busy .btn-label::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  vertical-align: -1px;
  border: 2px solid rgba(9, 9, 9, 0.28);
  border-top-color: var(--brand-black);
  border-radius: var(--r-full);
  animation: spin 0.7s linear infinite;
}

.form-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--on-dark-muted);
  min-height: 18px;
}
.form-note.error { color: var(--error-soft); }

.device-line {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: 9px 14px;
  border: 1px solid #1c1c1f;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.015);
}
.device-label {
  font-family: var(--font-brand);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: #6b6b70;
  flex: none;
}
.device-line code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--on-dark-body);
  word-break: break-all;
}

/* ---------------- Draw stage (抽签动画) ---------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: stage-in 300ms ease both;
  overflow-y: auto;
  padding: 40px 20px;
}
.stage.is-closing {
  animation: stage-out 360ms ease both;
}

/* 扫描线氛围 */
.stage-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  mask-image: radial-gradient(ellipse 65% 60% at 50% 50%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 50%, #000 10%, transparent 78%);
}

.stage-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.stage-label {
  margin: 0 0 28px;
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.24em;
  color: var(--on-dark-muted);
}
.stage-label.is-live #stage-label-text::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 11px;
  margin-left: 8px;
  vertical-align: -1px;
  background: var(--brand-sage);
  animation: caret 1s steps(1) infinite;
}

/* ---------------- 结果卡片 ---------------- */

.card-stage {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.reward-card {
  --mx: 0;
  --my: 0;
  --cursor-angle: 45deg;
  --edge-proximity: 0;
  --glow-intensity: 1;

  position: relative;
  width: min(520px, 88vw);
  aspect-ratio: 1.586 / 1;
  border-radius: 24px;
  transform-style: preserve-3d;
  transform:
    rotateY(calc(var(--mx) * 14deg))
    rotateX(calc(var(--my) * -14deg));
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.reward-card.is-drawing {
  opacity: 0.35;
  transform: scale(0.94);
  filter: blur(1px);
}
.reward-card.is-revealed {
  opacity: 1;
  transform:
    rotateY(calc(var(--mx) * 14deg))
    rotateX(calc(var(--my) * -14deg))
    scale(1);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 500ms ease,
    filter 500ms ease;
}

/* 外圈光晕：跟随 cursor-angle 的锥形扫光 */
.card-halo {
  position: absolute;
  inset: -40px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: plus-lighter;
  opacity: calc(var(--edge-proximity) / 100);
  transition: opacity 0.3s ease-out;
  mask-image: conic-gradient(
    from var(--cursor-angle) at center,
    black 2.5%,
    transparent 12%,
    transparent 88%,
    black 97.5%
  );
  -webkit-mask-image: conic-gradient(
    from var(--cursor-angle) at center,
    black 2.5%,
    transparent 12%,
    transparent 88%,
    black 97.5%
  );
}
.card-halo::before {
  content: "";
  position: absolute;
  inset: 40px;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px hsl(84deg 30% 72% / calc(90% * var(--glow-intensity))),
    inset 0 0 6px 0 hsl(84deg 30% 72% / calc(45% * var(--glow-intensity))),
    inset 0 0 18px 1px hsl(84deg 30% 72% / calc(28% * var(--glow-intensity))),
    inset 0 0 40px 2px hsl(84deg 30% 72% / calc(16% * var(--glow-intensity))),
    0 0 6px 0 hsl(84deg 30% 72% / calc(45% * var(--glow-intensity))),
    0 0 18px 1px hsl(84deg 30% 72% / calc(28% * var(--glow-intensity))),
    0 0 40px 2px hsl(84deg 30% 72% / calc(16% * var(--glow-intensity)));
}

/* 边缘描边光 */
.card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  border: 1px solid transparent;
  opacity: calc(var(--edge-proximity) / 100);
  transition: opacity 0.3s ease-out;
  background:
    linear-gradient(var(--edge-fill, #0d0d0f) 0 100%) padding-box,
    conic-gradient(
      from var(--cursor-angle) at center,
      var(--brand-sage) 0deg,
      hsl(84deg 30% 72% / 30%) 40deg,
      transparent 90deg,
      transparent 200deg,
      hsl(84deg 30% 72% / 45%) 300deg,
      var(--brand-sage) 360deg
    ) border-box;
  mask-image: conic-gradient(
    from var(--cursor-angle) at center,
    black 0%,
    transparent 14%,
    transparent 86%,
    black 100%
  );
  -webkit-mask-image: conic-gradient(
    from var(--cursor-angle) at center,
    black 0%,
    transparent 14%,
    transparent 86%,
    black 100%
  );
}

/* 卡面 */
.card-surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 12% 0%, rgba(185, 199, 167, 0.10), transparent 55%),
    radial-gradient(90% 80% at 88% 100%, rgba(255, 255, 255, 0.035), transparent 60%),
    linear-gradient(158deg, #131316 0%, #0a0a0c 48%, #0e0e11 100%);
  border: 1px solid #26262a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 12px 28px rgba(0, 0, 0, 0.5),
    0 36px 80px rgba(0, 0, 0, 0.6);
  transform: translateZ(0);
}
.card-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      112deg,
      transparent 30%,
      rgba(255, 255, 255, 0.035) 45%,
      rgba(255, 255, 255, 0.055) 50%,
      rgba(255, 255, 255, 0.035) 55%,
      transparent 70%
    ),
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 45%);
  background-size: 100% 100%, 30px 30px, 30px 30px, 100% 100%;
}
.card-surface::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  pointer-events: none;
  z-index: 1;
}

/* 鼠标高光 */
.card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  background: radial-gradient(
    420px circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    rgba(255, 255, 255, 0.10),
    transparent 60%
  );
}
.reward-card.is-hover .card-sheen { opacity: 1; }

/* 卡面内容 */
.card-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 32px 38px;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-eyebrow {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.2em;
  color: var(--on-dark-muted);
}

.card-tier {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(185, 199, 167, 0.35);
  color: var(--brand-sage);
  background: rgba(185, 199, 167, 0.07);
}
.card-tier[data-kind="cash"] {
  border-color: rgba(216, 180, 138, 0.38);
  color: #d8b48a;
  background: rgba(216, 180, 138, 0.07);
}

.card-amount {
  margin: auto 0 0;
  font-family: var(--font-brand);
  font-size: clamp(34px, 7vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand-white);
  font-variant-numeric: tabular-nums;
}
.card-amount .unit {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--on-dark-muted);
  margin-left: 4px;
  letter-spacing: 0;
}

.card-title {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--brand-sage);
  letter-spacing: 0.01em;
}

.card-divider {
  height: 1px;
  margin: 22px 0 16px;
  background: linear-gradient(to right, #27272a, transparent);
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}
.card-meta dt {
  font-family: var(--font-brand);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6b70;
  margin-bottom: 4px;
}
.card-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--on-dark-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#card-code { color: var(--brand-sage); letter-spacing: 0.08em; }
.reward-card.is-cash #card-code { color: #d8b48a; }

.card-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--on-dark-muted);
}

/* 中奖 / 未中奖 / 红包 配色 */
.reward-card.is-lost { --edge-fill: #0b0b0d; }
.reward-card.is-lost .card-amount {
  color: var(--on-dark);
  letter-spacing: -0.02em;
}
.reward-card.is-lost .card-title { color: var(--on-dark-muted); }
.reward-card.is-lost .card-halo::before {
  box-shadow:
    inset 0 0 0 1px hsl(0deg 0% 60% / calc(35% * var(--glow-intensity))),
    inset 0 0 18px 1px hsl(0deg 0% 60% / calc(14% * var(--glow-intensity))),
    0 0 18px 1px hsl(0deg 0% 60% / calc(14% * var(--glow-intensity)));
}
.reward-card.is-lost .card-glow {
  background:
    linear-gradient(#0b0b0d 0 100%) padding-box,
    conic-gradient(from var(--cursor-angle) at center,
      #71717a 0deg, transparent 90deg, transparent 270deg, #71717a 360deg) border-box;
}
.reward-card.is-cash .card-title { color: #d8b48a; }
.reward-card.is-cash .card-amount { color: #ecd9be; }
.reward-card.is-cash .card-halo::before {
  box-shadow:
    inset 0 0 0 1px hsl(34deg 45% 68% / calc(85% * var(--glow-intensity))),
    inset 0 0 6px 0 hsl(34deg 45% 68% / calc(42% * var(--glow-intensity))),
    inset 0 0 18px 1px hsl(34deg 45% 68% / calc(26% * var(--glow-intensity))),
    inset 0 0 40px 2px hsl(34deg 45% 68% / calc(15% * var(--glow-intensity))),
    0 0 6px 0 hsl(34deg 45% 68% / calc(42% * var(--glow-intensity))),
    0 0 18px 1px hsl(34deg 45% 68% / calc(26% * var(--glow-intensity)));
}
.reward-card.is-cash .card-glow {
  background:
    linear-gradient(var(--edge-fill, #0d0d0f) 0 100%) padding-box,
    conic-gradient(from var(--cursor-angle) at center,
      #d8b48a 0deg, hsl(34deg 45% 68% / 30%) 40deg, transparent 90deg,
      transparent 200deg, hsl(34deg 45% 68% / 45%) 300deg, #d8b48a 360deg) border-box;
}

/* 终端日志 */
.stage-log {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  width: min(520px, 88vw);
  min-height: 76px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.95;
  color: var(--on-dark-muted);
}
.stage-log li {
  opacity: 0;
  animation: log-in 280ms ease forwards;
}
.stage-log li::before {
  content: "› ";
  color: var(--brand-sage);
}
.stage-log li.is-done::after {
  content: " ok";
  color: var(--brand-sage);
}

@keyframes stage-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes stage-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes log-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes caret {
  50% { opacity: 0; }
}

/* ---------------- Result ---------------- */

.result {
  margin-top: var(--s-lg);
  border: 1px solid var(--surface-dark-soft);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  background: var(--brand-black-deep);
  animation: rise 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.result[data-won="1"] {
  border-color: rgba(185, 199, 167, 0.42);
  background: linear-gradient(180deg, rgba(185, 199, 167, 0.055), transparent 55%), var(--brand-black-deep);
}

.result-head { display: flex; align-items: center; gap: var(--s-xs); margin-bottom: var(--s-sm); }
.result-head span:last-child {
  font-family: var(--font-brand);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  color: var(--on-dark-muted);
}

.result-title {
  margin: 0 0 var(--s-xs);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--on-dark);
}
.result[data-won="1"] .result-title { color: var(--brand-sage); }
.result[data-kind="cash"][data-won="1"] .result-title { color: var(--brand-paper); }

.result-body { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--on-dark-body); }
.result-body b { color: var(--on-dark); font-weight: 600; }

.code-box {
  margin: var(--s-md) 0 0;
  border: 1px solid var(--surface-dark-soft);
  border-radius: var(--r-md);
  padding: var(--s-md);
  background: var(--surface-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  flex-wrap: wrap;
}
.code-label {
  display: block;
  font-family: var(--font-brand);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 4px;
}
.code-value {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--on-dark);
  word-break: break-all;
}
.code-copy {
  border: 1px solid var(--surface-dark-soft);
  background: transparent;
  color: var(--on-dark-body);
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 15px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--m-fast), color var(--m-fast);
}
.code-copy:hover { background: var(--surface-dark-soft); color: var(--on-dark); }

.result-meta {
  margin: var(--s-md) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--s-lg);
  font-size: 12px;
  color: var(--on-dark-muted);
}
.result-meta b { color: var(--on-dark-body); font-weight: 500; }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  flex: none;
  background: var(--on-dark-muted);
}
.status-dot[data-state="ok"] {
  background: var(--brand-sage);
  box-shadow: 0 0 0 3px rgba(185, 199, 167, 0.14);
}
.status-dot[data-state="muted"] { background: #3f3f46; }

.page-foot {
  margin-top: var(--s-xl);
  padding-top: var(--s-lg);
  border-top: 1px solid #1c1c1f;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
  font-size: 12px;
  color: #6b6b70;
}
.dot-sep { color: #3f3f46; }

/* ---------------- Animations ---------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cue {
  0% { transform: translateY(-14px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .page-inner { padding: 84px clamp(20px, 6vw, 40px) 76px; }
}

@media (max-width: 640px) {
  .pager { right: 8px; gap: 10px; }
  .pager-dot { width: 18px; height: 18px; }
  .topbar { height: 54px; }
  .topbar-tag { display: none; }

  .page-inner { padding: 62px 20px 54px; }
  .eyebrow { margin-bottom: var(--s-md); }
  .hero-title { font-size: clamp(42px, 15vw, 64px); }
  .hero-say { font-size: 20px; margin-bottom: var(--s-sm); }
  .hero-lede { margin-bottom: var(--s-lg); }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary,
  .hero-cta .btn-ghost { width: 100%; height: 46px; }
  .scroll-cue { bottom: 16px; }

  .steps { grid-template-columns: repeat(2, 1fr); }
  .how-title { margin-bottom: var(--s-lg); font-size: clamp(24px, 8vw, 32px); }
  .step { padding: var(--s-md) var(--s-sm); }
  .step-num { margin-bottom: var(--s-sm); }
  .step h3 { font-size: 16px; }
  .step p { font-size: 12.5px; line-height: 1.7; }

  .odds { margin-top: var(--s-md); gap: 18px 28px; }
  .odds-num { font-size: clamp(26px, 9vw, 34px); }

  .pool-board { margin-top: var(--s-md); }
  .pool-head { padding: 10px 12px; }
  .pool-rows li { grid-template-columns: minmax(0, 1fr) 68px; padding: 9px 12px; }
  .pool-bar { display: none; }

  .draw-title { font-size: clamp(28px, 9vw, 38px); }
  .code-box { flex-direction: column; align-items: stretch; }
  .code-copy { width: 100%; }

  .stage { padding: 24px 16px; }
  .stage-label { margin-bottom: 20px; font-size: 10px; }
  .reward-card { width: min(440px, 92vw); }
  .card-body { padding: 24px 24px; }
  .card-amount { font-size: clamp(30px, 11vw, 40px); }
  .card-divider { margin: 16px 0 12px; }
  .stage-log { width: min(440px, 92vw); margin-top: 24px; }
}

@media (max-height: 700px) {
  .page-inner { padding-top: 72px; padding-bottom: 56px; }
  .hero-title { font-size: clamp(38px, 8vw, 76px); }
  .how-title { margin-bottom: var(--s-md); }
  .odds { margin-top: var(--s-md); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .page .reveal,
  .page .eyebrow,
  .page .hero-say,
  .page .hero-lede,
  .page .hero-cta,
  .page .how-title,
  .page .step,
  .page .odds,
  .page .pool-board,
  .page .draw-title,
  .page .draw-sub,
  .page .draw-form,
  .page .page-foot { opacity: 1 !important; transform: none !important; }

  .stage-log li { opacity: 1 !important; animation: none; }
  .stage-label.is-live #stage-label-text::after { animation: none; }
  .reward-card,
  .reward-card.is-revealed { transform: none !important; }
}
