@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/space-grotesk.woff2') format('woff2'); font-style: normal; font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('/assets/fonts/clash-display.woff2') format('woff2'); font-style: normal; font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Press Start 2P'; src: url('/assets/fonts/press-start-2p.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
:root {
  color-scheme: dark;
  --bg: #0b0b0c; --shell: #141416; --shell-hi: #1c1c1f; --shell-lo: #08080a; --line: #26262a; --text: #f4f3ef; --muted: #a3a29b; --quiet: #6b6a64;
  --orange: #fc6126; --orange-hi: #ff9a69; --orange-lo: #a83a12; --ink: #120c08; --ok: #7fe08a;
  --px: 'Press Start 2P', 'Courier New', monospace; --sans: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif; --display: 'Clash Display', var(--sans);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100svh; background: radial-gradient(ellipse at 50% -10%, rgb(252 97 38 / .10), transparent 55%), var(--bg); }
button, input { font: inherit; color: inherit; } button { cursor: pointer; border: 0; background: none; } button:disabled { cursor: not-allowed; } a { color: inherit; }
canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.px { font-family: var(--px); }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 8px 12px; background: var(--orange); color: var(--ink); z-index: 10; } .skip-link:focus { top: 16px; }
.noscript { padding: 24px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 2px; }
.boot { display: grid; place-items: center; min-height: 60svh; color: var(--muted); font-family: var(--px); font-size: 10px; }
.pixel { position: relative; background: var(--shell); border-radius: 14px; }
.pixel::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); }

.shell { max-width: 1180px; margin: 0 auto; padding: 16px 24px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--orange); }
.wordmark b { font: 700 22px/1 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: -.065em; } .wordmark b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 3px; background: currentColor; }
.wordmark span { font: 500 11px/1 var(--sans); letter-spacing: .14em; color: var(--quiet); }
.topbar-right { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 500 12px/1 var(--sans); } .chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); } .chip.is-off .dot { background: var(--quiet); box-shadow: none; }
.link { color: var(--muted); text-decoration: none; font: 500 12px/1 var(--sans); border-bottom: 1px solid transparent; } .link:hover { color: var(--text); border-color: var(--orange); }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 8px auto 20px; width: min(100%, 520px); background: var(--shell); border: 1px solid var(--line); border-radius: 999px; }
.tab { display: grid; justify-items: center; gap: 3px; padding: 10px 8px; border-radius: 999px; color: var(--muted); font: 600 13px/1 var(--sans); }
.tab small { font: 400 11px/1 var(--sans); color: var(--quiet); min-height: 11px; }
.tab.is-on { background: var(--orange); color: var(--ink); } .tab.is-on small { color: rgb(18 12 8 / .7); }

.column { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.wide { display: grid; grid-template-columns: minmax(0, 8fr) minmax(220px, 2fr); gap: 20px; align-items: start; }
.wide .side { display: grid; gap: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 20px; align-items: start; max-width: 1100px; margin: 0 auto; }
.split .side { display: grid; gap: 8px; }
.column .side { display: none; }
.spur-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spur.compact { width: auto; min-width: 220px; min-height: 64px; padding: 10px 28px; gap: 2px; } .spur.compact b { font-size: 24px; } .spur.compact small { font-size: 12px; }
.board-frame { padding: 12px; background: #111113; border-radius: 18px; } .board-frame::before { box-shadow: inset 0 0 0 1px #2a2a2e; }
.bezel { background: #050403; padding: 8px; border-radius: 12px; } .bezel::before { box-shadow: inset 0 0 0 1px #000; }
.bezel::after { content: ''; position: absolute; inset: 8px; pointer-events: none; border-radius: 8px; background: linear-gradient(115deg, rgb(255 255 255 / .06) 0%, rgb(255 255 255 / .02) 28%, transparent 46%), repeating-linear-gradient(0deg, rgb(0 0 0 / .12) 0 1px, transparent 1px 3px); mix-blend-mode: screen; }
.board { width: 100%; } .split .board { cursor: pointer; }
.is-stall .bezel { max-width: 560px; margin: 0 auto; } .split .is-stall .bezel { max-width: none; }
.controls { display: grid; gap: 14px; margin-top: 14px; }

.spur { display: grid; align-content: center; justify-items: center; gap: 8px; width: 100%; min-height: 108px; padding: 18px; border-radius: 16px; background: var(--shell-hi); color: var(--text); text-align: center; transition: transform 50ms; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.spur::before { box-shadow: inset 0 0 0 1px var(--line); }
.spur b { font: 600 36px/1 var(--display); letter-spacing: -.01em; } .spur small { font: 400 13px/1.4 var(--sans); color: var(--muted); }
.spur.is-hot { background: var(--orange); color: var(--ink); } .spur.is-hot small { color: rgb(18 12 8 / .72); } .spur.is-hot::before { box-shadow: inset 0 -4px 0 var(--orange-lo); }
.spur.is-pressed, .spur:active:not(:disabled) { transform: scale(.985); } .spur:disabled { color: var(--quiet); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border-radius: 999px; background: var(--shell-hi); color: var(--text); font: 600 13px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.btn::before { box-shadow: inset 0 0 0 1px var(--line); } .btn.is-hot { background: var(--orange); color: var(--ink); } .btn.is-hot::before { box-shadow: none; } .btn:active { transform: scale(.98); } .btn:disabled { color: var(--quiet); background: var(--shell); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .row .input { flex: 1; min-width: 160px; } .center { justify-content: center; text-align: center; } .link.center { display: block; margin: 4px auto 0; }
.field { display: grid; gap: 8px; } .field label { font: 500 13px/1.4 var(--sans); color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; background: #0b0b0c; color: var(--text); font: 500 15px/1 var(--sans); border: 1px solid var(--line); outline: 0; } .input::placeholder { color: var(--quiet); } .input:focus { border-color: var(--orange); } .input:disabled { color: var(--quiet); }
.coats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coat { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; background: #0f0f11; color: var(--muted); font: 500 12px/1 var(--sans); } .coat::before { box-shadow: inset 0 0 0 1px var(--line); } .coat canvas { width: 60px; height: 48px; } .coat[aria-pressed="true"] { color: var(--text); } .coat[aria-pressed="true"]::before { box-shadow: inset 0 0 0 2px var(--orange); }
.wallets { display: grid; gap: 8px; margin-top: 8px; }
.status, .help, .muted { font: 400 14px/1.55 var(--sans); color: var(--muted); } .status.is-error { color: #ff9a8a; } .help b { color: var(--text); }
.lead { font: 500 15px/1.5 var(--sans); color: var(--muted); } .lead b { color: var(--text); }
.section { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; font: 600 15px/1.3 var(--display); letter-spacing: -.01em; } .section span { font: 400 12px/1 var(--sans); color: var(--quiet); }
.hay-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .hay { font: 600 20px/1 var(--display); color: var(--orange); } .hay b { font-size: 30px; }
.quests { list-style: none; display: grid; gap: 8px; }
.quest { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #0f0f11; } .quest::before { box-shadow: inset 0 0 0 1px var(--line); }
.quest-text { display: grid; gap: 3px; min-width: 0; } .quest-text b { font: 600 14px/1.3 var(--sans); color: var(--text); } .quest-text span { font: 400 12.5px/1.4 var(--sans); color: var(--muted); }
.quest-actions { display: flex; gap: 6px; flex-shrink: 0; } .quest-actions .btn { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.quest em { font-style: normal; font: 600 12px/1 var(--sans); color: var(--ok); flex-shrink: 0; } .quest.is-done .quest-text b { color: var(--muted); } .quest .hint { font: 500 11px/1 var(--sans); color: var(--quiet); flex-shrink: 0; letter-spacing: .04em; text-transform: uppercase; }
.quest.stat .btn { min-width: 96px; display: grid; justify-items: center; gap: 2px; padding: 8px 12px; } .quest.stat .btn b { font-weight: 600; } .quest.stat .btn small { font: 500 11px/1 var(--sans); opacity: .75; }
.gauge { display: flex; gap: 3px; margin: 4px 0 6px; } .gauge i { width: 18px; height: 8px; border-radius: 3px; background: #1e1e22; box-shadow: inset 0 0 0 1px var(--line); } .gauge i.on { background: var(--orange); box-shadow: none; }
.quest.is-rolling .gauge i:not(.on) { animation: roll .3s steps(2) infinite; } @keyframes roll { 50% { background: #3a2a1c; } }
.quest.is-success { box-shadow: 0 0 0 2px var(--ok); } .quest.is-fail { box-shadow: 0 0 0 2px #ff4b5c; } .lvl { color: var(--orange); font-weight: 600; margin-left: 6px; font-size: 12px; }
.pill { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: var(--shell-hi); color: var(--muted); font: 500 12px/1 var(--sans); } .pill::before { box-shadow: inset 0 0 0 1px var(--line); } .pill.is-warn { color: var(--orange); } .pill.is-ok { color: var(--ok); }
.help.center { text-align: center; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tier { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font: 700 11px/1 var(--sans); letter-spacing: .06em; background: #0f0f11; border: 1px solid var(--line); color: var(--muted); }
.tier-challenger { color: #ff4b5c; border-color: #ff4b5c; } .tier-diamond { color: #7fd9ff; border-color: #7fd9ff; } .tier-gold { color: #f2c14e; border-color: #f2c14e; } .tier-silver { color: #c9ced6; border-color: #c9ced6; } .tier-bronze { color: #c98a5a; border-color: #c98a5a; }
.tiers, .ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rung { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; background: #0f0f11; } .rung b { font: 600 24px/1 var(--display); } .rung small { font: 400 11px/1 var(--sans); color: var(--quiet); } .rung.is-me::before { box-shadow: inset 0 0 0 2px var(--orange); }
.position { font: 400 15px/1.6 var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .position b { color: var(--text); }
.is-hidden .bezel { display: none; } .is-hidden { padding: 16px; }
.fold summary { list-style: none; cursor: pointer; } .fold summary::-webkit-details-marker { display: none; } .fold summary .section::after { content: '+'; color: var(--quiet); } .fold[open] summary .section::after { content: '–'; }
.tier-card { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: #0f0f11; } .tier-card b { font: 600 22px/1 var(--display); } .tier-card small { font: 400 11px/1 var(--sans); color: var(--quiet); } .tier-card.is-me::before { box-shadow: inset 0 0 0 2px var(--orange); }
.board-table { width: 100%; border-collapse: collapse; font: 500 13px/1.3 var(--sans); }
.board-table th { text-align: left; color: var(--quiet); font: 500 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 8px 0; }
.board-table td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; } .board-table td:last-child, .board-table th:last-child { text-align: right; color: var(--orange); }
.board-table .who { display: flex; align-items: center; gap: 8px; min-width: 0; } .board-table .who canvas { width: 30px; height: 24px; flex-shrink: 0; } .board-table .who .n { display: grid; line-height: 1.15; } .board-table .who .n small { font: 400 11px/1.2 var(--sans); color: var(--quiet); }
.board-table tr.is-me td { background: rgb(252 97 38 / .12); } .board-table .rank { color: var(--quiet); width: 3ch; } .board-table .tier { padding: 3px 8px; font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; background: var(--shell); color: var(--text); font: 500 13px/1.5 var(--sans); z-index: 20; } .toast a { color: var(--orange-hi); } .toast.is-error { color: #ff9a8a; } .toast.is-ok { color: #9fe8a5; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font: 400 12px/1.5 var(--sans); color: var(--quiet); } .footer a { color: var(--muted); text-decoration: none; } .footer a:hover { color: var(--orange); }
@media (max-width: 900px) { .wide, .split { grid-template-columns: minmax(0, 1fr); } .spur.compact { width: 100%; } .shell { padding-inline: 12px; } .tiers { grid-template-columns: repeat(3, 1fr); gap: 6px; } .tier-card { padding: 8px 2px; } .tier-card b { font-size: 16px; } .tier-card .tier { font-size: 9px; padding: 4px 6px; } .wide .side { order: 2; } }
@media (max-width: 520px) { .spur b { font-size: 30px; } .quest-actions .btn { padding: 8px 10px; } .board-frame { padding: 8px; } }
.wall-page { padding: 16px; background: #050403; } .wall-shell { max-width: 1600px; margin: 0 auto; } .wall-page .bezel { padding: 12px; } .wall-page .wall-caption { text-align: center; font: 500 13px/1.5 var(--sans); letter-spacing: .1em; color: var(--muted); padding-top: 14px; }

:root { --game-s1: 4px; --game-s2: 8px; --game-s3: 12px; --game-s4: 16px; --game-s6: 24px; --game-s8: 32px; --game-control: 48px; --game-action: 64px; --creator-width: 880px; --game-motion: 160ms; --game-ease: cubic-bezier(.22,1,.36,1); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.game-settings { position: relative; }
.game-settings > summary { list-style: none; min-height: var(--game-control); display: flex; align-items: center; gap: var(--game-s2); cursor: pointer; font-size: 12px; color: var(--muted); }
.game-settings > summary::-webkit-details-marker { display: none; }
.game-settings > summary::after { content: '+'; color: var(--orange); }
.game-settings[open] > summary::after { content: '−'; }
.game-settings-menu { position: absolute; z-index: 10; right: 0; top: var(--game-control); width: min(260px, 85vw); display: grid; gap: var(--game-s2); padding: var(--game-s4); background: var(--shell); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px #0008; }
.game-settings-menu .link { min-height: var(--game-control); text-align: left; }
.game-settings-menu .chip { width: max-content; }
.column.is-creating { max-width: var(--creator-width); }
.is-creator .bezel { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: var(--game-s4); }
.is-creator .bezel > *, .race-action-dock > *, .controls > * { min-width: 0; }
.bezel.has-controls::after { opacity: .35; }
.bezel.has-controls > * { position: relative; z-index: 1; }
.creator-controls { margin: 0; padding: var(--game-s4); gap: var(--game-s4); }
.creator-controls form { display: grid; gap: var(--game-s4); }
.creator-heading { font: 600 24px/1.2 var(--display); letter-spacing: -.02em; }
.creator-controls .input { min-height: var(--game-control); font-size: 16px; }
.creator-controls .spur { min-height: var(--game-action); padding: var(--game-s3) var(--game-s4); border-radius: 12px; gap: var(--game-s1); }
.creator-controls .spur b { font-size: 24px; }
.creator-controls .coats { border: 0; min-width: 0; }
.creator-controls .coats legend { margin-bottom: var(--game-s2); font-size: 13px; color: var(--muted); }
.creator-controls .coat canvas { width: 48px; height: 38px; }
.creator-controls .coat { min-height: 78px; }
.creator-controls .coat[aria-pressed='true'] { background: #241911; }
.creator-controls .input[aria-invalid='true'] { border-color: #ff9a8a; }
.creator-controls .status:empty { display: none; }
.creator-preview { min-width: 0; }
.creator-preview .board { width: 100%; }
.creator-caption { text-align: center; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; padding: var(--game-s2); }
.transaction-note { font: 400 12px/1.6 var(--sans); color: var(--muted); }
.transaction-note a { color: var(--orange-hi); text-underline-offset: 3px; }
.track-controls { margin: var(--game-s4) 0 0; padding: var(--game-s4); border-top: 1px solid var(--line); gap: var(--game-s3); }
.race-action-dock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .9fr); gap: var(--game-s4); align-items: center; }
.race-action-dock .spur.compact { min-width: 0; width: 100%; min-height: var(--game-action); border-radius: 12px; }
.race-action-dock .spur.compact b { font-size: 24px; }
.race-action-dock .spur.compact small { font-size: 12px; }
.race-action-status { display: grid; gap: var(--game-s1); font-size: 14px; }
.race-action-status p { color: var(--text); }
.race-action-status .help { font-size: 12px; color: var(--muted); }
.secondary-details { border-top: 1px solid var(--line); }
.secondary-details > summary { min-height: var(--game-control); display: flex; align-items: center; justify-content: space-between; gap: var(--game-s2); cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
.secondary-details > summary::-webkit-details-marker { display: none; }
.secondary-details > summary::after { content: '+'; color: var(--orange); }
.secondary-details[open] > summary::after { content: '−'; }
.secondary-details > :not(summary) { margin-bottom: var(--game-s3); }
.secondary-details .section { margin-top: var(--game-s4); }
.empty-board { display: grid; justify-items: center; gap: var(--game-s4); text-align: center; padding: var(--game-s6) var(--game-s4); }
.empty-board h2 { font: 600 24px/1.2 var(--display); letter-spacing: -.02em; }
.empty-board .help { max-width: 30ch; }
.empty-podium { display: flex; gap: var(--game-s3); align-items: flex-end; justify-content: center; width: 100%; max-width: 380px; height: 200px; padding: var(--game-s4) 0; }
.empty-podium > span { display: grid; place-content: center; gap: var(--game-s2); width: 30%; height: 90px; background: #0c0c0e; border: 1px dashed #55534d; border-radius: 8px 8px 0 0; color: var(--muted); }
.empty-podium > span:nth-child(2) { height: 145px; border-color: var(--orange); }
.empty-podium > span:last-child { height: 65px; }
.empty-podium b { font: 400 26px/1 var(--px); color: var(--quiet); }
.empty-podium > span:nth-child(2) b { color: var(--orange); }
.empty-podium small { font-size: 11px; }
.empty-race-note { display: grid; gap: var(--game-s3); padding: var(--game-s4) 0; }
.empty-race-note canvas { width: 80px; height: 64px; }
.empty-race-note h2 { font: 600 20px/1.25 var(--display); }
.empty-race-note .help { font-size: 13px; }
.empty-race-note .btn { justify-self: start; }
.board-table .who .n { white-space: normal; overflow-wrap: anywhere; }
.board-table td { white-space: normal; }
.game-rank-meta { font-size: 11px; color: var(--muted); margin-top: var(--game-s2); }
.result-next { justify-self: start; min-height: var(--game-action); min-width: 190px; }
.quest.stat .btn small { opacity: 1; }
.side .secondary-details { margin-top: var(--game-s3); }
.topbar .link, .footer a, .fold > summary { min-height: var(--game-control); }
.footer a { display: inline-flex; align-items: center; }
@media (max-width: 699px) {
  .is-creator .bezel { grid-template-columns: minmax(0, 1fr); padding: var(--game-s2); }
  .creator-preview { width: min(100%, 300px); justify-self: center; }
  .creator-controls { padding: var(--game-s3); }
  .race-action-dock { grid-template-columns: minmax(0, 1fr); gap: var(--game-s3); }
  .race-action-dock .spur { order: -1; }
  .track-controls { padding: var(--game-s3) var(--game-s1) var(--game-s1); }
  .empty-race-note { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .empty-race-note > .btn { grid-column: 2; }
  .topbar { gap: var(--game-s2); }
  .topbar-right { gap: var(--game-s2); }
  .empty-board { padding: var(--game-s4) var(--game-s2); }
  .empty-podium { gap: var(--game-s2); }
}
.btn.result-next { min-height: var(--game-action); }
.quest-actions .btn { min-height: var(--game-control); }
.topbar .wordmark { min-height: var(--game-control); align-items: center; }
.tab.is-on small { color: var(--ink); }

.connection-status { margin: var(--game-s4) 0; color: var(--text); }

:root {
  --crt-shell: #191a19; --crt-shell-lo: #090a09; --crt-rim: #33352e;
  --crt-screen: #100e0b; --crt-warm: #19120b; --crt-track: #77502d;
  --crt-floor: #3c2b1c; --crt-phosphor: #ffebc3; --crt-strength: .55; --crt-curvature: 0;
  --crt-radius: 16px; --crt-padding: 12px; --crt-glass-radius: 10px;
  --crt-name: 24px; --crt-meta: 11px; --crt-number: 24px;
}
.board-frame.has-crt {
  padding: var(--crt-padding); border-radius: var(--crt-radius);
  background: var(--shell); box-shadow: none;
}
.board-frame.has-crt::before { box-shadow: inset 0 0 0 1px var(--crt-rim); }
.has-crt .bezel { padding: 0; background: transparent; border-radius: 16px; }
.has-crt .bezel::before, .has-crt .bezel::after { display: none; }
.crt-surface {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--crt-glass-radius); background: var(--crt-screen);
  box-shadow: none;
}
.crt-output { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; image-rendering: auto; }
.crt-output[hidden] { display: none; }
.crt-glare { display: none; }
.crt-hud {
  position: absolute; left: 24px; right: 24px; top: 24px; z-index: 3; pointer-events: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--game-s3);
  font: 400 clamp(8px, .85vw, 11px)/1.5 var(--px); color: var(--crt-phosphor);
  white-space: nowrap;
}
.crt-hud [data-crt-left] { color: var(--orange); }
.crt-hud [data-crt-center] { font-size: clamp(14px, 1.5vw, 20px); }
.crt-hud [data-crt-right] { text-align: right; color: var(--muted); }
.crt-surface.is-flat { border-radius: 8px; box-shadow: none; }
.crt-surface.is-flat .crt-glare { opacity: 0; }
.has-crt .track-controls { margin-top: var(--game-s3); padding: var(--game-s4); border-color: var(--crt-rim); }
.has-crt .track-controls .race-action-dock { gap: var(--game-s6); }
.has-crt .track-controls .spur { box-shadow: 0 3px 12px #0005; }
.stable-controls { padding: var(--game-s2) var(--game-s2) 0; gap: var(--game-s4); }
.stable-identity { display: flex; align-items: center; justify-content: space-between; gap: var(--game-s4); }
.stable-identity > div { min-width: 0; display: grid; gap: var(--game-s2); }
.stable-identity h2 { font: 600 var(--crt-name)/1.2 var(--display); overflow-wrap: anywhere; }
.stable-stage { color: var(--muted); font-size: 12px; }
.stable-resources { display: flex; flex-wrap: wrap; gap: var(--game-s6); color: var(--muted); font-size: 13px; padding-top: var(--game-s3); border-top: 1px solid var(--crt-rim); }
.stable-resources b { font: 600 var(--crt-number)/1 var(--display); color: var(--crt-phosphor); margin-right: var(--game-s1); }
.stable-resources > :first-child b { color: var(--orange); }
#pet-horse { flex-shrink: 0; min-height: var(--game-control); border: 1px solid var(--crt-rim); background: var(--crt-shell); }
#pet-horse:hover { border-color: var(--orange); }
@media (max-width: 699px) {
  :root { --crt-padding: 8px; --crt-radius: 12px; --crt-glass-radius: 8px; }
  .crt-hud { gap: var(--game-s2); inset: 16px 12px auto; }
  .has-crt .track-controls { padding: var(--game-s3) var(--game-s1) var(--game-s1); }
  .has-crt .track-controls .race-action-dock { gap: var(--game-s3); }
  .stable-controls { padding-inline: var(--game-s1); }
  .stable-identity { gap: var(--game-s2); }
  .stable-identity .meta { gap: var(--game-s2); }
}

.shell[data-layout='race'], .shell[data-layout='board'] { max-width: 1680px; }
.shell[data-layout='race'] .wide { grid-template-columns: minmax(0, 1fr) minmax(240px, .2fr); gap: 24px; }
.shell[data-layout='race'] .wide .side { border-top: 1px solid var(--line); padding-top: 16px; gap: 12px; }
.shell[data-layout='race'] .wide .side .section { font-size: 20px; }
.shell[data-layout='race'] .board-table td { padding-block: 14px; }
.shell[data-layout='race'] .board-table .who canvas { width: 40px; height: 32px; }
.shell[data-layout='race'] .board-table .who .n { font-size: 14px; gap: 4px; }
.last-finish { justify-self: start; min-height: 48px; margin-top: 12px; }
.has-crt .track-controls { padding: 16px 8px 4px; }
.has-crt .race-action-dock { grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) auto; }
.game-more { position: relative; align-self: center; }
.game-more > summary { list-style: none; display: flex; align-items: center; justify-content: center; min-height: 48px; min-width: 48px; padding: 8px; cursor: pointer; color: var(--muted); font-size: 12px; }
.game-more > summary::-webkit-details-marker { display: none; }
.game-more > summary::after { content: '+'; color: var(--orange); margin-left: 8px; }
.game-more[open] > summary::after { content: '−'; }
.game-more-panel { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 8; display: grid; gap: 16px; width: min(360px, 84vw); max-height: min(540px, 70svh); overflow: auto; padding: 20px; background: var(--shell); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 48px #000b; }
.game-more-panel h3 { font-size: 18px; }
.game-more-panel .link { display: inline-flex; align-items: center; min-height: 48px; }
.game-more-panel .input { min-width: 0; }
.game-more-panel .story-image { margin: 0; }
.game-more-panel .result-share { display: grid; gap: 12px; }
.horse-history { border-top: 1px solid var(--line); }
.horse-history > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--muted); cursor: pointer; font-size: 13px; list-style: none; }
.horse-history > summary::-webkit-details-marker { display: none; }
.horse-history > summary::after { content: '+'; color: var(--orange); }
.horse-history[open] > summary::after { content: '−'; }
.horse-history > :not(summary) { margin-bottom: 12px; }
.moment-action { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; }
.moment-action .lead { margin: 0; font-size: 20px; }
@media (max-width: 999px) {
  .shell[data-layout='race'] .wide { grid-template-columns: minmax(0, 1fr); }
  .shell[data-layout='race'] .wide .side { order: 2; }
}
@media (max-width: 699px) {
  .has-crt .race-action-dock { grid-template-columns: minmax(0, 1fr) auto; }
  .race-action-dock .spur.compact { grid-column: 1 / -1; grid-row: 2; }
  .game-more { grid-column: 2; grid-row: 1; }
  .moment-action { grid-template-columns: minmax(0, 1fr) auto; }
  .moment-action .lead { grid-column: 1 / -1; font-size: 18px; }
  .moment-action .result-more { grid-row: 2; }
}

:root { --board-gold: #edbd62; --board-silver: #bec9c3; --board-bronze: #c98b65; --board-row: 76px; }
.shell[data-layout='board'] .column { max-width: none; }
.shell[data-layout='board'] .board-frame { padding: 8px 0; background: transparent; }
.shell[data-layout='board'] .board-frame::before { display: none; }
.shell[data-layout='board'] .controls { margin: 0; gap: 24px; }
.leaderboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.leader-eyebrow { color: var(--orange); font-size: 11px; letter-spacing: .16em; margin-bottom: 4px; }
.leaderboard-heading h2 { font: 600 40px/1.1 var(--display); letter-spacing: -.02em; }
.leaderboard-heading .help { margin-top: 8px; }
.leaderboard-heading .btn { min-height: 48px; padding-inline: 24px; }
.leader-podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); align-items: end; gap: 16px; padding: 8px 32px 0; background: radial-gradient(ellipse at 50% 100%, #81512538, transparent 65%); }
.podium-place { --podium-color: var(--board-silver); position: relative; min-width: 0; display: grid; justify-items: center; align-content: end; gap: 8px; min-height: 260px; padding: 24px 16px; border: 1px solid color-mix(in srgb, var(--podium-color) 30%, var(--line)); border-bottom: 3px solid var(--podium-color); border-radius: 16px 16px 0 0; background: linear-gradient(180deg, #111211, color-mix(in srgb, var(--podium-color) 8%, #111211)); }
.podium-1 { --podium-color: var(--board-gold); min-height: 310px; }
.podium-3 { --podium-color: var(--board-bronze); min-height: 240px; }
.podium-rank { position: absolute; left: 20px; top: 12px; color: var(--podium-color); opacity: .24; font: 600 96px/1 var(--display); letter-spacing: -.04em; }
.podium-place > canvas { position: relative; width: 148px; height: 118px; max-width: 100%; object-fit: contain; }
.podium-place h3 { position: relative; max-width: 100%; color: var(--text); font: 600 22px/1.15 var(--display); text-align: center; overflow-wrap: anywhere; }
.podium-place h3 small { display: block; font: 500 11px/1.5 var(--sans); color: var(--orange); margin-top: 4px; }
.podium-place p { color: var(--muted); font-size: 12px; }
.podium-place p b { font-size: 24px; color: var(--podium-color); }
.podium-placeholder { width: 120px; height: 80px; border-bottom: 1px dashed var(--podium-color); opacity: .35; }
.podium-place.is-unclaimed h3 { color: var(--muted); font-size: 18px; }
.my-standing { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(120px, .65fr); align-items: center; gap: 32px; padding: 24px 28px; background: linear-gradient(100deg, #2b1e11, #161410); border: 1px solid #604227; border-left: 4px solid var(--orange); border-radius: 12px; }
.my-standing-rank { display: grid; gap: 6px; }
.my-standing-rank > span { color: var(--orange-hi); font-size: 10px; letter-spacing: .08em; }
.my-standing-rank > b { font: 600 40px/1 var(--display); }
.my-standing-horse { display: flex; align-items: center; gap: 16px; min-width: 0; }
.my-standing-horse > canvas { width: 72px; height: 58px; }
.my-standing-horse > div { min-width: 0; }
.my-standing-horse h3 { font: 600 22px/1.2 var(--display); overflow-wrap: anywhere; margin-bottom: 8px; }
.my-standing-points { display: grid; gap: 6px; }
.my-standing-points b { font: 600 32px/1 var(--display); color: var(--crt-phosphor); }
.my-standing-points span, .my-standing-next { color: var(--muted); font-size: 13px; }
.ranking-filters { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.ranking-filter { min-height: 48px; padding: 12px 24px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.ranking-filter[aria-pressed='true'] { color: var(--ink); border-color: var(--orange); background: var(--orange); font-weight: 600; }
.ranking-section > .section { font-size: 20px; margin-bottom: 12px; }
.leaderboard-table { width: 100%; table-layout: fixed; }
.leaderboard-table th { padding: 16px 20px; font-size: 12px; }
.leaderboard-table th:first-child { width: 100px; }
.leaderboard-table th:last-child { width: 180px; }
.leaderboard-table .leader-tier { width: 170px; }
.leaderboard-table td { height: var(--board-row); padding: 12px 20px; font-size: 18px; }
.leaderboard-table .rank { font: 600 24px/1 var(--display); }
.leaderboard-table .who { gap: 20px; }
.leaderboard-table .who canvas { width: 64px; height: 52px; }
.leaderboard-table .who .n { font: 500 18px/1.3 var(--sans); gap: 4px; }
.leaderboard-table .who a { text-decoration: none; text-underline-offset: 4px; }
.leaderboard-table .who a:hover { color: var(--orange-hi); text-decoration: underline; }
.leaderboard-table .who small { color: var(--orange-hi); }
.leaderboard-table .tier { padding: 6px 10px; font-size: 11px; }
.leaderboard-table .leader-score { font: 600 24px/1 var(--display); }
.leaderboard-table tr.is-me td { background: #2b1d10; }
.leaderboard-table tr.is-me td:first-child { box-shadow: inset 3px 0 var(--orange); color: var(--orange); }
.ranking-empty { color: var(--muted); padding: 40px 20px; border: 1px dashed var(--line); border-radius: 12px; }
.board-rules { margin-top: 8px; }
.shell[data-layout='stable'] .quest.stat { min-height: 96px; padding: 20px; }
.shell[data-layout='stable'] .quest.stat .quest-text > b { font-size: 16px; }
.shell[data-layout='stable'] .quest.stat .btn { min-width: 112px; min-height: 56px; }
.shell[data-layout='stable'] .quest.stat .gauge { margin-top: 12px; }
.shell[data-layout='stable'] .side > .section { font-size: 20px; }
@media (max-width: 999px) {
  .leader-podium { padding-inline: 0; }
  .my-standing { grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; }
  .my-standing-next { grid-column: 1 / -1; }
  .leaderboard-table .leader-tier { width: 140px; }
  .leaderboard-table th:last-child { width: 140px; }
}
@media (max-width: 699px) {
  .leaderboard-heading { gap: 12px; }
  .leaderboard-heading h2 { font-size: 30px; }
  .leaderboard-heading .help { font-size: 12px; }
  .leaderboard-heading .btn { padding-inline: 14px; font-size: 12px; }
  .leader-podium { gap: 6px; }
  .podium-place { min-height: 220px; padding: 16px 8px; gap: 8px; border-radius: 10px 10px 0 0; }
  .podium-1 { min-height: 254px; }
  .podium-3 { min-height: 206px; }
  .podium-rank { left: 8px; top: 12px; font-size: 56px; }
  .podium-place > canvas { width: 88px; height: 70px; }
  .podium-place h3 { font-size: 14px; }
  .podium-place p b { font-size: 18px; }
  .podium-placeholder { width: 60px; height: 54px; }
  .podium-place.is-unclaimed h3 { font-size: 13px; }
  .my-standing { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 20px 16px; }
  .my-standing-rank > b { font-size: 32px; }
  .my-standing-horse { gap: 8px; }
  .my-standing-horse > canvas { width: 48px; height: 38px; }
  .my-standing-horse h3 { font-size: 18px; }
  .my-standing-points { display: flex; align-items: baseline; gap: 8px; }
  .my-standing-points b { font-size: 24px; }
  .my-standing-next { grid-column: 2; font-size: 12px; }
  .ranking-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .ranking-filter { padding-inline: 12px; font-size: 13px; }
  .leaderboard-table .leader-tier { display: none; }
  .leaderboard-table th, .leaderboard-table td { padding-inline: 8px; }
  .leaderboard-table th:first-child { width: 46px; }
  .leaderboard-table th:last-child { width: 78px; }
  .leaderboard-table th { font-size: 10px; line-height: 1.5; }
  .leaderboard-table .rank, .leaderboard-table .leader-score { font-size: 18px; }
  .leaderboard-table .who { gap: 8px; }
  .leaderboard-table .who canvas { width: 40px; height: 32px; }
  .leaderboard-table .who .n { font-size: 14px; }
  .shell[data-layout='stable'] .quest.stat { padding: 16px; }
}

/* Stable keeps the same training rows at every width. */
.split .side { min-width: 0; }
.quest.stat .quest-text { flex: 1; }
.quest.stat .gauge { width: min(207px, 100%); }
.quest.stat .gauge i { flex: 1; min-width: 0; }
.quest.stat .btn { flex-shrink: 0; }

.result-more[open] { grid-column: 1 / -1; grid-row: auto; width: 100%; }
.result-more .game-more-panel { position: static; width: 100%; max-height: none; margin-top: 12px; box-shadow: none; }
.result-more .story-image { width: 100%; max-width: 480px; height: auto; }
.split .quests { min-width: 0; grid-template-columns: minmax(0, 1fr); }

:root { --dialog-width: 480px; --dialog-wide: 760px; --dialog-radius: 16px; --dialog-inset: 24px; --dialog-motion: 240ms; }
.game-dialog { width: min(var(--dialog-width), calc(100vw - 32px)); max-height: 85svh; margin: auto; padding: var(--dialog-inset); overflow-y: auto; overscroll-behavior: contain; color: var(--text); background: var(--shell); border: 1px solid #46413a; border-radius: var(--dialog-radius); box-shadow: 0 24px 80px #0009; }
.game-dialog[open] { animation: dialog-enter var(--dialog-motion) var(--game-ease) both; }
.game-dialog::backdrop { background: #000b; }
.dialog-result { --dialog-width: var(--dialog-wide); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.dialog-heading h2 { font: 600 24px/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.dialog-close { flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); transition: background var(--game-motion); }
.dialog-close:hover { background: var(--shell-hi); color: var(--text); }
.dialog-close svg, #pet-horse svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog-body { display: grid; gap: 20px; min-width: 0; }
.dialog-body [hidden] { display: none; }
.dialog-body .btn { min-height: 48px; }
.dialog-body .link { display: inline-flex; align-items: center; min-height: 44px; }
.dialog-body .status:empty, .dialog-body #card-status:empty { display: none; }
.wallet-choice { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; padding: 14px 16px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #0f0f11; transition: border-color var(--game-motion), background var(--game-motion); }
.wallet-choice:hover:not(:disabled) { border-color: var(--orange); background: #231a14; }
.wallet-choice:disabled { opacity: .55; }
.wallet-choice .wallet-name { font-size: 16px; }
.wallet-symbol { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--shell-hi); color: var(--orange-hi); font-size: 14px; font-weight: 600; overflow: hidden; }
.wallet-symbol img { width: 100%; height: 100%; object-fit: cover; }
.result-tabs { display: flex; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.result-tabs button { flex: 1; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.result-tabs button[aria-pressed='true'] { background: var(--orange); color: var(--ink); border-color: var(--orange); font-weight: 600; }
.result-share, .result-history { display: grid; gap: 16px; min-width: 0; }
.result-share .story-image { display: block; width: 100%; height: auto; margin: 0; border-radius: 10px; }
.result-share .row .input { min-width: 0; }
.result-history .btn { justify-self: start; }
.result-history .moment-list { margin: 0; }
.creator-kicker { font: 500 10px/1.5 var(--sans); letter-spacing: .12em; color: var(--orange-hi); }
.creator-caption > strong { display: block; font: 600 20px/1.2 var(--display); color: var(--text); margin: 8px 0 12px; }
.horse-traits { display: flex; flex-wrap: wrap; gap: 6px 12px; list-style: none; color: var(--muted); font-size: 11px; line-height: 1.5; }
.horse-traits li { display: inline-flex; gap: 6px; align-items: center; }
.horse-traits li::before { content: ''; width: 3px; height: 3px; background: var(--orange); flex-shrink: 0; }
.creator-caption .horse-traits { justify-content: center; }
.horse-reveal { display: grid; gap: 24px; animation: dialog-enter var(--dialog-motion) var(--game-ease) both; }
.horse-reveal h2 { font: 600 40px/1.05 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.horse-reveal .horse-traits { display: grid; gap: 12px; font-size: 13px; }
.owner-signature { color: var(--orange-hi); font-size: 13px; }
#pet-horse svg { color: var(--orange-hi); }
.pet-status { min-height: 20px; color: var(--muted); font-size: 12px; }
.earn-hay-panel { display: grid; gap: 16px; margin-top: 16px; padding: 20px; background: #1d1b10; border: 1px solid #4b4224; border-top: 3px solid #dab56b; border-radius: 12px; }
.earn-hay-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.earn-hay-panel h3 { font: 600 24px/1.2 var(--display); }
.earn-hay-panel > header > b { color: #edc97e; font: 600 20px/1.1 var(--display); white-space: nowrap; }
.earn-hay-panel .creator-kicker { color: #cdb471; margin-bottom: 6px; font-size: 9px; }
.earn-hay-panel > .section { font-size: 15px; padding-top: 8px; border-top: 1px solid #4b4224; }
.daily-quest { gap: 16px; padding: 16px; background: #100f0c; }
.daily-quest .quest-text { flex: 1; gap: 6px; }
.daily-quest .quest-reward { color: #edc97e; font-weight: 600; font-size: 15px; }
.quest-reward small { color: var(--muted); font-size: 11px; font-weight: 400; }
.daily-quest .btn { min-height: 44px; padding-inline: 12px; color: #edc97e; background: #2c2618; font-size: 12px; }
.daily-quest progress, .move-power progress { display: block; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 2px; overflow: hidden; background: #302d23; }
.daily-quest progress::-webkit-progress-bar, .move-power progress::-webkit-progress-bar { background: #302d23; }
.daily-quest progress::-webkit-progress-value { background: #edc97e; }

/* Prime time: the one race a day that pays double, so the field shows up together. */
.prime-strip { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: #2a1f10; box-shadow: inset 0 0 0 1px #6b5526; }
.prime-strip b { font: 600 13px/1.2 var(--sans); color: #f0c982; }
.prime-strip span { font: 400 12px/1.3 var(--sans); color: var(--muted); }
.prime-strip em { margin-left: auto; font-style: normal; font: 600 12px/1 var(--sans); color: #f0c982; font-variant-numeric: tabular-nums; }
.prime-strip.is-live { background: #3a1c0c; box-shadow: inset 0 0 0 1px var(--orange); }
.prime-strip.is-live b, .prime-strip.is-live em { color: var(--orange); }
.race-action-status .prime-strip { margin-top: 8px; }
.quest-text .quest-steps { display: flex; gap: 4px; }
.quest-text .quest-steps i { font: 600 10px/16px var(--sans); font-style: normal; min-width: 22px; text-align: center; border-radius: 8px; background: #2a2619; color: var(--quiet); }
.quest-text .quest-steps i.on { background: #edc97e; color: #100f0c; }
.quest-text .quest-today { margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--orange); color: #100f0c; font: 600 10px/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.daily-quest progress::-moz-progress-bar { background: #edc97e; }
.daily-quest.is-done { opacity: .72; }
.practice-partners { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.practice-partners h3 { display: flex; gap: 8px; align-items: center; font: 500 14px/1.3 var(--sans); }
.practice-partners h3 > span { border: 1px solid #59523f; padding: 3px 5px; color: #cdb471; font-size: 9px; }
.practice-partners > .help { font-size: 12px; }
.practice-partners ul { display: grid; gap: 12px; list-style: none; }
.practice-partners li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.practice-partners canvas { width: 40px; height: 32px; }
.practice-partners small { font-size: 10px; }
.wallet-address, .leaderboard-table .who .n .wallet-address { display: block; font: 400 11px/1.5 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); overflow-wrap: anywhere; }
.my-standing .wallet-address { margin-top: 6px; }
.board-handle { color: var(--orange-hi); font-weight: 500; text-decoration: none; } .board-handle:hover { text-decoration: underline; text-underline-offset: 3px; }
.handle-board { display: grid; justify-items: start; gap: 6px; margin: 2px 0 10px; } .handle-board .link { display: inline-flex; align-items: center; min-height: 32px; color: var(--text); border-color: var(--line); } .handle-board .link[aria-pressed='true'] { border-color: var(--orange); } .handle-board .link:disabled { color: var(--quiet); border-color: transparent; cursor: not-allowed; }
.move-power { display: grid; gap: 5px; max-width: 260px; margin-block: 5px; }
.move-power b { font-size: 12px; font-weight: 500; color: var(--orange-hi); }
.move-power small { font-size: 11px; color: var(--muted); }
.move-power progress::-webkit-progress-value { background: var(--orange); }
.move-power progress::-moz-progress-bar { background: var(--orange); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 699px) {
  :root { --dialog-inset: 16px; }
  .game-dialog { width: calc(100vw - 24px); }
  .dialog-heading { margin-bottom: 16px; gap: 8px; }
  .dialog-heading h2 { font-size: 22px; }
  .dialog-body { gap: 16px; }
  .horse-reveal h2 { font-size: 32px; }
  .earn-hay-panel { padding: 16px 12px; }
  .daily-quest { padding: 14px 10px; gap: 10px; }
  .daily-quest .btn { padding-inline: 10px; font-size: 11px; }
  .podium-place .wallet-address { font-size: 9px; }
  .result-tabs button { padding-inline: 8px; font-size: 13px; }
  .result-share .row { gap: 8px; }
  .result-share .btn { font-size: 12px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-dialog[open], .horse-reveal { animation: none; }
  .dialog-close, .wallet-choice { transition: none; }
}

.shell[data-layout='race'] .wide { grid-template-areas: 'game side' 'controls side'; row-gap: 16px; }
.wide > .board-frame { grid-area: game; }
.wide > .track-controls { grid-area: controls; margin: 0; padding: 16px 4px 0; border: 0; }
.wide > .side { grid-area: side; }
.wide > .track-controls .race-action-dock { grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) auto; gap: 24px; }
@media (max-width: 999px) {
  .shell[data-layout='race'] .wide { grid-template-areas: 'game' 'controls' 'side'; }
}
@media (max-width: 699px) {
  .wide > .track-controls .race-action-dock { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
}
.code-form .input { text-transform: uppercase; letter-spacing: 0.08em; }
.code-form .help { min-height: 1em; margin: 0; color: #ff9a8a; }
.code-form .input[aria-invalid='true'] { border-color: #ff9a8a; }
