:root {
  --bg: #05060f;
  --ink: #eef1ff;
  --muted: #98a0c4;
  --accent: #8aa2ff;
  --glow: rgba(138, 162, 255, 0.4);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-brd: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  transition: --accent 0.6s ease;
}

/* ── atmosphere ── */
.bg-aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 20% 12%, var(--glow), transparent 60%),
    radial-gradient(46vw 46vw at 82% 20%, rgba(120, 90, 220, 0.28), transparent 62%),
    radial-gradient(50vw 50vw at 55% 108%, rgba(40, 90, 160, 0.30), transparent 60%);
  filter: blur(40px) saturate(1.2);
  animation: drift 22s ease-in-out infinite alternate;
  transition: background 0.7s ease;
}
@keyframes drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
.bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 90px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 210px 160px, #cfe0ff, transparent),
    radial-gradient(1px 1px at 80px 200px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 270px 50px, #ffe9cf, transparent);
  background-size: 320px 320px;
  opacity: 0.5;
  animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.28; } 50% { opacity: 0.55; } }

/* ── frame ── */
.frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  text-align: center;
}
.scene { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.25rem; font-weight: 600;
}
.year {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(4.5rem, 22vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 80px var(--glow);
  margin-bottom: 1.5rem;
}
.lead { font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 500; margin-bottom: 0.6rem; }
.muted { color: var(--muted); font-size: clamp(0.95rem, 2vw, 1.1rem); max-width: 44ch; margin: 0 auto 2rem; line-height: 1.55; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 1rem;
  color: var(--ink); background: var(--glass);
  border: 1px solid var(--glass-brd); cursor: pointer; text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary {
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ffffff));
  color: #06070f; border: none; box-shadow: 0 12px 34px var(--glow);
}
.btn.primary:hover { box-shadow: 0 16px 46px var(--glow); }
.btn.ghost { background: transparent; }
.arr { transition: transform 0.2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ── forks / choices ── */
.q {
  font-family: 'Unbounded', sans-serif; font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.choices.tokens { grid-template-columns: repeat(3, 1fr); }
.choice {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1.5rem 1rem;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 20px; cursor: pointer; color: var(--ink);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}
.choice:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.ch-glyph { font-size: 1.8rem; line-height: 1; margin-bottom: 0.3rem; }
.c-fire .ch-glyph { color: #ff6a3d; }
.c-flow .ch-glyph { color: #38d6c8; }
.c-silence .ch-glyph { color: #a78bfa; }
.c-fire:hover { box-shadow: 0 16px 40px rgba(255, 106, 61, 0.28); border-color: #ff6a3d; }
.c-flow:hover { box-shadow: 0 16px 40px rgba(56, 214, 200, 0.28); border-color: #38d6c8; }
.c-silence:hover { box-shadow: 0 16px 40px rgba(167, 139, 250, 0.28); border-color: #a78bfa; }
.ch-title { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 1.05rem; }
.ch-sub { color: var(--muted); font-size: 0.85rem; }

/* ── passage ── */
.p-mark { color: var(--accent); font-size: 2rem; line-height: 0.5; margin-bottom: 1rem; }
.p-title { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.p-body { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.65; max-width: 52ch; margin: 0 auto 2rem; }

/* ── finale ── */
.done {
  font-family: 'Unbounded', sans-serif; font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4.5rem); letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 70px var(--glow); margin-bottom: 1rem;
}
.recap { font-size: clamp(1.05rem, 2.4vw, 1.35rem); margin-bottom: 0.5rem; }
.recap b { color: var(--accent); font-weight: 700; }
.actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }

/* ── footer ── */
.cred {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  padding: 0.9rem; font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--muted);
}
.cred .tech { color: var(--accent); font-weight: 600; }
.cred a { color: var(--muted); text-decoration: none; }
.cred a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .choices, .choices.tokens { grid-template-columns: 1fr; }
  .cred { flex-direction: column; gap: 0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .bg-aurora, .bg-stars { animation: none; }
}

/* ── language switcher ── */
.lang-switch {
  position: fixed; top: 18px; right: 18px; z-index: 3;
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 999px; backdrop-filter: blur(12px);
}
.lang {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-family: 'Manrope', sans-serif; font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.05em;
  padding: 5px 10px; border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang:hover { color: var(--ink); }
.lang.on { color: #06070f; background: var(--accent); }

/* ── lunar / chinese new year ── */
.lunar .eyebrow { margin-bottom: 0.75rem; }
.hanzi {
  font-family: 'Unbounded', serif;
  font-size: clamp(4rem, 16vw, 8rem);
  line-height: 1;
  font-weight: 800;
  background: linear-gradient(180deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 70px var(--glow);
  margin-bottom: 0.75rem;
}

/* ── countdown ── */
.countdown { margin: 1.75rem auto; }
.cd-label {
  font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.9rem; font-weight: 600;
}
.cd-grid { display: flex; gap: 0.6rem; justify-content: center; }
.cd-cell {
  display: flex; flex-direction: column; align-items: center;
  min-width: 78px; padding: 0.9rem 0.6rem;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 16px; backdrop-filter: blur(12px);
}
.cd-num {
  font-family: 'Unbounded', sans-serif; font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink); text-shadow: 0 0 24px var(--glow);
}
.cd-u { margin-top: 0.35rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 480px) {
  .cd-cell { min-width: 62px; padding: 0.7rem 0.4rem; }
}

/* ── blessing ── */
.blessing {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  font-weight: 400;
  color: var(--ink);
  max-width: 44ch; margin: 1.25rem auto 0.5rem;
  line-height: 1.4;
  opacity: 0.95;
}

/* ── cn / greg toggle ── */
.cn-toggle {
  display: inline-flex; gap: 4px; margin: 1.25rem auto 0;
  padding: 4px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-brd); backdrop-filter: blur(12px);
}
.cn-toggle button {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-family: 'Manrope', sans-serif; font-weight: 600;
  font-size: 0.78rem; padding: 5px 12px; border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.cn-toggle button:hover { color: var(--ink); }
.cn-toggle button.on { color: #06070f; background: var(--accent); }

/* ── calendar row ── */
.cal-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.btn.sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.cal-ico { font-size: 0.9rem; }
