/* Club floor at 2 a.m.: night violet, tennis-ball yellow, legging pink, reflective silver, chair green. */
:root {
  --bg: #110b16;
  --bg-2: #1a1222;
  --panel: rgba(32, 22, 42, 0.8);
  --line: rgba(215, 255, 58, 0.14);
  --line-strong: rgba(215, 255, 58, 0.34);
  --text: #f8f6ef;
  --muted: #bdb3c6;
  --ball: #d7ff3a;
  --pink: #ff5c8a;
  --silver: #e8eef2;
  --green: #2bff7a;
  --red: #ff3a55;
  --ink: #110b16;
  --f-display: "Bowlby One", "Arial Black", Impact, sans-serif;
  --f-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--f-body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font: 400 clamp(2.2rem, 1.5rem + 3.2vw, 4.2rem)/0.98 var(--f-display); text-transform: uppercase; }
p { margin: 0; }
.small { font-size: 0.85rem; color: var(--muted); }
:focus-visible { outline: 2px solid var(--ball); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 700 0.78rem/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.chip { color: var(--ink); background: var(--ball); padding: 4px 8px; border-radius: 6px; letter-spacing: 0.04em; }
.section-lead { max-width: 62ch; color: var(--muted); margin-top: 14px; font-size: 1.1rem; }

/* ticker bar */
.ticker-bar { height: 32px; overflow: hidden; background: var(--ball); color: var(--ink); font: 700 0.76rem/32px var(--f-mono); letter-spacing: 0.12em; white-space: nowrap; }
.ticker-run { display: inline-flex; gap: 34px; padding-left: 20px; animation: run 36s linear infinite; }
.ticker-run span::after { content: "●"; margin-left: 34px; font-size: 0.6em; vertical-align: 2px; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 12px var(--gr) 12px var(--gl); background: rgba(17, 11, 22, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.2rem/1 var(--f-display); text-transform: uppercase; }
.brand img { width: 36px; height: 36px; }
.links { display: flex; gap: 20px; margin-left: auto; }
.links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--text); }
@media (max-width: 900px) { .links { display: none; } .nav .btn { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--line-strong); background: rgba(17, 11, 22, 0.5); color: var(--text); text-decoration: none; font: 700 0.98rem/1 var(--f-body); cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-2px); border-color: var(--ball); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn-main { background: var(--ball); border-color: var(--ball); color: var(--ink); box-shadow: 0 6px 24px rgba(215, 255, 58, 0.28); }
.btn-main:hover { box-shadow: 0 10px 34px rgba(215, 255, 58, 0.45); }
.btn-ball { border-color: var(--pink); color: var(--text); }
.btn-ball:hover { border-color: var(--pink); box-shadow: 0 8px 28px rgba(255, 92, 138, 0.35); }
.btn[aria-disabled="true"] { display: none; }

/* hero */
.hero { position: relative; padding-block: 34px 60px; background: radial-gradient(ellipse at 78% 30%, rgba(255, 92, 138, 0.16), transparent 55%), radial-gradient(ellipse at 8% 85%, rgba(43, 255, 122, 0.08), transparent 50%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 32px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy .eyebrow { margin-bottom: 0; }
h1 { font: 400 clamp(3.4rem, 1.6rem + 6.4vw, 7rem)/0.86 var(--f-display); text-transform: uppercase; }
h1 em { font-style: normal; color: var(--ball); text-shadow: 0 0 36px rgba(215, 255, 58, 0.45); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.ca { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-strong); }
.ca span { font: 700 0.78rem var(--f-mono); color: var(--ball); letter-spacing: 0.1em; }
.ca code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); font-size: 0.9rem; user-select: all; }
.ca button { flex: none; border: 0; border-radius: 999px; padding: 9px 16px; background: var(--text); color: var(--ink); font: 700 0.85rem var(--f-body); cursor: pointer; }
.ca button:disabled { opacity: 0.3; cursor: default; }
.ca-wide { width: min(760px, 100%); margin-top: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.stat span { display: block; font: 700 0.68rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font: 400 clamp(1.3rem, 1rem + 1vw, 1.8rem)/1.2 var(--f-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-hot { border-color: rgba(255, 92, 138, 0.5); }
.stat-hot b { color: var(--pink); }
.level { grid-column: 1 / -1; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 6px; }
.level-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-top b { font: 400 1.25rem/1.1 var(--f-display); text-transform: uppercase; }
.level p { color: var(--muted); }
.badge { font: 700 0.65rem/1 var(--f-mono); letter-spacing: 0.14em; padding: 5px 8px; border-radius: 6px; background: rgba(215, 255, 58, 0.14); color: var(--ball); }
body[data-mode="live"] .badge { background: rgba(43, 255, 122, 0.16); color: var(--green); }
.bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--ball)); transition: width 0.25s; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 3D stage */
.stage-wrap { position: relative; height: clamp(520px, 76vh, 760px); border-radius: 26px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); background: #120c18; }
#stage { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#stage:active { cursor: grabbing; }
.no-gl #stage { display: none; }
.no-gl::before { content: "3D needs WebGL. The numbers still work."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ring-tag { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity 0.3s; will-change: transform; }
.ring-tag span { display: block; padding: 6px 12px; border-radius: 99px; background: var(--pink); color: #fff; font: 700 0.78rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); position: relative; }
.ring-tag span::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--pink); }
.hud { position: absolute; right: 14px; top: 14px; width: min(220px, 46%); display: grid; gap: 5px; justify-items: end; pointer-events: none; }
.hud-label, .hud-pct { font: 700 0.66rem/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px #000; }
.hud-track { width: 100%; height: 12px; border-radius: 99px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.25); overflow: hidden; }
.hud-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--ball)); border-radius: inherit; }
.quip { position: absolute; left: 50%; top: 22px; transform: translate(-50%, -8px); max-width: min(360px, 60%); padding: 10px 16px; border-radius: 16px; background: var(--text); color: var(--ink); font-weight: 700; text-align: center; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.quip.on { opacity: 1; transform: translate(-50%, 0); }
.stage-hint { position: absolute; right: 14px; bottom: 12px; font: 600 0.72rem var(--f-mono); color: #fff; background: rgba(17, 11, 22, 0.6); padding: 6px 10px; border-radius: 99px; pointer-events: none; }
body.gaming .stage-hint { display: none; }

/* game overlays on the stage */
.game-hud { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; justify-items: center; gap: 10px; padding: 0 12px; pointer-events: none; }
.g-stats { display: flex; gap: 8px; }
.g-stats div { min-width: 92px; padding: 8px 12px; border-radius: 14px; background: rgba(17, 11, 22, 0.78); border: 1px solid var(--line); text-align: center; }
.g-stats span { display: block; font: 700 0.6rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.g-stats b { font: 400 1.35rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.wiggle-btn { pointer-events: auto; width: min(320px, 100%); min-height: 74px; border: 0; border-radius: 999px; background: var(--ball); color: var(--ink); font: 400 2rem/1 var(--f-display); letter-spacing: 0.04em; cursor: pointer; box-shadow: 0 8px 0 #8aa60f, 0 18px 40px rgba(0, 0, 0, 0.5); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.wiggle-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #8aa60f, 0 10px 24px rgba(0, 0, 0, 0.5); }
.g-hint { font: 700 0.7rem var(--f-mono); color: #fff; text-shadow: 0 1px 3px #000; }
.game-end { position: absolute; inset: 0; margin: auto; width: min(420px, calc(100% - 24px)); height: max-content; padding: 24px; border-radius: 22px; background: rgba(17, 11, 22, 0.92); border: 1px solid var(--line-strong); display: grid; gap: 12px; text-align: center; justify-items: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.end-verdict { font: 400 clamp(2.6rem, 2rem + 3vw, 3.8rem)/0.95 var(--f-display); text-transform: uppercase; color: var(--pink); }
.game-end.win .end-verdict { color: var(--ball); }
.end-line { color: var(--muted); }
.end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* simulator */
.sim { margin-top: 28px; padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 16px; }
.sim-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.sim-head h2 { font-size: 1.5rem; }
.sim-head .btn { margin-left: auto; }
.sim-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 7ch; gap: 14px; align-items: center; }
.sim-row label { font: 700 0.75rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sim-row output { font: 700 1.1rem var(--f-mono); color: var(--ball); text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--ball); height: 28px; }
.sim-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* sections */
.zone { padding-block: clamp(70px, 10vw, 120px); border-top: 1px solid var(--line); }
.ladder { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 8px; }
.ladder button { width: 100%; display: grid; grid-template-columns: 9ch minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(32, 22, 42, 0.45); color: var(--muted); text-align: left; font: inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ladder button:hover { border-color: var(--ball); }
.lv-mc { font: 700 1rem var(--f-mono); font-variant-numeric: tabular-nums; }
.lv-name b { display: block; font: 400 1.15rem/1.15 var(--f-display); text-transform: uppercase; color: var(--text); }
.lv-name small { font-size: 0.9rem; }
.lv-part { font: 700 0.75rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line-strong); }
.ladder li.reached button { background: rgba(215, 255, 58, 0.05); border-color: rgba(215, 255, 58, 0.26); color: var(--text); }
.ladder li.reached .lv-part { background: var(--pink); border-color: var(--pink); color: #fff; }
.ladder li.current button { border-color: var(--ball); box-shadow: 0 0 0 1px var(--ball), 0 8px 30px rgba(215, 255, 58, 0.14); }
.ladder li:last-child.reached .lv-part { background: var(--ball); border-color: var(--ball); color: var(--ink); }
@media (max-width: 560px) { .ladder button { grid-template-columns: minmax(0, 1fr) auto; } .lv-mc { grid-column: 1 / -1; } }
.formula-row { margin-top: 22px; display: grid; gap: 14px; }
.formula { font: 700 0.95rem/1.5 var(--f-mono); color: var(--ball); padding: 10px 14px; border-radius: 10px; background: rgba(215, 255, 58, 0.08); overflow-wrap: anywhere; width: fit-content; max-width: 100%; }
.seen { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--muted); font-size: 0.9rem; }
.seen b { font-family: var(--f-mono); color: var(--text); }

/* game section */
.game-zone { background: linear-gradient(180deg, transparent, rgba(255, 92, 138, 0.07) 40%, transparent); }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.game-grid .actions { margin-top: 26px; }
.game-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g-card { padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; min-width: 0; }
.g-card > span { font: 700 0.68rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.g-card b { font: 400 clamp(1.4rem, 1.1rem + 1vw, 2rem)/1.15 var(--f-display); overflow-wrap: anywhere; }
.g-card small { color: var(--muted); font-size: 0.85rem; }
.rules { grid-column: 1 / -1; }
.rules ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text); }
.rules li::marker { color: var(--ball); }
@media (max-width: 860px) { .game-grid { grid-template-columns: minmax(0, 1fr); } }

/* story */
.story { background: linear-gradient(180deg, transparent, rgba(43, 255, 122, 0.05) 40%, transparent); }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.story-text { display: grid; gap: 18px; font-size: 1.12rem; color: var(--muted); max-width: 64ch; }
.story-text b { color: var(--text); }
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 0; }
.facts li { display: grid; grid-template-columns: 10ch minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 1rem; }
.facts span { font: 700 0.72rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
@media (max-width: 820px) { .story-grid { grid-template-columns: minmax(0, 1fr); } }

.token-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 30px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.token-grid div { display: grid; gap: 6px; padding: 22px 16px 22px 0; min-width: 0; }
.token-grid div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.token-grid span { font: 700 0.72rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.token-grid b { font: 400 clamp(1.2rem, 0.9rem + 1.2vw, 1.9rem)/1.15 var(--f-display); overflow-wrap: anywhere; }
@media (max-width: 760px) { .token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .token-grid div:nth-child(3) { padding-left: 0; border-left: 0; } .token-grid div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 34px 0 26px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.steps li { counter-increment: s; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 50%; background: var(--ball); color: var(--ink); font: 700 1rem var(--f-mono); }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.foot { padding-block: 44px 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.foot .wrap { display: grid; gap: 14px; }
.foot p { max-width: 82ch; }
.domain { font-family: var(--f-mono); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30; transform: translate(-50%, 20px); padding: 14px 20px; border-radius: 16px; background: var(--ball); color: var(--ink); font-weight: 600; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { animation: toast 3.2s ease-out forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .stage-wrap { order: -1; height: clamp(460px, 72vh, 620px); }
}
@media (max-width: 600px) { .quip { top: 70px; max-width: 86%; } .hud { width: 46%; } .g-stats div { min-width: 0; flex: 1; } .g-stats { width: 100%; } }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:first-child { grid-column: 1 / -1; } .sim-row { grid-template-columns: minmax(0, 1fr) 7ch; } .sim-row label { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .bar i, .quip { transition: none; } .toast.on { animation-duration: 0.01s; opacity: 1; } .ticker-run { animation: none; } }
