/* Broadcast-graphics look: slate panels, hairline rules, condensed athletic type,
   one accent per sport (set on :root by JS). Deliberately single-theme (night
   stadium); the pixel-art arena lives inside the canvases. */
:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-2: #0f141b;
  --panel: #131a23;
  --panel-2: #19222d;
  --line: #232e3b;
  --line-2: #33435a;
  --text: #edf1f5;
  --muted: #8b98a8;
  --dim: #5b6878;
  --accent: #34d399;
  --accent-ink: #04140d;
  --accent-2: #f5c84c;
  --good: #4ade80;
  --bad: #f87171;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pix: var(--display);
  --app-h: 100dvh;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --slant: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body {
  background: radial-gradient(120% 50% at 50% -8%, #17212e 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
[hidden], .hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { max-width: 600px; margin: 0 auto; min-height: var(--app-h); }
.screen { display: none; }
.screen.active { display: block; animation: fade 0.22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- type helpers ---------- */
.card-kicker, .hud-label, .sub-title, .prompt-kicker, .race-round, .lu-ovr::before {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.card-kicker { font-size: 13px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.card-kicker::before { content: ''; width: 14px; height: 4px; background: var(--accent); transform: skewX(-24deg); flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: 50px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  cursor: pointer;
  transition: transform 0.06s, filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; clip-path: var(--slant); border-radius: 0; padding-inline: 22px; }
.btn-xl { min-height: 56px; font-size: 20px; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn:disabled { opacity: 0.5; cursor: progress; filter: none; transform: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 4px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--muted); font-size: 18px; cursor: pointer; justify-self: start;
}
.icon-btn.armed { border-color: var(--bad); color: var(--bad); background: #2a1216; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 10px 0; font-size: 15px; min-height: 44px; }

/* ---------- hub ---------- */
#hub.active { padding-block: calc(var(--safe-t) + 28px) calc(var(--safe-b) + 28px); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.hub-head { margin-bottom: 22px; }
.wordmark {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(46px, 15vw, 76px); line-height: 0.9; letter-spacing: -0.01em; position: relative; display: inline-block;
}
.wordmark::after { content: ''; display: block; height: 6px; width: 62%; margin-top: 8px; background: linear-gradient(90deg, #34d399 0 33%, #fb923c 33% 66%, #facc15 66%); transform: skewX(-24deg); transform-origin: left; }
.wordmark.sm { font-size: 24px; }
.wordmark.sm::after { height: 3px; margin-top: 3px; background: var(--accent); }
.hub-lede { margin: 16px 0 0; font-size: 18px; color: #c6cfda; max-width: 34ch; text-wrap: pretty; }
.hub-lede b { color: var(--text); }
.sport-grid { display: grid; gap: 12px; }
.sport-card {
  position: relative; display: block; width: 100%; padding: 0; text-align: left; cursor: pointer;
  aspect-ratio: 16 / 7; max-width: 100%; min-height: 150px; overflow: hidden;
  border: 1px solid var(--line-2); border-left: 4px solid var(--c); border-radius: 6px; background: var(--panel);
  transition: transform 0.12s, border-color 0.15s;
}
.sport-card:hover { transform: translateY(-1px); border-color: var(--c); }
.sport-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.sport-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(7, 10, 15, 0.92) 92%); pointer-events: none; }
.sport-label { position: absolute; left: 14px; right: 90px; bottom: 12px; z-index: 1; display: grid; gap: 2px; }
.sport-label b { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 32px; line-height: 1; color: #fff; }
.sport-label small { font-size: 13px; color: #b8c3cf; line-height: 1.3; }
.sport-go {
  position: absolute; right: 12px; bottom: 14px; z-index: 1; font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 16px; padding: 8px 18px; background: var(--c); color: #0b0f14; clip-path: var(--slant);
}
.hub-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.hub-points li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); }
.hub-points b { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); font-size: 15px; }
.hub-points span { color: #c6cfda; font-size: 15px; }
@media (min-width: 600px) { .sport-card { aspect-ratio: 16 / 6; } }

/* ---------- sport home ---------- */
.hero { position: relative; height: clamp(250px, 72vw, 320px); overflow: hidden; border-bottom: 1px solid var(--line-2); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(7, 10, 15, 0.88) 0%, rgba(7, 10, 15, 0.7) 45%, rgba(7, 10, 15, 0.2) 70%, transparent 82%); pointer-events: none; }
.hero-top {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding-block: calc(var(--safe-t) + 10px) 0; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.back-btn { background: rgba(11, 15, 20, 0.6); border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); padding: 8px 12px; min-height: 40px; cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: 0.04em; font-size: 16px; }
.hero-overlay { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--safe-t) + 62px); padding-left: var(--gutter-l); padding-right: var(--gutter-r); pointer-events: none; }
.sport-title { margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: clamp(42px, 13vw, 64px); line-height: 0.95; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
.sport-title::after { content: ''; display: block; width: 72px; height: 5px; margin-top: 8px; background: var(--accent); transform: skewX(-24deg); transform-origin: left; }
.tagline { margin: 10px 0 0; color: #d3dbe4; font-size: 16px; max-width: 32ch; text-shadow: 0 1px 2px #000; }
.home-body { padding-block: 0 calc(var(--safe-b) + 12px); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 12px 0; }
.daily-card { margin-top: -26px; position: relative; z-index: 2; border-color: var(--line-2); border-top: 3px solid var(--accent); }
.card-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-text { margin: 8px 0 14px; color: #c6cfda; }
.daily-date { font-family: var(--display); font-weight: 600; font-size: 22px; margin-top: 4px; }
.streak-badge { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; color: var(--accent-2); border: 1px solid #5c4a1a; background: #1d1809; border-radius: 4px; padding: 6px 9px; white-space: nowrap; }
.streak-badge:empty { display: none; }
.daily-done { background: var(--bg-2); border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: 4px; margin-bottom: 12px; }
.daily-done b { color: var(--accent-2); font-family: var(--display); font-size: 18px; }
.live-dot { margin-left: auto; font-size: 11px; letter-spacing: 0.14em; color: #fca5a5; display: inline-flex; align-items: center; gap: 6px; }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); animation: blink 1.6s infinite; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-grid .btn { font-size: 16px; }
.small-note { font-size: 13px; margin: 10px 0 0 !important; }

.chips {
  display: flex; gap: 8px; margin: 0 -16px 14px; padding: 2px 16px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.02em; min-height: 40px; padding: 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: #c6cfda; cursor: pointer; }
.chip[aria-checked='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stat { text-align: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 2px; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 26px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.how summary { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); cursor: pointer; list-style: none; font-size: 14px; }
.how summary::after { content: ' +'; }
.how[open] summary::after { content: ' −'; }
.how ol { padding-left: 20px; margin: 12px 0 0; color: #c6cfda; }
.how li { margin-bottom: 8px; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tier-legend span { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 3px; border: 1px solid currentColor; }
.foot { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 12px; font-size: 14px; gap: 12px; flex-wrap: wrap; }

/* ---------- full-height play screens ---------- */
body.in-game { overflow: hidden; position: fixed; inset: 0; width: 100%; }
#game.active, #race.active {
  display: flex; flex-direction: column; height: var(--app-h); gap: 8px;
  padding-block: calc(var(--safe-t) + 8px) calc(var(--safe-b) + 10px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; flex: none; }
.hud-dist { justify-self: start; }
.hud-label { font-size: 11px; color: var(--muted); }
.hud-value { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-value small { font-size: 14px; color: var(--muted); margin-left: 4px; font-style: normal; font-weight: 600; }
.hud-mid { text-align: center; }
.hud .icon-btn { justify-self: end; }
.pips { display: flex; gap: 4px; justify-content: center; margin-bottom: 6px; }
.pip { width: 16px; height: 6px; background: var(--line-2); transform: skewX(-24deg); }
.pip.current { background: var(--accent); animation: blink 1s steps(2) infinite; }
.pip.miss { background: #3a4656; }
@keyframes blink { 50% { opacity: 0.45; } }

.prompt-card { flex: none; background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 4px; padding: 12px 14px; }
.prompt-kicker { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--accent); }
.prompt-hint { color: var(--muted); }
.prompt-text { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 6.6vw, 30px); line-height: 1.08; margin: 6px 0 4px; text-wrap: balance; }
.prompt-sub { color: var(--muted); font-size: 14px; }
.prompt-card.enter { animation: slam 0.3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes slam { from { transform: translateX(-10px); opacity: 0; } }

.stage { flex: 1 1 auto; min-height: 120px; position: relative; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: #050a14; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.stage-pop { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(0.6); font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(30px, 10vw, 44px); text-transform: uppercase; text-shadow: 0 3px 0 #000; opacity: 0; pointer-events: none; white-space: nowrap; z-index: 2; }
.stage-pop.show { animation: pop 1.3s ease-out forwards; }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -70%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}
.run-hud { position: absolute; left: 0; right: 0; top: 10px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; padding-inline: 12px; }
.run-name { font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff; background: rgba(7, 10, 15, 0.8); border-left: 3px solid var(--accent); padding: 3px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-yards { font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(40px, 13vw, 56px); line-height: 1; text-shadow: 0 3px 0 #000; font-variant-numeric: tabular-nums; }
.run-hud.done .run-yards { animation: thump 0.4s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes thump { 40% { transform: scale(1.2); } }

.dock { flex: none; display: flex; flex-direction: column; gap: 8px; }
.feedback { min-height: 20px; font-size: 15px; text-align: center; line-height: 1.25; }
.feedback:empty { min-height: 0; }
.feedback.bad { color: var(--bad); }
.feedback.warn { color: var(--accent-2); }
.feedback.ok { color: var(--good); }
.answer-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: stretch; }
.answer-row.race-row { grid-template-columns: 1fr auto; }
.answer-row.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
#answer, #race-answer {
  min-width: 0; height: 52px; font-family: var(--body); font-size: 18px; padding: 0 14px; border-radius: 4px;
  border: 1px solid var(--accent); background: var(--bg-2); color: var(--text); caret-color: var(--accent);
  -webkit-appearance: none; appearance: none;
}
#answer::placeholder, #race-answer::placeholder { color: var(--dim); }
#answer[readonly], #race-answer:disabled { border-color: var(--line-2); color: var(--muted); }
.btn-kick { width: auto; min-width: 92px; min-height: 52px; font-size: 18px; }
.timer { position: relative; width: 52px; height: 52px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 3; }
.timer #timer-ring { fill: none; stroke: var(--accent); stroke-dasharray: 100.53; stroke-dashoffset: 0; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.timer span { position: relative; z-index: 1; }
.timer.low #timer-ring { stroke: var(--bad); }
.timer.low span { color: var(--bad); animation: blink 0.5s steps(2) infinite; }
.timer.done span { color: var(--muted); animation: none; }

.reveal { background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--tier, var(--accent)); border-radius: 4px; padding: 10px 13px; animation: rise 0.25s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.reveal-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.reveal-tier { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; }
.reveal-name { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.05; }
.reveal-yards { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 32px; color: var(--accent-2); white-space: nowrap; }
.reveal-meta { color: var(--muted); font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reveal-others { font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-height: 640px) {
  #game.active, #race.active { gap: 6px; padding-top: calc(var(--safe-t) + 6px); }
  .prompt-card { padding: 8px 12px; }
  .prompt-text { font-size: clamp(20px, 5.4vw, 24px); }
  .prompt-sub { font-size: 13px; }
  .stage { min-height: 90px; }
  .reveal-meta, .reveal-others { -webkit-line-clamp: 1; }
}
@media (max-height: 500px) {
  .prompt-sub, .prompt-kicker, .hud-label { display: none; }
  .pips { margin-bottom: 0; }
  .hud-value { font-size: 24px; }
  .icon-btn { width: 38px; height: 38px; }
  .stage { min-height: 70px; }
  .reveal-meta { display: none; }
}

/* ---------- results ---------- */
#results.active { padding-block: calc(var(--safe-t) + 8px) 0; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.res-head { text-align: center; padding: 18px 0 6px; }
.res-head .card-kicker { justify-content: center; }
.res-total { font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(72px, 24vw, 112px); line-height: 0.9; margin-top: 14px; font-variant-numeric: tabular-nums; }
.res-total small { display: block; font-size: 15px; font-style: normal; font-weight: 600; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 6px; }
.res-title { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 12px; color: var(--accent); }
.res-squares { font-size: 24px; letter-spacing: 4px; margin-top: 8px; }
.res-list { list-style: none; padding: 0; margin: 16px 0 0; }
.res-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--tier); border-radius: 4px; margin-bottom: 8px; background: var(--panel); animation: fade 0.3s both; }
.res-q { color: var(--muted); font-size: 14px; }
.res-a { font-family: var(--display); font-weight: 700; font-size: 20px; }
.res-y { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 24px; text-align: right; }
.res-y small { display: block; font-style: normal; font-weight: 700; font-size: 12px; letter-spacing: 0.1em; }
.res-actions { position: sticky; bottom: 0; display: grid; gap: 10px; margin: 8px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding-block: 14px calc(var(--safe-b) + 14px); padding-left: var(--gutter-l); padding-right: var(--gutter-r); background: linear-gradient(transparent, var(--bg) 22%); }
.res-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-text { width: 100%; font-family: var(--body); font-size: 16px; line-height: 1.4; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--accent); background: var(--bg-2); color: var(--text); resize: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 90px); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  padding: 10px 16px; border-radius: 4px; border-left: 4px solid var(--accent);
  opacity: 0; pointer-events: none; transition: 0.25s; z-index: 10; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- lobbies (auction + race) ---------- */
#auc-lobby.active, #auction.active, #lineups.active, #match.active, #race-lobby.active, #board.active, #locker.active, #account.active {
  display: flex; flex-direction: column; gap: 12px;
  padding-block: calc(var(--safe-t) + 12px) calc(var(--safe-b) + 16px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.sub-head { display: flex; align-items: center; gap: 12px; }
.sub-title { font-size: 20px; margin: 0; color: var(--text); }
.rules { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; color: #c6cfda; }
.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--display); font-weight: 600; }
.field input, .join-row input { min-height: 48px; font-family: var(--body); font-size: 18px; text-transform: none; letter-spacing: 0; padding: 0 12px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); -webkit-appearance: none; appearance: none; min-width: 0; }
.field input:focus, .join-row input:focus { border-color: var(--accent); outline: none; }
.or { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 8px; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.join-row input { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.3em; text-transform: uppercase; text-align: center; }
.join-row .btn { width: auto; padding-inline: 20px; }
.code-box { margin-top: 16px; display: grid; justify-items: center; gap: 4px; padding: 14px; border: 1px dashed var(--accent); border-radius: 4px; background: var(--bg-2); }
.big-code { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: 0.2em; color: var(--accent); user-select: all; -webkit-user-select: all; line-height: 1; }
.lobby-status { min-height: 22px; text-align: center; margin: 12px 0; color: var(--accent-2); }
.seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; align-items: center; }
.seg legend { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--muted); margin-bottom: 6px; float: left; width: 100%; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-2); font-family: var(--display); font-weight: 700; font-size: 18px; cursor: pointer; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.lobby-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.lobby-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; }
.lobby-list i { width: 10px; height: 10px; background: var(--c); transform: skewX(-20deg); }
.lobby-list span { font-family: var(--display); font-weight: 700; font-size: 18px; }
.lobby-list small { color: var(--muted); }

/* ---------- race ---------- */
.race-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; flex: none; }
.race-round { font-size: 15px; color: var(--muted); text-align: center; }
.race-clock { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 30px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.race-clock.low { color: var(--bad); }
.race-stage { min-height: 150px; }
.standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: none; }
.standings li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 70px minmax(0, 1.1fr); gap: 8px; align-items: center; font-size: 14px; padding: 5px 8px; background: var(--panel); border-left: 3px solid var(--c); border-radius: 3px; }
.standings li.me { background: var(--panel-2); }
.st-place { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 16px; color: var(--c); font-variant-numeric: tabular-nums; }
.st-name { font-family: var(--display); font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--c); transition: width 0.6s; }
.st-last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.race-results { flex: none; display: grid; gap: 10px; text-align: center; padding: 14px; border: 1px solid var(--accent); border-radius: 6px; background: var(--panel); animation: rise 0.3s; }
.podium { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.podium li { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; background: var(--bg-2); border-left: 4px solid var(--c); border-radius: 3px; text-align: left; }
.podium b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 22px; color: var(--c); }
.podium span { font-family: var(--display); font-weight: 700; font-size: 20px; }
.podium i { font-style: normal; color: var(--muted); font-family: var(--display); font-weight: 600; letter-spacing: 0.06em; }

/* ---- game-mode tiles: each mode gets a full-size tile with its own art ---- */
.section-head {
  margin: 26px 0 10px; font-family: var(--display); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); display: flex; align-items: center; gap: 10px;
}
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.mode-tiles { display: grid; gap: 14px; }
.mode-tile {
  --tile: var(--accent);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-2); border-top: 3px solid var(--tile); border-radius: 6px;
}
.auction-tile { --tile: var(--accent-2); }
.mode-art { position: relative; aspect-ratio: 16 / 8; max-width: 100%; min-height: 150px; background: #07090f; border-bottom: 1px solid var(--line); }
.mode-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.mode-art::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(19, 26, 35, 0.95)); pointer-events: none; }
.mode-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1; margin: 0;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px; background: rgba(7, 10, 15, 0.82); border: 1px solid var(--line-2); color: var(--tile);
}
.mode-badge.live-dot { color: #fca5a5; }
.mode-body { display: grid; gap: 12px; padding: 4px 16px 16px; margin-top: -22px; position: relative; z-index: 1; }
.mode-title {
  margin: 0; font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(30px, 8vw, 40px); line-height: 0.95; color: #fff; text-wrap: balance;
}
.mode-title::after { content: ''; display: block; width: 56px; height: 4px; margin-top: 8px; background: var(--tile); transform: skewX(-24deg); transform-origin: left; }
.mode-body .card-text { margin: 0; }
.mode-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-facts li { display: grid; justify-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); }
.mode-facts b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 24px; line-height: 1; color: var(--tile); font-variant-numeric: tabular-nums; }
.mode-facts span { font-family: var(--display); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.mode-tile .btn-primary { background: var(--tile); width: 100%; }
.mode-grid.one { grid-template-columns: 1fr; }
.mode-tile .small-note:empty { display: none; }
.mode-tile .small-note { margin: 0 !important; }

/* =====================================================================
   AUCTION DRAFT
   ===================================================================== */
.auc-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.auc-lot-n { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.2em; color: var(--muted); text-align: center; }
.net-pill { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: #10261a; color: var(--good); border: 1px solid #1f5a37; }
.net-pill.bad { background: #2a1216; color: var(--bad); border-color: #6b1f2c; }
.auc-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auc-team { border: 1px solid var(--line); border-top: 3px solid var(--team); border-radius: 4px; padding: 8px 10px; background: var(--panel); min-width: 0; transition: box-shadow 0.2s, border-color 0.2s; }
.auc-team.leading { border-color: var(--team); box-shadow: 0 0 0 1px var(--team), 0 0 18px -6px var(--team); }
.auc-team-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.auc-team-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--team); }
.auc-team-head b { font-family: var(--display); font-weight: 800; font-style: italic; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.auc-slots { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.auc-slots li { display: grid; grid-template-columns: 32px 1fr auto; gap: 4px; align-items: center; min-width: 0; }
.auc-slots .pos { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.auc-slots .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auc-slots i { font-style: normal; color: var(--muted); font-size: 13px; }
.auc-slots li.empty { color: var(--dim); }

.lot-card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 6px;
  border: 1px solid #6b5a22; border-left: 4px solid var(--accent-2);
  background: repeating-linear-gradient(135deg, rgba(245, 200, 76, 0.04) 0 6px, transparent 6px 12px), linear-gradient(160deg, #1f1a0e, var(--panel) 70%);
}
.lot-card.enter { animation: deal 0.4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes deal { from { transform: translateX(30px); opacity: 0; } }
.lot-badge { display: grid; justify-items: center; gap: 2px; padding: 8px 10px; border-radius: 4px; background: var(--bg); border: 1px solid #6b5a22; min-width: 64px; }
.lot-badge b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 38px; line-height: 1; color: var(--accent-2); }
.lot-badge span { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: #e9d38a; }
.lot-info { min-width: 0; }
.lot-name { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 7vw, 32px); line-height: 1; text-transform: uppercase; text-wrap: balance; }
.lot-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #d8c99a; font-size: 14px; margin-top: 6px; }
.lot-clubs { color: var(--muted); font-size: 13px; margin-top: 4px; }
.flag { width: 28px; height: 21px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); object-fit: cover; flex: none; }
.flag.sm { width: 18px; height: 13.5px; vertical-align: -2px; margin-right: 6px; }
.lot-club { display: grid; justify-items: center; gap: 3px; width: 84px; text-align: center; }
.lot-crest svg { display: block; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45)); }
.lot-club-tag { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; color: var(--accent-2); }
.lot-club-name { font-size: 12px; line-height: 1.15; color: #f1e7c4; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 360px) { .lot-club { width: 58px; } .lot-crest svg { width: 46px; height: 52px; } .lot-badge { min-width: 54px; padding: 6px; } }
.mini-crest svg { display: block; }
.lot-stamp { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(-8deg); font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: 0.06em; padding: 6px 12px; border: 3px solid; border-radius: 4px; background: rgba(11, 15, 20, 0.9); animation: stamp 0.35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes stamp { from { transform: translateY(-50%) rotate(-8deg) scale(2); opacity: 0; } }

.auc-bid { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; background: var(--bg-2); }
.bid-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.bid-amount { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 48px; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bid-right { text-align: right; min-width: 0; }
.bid-going { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: 0.06em; color: var(--accent-2); min-height: 22px; }
.bid-leader { font-size: 15px; color: var(--muted); margin-top: 4px; }
.bid-timer { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bid-timer-fill { height: 100%; transform-origin: left; background: var(--accent-2); transition: transform 0.1s linear; }
.auc-controls { display: grid; gap: 10px; }
.bid-group { border: 1px solid var(--team); border-radius: 4px; padding: 8px; background: var(--panel); }
.bid-who { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--team); margin: 0 2px 8px; }
.bid-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bid-btn { display: grid; justify-items: center; gap: 2px; min-height: 58px; padding: 6px 4px; background: var(--team); color: #0b0f14; border-color: transparent; }
.bid-btn small { font-size: 12px; opacity: 0.75; }
.bid-btn b { font-size: 22px; font-weight: 800; }
.bid-btn:disabled { background: var(--panel-2); color: var(--dim); opacity: 1; cursor: not-allowed; }

.lu-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .lu-grid { grid-template-columns: 1fr 1fr; } }
.lu-col { border: 1px solid var(--team); border-top-width: 3px; border-radius: 4px; padding: 12px; background: var(--panel); min-width: 0; }
.lu-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--team); }
.lu-ovr { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 26px; color: var(--accent-2); }
.lu-ovr::before { content: 'OVR '; font-size: 12px; color: var(--muted); font-style: normal; }
.lu-chem { font-size: 14px; color: var(--good); margin-top: 4px; }
.lu-warn { font-size: 14px; color: var(--bad); }
.lu-warn:empty { display: none; }
.lu-list { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 4px; }
.lu-list li { display: grid; grid-template-columns: 30px 34px 22px 1fr auto; gap: 6px; align-items: center; font-size: 15px; }
.lu-list .ovr { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; color: var(--accent-2); }
.lu-list .pos { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--muted); }
.lu-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-list i { font-style: normal; color: var(--muted); font-size: 14px; }
.lu-left { font-size: 13px; }

.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-top: 3px solid var(--accent); }
.sb-team { font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-team:last-child { text-align: right; }
.sb-mid { text-align: center; }
.sb-score { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.sb-score i { color: var(--muted); margin: 0 6px; }
.sb-min { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--good); margin-top: 2px; }
.mini-pitch {
  position: relative; height: 92px; border-radius: 4px; overflow: hidden; border: 1px solid #1e5a2c;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.6) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 17px, rgba(255, 255, 255, 0.6) 18px 19px, transparent 20px),
    repeating-linear-gradient(90deg, #2f7d3b 0 28px, #378c44 28px 56px);
}
.mini-pitch::before, .mini-pitch::after { content: ''; position: absolute; top: 26%; height: 48%; width: 9%; border: 2px solid rgba(255, 255, 255, 0.6); }
.mini-pitch::before { left: -2px; border-left: 0; }
.mini-pitch::after { right: -2px; border-right: 0; }
/* Animated match */
.match-stage { flex: none; height: clamp(230px, 68vw, 340px); }
.match-stage .mp-flash { z-index: 2; }
.match-legend { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: space-between; padding-inline: 8px; pointer-events: none; z-index: 2; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.ml-0 { color: #ff6b35; }
.ml-1 { color: #38bdf8; }

/* Box scores */
.box-scores { display: grid; gap: 12px; text-align: left; margin-top: 4px; }
.box-team h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; color: var(--team); border-left: 3px solid var(--team); padding-left: 8px; }
.box-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 4px; -webkit-overflow-scrolling: touch; }
.box-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.box-table th { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 6px 8px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.box-table td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.box-table th:first-child, .box-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
.box-table th:first-child { background: var(--bg-2); }
.box-table td:first-child { font-weight: 600; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.box-table td:nth-child(2), .box-table th:nth-child(2) { text-align: left; color: var(--muted); }
.box-table tr:last-child td { border-bottom: 0; }
.box-table tr.motm td { background: #1d1909; }
.box-table tr.motm td:first-child { background: #1d1909; }
.box-table .tag { font-family: var(--display); font-size: 11px; letter-spacing: 0.08em; color: #1a1400; background: var(--accent-2); padding: 1px 5px; border-radius: 3px; }
.box-table small { color: var(--bad); font-size: 11px; }

/* Mini field variants: hardwood court and gridiron */
#match[data-sport='nba'] .mini-pitch {
  border-color: #6b4423;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.7) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 15px, rgba(255, 255, 255, 0.7) 16px 17px, transparent 18px),
    linear-gradient(90deg, rgba(30, 58, 138, 0.85) 0 16%, transparent 16% 84%, rgba(30, 58, 138, 0.85) 84%),
    repeating-linear-gradient(0deg, #c8925a 0 6px, #bf8752 6px 12px);
}
#match[data-sport='nba'] .mini-pitch::before, #match[data-sport='nba'] .mini-pitch::after { border-radius: 50%; width: 22%; top: 18%; height: 64%; }
#match[data-sport='nba'] .mp-ball { background: #ea7a2c; }
#match[data-sport='nfl'] .mini-pitch {
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(8% - 1px), rgba(255, 255, 255, 0.55) calc(8% - 1px) 8%),
    linear-gradient(90deg, #1e3a8a 0 10%, transparent 10% 90%, #7f1d1d 90%),
    repeating-linear-gradient(90deg, #2b7536 0 8%, #33844a 8% 16%);
}
#match[data-sport='nfl'] .mini-pitch::before, #match[data-sport='nfl'] .mini-pitch::after { display: none; }
#match[data-sport='nfl'] .mp-ball { width: 16px; height: 10px; margin: -5px 0 0 -8px; background: #7b4a26; border-radius: 50%; }
.mp-end { position: absolute; bottom: 4px; font-family: var(--display); font-weight: 700; font-size: 12px; color: rgba(255, 255, 255, 0.85); max-width: 40%; overflow: hidden; white-space: nowrap; }
.mp-end-l { left: 6px; }
.mp-end-r { right: 6px; }
.mp-ball { position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #0a0e14, 0 2px 4px rgba(0, 0, 0, 0.5); transition: left 0.45s cubic-bezier(.3, .7, .3, 1); }
.mp-flash { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(24px, 8vw, 32px); text-transform: uppercase; text-shadow: 0 3px 0 #000; opacity: 0; pointer-events: none; }
.mp-flash.show { animation: mpflash 1.4s ease-out forwards; }
@keyframes mpflash { 0% { opacity: 0; transform: scale(0.6); } 15% { opacity: 1; transform: scale(1.12); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev { display: grid; grid-template-columns: 36px 22px 1fr; gap: 6px; align-items: start; padding: 8px 10px; border-radius: 4px; background: var(--panel); border-left: 3px solid var(--team, var(--line)); font-size: 15px; animation: fade 0.25s; }
.ev-min { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--muted); }
.ev-goal, .ev-so-goal { background: var(--panel-2); font-weight: 600; }
.ev-half, .ev-ft, .ev-end, .ev-kickoff, .ev-stoppage { border-left-color: var(--line-2); color: var(--muted); }
.match-end { display: grid; gap: 10px; text-align: center; padding: 16px; border-radius: 6px; border: 1px solid var(--accent-2); background: linear-gradient(180deg, #1d1906, var(--panel)); animation: rise 0.35s; }
.me-banner { font-family: var(--display); font-weight: 800; font-style: italic; font-size: clamp(34px, 11vw, 46px); line-height: 1; text-transform: uppercase; }
.me-score { font-family: var(--display); font-weight: 700; font-size: 20px; }
.me-motm { color: var(--accent-2); }
.me-stats { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.me-stats td { padding: 4px 6px; width: 30%; }
.me-stats td:first-child { text-align: left; }
.me-stats td:last-child { text-align: right; }
.me-stats th { font-weight: 400; color: var(--muted); font-size: 13px; }

@media (min-width: 600px) {
  #app { padding-top: 12px; }
  .hero { border-radius: 6px; border: 1px solid var(--line-2); margin: 0 16px; }
  .daily-card { margin-top: 14px; }
  #game.active, #race.active { height: min(var(--app-h), 940px); padding-top: 16px; }
}
@media (max-width: 360px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .btn-kick { min-width: 76px; padding-inline: 12px; }
  .answer-row { grid-template-columns: 46px 1fr auto; }
  .timer { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   LEADERBOARD
   ===================================================================== */
.board-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  width: 100%; margin-top: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: linear-gradient(100deg, #1d1809 0%, var(--panel) 55%); border: 1px solid #4a3c17; border-left: 4px solid var(--accent-2); border-radius: 6px;
  transition: transform 0.12s, border-color 0.15s;
}
.board-card:hover { transform: translateY(-1px); border-color: var(--accent-2); }
.board-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 4px; background: rgba(7, 10, 15, 0.6); }
.board-label { display: grid; gap: 2px; min-width: 0; }
.board-label b { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 24px; line-height: 1; color: #fff; }
.board-label small { font-size: 13px; color: #b8c3cf; }
.board-soon {
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 3px; border: 1px solid #5c4a1a; color: var(--accent-2); background: #1d1809;
}

.board-tabs { display: flex; gap: 6px; }
.board-tabs button {
  flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.board-tabs button[aria-selected='true'] { color: #0b0f14; background: var(--c); border-color: var(--c); }

.board-you {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line-2); border-left: 4px solid var(--bc, var(--accent-2));
}
.by-rank { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 24px; color: var(--muted); text-align: center; }
.by-name { display: grid; min-width: 0; }
.by-name b { font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.by-name small { color: var(--muted); font-size: 13px; }
.by-pts { display: grid; justify-items: end; }
.by-pts b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 30px; line-height: 1; color: var(--bc, var(--accent-2)); font-variant-numeric: tabular-nums; }
.by-pts small { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.board-list { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.board-rows { list-style: none; margin: 0; padding: 6px 12px; display: grid; filter: blur(1.5px); opacity: 0.55; }
.board-rows li { display: grid; grid-template-columns: 30px 1fr 64px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.board-rows li:last-child { border-bottom: 0; }
.board-rows b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; color: var(--dim); text-align: center; }
.board-rows i { display: block; height: 10px; border-radius: 2px; background: var(--line-2); }
.board-rows u { display: block; height: 10px; border-radius: 2px; background: var(--line-2); text-decoration: none; }
.board-rows li:nth-child(-n + 3) b { color: var(--accent-2); }
.board-lock {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 16px;
  text-align: center; background: radial-gradient(70% 60% at 50% 50%, rgba(11, 15, 20, 0.92), rgba(11, 15, 20, 0.55));
}
.board-lock-badge {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 22px; letter-spacing: 0.04em;
  padding: 6px 14px; color: #0b0f14; background: var(--accent-2); clip-path: var(--slant);
}
.board-lock p { margin: 0; max-width: 34ch; color: #c6cfda; font-size: 15px; text-wrap: pretty; }
.board-rules { margin: 0; }
.board-rules ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.board-rules li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: #c6cfda; font-size: 15px; }
.board-rules li:last-child { border-bottom: 0; padding-bottom: 0; }
.board-rules li b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; color: var(--accent-2); white-space: nowrap; }
.board-rules li.note { grid-template-columns: 1fr; color: var(--muted); font-size: 13px; }

.pts-earned { margin: 10px auto 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; color: #c6cfda; }
.pts-earned b { font-weight: 800; font-style: italic; font-size: 24px; color: var(--accent-2); }
.pts-earned span { flex-basis: 100%; text-align: center; font-family: var(--body); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }

/* =====================================================================
   ADS + SITE LINKS
   ===================================================================== */
/* Ads sit between blocks of content with clear space around them, never right up
   against a button (AdSense policy on accidental clicks). */
.ad-slot { display: grid; gap: 4px; margin: 18px 0; min-width: 0; max-width: 100%; overflow: hidden; }
.ad-slot .ad-label { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); text-align: center; }
.ad-slot ins.adsbygoogle { min-height: 100px; }
.ad-slot:has(ins[data-ad-status='unfilled']) { display: none; }
.ad-placeholder {
  display: grid; place-items: center; min-height: 250px; border: 1px dashed var(--line-2); border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--bg-2) 0 10px, var(--panel) 10px 20px);
  font-family: var(--display); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-size: 13px;
}
#match .ad-slot, #auc-lobby .ad-slot, #race-lobby .ad-slot, #board .ad-slot { margin: 6px 0; }

.hub-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: center; text-align: center; }
.hub-foot .small-note { margin: 0 !important; }
.site-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 6px 0 4px; }
.site-links a { color: var(--muted); font-size: 14px; text-decoration: none; padding: 6px 0; }
.site-links a:hover { color: var(--text); text-decoration: underline; }
/* The policy pages aren't published with the claude.ai preview. */
.on-artifact .site-links { display: none; }

/* =====================================================================
   LOCKER (customize your player)
   ===================================================================== */
.locker-card { margin-top: 10px; background: linear-gradient(100deg, #10241b 0%, var(--panel) 55%); border-color: #1f4d39; border-left-color: #34d399; }
.locker-card:hover { border-color: #34d399; }
#locker-mini { width: 40px; height: 40px; image-rendering: pixelated; }
.pro-chip { color: #0b0f14; background: var(--accent-2); border-color: var(--accent-2); }

.locker-stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; min-height: 190px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); background: #07090f; }
.locker-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.locker-sports { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.locker-sports button, .locker-cheer {
  min-height: 32px; padding: 0 10px; border-radius: 3px; border: 1px solid var(--line-2); background: rgba(7, 10, 15, 0.82); cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.locker-sports button[aria-pressed='true'] { color: #0b0f14; background: var(--accent); border-color: var(--accent); }
.locker-cheer { position: absolute; right: 8px; bottom: 8px; color: var(--accent-2); border-color: #5c4a1a; }

.locker-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.locker-tabs::-webkit-scrollbar { display: none; }
.locker-tabs button {
  flex: none; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.locker-tabs button[aria-selected='true'] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.locker-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.lk-item {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 78px; padding: 10px 4px 8px;
  border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; color: var(--text);
}
.lk-item[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--panel-2); }
.lk-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); }
.lk-name { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: #c6cfda; text-align: center; line-height: 1.1; }
.lk-item.tile .lk-name { font-size: 15px; font-weight: 700; color: var(--text); }
.lk-lock {
  position: absolute; top: -6px; right: -4px; padding: 2px 6px; border-radius: 3px;
  font-family: var(--display); font-weight: 800; font-size: 10px; letter-spacing: 0.08em; color: #0b0f14; background: var(--accent-2);
}
.lk-lock.pts { background: #c6cfda; }
.lk-item.locked .lk-swatch, .lk-item.locked .lk-name { opacity: 0.75; }

.locker-bar { display: grid; gap: 10px; padding: 12px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line-2); }
.locker-status { margin: 0; min-height: 20px; color: #c6cfda; font-size: 14px; }
.locker-status b { color: var(--accent-2); }
.locker-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }

.pro-card { margin: 0; border-color: #5c4a1a; background: linear-gradient(160deg, #1d1809 0%, var(--panel) 60%); }
.pro-card .card-kicker { color: var(--accent-2); }
.pro-card .card-kicker::before { background: var(--accent-2); }
.pro-soon { margin-left: auto; font-size: 11px; letter-spacing: 0.14em; padding: 3px 7px; border-radius: 3px; border: 1px solid #5c4a1a; }
.pro-perks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pro-perks li { display: grid; grid-template-columns: 104px 1fr; gap: 10px; align-items: baseline; }
.pro-perks b { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 17px; color: var(--accent-2); }
.pro-perks span { color: #c6cfda; font-size: 15px; }

/* =====================================================================
   ACCOUNT + GUEST IDENTITY
   ===================================================================== */
.hub-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.id-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 58%; padding: 4px 6px 4px 12px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel);
}
.id-name { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.id-cta { flex: none; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--accent-2); color: #0b0f14; }
.id-pill.signed .id-cta { background: transparent; color: var(--muted); padding-inline: 4px; }

.account-reason { margin: 0; padding: 10px 14px; border-radius: 6px; border: 1px solid #5c4a1a; background: #1d1809; color: var(--accent-2); font-weight: 600; }
.account-card { margin: 0; display: grid; gap: 12px; }
.account-card .card-text { margin: 0; }
.account-name { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 34px; line-height: 1; color: #fff; overflow-wrap: anywhere; }
.account-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.account-perks li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; }
.account-perks b { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 17px; color: var(--accent); }
.account-perks span { color: #c6cfda; font-size: 15px; }
.account-form { display: grid; gap: 6px; }
.account-form .field { margin-bottom: 0; }
.account-error { margin: 0; min-height: 20px; color: var(--bad); font-size: 14px; }
.account-actions { display: grid; gap: 10px; }

/* Pro plans */
.pro-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 12px; }
.pro-plan { position: relative; display: grid; gap: 4px; padding: 14px 12px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); min-width: 0; }
.pro-plan.best { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); background: #1d1809; }
.pp-tag { position: absolute; top: -10px; left: 10px; padding: 2px 8px; border-radius: 3px; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; background: var(--accent-2); color: #0b0f14; }
.pp-name { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pp-price { color: #c6cfda; font-size: 14px; }
.pp-price b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 30px; color: #fff; }
.pp-note { font-size: 13px; color: var(--muted); }
.pro-plan.best .pp-note { color: var(--accent-2); font-weight: 600; }
.pro-card > .btn { width: 100%; }

/* Account form extras + selectable Pro plans */
.account-switch { justify-self: center; margin-top: 4px; color: var(--accent); }
.account-pro { margin: 0; color: var(--accent-2); font-weight: 600; }
.account-pro:empty { display: none; }
.pro-plan { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pro-plan[aria-checked='true'] { border-color: var(--accent-2); box-shadow: inset 0 0 0 2px var(--accent-2); }
.pro-plan.best:not([aria-checked='true']) { box-shadow: none; border-color: #5c4a1a; }
.pro-status { margin: 8px 0 0; min-height: 0; font-size: 14px; color: #c6cfda; text-align: center; }
.pro-status:empty { display: none; }

/* Live leaderboard rows (accounts on) */
.board-rows.live { filter: none; opacity: 1; }
.board-rows.live li { grid-template-columns: 34px 1fr auto; }
.board-rows.live .br-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-rows.live .br-name em { margin-left: 8px; padding: 1px 5px; border-radius: 3px; font-style: normal; font-size: 10px; letter-spacing: 0.1em; vertical-align: 2px; background: var(--accent-2); color: #0b0f14; }
.board-rows.live .br-pts { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.board-rows.live li.me { background: rgba(245, 200, 76, 0.08); border-radius: 4px; }
.board-rows.live .br-note { display: block; padding: 18px 4px; color: var(--muted); text-align: center; }
