.race-entry{border-color:#78623d;background:#292419}.race-entry span:last-child{color:#e6ca93}
#race-replay{margin:10px 0 0;border:1px solid #746746;background:#2c3025;color:#eee5c7;font-size:14px;padding:9px 14px}
#race-dialog{width:min(860px,96vw);max-height:92dvh;overflow:auto;background:#161714;color:#f2f0e8;border:1px solid #746746;border-radius:18px;padding:24px}#race-dialog::backdrop{background:#080b0ada}.race-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.race-heading>div{min-width:0}.race-heading h2{font-size:24px;line-height:1.4;margin:4px 0;word-break:keep-all}.race-heading .eyebrow{color:#d7c391}#close-race{flex-shrink:0;padding:8px 12px;white-space:nowrap;font-size:14px}.race-disclaimer{font-size:14px;color:#b7b9a9;line-height:1.6}
.race-arena{border:1px solid #465a47;background:#102a23;border-radius:14px;padding:12px 10px 8px;overflow:hidden}.race-scoreboard{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px 16px;padding:0 2px 10px}.race-scoreboard strong{color:#f2d694;font-size:21px}.race-scoreboard span{font-size:14px;font-variant-numeric:tabular-nums;color:#dfebdf}.race-track-head{display:flex;justify-content:space-between;margin:0 7px 3px 36px;color:#afc7b8;font-size:12px;letter-spacing:.12em}.race-track{border-radius:8px;overflow:hidden;background:#3b3325}.race-lane{height:38px;position:relative;border-bottom:1px dashed #bbaa8150;background:#66523620}.race-lane:nth-child(even){background:#a18d5420}.race-lane:last-child{border-bottom:0}.race-lane:after{content:'';position:absolute;right:8px;top:0;bottom:0;width:7px;background:repeating-conic-gradient(#ecebd5 0% 25%,#1a251b 0% 50%) 0 0/7px 7px;opacity:.8}.race-lane-label{position:absolute;top:6px;left:6px;color:#0c1210;font-weight:700;font-size:12px;background:var(--horse-color);width:21px;height:21px;display:grid;place-items:center;border-radius:50%;z-index:2}.race-runway{position:absolute;left:29px;right:8px;top:0;height:38px}.race-runner{position:absolute;left:0;top:0;width:56px;height:38px;will-change:transform;z-index:1}.race-sprite{display:block;width:56px;height:38px;background-image:url('/horse-gallop.png');background-size:400% auto;background-position:0 -15px;background-repeat:no-repeat;filter:drop-shadow(0 2px 1px #0007)}.race-runner .race-number{position:absolute;left:27px;top:8px;min-width:15px;height:15px;line-height:15px;text-align:center;background:var(--horse-color);color:#101510;font-size:12px;font-weight:800;border-radius:3px}.race-track.running .race-sprite{animation:horse-stride .48s steps(1) infinite}.race-lane.winner{background:#e4b94c35}.race-lane.winner .race-lane-label{outline:2px solid #fff3c8}#race-progress{display:block;width:100%;height:4px;margin:12px 0 0;accent-color:#e5c77c}
@keyframes horse-stride{0%,24.99%{background-position:0 -15px}25%,49.99%{background-position:33.3333% -15px}50%,74.99%{background-position:66.6667% -15px}75%,100%{background-position:100% -15px}}
#race-start{margin:16px 0}#race-start select{max-width:160px}#race-bet fieldset{border:0;padding:0;margin:18px 0 14px;min-width:0}#race-bet legend{font-size:16px;font-weight:650;margin-bottom:10px}#race-bet legend span{font-size:14px;font-weight:400;color:#b8baaa;margin-left:10px}.race-horses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.race-horses button{display:grid;grid-template-columns:1fr auto;gap:5px;text-align:left;background:#232820;border:1px solid #4b5741;color:#eff1e5;margin:0;padding:12px;min-width:0}.race-horses button strong{color:var(--horse-color);font-size:17px}.race-horses .race-odds{font-size:21px;color:#f3d98e;font-weight:700}.race-horses small{grid-column:1/-1;font-size:14px;line-height:1.5;color:#d1d5c6}.race-horses button[aria-pressed=true]{border-color:#f8d989;background:#48432b;box-shadow:inset 0 0 0 1px #f8d989}.race-horses button.winner{border-color:#a9e5a7;background:#2d4430}.race-stake{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:end}.race-stake strong{display:block;font-size:22px;font-variant-numeric:tabular-nums}.race-stake .muted{display:block}#race-bet-button{width:100%;background:#b59950;color:#111a12;margin:6px 0}#race-dialog .muted{color:#bdc1ae;font-size:14px;line-height:1.7}#race-error{color:#ffb6ba;font-size:15px}#race-feedback{color:#cbe6af;font-size:15px}.race-participation{border-top:1px solid #414a39;margin-top:20px;padding-top:5px}.race-participation h3{font-size:17px}.race-person{padding:12px 0;border-bottom:1px solid #343d2e;overflow-wrap:anywhere}.race-person strong{font-size:16px}.race-person p{font-size:14px;line-height:1.6;margin:3px 0;color:#c7cebb}.race-person .race-paid{color:#d9e8ae}.race-rules{font-size:14px;line-height:1.8}.race-rules code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:#b9c2a9}.bubble.race p{background:#2a2b20;border:1px solid #71673f}.bubble.race_cheer p{background:#272f23;border-left:3px solid #afa366}
@media(max-width:600px){#race-dialog{padding:14px}.race-heading h2{font-size:21px}.race-heading .eyebrow{font-size:12px}.race-arena{padding:12px 7px 9px}.race-horses{grid-template-columns:repeat(2,minmax(0,1fr))}.race-horses button{padding:9px;gap:3px}.race-horses .race-odds{font-size:19px}.race-horses small{font-size:14px}.race-stake{gap:10px}.race-stake strong{font-size:19px}.race-scoreboard strong{font-size:19px}#race-bet legend span{display:block;margin:3px 0 0}}
@media(prefers-reduced-motion:reduce){.race-track.running .race-sprite{animation:none}.race-runner{will-change:auto}}
