/* RunBite landing — styled like the game's HUD/panels (ink cards, gold edges,
   pixel headings). Tokens mirror lib/features/panels/presentation/panel_widgets.dart. */

@font-face {
  font-family: "INVIV Pixel";
  src: url("../assets/fonts/InvivPixel-Regular.woff2") format("woff2"), url("../assets/fonts/InvivPixel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../assets/fonts/BeVietnamPro-500.woff2") format("woff2"), url("../assets/fonts/BeVietnamPro-500.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../assets/fonts/BeVietnamPro-600.woff2") format("woff2"), url("../assets/fonts/BeVietnamPro-600.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --ink-950: #121827;
  --ink-900: #171e30;
  --ink-800: #20283a;
  --raised: #2a3348;
  --raised-hi: #343f58;
  --edge: #0b0f1a;
  --gold: #f3b83f;
  --gold-300: #ffd86a;
  --gold-sh: #c98a1f;
  --gold-35: rgba(243, 184, 63, .35);
  --gold-15: rgba(243, 184, 63, .15);
  --light: #f4efe4;
  --body: rgba(244, 239, 228, .78);
  --muted: rgba(244, 239, 228, .62);
  --grass: #b7e3a1;
  --water: #7fd0ee;
  --cream: #f1e3c6;
  --hp: #e43b44;
  --stamina: #63c74d;
  --info: #0099db;
  --pixel: "INVIV Pixel", ui-monospace, monospace;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-card: 14px;
  --r-panel: 20px;
  --r-btn: 12px;
  --gutter: 16px;
  --sec-y: 96px;
  /* INVIV Pixel (VT323) draws one font pixel per 52/1000 em: these sizes put
     font pixels on whole/half CSS pixels so headings stay crisp. */
  --px-1: 19.2308px;
  --px-15: 28.8462px;
  --px-2: 38.4615px;
  --px-3: 57.6923px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--ink-950);
  background-image:
    radial-gradient(rgba(255, 216, 106, .06) 1px, transparent 1.5px),
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(127, 208, 238, .10), transparent 70%);
  background-size: 24px 24px, 100% 100%;
  color: var(--light);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-300); }
button { font: inherit; color: inherit; }
.px { image-rendering: pixelated; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink-950); padding: 8px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 800px; }

/* ── Type ─────────────────────────────────────────────── */
.h2 {
  font-family: var(--pixel); font-weight: 400; color: var(--gold-300);
  font-size: var(--px-3); line-height: 1; margin: 0; letter-spacing: .5px;
}
.h3 {
  font-family: var(--pixel); font-weight: 400; color: var(--gold-300);
  font-size: var(--px-15); line-height: 1.05; margin: 0 0 8px;
  display: flex; align-items: center; gap: 12px;
}
.h3 img { flex: none; }
.eyebrow {
  font-family: var(--pixel); color: var(--water); font-size: 24px; line-height: 1;
  margin: 0 0 12px; letter-spacing: 1px; text-transform: uppercase;
}
.section__lead { color: var(--body); font-size: 18px; max-width: 600px; margin: 16px 0 0; }
p { margin: 0; }

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 24, 39, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold-15);
}
.topbar__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { flex: none; }
.brand img { width: 176px; height: 62px; max-width: none; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  font-family: var(--pixel); font-size: 22px; color: var(--light); text-decoration: none;
  padding: 6px 10px; border-radius: 10px; line-height: 1; white-space: nowrap;
}
.nav a:hover { background: var(--raised); color: var(--gold-300); }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex; background: var(--ink-800); border: 1.5px solid var(--gold-35);
  border-radius: 999px; padding: 3px;
}
.lang__btn {
  font-family: var(--pixel); font-size: 20px; line-height: 1; min-width: 44px; height: 36px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--gold); color: var(--ink-950); }

/* ── Buttons (PixelPanelButton) ───────────────────────── */
.btn {
  --b: var(--gold); --b-hi: var(--gold-300); --b-sh: var(--gold-sh); --t: var(--ink-950);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-btn);
  background: linear-gradient(var(--b-hi), var(--b) 45%);
  color: var(--t); text-decoration: none; cursor: pointer;
  border: 2px solid var(--edge);
  box-shadow: 0 4px 0 var(--b-sh), 0 4px 0 2px var(--edge), inset 0 2px 0 rgba(255, 255, 255, .45);
  font-family: var(--pixel); font-size: 26px; line-height: 1;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  position: relative; top: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active, .btn.is-pressed {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--b-sh), 0 0 0 2px var(--edge), inset 0 2px 0 rgba(255, 255, 255, .3);
}
.btn--sm { min-height: 44px; font-size: 22px; padding: 0 16px; }
.btn--store {
  --b: #2a3348; --b-hi: #3b4763; --b-sh: #151b2b; --t: var(--light);
  border-color: var(--edge); outline: 1.5px solid var(--gold-35); outline-offset: -4px;
  padding: 0 20px 0 16px; min-height: 60px; text-align: left;
}
.btn--store span { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.btn--store small { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1; }
.btn--store b { font-family: var(--pixel); font-weight: 400; font-size: 28px; line-height: .9; color: var(--light); }
.btn--store svg { color: var(--gold-300); flex: none; }
.btn--ghost {
  --b: transparent; --b-hi: transparent; --b-sh: transparent; --t: var(--gold-300);
  background: transparent; border-color: transparent; box-shadow: none;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px;
  padding: 0 4px;
}
.btn--ghost:active { transform: translateY(2px); box-shadow: none; }

/* ── Chips / panels / paper ───────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  border-radius: 999px; background: var(--ink-800); border: 1.5px solid var(--gold-35);
  font-family: var(--pixel); font-size: 22px; line-height: 1; color: var(--gold-300);
}
.panel {
  background: var(--ink-800);
  border: 2px solid var(--gold);
  border-radius: var(--r-panel);
  box-shadow: 0 0 0 3px var(--edge), 0 24px 48px rgba(5, 10, 25, .55);
  position: relative;
}
.paper {
  background: var(--ink-950);
  border: 1.5px solid var(--gold-35);
  border-radius: var(--r-card);
  padding: 24px;
}

.btn--xl {
  min-height: 72px; padding: 10px 32px; flex-direction: column; gap: 4px; white-space: normal; text-align: center; line-height: 1;
  box-shadow: 0 5px 0 var(--b-sh), 0 5px 0 2px var(--edge), inset 0 2px 0 rgba(255, 255, 255, .5), 0 12px 32px rgba(243, 184, 63, .28);
}
.btn--xl:active { transform: translateY(5px); }
.btn__main { font-size: var(--px-2); line-height: .9; }
.btn__sub { font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.2; color: #3a2606; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Hero ─────────────────────────────────────────────── */
.hero { padding: 56px 0 64px; position: relative; overflow: hidden; }
.hero::before { /* soft gold glow behind the phone */
  content: ""; position: absolute; right: -10%; top: 0; width: 60%; height: 100%;
  background: radial-gradient(closest-side, rgba(243, 184, 63, .14), transparent 70%); pointer-events: none;
}
.hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 32px; align-items: center; position: relative; }
.hero__copy { position: relative; }
.hero__title {
  font-family: var(--pixel); font-weight: 400; font-size: var(--px-3); line-height: 1.02;
  color: var(--light); margin: 20px 0 20px; max-width: 680px;
}
.hero__title em { font-style: normal; color: var(--gold-300); }
.hero__lead { color: var(--body); font-size: 19px; max-width: 560px; margin-bottom: 32px; }
.hero__lead b { color: var(--light); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.cta--center { justify-content: center; }
.cta__note { margin-top: 16px; color: var(--muted); font-size: 14px; font-weight: 500; }
.cta__note--center { text-align: center; margin-top: 24px; }

/* steps → zombies → gold tally */
.tally {
  margin-top: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  background: var(--ink-800); border: 1.5px solid var(--gold-35); border-radius: var(--r-card);
  padding: 12px 16px; max-width: 560px;
}
.tally__cell { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 0; flex: 1 1 0; }
.tally__cell img { grid-row: span 2; }
.tally__cell b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; color: var(--light); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tally__cell span { font-size: 12px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.tally__cell--gold b { color: var(--gold-300); }
.tally__cell.is-bump b { animation: hop .3s ease-out; }
.tally__arrow { flex: none; width: 16px; height: 16px; background: var(--gold); clip-path: polygon(0 25%, 50% 25%, 50% 0, 100% 50%, 50% 100%, 50% 75%, 0 75%); opacity: .8; }
.tally__cap { margin-top: 8px; color: var(--muted); font-size: 12px; }

/* phone mockups */
.hero__art { position: relative; height: 620px; display: grid; place-items: center; }
.phone {
  width: 260px; padding: 10px; border-radius: 40px; background: #0b0f1a;
  border: 2px solid var(--gold-35); box-shadow: 0 16px 32px rgba(5, 10, 25, .55), inset 0 0 0 2px #2a3348;
  position: relative;
}
.phone img { width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 30px; image-rendering: auto; }
.phone--front { width: 284px; z-index: 2; border-color: var(--gold); box-shadow: 0 0 0 3px var(--edge), 0 32px 64px rgba(5, 10, 25, .7); transform: translateX(40px); }
.phone--back { position: absolute; width: 236px; left: 4%; top: 52px; transform: rotate(-8deg); opacity: .9; z-index: 1; }
.float {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--pixel); font-size: 22px; line-height: 1; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: rgba(18, 24, 39, .94); border: 1.5px solid; box-shadow: 0 8px 20px rgba(5, 10, 25, .5);
  animation: bob 2.4s ease-in-out infinite;
}
.float--auto { color: #9be08a; border-color: #3e8948; right: 0; top: 120px; }
.float--hp { color: #ffd3d6; border-color: rgba(228, 59, 68, .6); left: 10%; bottom: 72px; animation-delay: -1.2s; }

/* in-game workout screen (workout_overlay.dart) rebuilt in HTML */
.wk {
  position: relative; aspect-ratio: 390 / 844; border-radius: 30px; overflow: hidden;
  background: #0a0c12; color: #f4efe4; display: flex; flex-direction: column; padding: 18px 16px 16px;
}
.wk__head { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: var(--px-1); line-height: 1; color: var(--gold-300); }
.wk__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hp); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.wk__run {
  margin-left: auto; font-size: 16px; color: #0a0c12; background: var(--stamina); border-radius: 6px; padding: 3px 6px 2px;
  opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s;
}
.wk.is-running .wk__run { opacity: 1; transform: none; }
.wk__big { display: flex; flex-direction: column; align-items: center; margin-top: 40px; }
.wk__big b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-3); line-height: .9; font-variant-numeric: tabular-nums; }
.wk__big--km { margin-top: 20px; }
.wk__big--km b { color: var(--gold-300); }
.wk__big span, .wk__grid span { font-size: 11px; font-weight: 600; color: rgba(244, 239, 228, .55); margin-top: 4px; }
.wk__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 8px; margin-top: 28px; text-align: center; }
.wk__grid div { display: flex; flex-direction: column; align-items: center; }
.wk__grid b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; font-variant-numeric: tabular-nums; }
.wk__grid .is-green { color: #3ec96b; }
.wk__grid .is-gold { color: var(--gold); }
.wk__grid b.is-bump { animation: hop .3s ease-out; }
.wk__btns { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wk__btn {
  font-family: var(--pixel); font-size: 15px; line-height: 1.05; text-align: center; padding: 14px 4px; border-radius: 12px;
  background: #273049; border: 1.5px solid #3b4763;
}
.wk__btn--end { background: #8e2a33; border-color: #b8414b; }
.wk__toasts { position: absolute; left: 12px; right: 12px; bottom: 76px; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast {
  font-family: var(--sans); font-weight: 600; font-size: 12px; line-height: 1.2; color: var(--light);
  background: #20283a; border: 1.5px solid var(--gold); border-radius: 10px; padding: 7px 12px;
  animation: toast 1.8s ease forwards; white-space: nowrap;
}
.toast b { color: var(--gold-300); font-weight: 600; }
.toast--goal { border-color: var(--stamina); background: #173322; }
@keyframes toast {
  0% { opacity: 0; transform: translateY(10px) scale(.95); }
  12%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* sparkles (FX sprite strip sparkle.png: 4 x 8px) */
.spark, .fxloop--sparkle {
  position: absolute; width: 32px; height: 32px;
  background: url("../assets/fx/sparkle.png") 0 0 / 128px 32px no-repeat;
  image-rendering: pixelated;
  animation: fx4 .6s steps(4) infinite;
}
@keyframes fx4 { to { background-position-x: -128px; } }

/* ── How: pocket → reward story ───────────────────────── */
.story { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.story::before { /* dashed walking path linking the beats */
  content: ""; position: absolute; left: 12%; right: 12%; top: 104px; height: 4px; z-index: 0;
  background: repeating-linear-gradient(90deg, var(--gold-35) 0 12px, transparent 12px 24px);
  animation: march 1s linear infinite;
}
@keyframes march { to { background-position-x: 24px; } }
.beat { position: relative; padding: 28px 24px 28px; z-index: 1; }
.beat p { color: var(--body); }
.beat__num {
  position: absolute; top: -16px; left: 24px; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--gold); color: var(--ink-950);
  font-family: var(--pixel); font-size: 28px; border: 2px solid var(--edge);
  box-shadow: 0 3px 0 var(--gold-sh); z-index: 2;
}
.beat__art {
  position: relative; height: 152px; margin: 0 0 20px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(127, 208, 238, .12), transparent 70%), var(--ink-800);
  border: 1.5px solid var(--gold-15);
}
/* 1 — TẬP button gets pressed, the clock starts */
.tap-btn {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -52px 0 0 -44px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #4fd37a, #2a9e52); border: 3px solid var(--edge);
  box-shadow: 0 5px 0 #1d6b38, 0 5px 0 3px var(--edge); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  animation: press 2.4s ease-in-out infinite; z-index: 1;
}
.tap-btn b { font-family: var(--pixel); font-weight: 400; font-size: 22px; line-height: 1; color: var(--ink-950); }
@keyframes press { 0%, 30%, 46%, 100% { transform: none; box-shadow: 0 5px 0 #1d6b38, 0 5px 0 3px var(--edge); } 36%, 42% { transform: translateY(5px); box-shadow: 0 0 0 #1d6b38, 0 0 0 3px var(--edge); } }
.tap-ring { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -52px 0 0 -44px; border-radius: 50%; border: 3px solid #4fd37a; opacity: 0; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0%, 38% { opacity: 0; transform: scale(1); } 42% { opacity: .9; } 80%, 100% { opacity: 0; transform: scale(1.7); } }
.mini-clock { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-family: var(--pixel); font-size: 22px; line-height: 1; color: var(--light); background: #0a0c12; border-radius: 8px; padding: 4px 10px; }
.mini-clock i { font-style: normal; display: inline-block; animation: tick 2.4s steps(1) infinite; }
@keyframes tick { 0%, 40% { opacity: 1; } 40.01%, 100% { opacity: 1; color: var(--gold-300); } }
/* 2 — phone slides into a jeans pocket, rewards pop out */
.beat__art--pocket { background: repeating-linear-gradient(135deg, #2f4a75 0 4px, #2b446c 4px 8px); }
.beat__art--pocket::after { /* side seam */ content: ""; position: absolute; top: 0; bottom: 0; left: 18px; border-left: 2px dashed rgba(224, 181, 106, .5); }
.pocket { position: absolute; left: 50%; bottom: 0; width: 150px; height: 92px; margin-left: -75px; z-index: 1; }
.pocket::before { /* front panel with the opening shadow on top */
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: 4px 4px 44px 44px;
  background: repeating-linear-gradient(135deg, #42659c 0 4px, #3c5d91 4px 8px);
  border-top: 5px solid #1d2f4f; box-shadow: 0 -2px 0 #5b80b8, 0 6px 16px rgba(5, 10, 25, .45);
}
.pocket__lip { position: absolute; inset: 12px 10px 10px; z-index: 4; border: 2px dashed #e0b56a; border-radius: 2px 2px 34px 34px; }
.pocket__phone {
  position: absolute; left: 50%; top: -96px; width: 50px; height: 90px; margin-left: -25px; z-index: 2;
  background: #0b0f1a; border: 3px solid var(--edge); border-radius: 10px; box-shadow: inset 0 0 0 2px #2a3348;
  animation: slip 3.2s cubic-bezier(.4, 0, .2, 1) infinite;
}
.pocket__phone::after { content: ""; position: absolute; inset: 6px 5px 10px; border-radius: 4px; background: linear-gradient(#3ec96b, #1f7a40); opacity: .85; }
@keyframes slip { 0%, 12% { transform: translateY(0); } 38%, 100% { transform: translateY(64px); } }
.pop {
  position: absolute; display: inline-flex; align-items: center; gap: 4px; font-family: var(--pixel); font-size: 22px; line-height: 1;
  color: var(--gold-300); -webkit-text-stroke: 4px var(--ink-950); paint-order: stroke fill; opacity: 0; z-index: 4;
  animation: popup 3.2s ease-out infinite;
}
.pop small { font-size: 16px; color: var(--light); }
.pop--1 { left: 14%; top: 34px; color: #9be08a; animation-delay: .9s; }
.pop--2 { right: 14%; top: 22px; animation-delay: 1.5s; }
.pop--3 { left: 50%; top: 10px; margin-left: -40px; color: var(--water); animation-delay: 2.1s; }
@keyframes popup { 0% { opacity: 0; transform: translateY(14px) scale(.7); } 10% { opacity: 1; transform: translateY(0) scale(1.1); } 30% { opacity: 1; transform: translateY(-8px) scale(1); } 45%, 100% { opacity: 0; transform: translateY(-18px); } }
/* 3 — crate with rays (the away-trip reveal) */
.rays {
  position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  background: repeating-conic-gradient(rgba(62, 201, 107, .35) 0 12deg, transparent 12deg 30deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 75%); mask: radial-gradient(closest-side, #000 30%, transparent 75%);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.crate { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; animation: crate 2.4s ease-in-out infinite; }
@keyframes crate { 0%, 60%, 100% { transform: none; } 66% { transform: rotate(-6deg) scale(1.06); } 72% { transform: rotate(6deg) scale(1.06); } 78% { transform: none; } }
.burst { position: absolute; width: 28px; height: 28px; left: 50%; top: 50%; margin: -14px; background: url("../assets/icons/coin.png") 0 0 / 28px 28px; image-rendering: pixelated; opacity: 0; animation: burst 2.4s ease-out infinite; }
.burst--a { --dx: -70px; --dy: -46px; }
.burst--b { --dx: 72px; --dy: -40px; animation-delay: .08s; }
.burst--c { --dx: 4px; --dy: -62px; animation-delay: .16s; }
@keyframes burst { 0%, 76% { opacity: 0; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }

/* ── Scene ────────────────────────────────────────────── */
.scene-wrap { margin: 0; }
.scene {
  position: relative; height: 400px; overflow: hidden;
  border-radius: var(--r-panel);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px var(--edge), 0 24px 48px rgba(5, 10, 25, .55);
  background: var(--grass);
  isolation: isolate;
}
.scene__map {
  position: absolute; inset: 0;
  background:
    url("../assets/brand/map_strip.png") 0 64px / 512px 336px repeat-x,
    linear-gradient(#7fd0ee, #7fd0ee);
  image-rendering: pixelated;
}
.scene__layer { position: absolute; inset: 0; pointer-events: none; }
.scene__cap { color: var(--muted); font-size: 13px; text-align: center; margin-top: 12px; }

/* Sprite strips — frame width/height and count via custom props. */
.spr {
  position: absolute; width: var(--fw); height: var(--fh);
  background-repeat: no-repeat; background-position: 0 0;
  background-size: calc(var(--fw) * var(--n)) var(--fh);
  image-rendering: pixelated;
  animation: frames var(--dur, .5s) steps(var(--n)) infinite;
}
@keyframes frames { to { background-position-x: calc(var(--fw) * var(--n) * -1); } }
@keyframes framesOnce { to { background-position-x: calc(var(--fw) * (var(--n) - 1) * -1); } }
.once, .spr--player.is-attack, .zombie .spr.is-down, .fx {
  animation-name: framesOnce !important;
  animation-timing-function: steps(var(--n), jump-none) !important;
  animation-iteration-count: 1 !important;
  animation-fill-mode: forwards !important;
}
.spr--player { --fw: 192px; --fh: 192px; left: 0; top: 0; }
.spr--player.is-walk { --n: 5; --dur: .5s; background-image: url("../assets/sprites-v2/player_walk.png"); }
.spr--player.is-idle { --n: 4; --dur: .6s; background-image: url("../assets/sprites-v2/player_idle.png"); }
.spr--player.is-attack { --n: 2; --dur: .36s; background-image: url("../assets/sprites-v2/player_attack.png"); }
.spr--head { --fw: 192px; --fh: 192px; --n: 4; --dur: .6s; left: 0; top: 0; }
.spr--head.is-none { display: none; }

.actor { position: absolute; width: 192px; height: 192px; }
.actor--player { z-index: 3; }

/* Hats: 24x16 drawn at 3x. Bottom-centre pixel sits on the head anchor;
   --hdy lifts it for taller character hair (kCharacterHatDy x 2). */
.hat {
  position: absolute; width: 72px; height: 48px; left: 62px; top: -5px;
  background: url("../assets/hats/hat_non_la.png") 0 0 / 72px 48px no-repeat;
  image-rendering: pixelated;
}
.hat.is-none { display: none; }
.hat--walk { animation: hatWalk .5s infinite; }
@keyframes hatWalk {
  0%, 39.99% { transform: translate(0, 0); }
  40%, 59.99% { transform: translate(0, 2px); }
  60%, 79.99% { transform: translate(0, -2px); }
  80%, 100% { transform: translate(2px, -2px); }
}
.hat--idle { left: 64px; top: calc(-17px + var(--hdy, 0px)); animation: hatIdle .6s infinite; }
@keyframes hatIdle {
  0%, 24.99% { transform: translate(0, 0); }
  25%, 49.99% { transform: translate(0, -2px); }
  50%, 74.99% { transform: translate(4px, 0); }
  75%, 100% { transform: translate(6px, 0); }
}
.hat--attack { animation: hatAtk .36s forwards; }
@keyframes hatAtk {
  0%, 49.99% { transform: translate(-6px, 6px); }
  50%, 100% { transform: translate(0, 16px); }
}

/* Scene billboard (sign_classic colours). */
.sign {
  position: absolute; left: 50%; top: -44px; transform: translateX(-50%);
  background: #f3dfb5; color: #202334; border: 2px solid #121827; border-radius: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 13px; line-height: 1;
  padding: 6px 10px; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(18, 24, 39, .35);
}
.sign::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 2px; height: 6px;
  background: #121827; transform: translateX(-50%);
}

.spr--pet { --fw: 100px; --fh: 100px; --n: 4; --dur: .66s; z-index: 2;
  background-image: url("../assets/sprites-v2/pets/buffalo.png"); }

.zombie { position: absolute; width: 224px; height: 224px; z-index: 2; }
.zombie .spr { --fw: 224px; --fh: 224px; left: 0; top: 0; }
.zombie .spr.is-walk { --n: 4; --dur: .6s; }
.zombie .spr.is-hurt { --n: 2; --dur: .25s; }
.zombie .spr.is-down { --n: 4; --dur: .5s; }
.zombie.is-flash .spr { filter: brightness(2.6) saturate(.2); }
.zombie__tag {
  position: absolute; left: 50%; top: 52px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: opacity .2s;
}
.zombie.is-dead .zombie__tag { opacity: 0; }
.zombie__hp { width: 64px; height: 7px; background: var(--ink-950); border-radius: 4px; padding: 1px; }
.zombie__hp i { display: block; height: 100%; width: 100%; background: var(--hp); border-radius: 3px; transition: width .2s; }

.tag {
  font-family: var(--pixel); font-size: 18px; line-height: 1; letter-spacing: 1px;
  padding: 3px 7px 2px; border-radius: 6px; background: rgba(18, 24, 39, .88);
}
.tag--walker { color: #9be08a; }
.tag--runner { color: #2ce8f5; }
.tag--tank { color: #f6757a; }
.tag--boss { color: #ffd3d6; background: var(--hp); font-size: 22px; }

.fx { position: absolute; background-repeat: no-repeat; image-rendering: pixelated; pointer-events: none;
  animation: frames var(--dur) steps(var(--n)) 1 forwards; background-size: calc(var(--fw) * var(--n)) var(--fh);
  width: var(--fw); height: var(--fh); z-index: 5; }
.fx--hit { --fw: 96px; --fh: 96px; --n: 4; --dur: .29s; background-image: url("../assets/fx/hit.png"); }
.fx--poof { --fw: 120px; --fh: 120px; --n: 5; --dur: .36s; background-image: url("../assets/fx/poof.png"); }
.fx--dust { --fw: 48px; --fh: 48px; --n: 4; --dur: .29s; background-image: url("../assets/fx/dust.png"); z-index: 1; }

.dmg {
  position: absolute; z-index: 6; font-family: var(--pixel); font-size: 44px; line-height: 1;
  color: #fff; -webkit-text-stroke: 6px var(--ink-950); paint-order: stroke fill;
  animation: dmg .8s ease-out forwards; pointer-events: none;
}
.dmg--gold { color: var(--gold-300); font-size: 36px; }
@keyframes dmg {
  0% { transform: translate(-50%, 8px) scale(.6); opacity: 0; }
  15% { transform: translate(-50%, -6px) scale(1.15); opacity: 1; }
  70% { transform: translate(-50%, -36px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -52px) scale(1); opacity: 0; }
}
.coin {
  position: absolute; width: 32px; height: 32px; z-index: 7;
  background: url("../assets/icons/coin.png") 0 0 / 32px 32px; image-rendering: pixelated;
  pointer-events: none;
}
.prop { position: absolute; image-rendering: pixelated; }
.prop--pin { width: 48px; height: 66px; z-index: 1; }
.prop--pin img { width: 48px; height: 66px; animation: bob 1.2s ease-in-out infinite; }
.prop--pin .fxloop--sparkle { left: 30px; top: -6px; }

.hud {
  position: absolute; z-index: 8; display: flex; align-items: center; gap: 8px;
  background: rgba(18, 24, 39, .92); border: 1.5px solid var(--gold-35); border-radius: 14px;
  padding: 8px 12px; font-family: var(--pixel); color: var(--light); line-height: 1;
  box-shadow: 0 4px 12px rgba(5, 10, 25, .35);
}
.hud--steps { left: 12px; top: 12px; padding: 6px 12px 6px 6px; }
.hud__steps { display: flex; flex-direction: column; gap: 5px; }
.hud__num { font-size: 22px; color: var(--muted); }
.hud__num b { color: var(--light); font-weight: 400; }
.bar { display: block; width: 120px; height: 8px; background: var(--raised); border-radius: 4px; overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 70%; background: var(--info); border-radius: 4px; transition: width .3s; }
.hud--gold { right: 12px; top: 12px; font-size: 24px; border-radius: 999px; padding: 6px 14px 6px 8px; }
.hud--gold b { font-weight: 400; color: var(--gold-300); min-width: 52px; display: inline-block; }
.hud--gold.is-hop { animation: hop .3s ease-out; }
.coin16 { width: 24px; height: 24px; }
.hud--auto { right: 12px; bottom: 12px; font-size: 22px; border-radius: 999px; padding: 6px 14px 6px 10px; color: #0a2412; background: #3ec96b; border-color: var(--edge); }
.hud--auto img { filter: brightness(0) saturate(0); opacity: .7; }
@keyframes hop { 40% { transform: translateY(-6px) scale(1.06); } }

.street-label {
  position: absolute; z-index: 1; left: 0; top: 260px;
  font-family: var(--sans); font-weight: 600; font-size: 13px; color: #6a6478;
  letter-spacing: .5px; white-space: nowrap; pointer-events: none;
}

/* ── Sections ─────────────────────────────────────────── */
.section { padding: var(--sec-y) 0; position: relative; }
section[id], .panel[id] { scroll-margin-top: 72px; }
.section--alt {
  background:
    linear-gradient(180deg, rgba(32, 40, 58, .0), rgba(32, 40, 58, .55) 12%, rgba(32, 40, 58, .55) 88%, rgba(32, 40, 58, 0));
}
.section__head { margin-bottom: 48px; }
.bob { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ── Workout ──────────────────────────────────────────── */
.workout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy phones" "calc phones"; gap: 32px 56px; align-items: start; }
.workout__copy { grid-area: copy; }
.workout__phones { grid-area: phones; display: flex; justify-content: center; gap: 24px; padding-top: 16px; align-self: center; }
.calc { grid-area: calc; }
.shot { margin: 0; flex: 0 0 auto; text-align: center; }
.shot figcaption { font-family: var(--pixel); font-size: 22px; line-height: 1.1; color: var(--light); margin-top: 16px; }
.workout__phones .phone { width: 236px; }
.shot--tilt-l { transform: rotate(-3deg); }
.shot--tilt-r { transform: rotate(3deg) translateY(40px); }
.perks { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
.perks li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.perks li > img { width: 48px; height: 48px; padding: 8px; background: var(--ink-800); border: 1.5px solid var(--gold-35); border-radius: 12px; }
.perks b { display: block; font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; color: var(--gold-300); margin-bottom: 4px; }
.perks span { color: var(--body); }

.calc { padding: 24px; }
.calc__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.calc__head .h3 { margin: 0; }
.calc__mode { display: flex; gap: 8px; margin-bottom: 16px; }
.calc__mode .tab[aria-pressed="true"] { background: var(--gold); color: var(--ink-950); border-color: var(--edge); }
.calc__label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: var(--body); }
.calc__label b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); color: var(--light); }
.calc input[type="range"] { width: 100%; margin: 8px 0 16px; accent-color: var(--gold); height: 32px; cursor: pointer; }
.calc__out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.calc__out div { background: var(--ink-950); border-radius: 12px; padding: 12px; text-align: center; border: 1.5px solid var(--gold-15); }
.calc__out dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.calc__out dd { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.calc__out b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; color: var(--gold-300); }
.calc__note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ── Health ───────────────────────────────────────────── */
.hgrid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.hcard p { color: var(--body); }
.hcard--goal { display: flex; gap: 24px; align-items: center; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--raised); stroke-width: 12; }
.ring__fill { fill: none; stroke: var(--stamina); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); }
.ring.is-in .ring__fill { stroke-dashoffset: 0; }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring__label b { font-family: var(--pixel); font-weight: 400; font-size: 30px; color: var(--light); }
.ring__label span { font-size: 12px; color: var(--muted); font-weight: 500; }
.streak { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 48px; align-items: center; }
.streak li { height: 28px; border-radius: 8px; background: var(--raised); border: 1.5px solid transparent; }
.streak li.is-on { background: var(--stamina); border-color: var(--edge); }
.streak li.is-now { border-color: var(--stamina); animation: pulse 1.6s ease-in-out infinite; }
.streak li.is-epic { height: 44px; display: grid; place-items: center; background: linear-gradient(#68386c, #3d2140); border-color: #b55088; }
.sync { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; min-height: 48px; align-items: center; }
.sync__pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--ink-800); border: 1.5px solid rgba(228, 59, 68, .5); font-weight: 600; font-size: 14px; }

.safety { margin-top: 32px; padding: 32px; }
.safety__head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.safety__head .h3 { margin: 0 0 4px; }
.safety__head p { color: var(--body); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks--2 { grid-template-columns: 1fr 1fr; gap: 16px 32px; margin: 0; }
.ticks li { position: relative; padding-left: 32px; color: var(--body); }
.ticks li b { color: var(--light); font-weight: 600; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--stamina) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath fill='%23121827' d='M2 5h1v1h1v1h1V6h1V5h1V4h1V3h1v1H8v1H7v1H6v1H5v1H4V7H3V6H2z'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1.5px solid var(--edge);
}
.safe__warn {
  margin-top: 24px; padding: 14px 20px; border-radius: 12px; background: rgba(228, 59, 68, .12);
  border: 1.5px solid rgba(228, 59, 68, .5); color: #ffd3d6; font-weight: 600; text-align: center;
}

/* ── Rewards bento ────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.feat { display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.feat p { color: var(--body); }
.feat__body { margin-top: auto; }
.feat--zombies, .feat--checkin { grid-column: span 3; }
.feat--wheel, .feat--deals, .feat--bond, .feat--cache { grid-column: span 2; }
.feat--cache { display: none; }

.zlineup { display: flex; justify-content: space-around; align-items: flex-end; height: 216px; background: var(--raised); border-radius: 10px; margin: -4px -4px 0; padding-bottom: 8px; position: relative; overflow: hidden; }
.zlineup::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: rgba(183, 227, 161, .14); }
.zcell { position: relative; width: 136px; height: 208px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.zcell .tag { position: absolute; top: 12px; z-index: 2; }
.spr--z { --fw: 224px; --fh: 224px; --n: 4; --dur: .6s; left: 50%; margin-left: -112px; bottom: 22px; }
.spr--walker { background-image: url("../assets/sprites-v2/walker_walk.png"); }
.spr--runner { background-image: url("../assets/sprites-v2/runner_walk.png"); --dur: .4s; }
.spr--tank { background-image: url("../assets/sprites-v2/tank_walk.png"); --dur: .8s; }
.zgold { position: absolute; bottom: 6px; display: flex; gap: 4px; align-items: center; font-family: var(--pixel); font-size: 20px; color: var(--gold-300); line-height: 1; z-index: 2; }
.x15 { position: absolute; right: 10px; top: 10px; z-index: 3; font-family: var(--pixel); font-size: 20px; line-height: 1; color: var(--ink-950); background: var(--stamina); border: 2px solid var(--edge); border-radius: 8px; padding: 4px 8px 3px; transform: rotate(4deg); animation: pulse 1.6s ease-in-out infinite; }

.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { background: var(--raised); border-radius: 10px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1.5px solid transparent; }
.day__n { font-family: var(--pixel); font-size: 16px; color: var(--muted); line-height: 1; }
.day b { font-family: var(--pixel); font-weight: 400; font-size: 18px; line-height: 1; color: var(--gold-300); }
.day.is-done { opacity: .55; }
.feat--checkin .days { min-height: 200px; }
.feat--checkin .day { justify-content: center; gap: 10px; }
.feat--checkin .day img { width: 24px; height: 24px; }
.feat--checkin .day--big img { width: 32px; height: 32px; }
.feat--checkin .day b { font-size: 22px; }
.day.is-today { border-color: var(--gold); background: rgba(243, 184, 63, .14); animation: pulse 1.6s ease-in-out infinite; }
.day--big { background: linear-gradient(var(--raised-hi), var(--raised)); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(243, 184, 63, .18); } }

.wheel-demo { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; }
.wheel { position: relative; width: 132px; height: 132px; grid-row: span 2; }
.wheel__disc {
  position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid var(--gold); box-shadow: 0 0 0 3px var(--edge);
  background: conic-gradient(#e43b44 0 45deg, #feae34 0 90deg, #3e8948 0 135deg, #0099db 0 180deg,
    #e43b44 0 225deg, #68386c 0 270deg, #feae34 0 315deg, #b55088 0 360deg);
  transition: transform 3s cubic-bezier(.15, .85, .2, 1);
}
.wheel__disc span {
  position: absolute; left: 50%; top: 50%; width: 40px; margin-left: -20px; text-align: center;
  font-family: var(--pixel); font-size: 18px; line-height: 1; color: #fff;
  -webkit-text-stroke: 3px var(--ink-950); paint-order: stroke fill;
  transform: rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-46px);
}
.wheel__hub { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: var(--gold-300); border: 3px solid var(--edge); }
.wheel__ptr { position: absolute; left: 50%; top: -10px; margin-left: -9px; width: 18px; height: 20px; background: var(--light); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 0 var(--edge)); }
.wheel__res { font-family: var(--pixel); font-size: 22px; color: var(--gold-300); min-height: 24px; line-height: 1.1; }

.deals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.deal { position: relative; background: var(--raised); border-radius: 10px; padding: 24px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 132px; justify-content: flex-end; }
.deal img.px:not([width="16"]) { width: 54px; height: 36px; }
.deal__off { position: absolute; left: 4px; top: 4px; font-family: var(--pixel); font-size: 16px; line-height: 1; background: var(--hp); color: #fff; border-radius: 6px; padding: 3px 5px 2px; }
.deal s { font-family: var(--pixel); font-size: 16px; color: var(--muted); line-height: 1; }
.deal b { display: flex; align-items: center; gap: 3px; font-family: var(--pixel); font-weight: 400; font-size: 20px; line-height: 1; color: var(--gold-300); }
.deal__sign { font-size: 12px !important; padding: 4px 8px !important; margin-bottom: 6px; }
.petimg { display: block; width: 40px; height: 40px; background-size: 160px 40px; image-rendering: pixelated; animation: petf .66s steps(4) infinite; }
@keyframes petf { to { background-position-x: -160px; } }
.petimg--lg { width: 80px; height: 80px; background-size: 320px 80px; animation-name: petfl; }
@keyframes petfl { to { background-position-x: -320px; } }
.bond { display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--raised); border-radius: 10px; padding: 16px 8px; min-height: 132px; justify-content: center; }
.hearts { display: flex; gap: 6px; }
.hearts i { width: 20px; height: 18px; background: #4a3048; clip-path: polygon(20% 0, 40% 0, 50% 15%, 60% 0, 80% 0, 100% 20%, 100% 45%, 50% 100%, 0 45%, 0 20%); }
.hearts i.is-on { background: #e8365f; }
.hearts i.is-fill { background: linear-gradient(90deg, #e8365f 0 0, #4a3048 0); animation: fillheart 3s ease-in-out infinite; }
@keyframes fillheart { 0% { background: linear-gradient(90deg, #e8365f 0%, #4a3048 0%); } 50% { background: linear-gradient(90deg, #e8365f 50%, #4a3048 50%); } 80%, 100% { background: #e8365f; } }

/* ── Cosmetics ────────────────────────────────────────── */
.cast { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cast li { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--ink-800); border: 1.5px solid var(--gold-15); border-radius: var(--r-card); padding: 8px 4px 12px; }
.cast__spr { width: 96px; height: 96px; max-width: 100%; background-size: 480px 96px; background-repeat: no-repeat; image-rendering: pixelated; animation: castw .5s steps(5) infinite; }
.cast li:nth-child(2n) .cast__spr { animation-delay: -.2s; }
@keyframes castw { to { background-position-x: -480px; } }
.cast b { font-family: var(--pixel); font-weight: 400; font-size: 24px; line-height: 1; color: var(--light); }
.cast small { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }

.signwall { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 32px; margin: 0 0 40px; padding: 32px 24px; border-radius: var(--r-panel);
  background: radial-gradient(ellipse at 50% 120%, rgba(127, 208, 238, .12), transparent 60%), #0b0f1a; border: 1.5px solid var(--gold-15); }
.signwall .sg { font-size: 17px; padding: 10px 16px; }

/* Signs & nameplates (sign_view.dart): colours via --f fill, --b border,
   --t text, --g glow, --a accent; .sh-* = shape, .ef-* = effect. */
.sg {
  --f: #F3DFB5; --b: #121827; --t: #202334; --g: transparent; --a: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: var(--sans); font-weight: 600; font-size: 13px; line-height: 1;
  padding: 6px 10px; color: var(--t); background-color: var(--f); border: 2px solid var(--b); border-radius: 8px;
}
.sh-rounded::after, .sh-bubble::after { /* small tail toward the character */
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 6px; margin-left: -5px;
  background: var(--b); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.sh-pill { border-radius: 999px; }
.sh-bubble { border-radius: 16px; }
.sh-bubble::after { left: 30%; }
.sh-cloud { border-radius: 999px; box-shadow: -6px -4px 0 -2px var(--f), 8px -5px 0 -2px var(--f); }
.sh-wood { border-radius: 4px; background-image: repeating-linear-gradient(0deg, transparent 0 5px, color-mix(in srgb, var(--a) 70%, transparent) 5px 6px); }
.sh-bamboo { border-radius: 4px; background-image: repeating-linear-gradient(90deg, transparent 0 22px, var(--a) 22px 24px); }
.sh-banner { border-radius: 2px; clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); padding-left: 18px; padding-right: 18px; border-color: transparent; box-shadow: inset 0 0 0 2px var(--b); }
.sh-led {
  border-radius: 6px; font-family: var(--pixel); font-weight: 400; font-size: 18px; letter-spacing: 1px;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px); background-size: 4px 4px;
  text-shadow: 0 0 6px var(--g); box-shadow: 0 0 0 2px var(--a);
}
.sh-frame { border-radius: 4px; box-shadow: inset 0 0 0 2px var(--a), 0 0 0 2px var(--edge), 0 0 12px var(--g); padding: 8px 14px; }
.sh-frame::before, .sh-frame::after { content: ""; position: absolute; top: -5px; width: 8px; height: 8px; background: var(--b); border: 1.5px solid var(--edge); }
.sh-frame::before { left: -5px; }
.sh-frame::after { right: -5px; }
.sh-hearts { border-radius: 999px; padding: 6px 26px; }
.sh-hearts::before, .sh-hearts::after { content: "\2665"; position: absolute; top: 50%; transform: translateY(-52%); color: var(--a); font-size: 14px; }
.sh-hearts::before { left: 8px; }
.sh-hearts::after { right: 8px; }

.ef-glow { box-shadow: 0 0 10px 2px var(--g); }
.ef-neon { text-shadow: 0 0 6px var(--g); box-shadow: 0 0 12px 2px var(--g), inset 0 0 8px var(--g); animation: neon 3.2s steps(1) infinite; }
.ef-neon--b { animation-duration: 4.1s; animation-delay: -1.3s; }
@keyframes neon { /* mostly on, quick stutters */
  0%, 61%, 64%, 67%, 100% { opacity: 1; filter: none; }
  62%, 66% { opacity: .35; filter: saturate(.4); }
  86% { opacity: .7; }
  87% { opacity: 1; }
}
.ef-pulse { animation: glowpulse 1.8s ease-in-out infinite; }
@keyframes glowpulse { 0%, 100% { box-shadow: 0 0 4px 0 var(--g); } 50% { box-shadow: 0 0 18px 5px var(--g); } }
.ef-rainbow { box-shadow: 0 0 12px 2px var(--g); animation: rainbow 4s linear infinite; border-color: #ff5a5a; color: #ffd86a; }
@keyframes rainbow { to { filter: hue-rotate(360deg); } }
.ef-shimmer { background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); background-size: 300% 100%; background-repeat: no-repeat; animation: shimmer 2.8s ease-in-out infinite; }
.sh-wood.ef-shimmer, .sh-bamboo.ef-shimmer { background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); }
@keyframes shimmer { 0%, 40% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
.ef-sparkle { animation: glowpulse 2.4s ease-in-out infinite; }
.ef-sparkle > .tw { position: absolute; width: 24px; height: 24px; background: url("../assets/fx/sparkle.png") 0 0 / 96px 24px; image-rendering: pixelated; animation: tw .6s steps(4) infinite; pointer-events: none; }
.ef-sparkle > .tw--a { right: -14px; top: -16px; }
.ef-sparkle > .tw--b { left: -12px; bottom: -14px; animation-delay: -.3s; animation-duration: .8s; }
@keyframes tw { to { background-position-x: -96px; } }
.ef-marquee { width: 220px; max-width: 100%; overflow: hidden; justify-content: flex-start; box-shadow: 0 0 0 2px var(--a), 0 0 10px var(--g); }
.ef-marquee > span { display: inline-block; padding-left: 100%; animation: marquee 7s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Store showcase */
.store { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; padding: 24px; }
.store__stage { min-width: 0; align-self: start; position: sticky; top: 96px; }
.stage {
  position: relative; height: 460px; border-radius: var(--r-card);
  background: radial-gradient(ellipse 70% 55% at 50% 80%, rgba(127, 208, 238, .16), transparent 70%), var(--ink-950);
  border: 1.5px solid var(--gold-35); overflow: hidden;
}
.stage__gold { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; background: var(--raised); border-radius: 999px; padding: 4px 12px 4px 6px; font-family: var(--pixel); font-size: 22px; color: var(--gold-300); line-height: 1; }
.stage__gold b { font-weight: 400; }
.stage__floor { position: absolute; left: 50%; bottom: 100px; width: 220px; height: 34px; margin-left: -110px; border-radius: 50%; background: rgba(183, 227, 161, .14); border: 2px dashed rgba(183, 227, 161, .25); }
.stage__char { position: absolute; left: 50%; bottom: 112px; width: 192px; height: 192px; margin-left: -128px; }
.stage__char > .sg:first-child { position: absolute; left: 50%; top: -64px; transform: translateX(-50%); z-index: 4; }
.stage__char > .sg.ef-marquee { width: 180px; }
.spr--pet-stage { left: 167px; top: 92px; }
.plate { position: absolute !important; left: 50%; top: 188px; transform: translateX(-50%); z-index: 4; font-size: 12px; padding: 4px 12px; }
.stage__name { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-family: var(--pixel); font-size: 26px; line-height: 1; color: var(--light); }
.stage__name small { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 6px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  font-family: var(--pixel); font-size: 22px; line-height: 1; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--ink-950); color: var(--light); border: 1.5px solid var(--gold-35); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--gold); color: var(--ink-950); border-color: var(--edge); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; max-height: 560px; overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--gold-35) transparent; }
.item {
  background: var(--ink-950); border: 1.5px solid var(--gold-35); border-radius: 12px; cursor: pointer;
  padding: 8px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 150px;
  transition: transform .12s, border-color .12s, background .12s; text-align: center;
}
.item:hover { transform: translateY(-2px); border-color: var(--gold); }
.item:active { transform: translateY(1px); }
.item[aria-pressed="true"] { border-color: var(--gold-300); background: rgba(243, 184, 63, .1); box-shadow: inset 0 0 0 1.5px var(--gold-300); }
.item__art { width: 96px; height: 80px; display: grid; place-items: center; background: var(--raised); border-radius: 10px; overflow: hidden; }
.item__art .look { width: 96px; height: 96px; background-size: 384px 96px; background-repeat: no-repeat; image-rendering: pixelated; margin-top: 4px; }
.item__art .hatimg { width: 72px; height: 48px; image-rendering: pixelated; }
.item__art .petimg { width: 60px; height: 60px; background-size: 240px 60px; animation-name: petfm; }
@keyframes petfm { to { background-position-x: -240px; } }
.item__art .sg { font-size: 11px; padding: 5px 8px; }
.item__art .sg.ef-marquee { width: 84px; }
.item__name { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--light); }
.item__price { margin-top: 4px; display: flex; align-items: center; gap: 4px; font-family: var(--pixel); font-size: 20px; line-height: 1; color: var(--gold-300); }
.item__price img { width: 16px; height: 16px; }
.item__free { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--stamina); }
.item__lv { font-family: var(--pixel); font-size: 16px; color: var(--muted); }
.store__note { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ── Proof (placeholders) ─────────────────────────────── */
.sample-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: var(--ink-950); background: repeating-linear-gradient(135deg, #f3b83f 0 8px, #e9a92a 8px 16px);
  border: 1.5px solid var(--edge); border-radius: 999px; padding: 4px 12px;
}
.sample-tag--sm { font-size: 11px; padding: 2px 10px; }
.stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 40px 24px 24px; border-radius: var(--r-panel); border: 1.5px dashed var(--gold-35); margin-bottom: 32px; }
.stats > .sample-tag { position: absolute; top: -14px; left: 24px; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--pixel); font-weight: 400; font-size: var(--px-3); line-height: 1; color: var(--gold-300); }
.stat span { display: block; color: var(--body); font-size: 14px; margin-top: 6px; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { margin: 0; position: relative; display: flex; flex-direction: column; gap: 16px; border-style: dashed; }
.quote .sample-tag { align-self: flex-start; }
.quote blockquote { margin: 0; color: var(--light); font-size: 17px; line-height: 1.55; }
.quote figcaption { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: auto; }
.avatar { width: 48px; height: 48px; flex: none; border-radius: 12px; background-color: var(--raised); background-size: 384px 96px; background-position: -24px -6px; background-repeat: no-repeat; image-rendering: pixelated; border: 1.5px solid var(--gold-35); }
.proof__note { margin-top: 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Coming soon ──────────────────────────────────────── */
.soon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; padding: 40px; align-items: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 80% at 20% 60%, rgba(228, 59, 68, .16), transparent 70%), var(--ink-800); }
.soon__art { position: relative; height: 340px; }
.boss { position: absolute; left: 50%; top: 0; width: 320px; height: 320px; margin-left: -160px; }
.boss .tag { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; }
.boss__hp { position: absolute; left: 50%; top: 26px; width: 200px; margin-left: -100px; height: 14px; display: flex; background: var(--ink-950); border: 2px solid var(--edge); border-radius: 6px; overflow: hidden; z-index: 2; }
.boss__hp i { width: var(--w); background: var(--hp); border-right: 2px solid var(--ink-950); }
.boss__hp i:nth-child(2) { background: #f77622; }
.boss__hp i:nth-child(3) { background: #feae34; }
.boss__hp i:nth-child(4) { background: #63c74d; }
.spr--boss { --fw: 320px; --fh: 320px; --n: 4; --dur: .9s; left: 0; top: 52px; background-image: url("../assets/sprites-v2/boss_brute_idle.png");
  filter: saturate(1.25) drop-shadow(0 0 18px rgba(228, 59, 68, .6)); }
.party { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; }
.party__m { width: 96px; height: 96px; background-size: 480px 96px; image-rendering: pixelated; animation: partyw .5s steps(5) infinite; transform: scaleX(-1); }
.party__m:nth-child(2n) { animation-delay: -.25s; }
@keyframes partyw { to { background-position-x: -480px; } }
.chip--soon { background: var(--hp); color: #fff; border-color: var(--edge); padding: 6px 14px; }
.soon__copy .h2 { margin-top: 16px; }
.soon__dev { margin-top: 12px; color: var(--muted); font-size: 13px; }
.notify { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.notify input {
  flex: 1 1 220px; min-height: 52px; padding: 0 16px; border-radius: var(--r-btn); border: 2px solid var(--gold-35);
  background: var(--ink-950); color: var(--light); font: inherit; font-size: 16px;
}
.notify input::placeholder { color: rgba(244, 239, 228, .45); }
.notify input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(243, 184, 63, .25); }
.notify input[aria-invalid="true"] { border-color: var(--hp); }
.notify__note { flex-basis: 100%; margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.notify__note a { color: var(--gold-300); }
.notify__msg { flex-basis: 100%; min-height: 24px; color: var(--body); font-size: 14px; }
.notify__msg.is-ok { color: #9be08a; font-weight: 600; }
.notify__msg.is-err { color: #ffb3b8; }

/* Screenshots carousel */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 4px 24px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel .shot { scroll-snap-align: center; }
.carousel .shot figcaption { max-width: 260px; }
.carousel__nav {
  position: absolute; top: calc(50% - 40px); z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-950);
  background: var(--gold); border: 2px solid var(--edge); box-shadow: 0 4px 0 var(--gold-sh), 0 4px 0 2px var(--edge);
}
.carousel__nav:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-sh); }
.carousel__nav--prev { left: -12px; }
.carousel__nav--next { right: -12px; }
@media (min-width: 1300px) { .carousel__nav--prev { left: -72px; } .carousel__nav--next { right: -72px; } }
.carousel__nav svg { image-rendering: pixelated; shape-rendering: crispEdges; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--raised); transition: background .2s, width .2s; }
.dots i.is-on { background: var(--gold); width: 24px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.qa { background: var(--ink-800); border: 1.5px solid var(--gold-35); border-radius: var(--r-card); overflow: hidden; }
.qa[open] { border-color: var(--gold); }
.qa summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative;
  font-weight: 600; font-size: 17px; line-height: 1.4; min-height: 44px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  display: grid; place-items: center; border-radius: 8px; background: var(--raised); color: var(--gold-300);
  font-family: var(--pixel); font-size: 26px; line-height: 1; transition: transform .2s;
}
.qa[open] summary::after { content: "−"; background: var(--gold); color: var(--ink-950); }
.qa p { padding: 0 20px 20px; color: var(--body); }

/* Final CTA */
.final { position: relative; padding: 0 0 var(--sec-y); text-align: center; scroll-margin-top: 72px; }
.final__road {
  height: 216px; position: relative; overflow: hidden;
  background: url("../assets/brand/map_strip.png") 0 -120px / 512px 336px repeat-x; image-rendering: pixelated;
  border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  box-shadow: 0 0 0 3px var(--edge);
  margin-bottom: 64px;
  animation: road 12s linear infinite;
}
@keyframes road { to { background-position-x: -512px; } }
.final__walker { position: absolute; left: 50%; top: -4px; width: 192px; height: 192px; margin-left: -48px; }
.spr--mini { left: 0; top: 0; }
.spr--pet-mini { left: -60px; top: 84px; background-image: url("../assets/sprites-v2/pets/corgi.png"); }
.final__in .h2 { max-width: 760px; margin: 0 auto; }
.final__in .section__lead { margin: 16px auto 32px; }

/* Footer */
.footer { border-top: 1px solid var(--gold-15); padding: 48px 0 56px; background: #0e1320; }
.footer__in { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.footer__brand p { color: var(--muted); margin-top: 12px; font-family: var(--pixel); font-size: 22px; line-height: 1; }
.footer__nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.footer__nav a { color: var(--light); text-decoration: none; font-weight: 500; }
.footer__nav a:hover { color: var(--gold-300); }
.footer__legal { grid-column: 1 / -1; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; border-top: 1px solid var(--gold-15); padding-top: 24px; }
.footer__legal a { color: var(--muted); }

/* Sticky thumb-zone CTA (phones) */
.dock { display: none; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1340px) {
  .nav a[href="#faq"] { display: none; }
}
@media (max-width: 1220px) {
  .nav a[href="#health"] { display: none; }
}
@media (max-width: 1080px) {
  .nav { display: none; }
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: 32px; text-align: center; }
  .hero__title, .hero__lead, .tally { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .hero__art { height: 600px; }
  .phone--front { transform: translateX(48px); }
  .phone--back { left: calc(50% - 250px); }
  .story { grid-template-columns: 1fr; gap: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }
  .story::before { left: 50%; right: auto; top: 0; bottom: 0; width: 4px; height: auto; background: repeating-linear-gradient(180deg, var(--gold-35) 0 12px, transparent 12px 24px); animation: none; }
  .workout { grid-template-columns: 1fr; grid-template-areas: "copy" "phones" "calc"; }
  .hgrid { grid-template-columns: 1fr 1fr; }
  .hcard--goal { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .feat--zombies, .feat--checkin { grid-column: span 2; }
  .feat--wheel { grid-column: span 2; }
  .feat--deals, .feat--bond { grid-column: span 1; }
  .cast { grid-template-columns: repeat(4, 1fr); }
  .store { grid-template-columns: 1fr; }
  .store__stage { position: static; }
  .stage { height: 400px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .quotes { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .soon { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --sec-y: 72px; }
  .wrap { padding: 0 var(--gutter); }
  .topbar__in { gap: 12px; height: 64px; }
  .brand img { width: 132px; height: 46.5px; }
  .topbar__cta { display: none; } /* the dock carries the CTA in the thumb zone */
  .h2 { font-size: var(--px-2); }
  .eyebrow { font-size: 20px; }
  .section__lead { font-size: 16px; }
  .hero { padding-top: 24px; padding-bottom: 40px; }
  .hero__title { font-size: var(--px-2); margin: 16px auto; }
  .hero__lead { font-size: 16px; margin-bottom: 24px; }
  .cta { flex-direction: column; align-items: stretch; gap: 8px; }
  .btn--xl { width: 100%; padding: 12px 16px; }
  .btn__main { font-size: var(--px-15); }
  .btn__sub { font-size: 14px; }
  .hero .chip { font-size: var(--px-1); }
  .hero__art { height: 500px; }
  .phone--front { width: 236px; transform: translateX(32px); }
  .phone--back { width: 180px; left: calc(50% - 150px); top: 64px; }
  .float { font-size: 18px; }
  .float--auto { right: 4px; top: 40px; }
  .float--hp { left: 0; bottom: 24px; }
  .wk { padding: 14px 12px 12px; }
  .wk__big { margin-top: 28px; }
  .wk__big b { font-size: var(--px-2); }
  .wk__grid { margin-top: 20px; gap: 12px 6px; }
  .wk__grid b { font-size: 24px; }
  .wk__btn { font-size: 13px; padding: 10px 4px; }
  .tally { padding: 10px 12px; gap: 6px; }
  .tally__cell { column-gap: 6px; }
  .tally__cell img { width: 20px; height: 20px; }
  .tally__cell b { font-size: 24px; }
  .tally__cell span { font-size: 11px; }
  .tally__arrow { width: 10px; height: 10px; }
  .beat { padding: 24px 20px; }
  .feat--checkin .days { min-height: 0; }
  .scene { height: 360px; }
  .workout__phones .phone { width: 168px; padding: 7px; border-radius: 28px; }
  .workout__phones .phone img { border-radius: 22px; }
  .workout__phones { gap: 12px; padding-bottom: 40px; }
  .shot figcaption { font-size: 20px; }
  .perks b { font-size: 24px; }
  .calc { padding: 20px 16px; }
  .calc__out { gap: 6px; }
  .calc__out div { padding: 10px 4px; }
  .hgrid { grid-template-columns: 1fr; gap: 16px; }
  .hcard--goal { flex-direction: column; align-items: flex-start; }
  .safety { padding: 24px 16px; }
  .safety__head img { width: 40px; height: 40px; }
  .ticks--2 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; gap: 16px; }
  .feat--zombies, .feat--checkin, .feat--wheel, .feat--deals, .feat--bond { grid-column: auto; }
  .paper { padding: 20px; }
  .h3 { font-size: 24px; }
  .zcell { width: 96px; }
  .cast { grid-template-columns: repeat(7, 112px); overflow-x: auto; scroll-snap-type: x mandatory; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .cast li { scroll-snap-align: start; }
  .cast__spr { width: 96px; height: 96px; background-size: 480px 96px; animation-name: castm; }
  @keyframes castm { to { background-position-x: -480px; } }
  .signwall { gap: 20px 16px; padding: 24px 12px; }
  .signwall .sg { font-size: 14px; padding: 8px 12px; }
  .store { padding: 12px; gap: 16px; }
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 480px; }
  .item { min-height: 140px; padding: 6px 4px 8px; }
  .item__art { width: 100%; }
  .stats { padding: 36px 16px 20px; }
  .stat b { font-size: var(--px-2); }
  .quote blockquote { font-size: 16px; }
  .soon { padding: 24px 16px; gap: 16px; }
  .soon__art { height: 280px; }
  .boss { width: 160px; height: 160px; margin-left: -80px; top: 40px; }
  .spr--boss { --fw: 160px; --fh: 160px; top: 36px; }
  .party { gap: 0; }
  .party__m { margin: 0 -10px; }
  @keyframes partym { to { background-position-x: -360px; } }
  .notify .btn { width: 100%; }
  .carousel__nav { display: none; }
  .carousel .phone { width: 236px; padding: 8px; border-radius: 36px; }
  .carousel .phone img { border-radius: 28px; }
  .footer__in { grid-template-columns: 1fr; }
  .footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .hud { padding: 6px 10px; }
  .hud--steps { left: 8px; top: 8px; padding: 4px 10px 4px 4px; gap: 6px; }
  .hud--steps .bar { width: 72px; height: 6px; }
  .hud__num { font-size: var(--px-1); }
  .hud--gold { right: 8px; top: 8px; font-size: var(--px-1); padding: 5px 10px 5px 6px; }
  .hud--gold b { min-width: 40px; }
  .coin16 { width: 16px; height: 16px; }
  .hud--auto { font-size: var(--px-1); right: 8px; bottom: 8px; }
  .lang__btn { min-width: 40px; }

  .dock {
    display: flex; align-items: center; gap: 10px; position: fixed; left: 8px; right: 8px; z-index: 60;
    bottom: calc(8px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 10px; border-radius: 18px;
    background: rgba(18, 24, 39, .96); border: 2px solid var(--gold); box-shadow: 0 0 0 3px var(--edge), 0 12px 32px rgba(5, 10, 25, .6);
    transform: translateY(140%); transition: transform .25s ease; visibility: hidden;
  }
  .dock.is-on { transform: none; visibility: visible; }
  .dock__icon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
  .dock__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
  .dock__txt b { font-family: var(--pixel); font-weight: 400; font-size: var(--px-1); color: var(--gold-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock__txt span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock .btn { flex: none; min-height: 48px; }
}
@media (max-width: 380px) {
  .days { gap: 4px; }
  .wheel-demo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .wheel { grid-row: auto; }
  .tally__arrow { display: none; }
  .dock__txt span { display: none; }
}

/* ── Reduced motion: keep frames still, no loops ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ring__fill { stroke-dashoffset: 0; }
  .carousel__track { scroll-behavior: auto; }
  .pocket__phone { transform: translateY(64px); }
  .pop, .burst { opacity: 1; }
  .pop--3 { display: none; }
  .burst { opacity: 0; }
  .dock { transition: none; }
}

/* ── Legal pages (privacy.html, terms.html) ───────────── */
html:not([lang="en"]) [data-l="en"],
html[lang="en"] [data-l="vi"] { display: none !important; }

.topbar__back {
  font-family: var(--pixel); font-size: 24px; line-height: 1; color: var(--light); text-decoration: none;
  padding: 6px 12px; border-radius: 10px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.topbar__back svg { flex: none; color: var(--gold-300); shape-rendering: crispEdges; }
.topbar__back:hover { background: var(--raised); color: var(--gold-300); }

.legal { width: 100%; max-width: 768px; margin: 0 auto; padding: 56px 24px var(--sec-y); }
.legal__head { margin-bottom: 32px; }
.legal__title {
  font-family: var(--pixel); font-weight: 400; color: var(--gold-300);
  font-size: var(--px-3); line-height: 1; margin: 0 0 16px; letter-spacing: .5px;
}
.legal__lead { color: var(--body); font-size: 18px; line-height: 1.7; }
.legal__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 20px; }
.legal__meta .chip { font-size: var(--px-1); padding: 6px 14px; }

.legal__sum { padding: 24px 24px 24px; margin-bottom: 24px; background: var(--ink-800); border-color: var(--gold); }
.legal__sum h2 { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; color: var(--gold-300); margin: 0; }
.legal__sum .ticks { margin-top: 16px; }

.toc { margin-bottom: 48px; }
.toc h2 { font-family: var(--pixel); font-weight: 400; font-size: var(--px-15); line-height: 1; color: var(--water); margin: 0 0 12px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 12px; align-items: baseline; padding: 8px 10px; border-radius: 10px;
  color: var(--light); text-decoration: none; font-weight: 500; line-height: 1.4;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero); flex: none; min-width: 28px;
  font-family: var(--pixel); font-size: var(--px-1); line-height: 1; color: var(--gold-300);
}
.toc a:hover { background: var(--raised); color: var(--gold-300); }

.legal__sec { scroll-margin-top: 88px; padding-top: 8px; margin-bottom: 40px; }
.legal__sec h2 {
  font-family: var(--pixel); font-weight: 400; color: var(--gold-300);
  font-size: var(--px-2); line-height: 1.05; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 1.5px solid var(--gold-35);
}
.legal__sec h3 {
  font-family: var(--pixel); font-weight: 400; color: var(--light);
  font-size: var(--px-15); line-height: 1.05; margin: 28px 0 8px;
}
.legal__sec p, .legal__sec li { color: var(--body); font-size: 17px; line-height: 1.75; }
.legal__sec p + p { margin-top: 14px; }
.legal__sec ul, .legal__sec ol { margin: 12px 0 0; padding-left: 24px; }
.legal__sec li + li { margin-top: 8px; }
.legal__sec li::marker { color: var(--gold); }
.legal__sec strong, .legal__sec b { color: var(--light); font-weight: 600; }
.legal__sec a { overflow-wrap: anywhere; }
.legal__sec code { font-size: .92em; background: var(--raised); padding: 1px 6px; border-radius: 6px; color: var(--cream); }

.path {
  display: inline; font-weight: 600; color: var(--light);
  background: var(--raised); border: 1px solid var(--gold-35); border-radius: 8px; padding: 1px 8px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.note {
  margin-top: 16px; padding: 14px 18px; border-radius: 12px;
  background: rgba(127, 208, 238, .08); border: 1.5px solid rgba(127, 208, 238, .4);
}
.note p { color: var(--light); font-size: 16px; }
.note--warn { background: rgba(228, 59, 68, .12); border-color: rgba(228, 59, 68, .5); }
.note--warn p { color: #ffd3d6; }
.legal__sec--key { padding: 24px; border: 2px solid var(--gold); border-radius: var(--r-panel); background: var(--ink-800); box-shadow: 0 0 0 3px var(--edge); }

.dtable { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.dtable th, .dtable td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--gold-15); line-height: 1.55; }
.dtable th { font-family: var(--pixel); font-weight: 400; font-size: var(--px-1); line-height: 1; color: var(--water); }
.dtable td { color: var(--body); }
.dtable td:first-child { color: var(--light); font-weight: 600; width: 24%; }

.legal__end { color: var(--muted); font-size: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--gold-15); }

@media (max-width: 720px) {
  .legal { padding: 32px var(--gutter) var(--sec-y); }
  .legal__title { font-size: var(--px-2); }
  .legal__lead { font-size: 16px; }
  .legal__sec h2 { font-size: var(--px-15); }
  .legal__sec h3 { font-size: 24px; }
  .legal__sec p, .legal__sec li { font-size: 16px; }
  .legal__sec--key, .legal__sum { padding: 20px 16px; }
  .topbar__back { font-size: 20px; padding: 6px 8px; }
  /* Stack the data table into cards: no sideways scroll at 360 px. */
  .dtable thead { display: none; }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable tr { padding: 12px 0; border-bottom: 1px solid var(--gold-15); }
  .dtable td, .dtable td:first-child { border: 0; padding: 2px 0; width: 100%; }
  .dtable td[data-th]::before { content: attr(data-th) " · "; color: var(--water); font-weight: 600; }
}
