/* MARBLE ROYALE - the look.

   A bright, airy page in the manner of Keel: a pale blue-white ground, a
   floating pill of a nav, a headline in navy at a hundred pixels, white cards
   with soft shadows, and coin marbles drifting round the title. One WebGL
   canvas sits under everything; between races it shows through a soft window
   in the page's veil, and when the gate opens the veil lifts and the race is a
   dark stage that fills the screen. One orange, and a gold reserved for money.
   Outfit for words, JetBrains Mono for anything that is a number or an
   address. */

:root {
  /* Legacy: the blue one. Black and White override these on <html data-theme>. */
  --bg: #f5f7ff; --bg2: #eaf0ff;
  --glass: #ffffff; --glass2: #f3f6ff; --soft: #e9eefb;
  --line: #e1e7f6; --line2: #ccd6ee;
  --ink: #172038; --ink2: #3f4a68; --dim: #7a85a3;
  --go: #ff7a1a; --go2: #e66a10; --goSoft: #ffe9d8; --goInk: #7a3200;
  --gold: #d98f00; --win: #15a34a; --hot: #e11d48; --cyan: #0ea5e9;
  --pillbg: rgba(255, 255, 255, .82); --pillline: rgba(255, 255, 255, .95);
  --softBtn: #e4ebff; --softBtn2: #d9e3ff; --softLine: #d5deff; --softInk: #1f3fb8;
  --onInk: #ffffff;
  --veil: radial-gradient(60% 50% at 12% 20%, rgba(190, 205, 255, .55), transparent 70%), radial-gradient(50% 45% at 88% 12%, rgba(215, 205, 255, .5), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(200, 220, 255, .55), transparent 70%), linear-gradient(180deg, #ffffff 0%, #eef3ff 45%, #f5f7ff 100%);
  --sky: #eef2fc; --apron: #dfe6f7;
  --shadow: 0 18px 50px -22px rgba(23, 32, 56, .28), 0 2px 6px -2px rgba(23, 32, 56, .08);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --disp: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --r: 22px;
}
html[data-theme="white"] {
  --bg: #ffffff; --bg2: #f7f7f8;
  --glass: #ffffff; --glass2: #f5f5f7; --soft: #ededf0;
  --line: #e6e6ea; --line2: #d4d4da;
  --ink: #111114; --ink2: #3d3d46; --dim: #80808c;
  --goSoft: #ffe9d8; --goInk: #7a3200;
  --gold: #c98400; --win: #15a34a; --hot: #e11d48;
  --pillbg: rgba(255, 255, 255, .9); --pillline: #e6e6ea;
  --softBtn: #f0f0f3; --softBtn2: #e6e6ea; --softLine: #dcdce2; --softInk: #111114;
  --onInk: #ffffff;
  --veil: linear-gradient(180deg, #ffffff 0%, #fafafb 100%);
  --sky: #f6f6f8; --apron: #e9e9ee;
  --shadow: 0 14px 40px -22px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .05);
}
html[data-theme="black"] {
  --bg: #07070b; --bg2: #0c0c12;
  --glass: #101016; --glass2: #17171f; --soft: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .17);
  --ink: #f2efe9; --ink2: #c9c4bb; --dim: #8a8797;
  --goSoft: rgba(255, 122, 26, .16); --goInk: #ffb36b;
  --gold: #ffc857; --win: #6fe3a1; --hot: #ff4d6d; --cyan: #6ee7ff;
  --pillbg: rgba(12, 12, 18, .82); --pillline: rgba(255, 255, 255, .12);
  --softBtn: rgba(255, 255, 255, .07); --softBtn2: rgba(255, 255, 255, .12); --softLine: rgba(255, 255, 255, .14); --softInk: #f2efe9;
  --onInk: #07070b;
  --veil: radial-gradient(50% 40% at 15% 10%, rgba(255, 122, 26, .12), transparent 70%), radial-gradient(45% 40% at 85% 90%, rgba(255, 200, 87, .08), transparent 70%), linear-gradient(180deg, #0a0a10 0%, #07070b 100%);
  --sky: #07070b; --apron: #08080d;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}
/* The race and the countdown are the dark stage, whatever the theme. */
body[data-screen="race"], body[data-screen="count"] {
  --bg: #07070b; --bg2: #0c0c12;
  --glass: rgba(13, 13, 20, .72); --glass2: rgba(20, 20, 30, .78); --soft: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --ink: #f2efe9; --ink2: #c9c4bb; --dim: #8a8797;
  --goSoft: rgba(255, 122, 26, .16); --goInk: #ffb36b;
  --gold: #ffc857; --win: #6fe3a1; --hot: #ff4d6d; --cyan: #6ee7ff;
  --pillbg: rgba(9, 9, 14, .7); --pillline: rgba(255, 255, 255, .16); --onInk: #07070b;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--disp); font-size: 15.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { text-wrap: balance; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.tag { display: inline-block; font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: .14em; font-weight: 700; padding: 2px 6px; border-radius: 999px; vertical-align: middle; }
.tag--demo { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); margin-left: 4px; }
.tag--paid { color: var(--win); background: color-mix(in srgb, var(--win) 16%, transparent); }
.tag--due { color: var(--goInk); background: var(--goSoft); }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; color: var(--goInk); background: var(--goSoft); padding: 1px 5px; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.gold { color: var(--gold) !important; }
.small { font-size: 12.5px; }
::selection { background: var(--go); color: #fff; }
:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- the world behind everything --------------------------------------- */

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
/* The veil: the page's pale ground over the world, with a soft window where
   the page wants the world seen. It lifts for the countdown and the race. */
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: var(--veil);
  transition: opacity .35s ease;
  --hx: 50vw; --hy: 60vh; --hw: 0px; --hh: 0px;
}
.veil[data-hole="1"] {
  -webkit-mask-image: radial-gradient(ellipse var(--hw) var(--hh) at var(--hx) var(--hy), transparent 0 58%, #000 100%);
  mask-image: radial-gradient(ellipse var(--hw) var(--hh) at var(--hx) var(--hy), transparent 0 58%, #000 100%);
}
body[data-screen="race"] .veil, body[data-screen="count"] .veil { opacity: 0; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0, 0, 0, .55) 100%);
}
body[data-screen="race"] .vignette, body[data-screen="count"] .vignette { opacity: 1; }
.noise { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }

/* ---- top bar ------------------------------------------------------------ */

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 0;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.top__left, .top__right {
  display: flex; align-items: center; gap: 4px; padding: 6px 8px;
  background: var(--pillbg); border: 1px solid var(--pillline); border-radius: 999px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.top__left { padding-left: 14px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: 8px; }
.brand__mark {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, var(--go) 46%, #8a3a08 100%);
  box-shadow: 0 6px 14px -6px rgba(255, 122, 26, .7);
}
.brand__name { font-weight: 800; letter-spacing: -.01em; font-size: 18px; color: var(--ink); }
.brand__name b { color: var(--go); font-weight: 800; }
.brand__name.small { font-size: 15px; }
.top__links { display: flex; gap: 2px; }
.top__links a { padding: 7px 11px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 14.5px; color: var(--ink2); }
.top__links a:hover { color: var(--ink); background: var(--goSoft); }
.top__race { display: flex; align-items: center; gap: 8px; margin-right: 8px; padding: 0 12px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.top__right { gap: 6px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 700;
  border: 1px solid var(--line2); border-radius: 999px; padding: 4px 10px;
  background: var(--glass2); text-decoration: none; cursor: default; color: var(--ink2);
}
.pill--phase { color: var(--go); border-color: rgba(255, 122, 26, .4); background: var(--goSoft); }
body[data-phase="racing"] .pill--phase { color: var(--hot); border-color: rgba(255, 77, 109, .5); }
body[data-phase="result"] .pill--phase { color: var(--win); border-color: rgba(111, 227, 161, .5); }
.pill--net i { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 8px var(--win); }
.pill--live { color: var(--hot); border-color: rgba(255, 77, 109, .5); }
.pill--live i, .kicker .live { width: 7px; height: 7px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 8px var(--hot); animation: pulse 1.4s infinite; display: inline-block; }
.pill--mega { color: #fff; background: linear-gradient(90deg, #e59a1a, var(--go)); border-color: transparent; animation: shine 1.4s ease-in-out infinite; }
.pill--demo { color: var(--gold); border-color: rgba(255, 200, 87, .45); }
.pill--ca { cursor: copy; }
.pill--ca em { font-style: normal; color: var(--dim); }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes shine { 50% { filter: brightness(1.25); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line2); border-radius: 999px; padding: 10px 18px;
  font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--glass); color: var(--ink);
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 16px -10px rgba(23, 32, 56, .3);
}
.btn:hover { background: var(--glass2); border-color: var(--dim); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--accent {
  background: linear-gradient(180deg, #ff8f3a, var(--go2)); color: #fff; border-color: rgba(255, 170, 100, .5);
  box-shadow: 0 10px 30px -12px rgba(255, 122, 26, .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--accent:hover { background: linear-gradient(180deg, #ff9d52, #f5731a); box-shadow: 0 14px 34px -12px rgba(255, 122, 26, 1); }
.btn--glass { background: var(--glass); }
.btn--soft { background: var(--softBtn); border-color: var(--softLine); color: var(--softInk); }
.btn--soft:hover { background: var(--softBtn2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--dim); box-shadow: none; }
.btn--danger { border-color: rgba(225, 29, 72, .4); color: var(--hot); }
.btn--icon { padding: 10px 12px; }
.btn--xl { padding: 15px 26px; font-size: 16.5px; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn__dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #ffd2ad 55%, #a54a08 100%); }

.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
}
body[data-screen="race"] .glass, body[data-screen="count"] .glass { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; font-weight: 700; color: var(--go); }
.kicker--plain { color: var(--go); margin-bottom: 8px; }

/* ---- screens ------------------------------------------------------------ */

#screens { position: relative; z-index: 5; }
.screen { min-height: 100dvh; }

/* home scrolls over the world */
.screen--home { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
.hero { position: relative; padding: clamp(50px, 8vw, 110px) var(--gut) 30px; max-width: 1240px; margin: 0 auto; text-align: center; }
.hero__in { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; display: grid; justify-items: center; }
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floaters { }
/* Each coin arrives from deep in the page, small and faint, and grows as it
   comes forward to its place; then it drifts. The wrapper flies, the coin
   inside floats, so the two motions never fight. */
.fl { position: absolute; opacity: 0; will-change: transform, opacity; }
/* nothing moves until the marbles are the real ones: the page waits for the
   renders, then every coin fades up into place, a beat apart */
.floaters.is-in .fl { animation: arrive .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__in { animation: fadeup .8s cubic-bezier(.2, .7, .2, 1) both; }
.trust { animation: fadeup .8s .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.floater { display: block; width: 100%; height: 100%; border-radius: 50%; animation: floaty 8s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(23, 32, 56, .25)); }
@keyframes arrive { from { transform: translateY(26px) scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .fl, .floaters.is-in .fl, .hero__in, .trust { animation: none; opacity: 1; } }
.hero__cta { justify-content: center; }
#commitLine { word-break: break-all; font-size: 12px; }
.trust { list-style: none; margin: 56px auto 0; padding: 22px 0 0; max-width: 1180px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; text-align: left; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.trust li { display: flex; gap: 10px; align-items: flex-start; padding: 0 12px; border-left: 1px solid var(--line); }
.trust li:first-child { border-left: 0; }
.trust .ic { color: var(--go); margin-top: 1px; }
.trust b { display: block; font-size: 14px; font-weight: 600; }
.trust span { font-size: 12px; color: var(--dim); line-height: 1.4; }
.stagewrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut); }
.stage { position: relative; height: clamp(260px, 42vw, 460px); border-radius: 28px; }
.stage__tag { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .2em; color: var(--ink2); background: var(--pillbg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 98px); font-weight: 700; line-height: .96; letter-spacing: -.045em;
  margin: 18px 0 22px; color: var(--ink); white-space: nowrap;
}
@media (max-width: 760px) { .hero h1 { white-space: normal; } }
.hero h1 span { color: var(--go); }
.hero p { max-width: 54ch; font-size: clamp(17px, 2vw, 22px); color: var(--ink2); margin: 0 0 28px; line-height: 1.45; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.livebar {
  margin: 0 var(--gut); max-width: 1180px; margin-left: auto; margin-right: auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 1px; overflow: hidden;
  width: calc(100% - 2 * var(--gut));
}
.livebar__cell { padding: 16px 20px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.livebar__cell em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--dim); }
.livebar__cell b { font-size: 20px; font-weight: 700; }
.livebar__cell b.big { font-size: 28px; color: var(--go); }
.livebar__cell--cta { display: flex; align-items: center; border-right: 0; padding: 12px 16px; }

.block { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gut) 0; }
.block__head { max-width: 62ch; margin-bottom: 22px; }
.block__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.block__head--row h2 { margin-bottom: 0; }
.table { padding: 6px; }
.table__row { display: grid; grid-template-columns: 1.1fr 1.2fr 1.4fr .8fr .9fr .8fr; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; font-size: 13.5px; }
.table__row:not(.table__head):hover { background: var(--glass2); cursor: pointer; }
.table__head { font-size: 9.5px; letter-spacing: .18em; color: var(--dim); }
.table__row .who { color: var(--ink); }
.block__head h2, .panel h3 { font-size: clamp(28px, 4vw, 48px); font-weight: 700; letter-spacing: -.035em; margin: 8px 0 8px; }
.panel h3 { font-size: clamp(22px, 2.4vw, 28px); }
.block__head p { margin: 0; color: var(--ink2); }
.block--split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: 24px; }
.panel h3 { font-size: 22px; margin-top: 0; }
.panel p { color: var(--ink2); }

.races { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.race {
  position: relative; padding: 20px; display: grid; gap: 12px; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.race:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, .45); }
.race--open { border-color: rgba(255, 122, 26, .55); box-shadow: 0 24px 50px -24px rgba(255, 122, 26, .5); }
.race--mega { border-color: rgba(255, 200, 87, .6); }
.race__no { display: flex; justify-content: space-between; align-items: center; }
.race__no b { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.race__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.race__stats div em { font-style: normal; display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.race__stats div b { font-family: var(--mono); font-size: 15px; }
.race__bar { height: 5px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.race__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--go2), #ffb36b); transition: width .5s ease; }
.race .btn { width: 100%; }

.steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--mono); color: var(--go); font-weight: 700; font-size: 12px; padding-top: 3px; }
.steps b { display: block; font-size: 15.5px; grid-column: 2; }
.steps span { color: var(--ink2); grid-column: 2; font-size: 14px; }

.foot { max-width: 1180px; margin: 60px auto 0; padding: 34px var(--gut) calc(30px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13.5px; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 28px; }
.foot__brand p { margin: 12px 0 14px; max-width: 44ch; }
.foot__links { display: flex; gap: 8px; flex-wrap: wrap; }
.foot__col { display: grid; gap: 8px; align-content: start; }
.foot__col b { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.foot__col a { text-decoration: none; color: var(--ink2); }
.foot__col a:hover { color: var(--go); }
.foot__line { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }

/* ---- lobby -------------------------------------------------------------- */

.screen--lobby { padding: calc(28px + env(safe-area-inset-top, 0px)) var(--gut) 40px; }
.lobby { max-width: 1240px; margin: 0 auto; display: grid; gap: 14px; }
.lobby__head { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr; gap: 1px; overflow: hidden; }
.stat { padding: 16px 20px; display: grid; gap: 3px; align-content: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--dim); }
.stat b { font-size: 22px; font-weight: 700; }
.stat--race b { font-size: 28px; }
.stat--clock b.big { font-size: 34px; color: var(--go); }
body[data-phase="locked"] .stat--clock b.big { color: var(--gold); }
.lobby__body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.lobby__you, .lobby__feed, .lobby__field { padding: 18px; }
.you { display: flex; gap: 14px; align-items: center; }
.you canvas { border-radius: 16px; background: var(--soft); flex: none; }
.you__meta { display: grid; gap: 3px; min-width: 0; }
.you__meta b { font-size: 16px; }
.you__meta span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you__actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 14px; }
.tx { margin-top: 10px; display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--ink2); }
.tx i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: pulse 1s infinite; }
.tx[data-status="confirmed"] i { background: var(--win); box-shadow: 0 0 8px var(--win); animation: none; }
.tx[data-status="failed"] i { background: var(--hot); box-shadow: 0 0 8px var(--hot); animation: none; }
.auto { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--ink2); accent-color: var(--go); }
.lobby__fieldhead { display: flex; justify-content: space-between; align-items: baseline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.pc {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line);
  animation: rise .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
.pc canvas { width: 34px; height: 34px; border-radius: 50%; }
.pc b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc span { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.pc.is-you { border-color: rgba(255, 122, 26, .6); background: var(--goSoft); }
.pc em { font-style: normal; position: absolute; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.empty { color: var(--dim); font-size: 13px; padding: 24px 0; text-align: center; }
.feed { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.feed li { font-size: 13px; color: var(--ink2); animation: rise .3s ease both; }
.feed li b { font-family: var(--mono); font-size: 11.5px; color: var(--go); }
.feed li.sys { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.chatbar { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 10px; }
.chatbar input { background: var(--soft); border: 1px solid var(--line2); border-radius: 12px; padding: 9px 12px; min-width: 0; }
.chatbar input:focus { outline: none; border-color: var(--go); }

/* ---- countdown ---------------------------------------------------------- */

.screen--count { display: grid; place-items: center; pointer-events: none; position: fixed; inset: 0; }
.count {
  font-size: clamp(140px, 30vw, 360px); font-weight: 900; line-height: 1; letter-spacing: -.04em;
  color: #fff; text-shadow: 0 0 60px rgba(255, 122, 26, .9), 0 0 120px rgba(255, 122, 26, .5);
  animation: countpop .9s cubic-bezier(.2, 1.4, .3, 1) both;
}
.count.go { color: var(--go); text-shadow: 0 0 80px rgba(255, 122, 26, 1), 0 0 160px rgba(255, 200, 87, .6); }
.count__sub { font-size: 14px; letter-spacing: .3em; color: var(--ink2); margin-top: 10px; }
@keyframes countpop { 0% { transform: scale(2.4); opacity: 0; } 30% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* ---- race HUD ----------------------------------------------------------- */

.screen--race { position: fixed; inset: 0; pointer-events: none; }
.hud { position: absolute; pointer-events: auto; }
.hud--tl { top: calc(22px + env(safe-area-inset-top, 0px)); left: var(--gut); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.hud--board {
  top: calc(22px + env(safe-area-inset-top, 0px)); right: var(--gut); list-style: none; margin: 0; padding: 8px;
  display: grid; gap: 3px; min-width: 190px; font-size: 12px;
  background: rgba(7, 7, 11, .55); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(10px);
}
.hud--board li { display: grid; grid-template-columns: 22px 12px 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; color: var(--ink2); }
.hud--board li i { width: 10px; height: 10px; border-radius: 50%; }
.hud--board li.is-you { background: var(--goSoft); color: var(--ink); }
.hud--board li.is-lead { color: var(--gold); }
.hud--board li span.t { color: var(--dim); font-size: 10.5px; }
.hud--me { left: var(--gut); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding: 12px 16px; display: grid; grid-template-columns: auto auto; gap: 6px 22px; min-width: 240px; }
.hud--me em { display: block; font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: var(--dim); }
.hud--me b { font-size: 24px; font-weight: 700; color: var(--go); }
.hud--me .bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.hud--me .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--go2), #ffb36b); transition: width .3s ease; }
.hud--cam { right: var(--gut); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 4px; padding: 4px; background: rgba(7, 7, 11, .55); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(10px); }
.cam { background: none; border: 0; border-radius: 9px; padding: 7px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--dim); cursor: pointer; }
.cam.is-on { background: var(--goSoft); color: var(--go); }
.hud--track { left: 50%; transform: translateX(-50%); bottom: calc(30px + env(safe-area-inset-bottom, 0px)); font-size: 10.5px; letter-spacing: .2em; color: var(--dim); pointer-events: none; }

/* ---- results ------------------------------------------------------------ */

.screen--results { display: grid; place-items: center; padding: calc(40px + env(safe-area-inset-top, 0px)) var(--gut) 40px; }
.results { width: min(560px, 100%); padding: 28px; text-align: center; display: grid; gap: 16px; animation: rise .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.results__cup { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--gold) 22%, var(--glass)); color: var(--gold); box-shadow: 0 14px 30px -14px rgba(217, 143, 0, .6); }
.results__cup .ic { width: 30px; height: 30px; }
.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.podium li { display: grid; grid-template-columns: 44px 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); }
.podium li:first-child { background: color-mix(in srgb, var(--gold) 14%, var(--glass)); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.podium .place { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--gold); }
.podium li:not(:first-child) .place { color: var(--dim); }
.podium canvas { width: 36px; height: 36px; border-radius: 50%; }
.podium .who b { display: block; font-size: 14px; }
.podium .who span { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.podium .prize { font-family: var(--mono); font-weight: 700; color: var(--gold); }
.podium li:not(:first-child) .prize { color: var(--dim); font-weight: 400; }
.results__you { display: grid; gap: 2px; }
.results__you em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.results__you b { font-size: 34px; color: var(--go); }
.results__pay { display: grid; gap: 8px; justify-items: center; }
.results__pay em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.addr { background: var(--soft); border: 1px dashed var(--line2); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; word-break: break-all; cursor: copy; width: 100%; }
.addr:hover { border-color: var(--win); }
.results__payrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.results__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- modals ------------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(23, 32, 56, .38); backdrop-filter: blur(8px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal__card { width: min(440px, 100%); padding: 22px; display: grid; gap: 14px; animation: rise .3s cubic-bezier(.2, 1.4, .4, 1); }
.modal__card--wide { width: min(720px, 100%); }
.modal__head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.modal__card p { margin: 0; }
.x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--dim); cursor: pointer; }
.wallets { display: grid; gap: 8px; }
.wl {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); cursor: pointer; text-align: left;
}
.wl:hover { border-color: rgba(255, 122, 26, .5); background: var(--goSoft); }
.wl img, .wl .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--goSoft); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: var(--go); }
.wl b { display: block; font-size: 14.5px; }
.wl span { font-size: 11.5px; color: var(--dim); }
.wl .go { color: var(--go); font-family: var(--mono); font-size: 12px; }
.modal__demo { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.modal__row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.account { display: grid; gap: 6px; justify-items: start; }
.account__kind { font-size: 12px; color: var(--dim); }
.account b { font-size: 13.5px; word-break: break-all; }
.account__stats { font-size: 12px; }

.skin { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.skin__prev { display: grid; gap: 8px; justify-items: center; }
.skin__prev canvas { border-radius: 20px; background: var(--soft); }
.name { width: 100%; background: var(--soft); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; text-align: center; letter-spacing: .06em; }
.name:focus { outline: none; border-color: var(--go); }
.skin__pick { display: grid; gap: 14px; align-content: start; }
.pickrow { display: grid; gap: 7px; }
.pickrow em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--dim); }
.mats, .faces, .swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.mt, .fc { display: grid; justify-items: center; gap: 3px; padding: 6px 8px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); cursor: pointer; }
.mt canvas, .fc canvas { width: 40px; height: 40px; border-radius: 50%; }
.mt span, .fc span { font-family: var(--mono); font-size: 9px; color: var(--dim); }
.mt.on, .fc.on { border-color: var(--go); background: var(--goSoft); }
.mt.on span, .fc.on span { color: var(--go); }
.sw { width: 28px; height: 28px; border-radius: 50%; padding: 0; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.sw.on { border-color: var(--ink); transform: scale(1.1); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--onInk); border: 1px solid var(--ink); font-size: 13.5px;
  box-shadow: 0 20px 50px -20px rgba(23, 32, 56, .6); animation: rise .25s ease; max-width: calc(100% - 32px);
}
.toast.good { border-color: var(--win); }
.toast.bad { border-color: var(--hot); }

/* ---- modes ---------------------------------------------------------------- */

.mode__img { position: relative; overflow: hidden; border-radius: 12px; background: #0a0a10; aspect-ratio: 16 / 9; }
.mode__img canvas { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.modecard { padding: 10px; display: grid; gap: 10px; transition: transform .2s ease, border-color .2s ease; }
.modecard:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, .4); }
.modecard.is-now { border-color: rgba(255, 122, 26, .7); box-shadow: 0 24px 50px -24px rgba(255, 122, 26, .5); }
.modecard.is-next { border-color: rgba(255, 200, 87, .6); }
.modecard__body { display: grid; gap: 8px; padding: 2px 6px 6px; }
.modecard__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modecard__top b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.modecard__body p { margin: 0; color: var(--ink2); font-size: 13.5px; line-height: 1.5; }
.modecard__phys, .mode__phys { display: flex; gap: 14px; flex-wrap: wrap; }
.modecard__phys span, .mode__phys span { display: grid; }
.modecard__phys em, .mode__phys em { font-style: normal; font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.modecard__phys b, .mode__phys b { font-size: 13px; color: var(--ink); }

.lobby__mode { display: grid; grid-template-columns: 240px 1fr auto; gap: 18px; align-items: center; padding: 12px 18px 12px 12px; }
.lobby__mode .mode__img { width: 240px; }
.mode__meta { display: grid; gap: 4px; }
.mode__meta b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.mode__meta p { margin: 0; color: var(--ink2); font-size: 14px; max-width: 60ch; }
.mode__phys { gap: 22px; }

.race__track { display: flex; align-items: center; gap: 10px; }
.race__track .mode__img { width: 96px; flex: none; border-radius: 8px; }
.race__track em { font-style: normal; display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.race__track b { display: block; font-size: 15px; font-weight: 700; }
.race__track.is-tbd b { color: var(--dim); font-weight: 500; }
.race__stats b.race__tbd { color: var(--dim); font-weight: 500; font-family: var(--disp); font-size: 13.5px; }
.race__track.is-tbd::before { content: '?'; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--glass2); border: 1px dashed var(--line2); font-family: var(--mono); color: var(--dim); flex: none; }

/* ---- the poll ------------------------------------------------------------- */

.results { width: min(760px, 100%); }
.poll { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.poll__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.poll__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pollopt {
  display: grid; gap: 10px; padding: 8px; text-align: left; cursor: pointer;
  background: var(--glass2); border: 1px solid var(--line2); border-radius: 14px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pollopt:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255, 122, 26, .5); }
.pollopt.is-mine { border-color: var(--go); box-shadow: 0 0 40px -14px rgba(255, 122, 26, .8); }
.pollopt.is-winner { border-color: var(--gold); box-shadow: 0 0 40px -14px rgba(255, 200, 87, .9); }
.pollopt.is-lost { opacity: .5; }
.pollopt:disabled { cursor: default; }
.pollopt__meta { display: grid; gap: 5px; padding: 0 4px 4px; }
.pollopt__meta b { font-size: 16px; font-weight: 800; }
.pollopt__meta p { margin: 0; color: var(--ink2); font-size: 12.5px; line-height: 1.45; min-height: 3.6em; }
.pollopt__meta span { font-size: 11px; color: var(--dim); }
.pollopt__meta em { font-style: normal; color: var(--ink); }
.pollopt__bar { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.pollopt__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--go2), #ffb36b); transition: width .4s ease; }
.pollopt.is-winner .pollopt__bar i { background: linear-gradient(90deg, #e58a12, var(--gold)); }
.pollopt.is-mine .pollopt__meta b::after { content: ' · your vote'; font-size: 11px; color: var(--go); font-weight: 600; }
.poll__done { display: grid; gap: 2px; text-align: center; padding: 8px 0 0; }
.poll__done em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.poll__done b { font-size: 26px; font-weight: 800; color: var(--gold); }

/* ---- themes --------------------------------------------------------------- */

.themes { display: flex; gap: 4px; padding: 3px; margin-right: 4px; border-radius: 999px; background: var(--soft); }
.theme { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.theme[data-theme="legacy"] { background: linear-gradient(135deg, #dfe7ff, #7f9dff); }
.theme[data-theme="black"] { background: linear-gradient(135deg, #2a2a36, #07070b); }
.theme[data-theme="white"] { background: linear-gradient(135deg, #ffffff, #e2e2e8); }
.theme.is-on { border-color: var(--go); }

/* ---- the dock ------------------------------------------------------------- */

.dock {
  position: fixed; left: 14px; top: 50%; z-index: 20;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px;
  width: 92px;
  background: var(--pillbg); border: 1px solid var(--pillline); border-radius: 26px;
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: none;
}
/* On the home page the dock waits until you scroll down to the track, then
   springs in from the left; on every other screen it is there from the
   start. It steps aside for the countdown and the race. */
.dock { opacity: 0; pointer-events: none; transform: translate(-28px, -50%); }
.dock.is-shown { opacity: 1; pointer-events: auto; transform: translateY(-50%); animation: dockin .6s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes dockin { from { transform: translate(-40px, -50%); opacity: 0; } to { transform: translateY(-50%); opacity: 1; } }
body[data-screen="race"] .dock, body[data-screen="count"] .dock { opacity: 0 !important; pointer-events: none !important; transform: translate(-20px, -50%) !important; animation: none !important; }
/* once the page is scrolled the top bar steps away: the dock has it all */
.top { transition: opacity .25s ease, transform .25s ease; }
body.is-scrolled:not([data-screen="race"]):not([data-screen="count"]) .top { opacity: 0; transform: translateY(-16px); pointer-events: none; }
body.is-scrolled:not([data-screen="race"]):not([data-screen="count"]) .top > * { pointer-events: none; }
.dock__brand { display: grid; place-items: center; padding: 6px 0 2px; }
.dock__brand .brand__mark { width: 28px; height: 28px; }
.dock__race { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 9.5px; letter-spacing: .12em; color: var(--dim); padding: 2px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dock__race .pill { font-size: 8.5px; padding: 2px 7px; }
.dock__it--wallet.is-off { background: linear-gradient(180deg, #ff8f3a, var(--go2)); color: #fff; box-shadow: 0 10px 24px -12px rgba(255, 122, 26, .9); }
.dock__it--wallet.is-off .ic { color: #fff; }
.dock__themes { display: flex; justify-content: center; gap: 5px; padding: 8px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.dock__themes .theme { width: 16px; height: 16px; }
.dock__it--wallet span { font-size: 10px; }
.dock__it {
  display: grid; justify-items: center; row-gap: 3px;
  padding: 9px 4px 8px; border: 0; border-radius: 18px; background: transparent; cursor: pointer; color: var(--ink2);
  font-weight: 600; font-size: 11.5px; line-height: 1.1; text-align: center;
}
.dock__it .ic { width: 20px; height: 20px; }
.dock__it span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock__it em { font-style: normal; font-size: 8.5px; letter-spacing: .14em; color: var(--dim); }
body[data-phase="racing"] .dock__it--race em { color: var(--hot); }
body[data-phase="result"] .dock__it--race em { color: var(--go); }
.dock__it:hover { background: var(--glass2); color: var(--ink); }
.dock__it.is-on { background: var(--goSoft); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .45); }
.dock__it.is-on i { color: var(--go); }
.dock__stat { display: grid; justify-items: center; text-align: center; padding: 8px 4px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.dock__stat em { font-style: normal; font-size: 8.5px; letter-spacing: .16em; color: var(--dim); }
.dock__stat b { font-size: 13px; font-weight: 700; }
@keyframes blink { 50% { opacity: .35; } }
.screen--home, .screen--lobby, .screen--launch, .screen--fair { padding-bottom: 40px; }
@media (min-width: 1001px) { .screen--home, .screen--lobby, .screen--launch, .screen--fair, .screen--results { padding-left: calc(var(--gut) + 96px); } .stagewrap, .block, .foot, .launch, .lobby { max-width: min(1180px, calc(100vw - 96px - 2 * var(--gut))); } }

/* ---- the phone's top strip -------------------------------------------------- */

.mtop { display: none; }
@media (max-width: 1000px) {
  .mtop {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: var(--pillbg); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .mtop .brand__name { font-size: 16px; }
  .mtop__race { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
  body[data-screen="race"] .mtop, body[data-screen="count"] .mtop { display: none; }
  .screen--home, .screen--lobby, .screen--launch, .screen--fair, .screen--results { padding-top: calc(70px + env(safe-area-inset-top, 0px)); }
}

/* ---- the notice on arrival ------------------------------------------------- */

.notice {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  width: min(420px, calc(100vw - 36px)); padding: 16px 18px; display: grid; gap: 10px;
  animation: rise .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.notice b { font-size: 15px; }
.notice p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.notice__row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.notice__row .dim { margin-right: auto; font-size: 11.5px; }
body[data-screen="race"] .notice, body[data-screen="count"] .notice { display: none; }
@media (max-width: 640px) { .notice { right: 10px; left: 10px; width: auto; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); } }

/* ---- rewards -------------------------------------------------------------- */

.rewards__total { display: grid; gap: 2px; padding: 12px 18px; text-align: right; }
.rewards__total em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: var(--dim); }
.rewards__total b { font-size: 24px; }
#rewardsTable .table__row { grid-template-columns: 1fr 1.6fr 1fr 1.2fr 1.4fr; }
.table__row a { color: var(--go); text-decoration: none; }
.table__row a:hover { text-decoration: underline; }
@media (max-width: 1000px) { #rewardsTable .table__row { grid-template-columns: 1fr 1.6fr 1fr; } #rewardsTable .table__row > :nth-child(4), #rewardsTable .table__row > :nth-child(5) { display: none; } }

/* ---- winners -------------------------------------------------------------- */

.winners { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.wlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.wlist li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; background: var(--glass2); }
.wlist li .no { color: var(--dim); font-size: 11px; }
.wlist li .who { color: var(--ink); cursor: pointer; }
.wlist li .st { grid-column: 2 / -1; color: var(--dim); font-size: 10.5px; }
.wlist li .pot { text-align: right; }
.wlist li.dim { padding: 10px 0; }

/* ---- fair ----------------------------------------------------------------- */

.fair__how .steps { margin-top: 12px; }
.fair__pick { display: flex; gap: 8px; margin: 10px 0; }
.fair__select { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--glass); color: var(--ink); font-size: 14px; }
.fair__out { margin: 0; padding: 14px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: var(--ink2); min-height: 120px; }
.fair__verdict { margin-top: 10px; padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.fair__verdict.ok { color: var(--win); background: color-mix(in srgb, var(--win) 14%, transparent); }
.fair__verdict.no { color: var(--hot); background: color-mix(in srgb, var(--hot) 14%, transparent); }
.screen--fair { padding-bottom: 40px; }

/* ---- the launchpad -------------------------------------------------------- */

.launch__pons { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); }
.launch__check { display: flex !important; gap: 10px; align-items: flex-start; }
.launch__check input { width: auto !important; margin-top: 4px; accent-color: var(--go); }
.launch__check span { text-transform: none !important; letter-spacing: 0 !important; font-family: var(--disp) !important; font-size: 13.5px !important; color: var(--ink2) !important; }
.launch__done { display: grid; gap: 10px; padding: 16px 18px; border-color: color-mix(in srgb, var(--win) 45%, transparent); }
.launch__done b { word-break: break-all; font-size: 13px; }
.launch__links { display: flex; gap: 8px; flex-wrap: wrap; }
.you__name { display: grid; gap: 6px; margin: 8px 0 10px; }
.you__name > span { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--go); }
.you__name > span em { display: block; font-style: normal; letter-spacing: 0; text-transform: none; font-family: var(--disp); font-size: 12px; color: var(--dim); margin-top: 2px; }
.you__name input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass2); color: var(--ink); font-size: 14px; }
.you__name input:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
.results__paid { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; color: var(--win); }
.results__paid a { color: var(--go); }

.screen--launch { padding: calc(28px + env(safe-area-inset-top, 0px)) var(--gut) 40px; }
.launch { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.launch__head { max-width: 62ch; }
.launch__head h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 700; letter-spacing: -.04em; margin: 8px 0 10px; }
.launch__head p { margin: 0; color: var(--ink2); }
.launch__body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.launch__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 22px; }
.launch__form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink2); }
.launch__form label > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.launch__form label small { font-size: 11.5px; }
.launch__form .wide, .launch__form .launch__actions { grid-column: 1 / -1; }
.launch__form input, .launch__form select {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass); color: var(--ink); font-size: 14px;
}
.launch__form input:focus, .launch__form select:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
.launch__form select option { background: var(--glass); }
.launch__form input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
.launch__form input[type="range"] { padding: 0; accent-color: var(--go); height: 42px; background: transparent; border: 0; }
.launch__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.launch__prev { display: grid; gap: 14px; }
.lcard { padding: 20px; display: grid; gap: 14px; }
.lcard__top { display: flex; align-items: center; gap: 14px; }
.lcard__top canvas { width: 60px; height: 60px; border-radius: 50%; }
.lcard__name { display: grid; flex: 1; }
.lcard__name b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.lcard p { margin: 0; }
.lcard__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.lcard__stats em { font-style: normal; display: block; font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.lcard__stats b { font-size: 15px; }
.lcard__status { font-size: 10.5px; letter-spacing: .16em; padding-top: 10px; border-top: 1px solid var(--line); }
.launches { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.launches li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--glass2); cursor: pointer; }
.launches li:hover { background: var(--soft); }
.launches li canvas { width: 30px; height: 30px; border-radius: 50%; }
.launches li b { display: block; font-size: 13px; }
.launches li span { display: block; font-size: 10.5px; }
.launches li .x { background: none; border: 0; color: var(--dim); font-size: 18px; cursor: pointer; padding: 2px 6px; }
.launches li .x:hover { color: var(--hot); }
.launch__how { padding: 0; }

/* ---- phones ------------------------------------------------------------- */

@media (max-width: 1000px) {
  .lobby__body { grid-template-columns: 1fr; }
  .lobby__head { grid-template-columns: 1fr 1fr; }
  .stat--race { grid-column: 1 / -1; }
  .stat--clock { grid-column: 1 / -1; }
  .block--split { grid-template-columns: 1fr; }
  .livebar { grid-template-columns: 1fr 1fr; }
  .livebar__cell--cta { grid-column: 1 / -1; }
  .grid { max-height: none; }
}
@media (max-width: 1000px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .table__row { grid-template-columns: 1fr 1fr 1.4fr .8fr; }
  .table__row > :nth-child(5), .table__row > :nth-child(6) { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .trust li { border-left: 0; padding: 0; }
  .top__links { display: none; }
  .lobby__mode { grid-template-columns: 1fr; }
  .lobby__mode .mode__img { width: 100%; }
  .launch__body { grid-template-columns: 1fr; }
  .winners { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .foot__grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .fl { display: none; }
  .fl:nth-child(-n+4) { display: block; transform: scale(.6); }
  .top__race { display: none; }
  .poll__opts { grid-template-columns: 1fr; }
  .launch__form { grid-template-columns: 1fr; }
  .dock { left: 50%; top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); flex-direction: row; width: auto; max-width: calc(100vw - 20px); gap: 0; padding: 4px; border-radius: 999px; max-height: none; }
  .dock { transform: translate(-50%, 20px); }
  .dock.is-shown { transform: translateX(-50%); animation: none; }
  body[data-screen="race"] .dock, body[data-screen="count"] .dock { transform: translate(-50%, 20px) !important; }
  .dock__brand, .dock__race, .dock__themes { display: none; }
  body.is-scrolled:not([data-screen="race"]):not([data-screen="count"]) .top { opacity: 1; transform: none; pointer-events: auto; }
  body.is-scrolled:not([data-screen="race"]):not([data-screen="count"]) .top > * { pointer-events: auto; }
  .dock__it { padding: 6px 8px; font-size: 10px; border-radius: 999px; }
  .dock__it em { display: none; }
  .dock__stat { display: none; }
  .screen--home, .screen--lobby, .screen--launch { padding-bottom: 90px; }
  .dock__it[data-dock="wallet"] span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
  .top { gap: 8px; }
  .top__race { display: none; }
  .brand__name { display: none; }
  .hud--board { right: 8px; min-width: 150px; font-size: 11px; top: calc(60px + env(safe-area-inset-top, 0px)); }
  .hud--board li:nth-child(n+6) { display: none; }
  .hud--me { left: 8px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); min-width: 0; padding: 10px 12px; }
  .hud--me b { font-size: 18px; }
  .hud--cam { right: 8px; left: 8px; justify-content: center; }
  .hud--track { display: none; }
  .results__cta { grid-template-columns: 1fr; }
  .skin { grid-template-columns: 1fr; }
  .skin__prev { grid-template-columns: 1fr; }
  .flow li:not(:last-child)::after { display: none; }
  .hero h1 { font-size: clamp(44px, 15vw, 90px); }
}
@media (prefers-reduced-motion: reduce) {
  .count, .pc, .feed li, .results, .modal__card, .toast { animation: none; }
  .pill--live i, .kicker .live, .tx i { animation: none; }
}

/* ---- the jar ------------------------------------------------------------ */

.livebar__cell--pot, .stat--pot { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.livebar__cell--pot > div, .stat--pot > div { display: grid; gap: 3px; }
.jar { position: relative; width: 56px; height: 70px; }
.jar svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.jar__top { animation: slosh 2.4s ease-in-out infinite; transform-origin: 60px 134px; }
@keyframes slosh { 50% { transform: translateX(2px) scaleY(1.25); } }
.jar[data-state="locked"] .jar__top, .jar[data-state="paid"] .jar__top { animation: none; }
.jar[data-state="locked"] svg path:nth-of-type(2) { stroke: var(--gold); }
.jar__lock { position: absolute; right: -6px; top: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--onInk); opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; }
.jar__lock .ic { width: 12px; height: 12px; }
.jar[data-state="locked"] .jar__lock { opacity: 1; transform: none; }
.jar__state { font-size: 9.5px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.jar[data-state="locked"] + div .jar__state { color: var(--gold); }
.jar[data-state="paid"] + div .jar__state { color: var(--win); }
.livebar__cell--pot b, .stat--pot b { line-height: 1.05; }
@media (prefers-reduced-motion: reduce) { .jar__top { animation: none; } }
