.venue-play { color:var(--ink,#203f42); overflow-wrap:anywhere; }
.venue-play .play-panel { display:grid; gap:0.85rem; }
.venue-play p, .venue-play h3, .venue-play ol { margin:0; }
.venue-play .play-panel > button { justify-self:start; }
.venue-play button, .venue-play select { min-height:44px; max-width:100%; white-space:normal; }
.venue-play label { display:grid; gap:.3rem; min-width:0; font-weight:650; }
.venue-play select, .venue-play textarea { padding:.45rem; border:1px solid #aeb8a7; border-radius:.35rem; background:#fffdf6; color:inherit; font:inherit; }
.venue-play textarea { resize:vertical; max-width:100%; min-width:0; }
.play-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap:.65rem; }
.capsule-reply { display:grid; gap:.6rem; padding:.85rem 1rem; border-inline-start:3px solid #47725d; background:#edf2e8; }
.capsule-reply button { justify-self:start; }
.venue-play .play-result { padding:.85rem 1rem; border-inline-start:4px solid #b17823; background:#f7efdb; display:grid; gap:.4rem; justify-items:start; }
.venue-play ol { padding-inline-start:1.55rem; }
.venue-play li { margin-block:.3rem; }
.venue-play li small,.venue-play .play-result small { display:block; font-size:.88rem; }
.venue-play .play-message:not(:empty) { margin-top:.7rem; font-weight:650; }
.slalom-track { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); position:relative; height:8.5rem; border:3px solid #73876f; border-radius:.5rem; background:#314e49; color:#fff9e6; }
.slalom-track:focus-visible { outline:3px solid #c98927; outline-offset:2px; }
.slalom-lane { position:relative; text-align:center; }
.slalom-lane+.slalom-lane { border-left:2px dashed #91a79b; }
.slalom-gate { display:inline-grid; place-items:center; width:70%; height:2.1rem; margin-top:.7rem; color:#ffdd87; border:3px solid currentColor; border-bottom:0; font-size:1.25rem; }
.slalom-rider { position:absolute; bottom:.55rem; left:calc((var(--lane) + .5)*100%/3); transform:translateX(-50%); transition:left .13s ease-out; font-size:2rem; background:#fff2cf; border-radius:50%; padding:.07rem .4rem; line-height:1.35; }
.slalom-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.3rem; }
.venue-play .slalom-controls button { min-width:0; padding:.45rem .15rem; }
.play-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.4rem; font-variant-numeric:tabular-nums; }
.play-detail { font-size:.9rem; }
@media(prefers-reduced-motion:reduce){ .slalom-rider { transition:none; } }
.slalom-pace { display:grid; gap:.2rem; padding:.65rem .85rem; border-inline-start:3px solid #47725d; background:#edf2e8; }
.slalom-splits summary { display:flex; align-items:center; gap:.4rem; min-height:44px; cursor:pointer; font-weight:650; }
.slalom-splits summary::before { content:"▸"; }
.slalom-splits[open] summary::before { content:"▾"; }
.slalom-splits table { table-layout:fixed; width:100%; border-collapse:collapse; font-size:.875rem; font-variant-numeric:tabular-nums; }
.slalom-splits caption { margin-block:.3rem; text-align:start; }
.slalom-splits th,.slalom-splits td { padding:.35rem .2rem; text-align:start; border-bottom:1px solid #d5ded2; }
.slalom-splits th:first-child { width:10%; }
.slalom-splits th:last-child { width:30%; }

dialog:has(.city-rally) { width:min(43rem,calc(100% - 1rem)); }
.city-rally { display:grid; gap:.7rem; }
.city-rally [hidden] { display:none !important; }
.rally-header,.rally-instruments { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.4rem; }
.rally-map { overflow:hidden; background:#e5e8d6; border:1px solid #aeb9a6; border-radius:.45rem; }
.rally-map:focus-visible { outline:3px solid #ab792a; outline-offset:2px; }
.rally-map .town-tip-map { display:block; width:100%; height:auto; aspect-ratio:1.55; max-height:44vh; }
.rally-map .rally-route-bed { stroke:#c1d8c9; stroke-width:13; opacity:.8; }
.rally-map .rally-line { stroke:#347969; stroke-width:2.5; stroke-dasharray:6 3; }
.rally-credit { color:#52675f; font-size:.75rem; }
.rally-credit a { color:inherit; }
.city-rally > button { justify-self:start; }
.rally-roadinfo { display:grid; gap:.16rem; padding:.5rem .65rem; margin:.45rem 0; border-left:3px solid #ab712b; background:#f7efdb; }
.rally-instruments { font-variant-numeric:tabular-nums; }
.rally-buttons { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.4rem; }
.rally-buttons button { padding:.4rem; min-width:0; }
.city-rally .play-message:empty { display:none; }
.city-rally [data-records]:empty { display:none; }
@media(max-width:520px){.rally-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }}
.rally-challenge { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem .8rem; }
.rally-challenge p { flex:1 1 13rem; }
.rally-ghost rect { fill:#216b99; }
.rally-ghost { opacity:.82; }
.city-rally .rally-duel { display:flex; flex-wrap:wrap; align-items:baseline; gap:.15rem .65rem; margin:.4rem 0; padding:.35rem .6rem; border-inline-start:3px dashed #216b99; background:#e9f2f6; }

dialog:has(.sprint) { width:min(64rem,calc(100% - 1rem)); max-height:96dvh; padding:clamp(.65rem,2vw,1.35rem); }
.sprint { display:grid; gap:.55rem; }
.sprint [hidden] { display:none !important; }
.sprint-view { position:relative; isolation:isolate; border-radius:.6rem; overflow:hidden; background:#b9bb91; color:#fff9e6; }
.sprint-view canvas { display:block; width:100%; height:clamp(190px,52vh,520px); }
.sprint-view:focus-visible { outline:3px solid #bc713a; outline-offset:2px; }
.sprint-plaque,.sprint-watch,.sprint-note,.sprint-trip,.sprint-speed { position:absolute; pointer-events:none; }
.sprint-plaque { left:.75rem; top:.75rem; max-width:55%; padding:.45rem .7rem; background:#203d39ed; border-left:.25rem solid #ed8151; border-radius:.15rem; }
.sprint-plaque span { display:block; font-size:.62rem; font-weight:750; letter-spacing:.14em; color:#ecd8ae; }
.sprint-plaque i { display:inline-block; width:.9rem; height:1px; margin:0 .2rem .18em; background:currentColor; }
.sprint-plaque strong { font:600 clamp(1.05rem,3vw,1.65rem)/1.1 var(--serif); }
.sprint-watch,.sprint-speed { font-variant-numeric:tabular-nums; background:#213b37e8; }
.sprint-watch { top:.75rem; right:.75rem; padding:.38rem .55rem; font-weight:750; border-radius:.18rem; }
.sprint-trip { left:.7rem; bottom:.65rem; width:clamp(34px,6.6vw,72px); height:26%; background:#294739b8; border-radius:.3rem; padding:.3rem; }
.sprint-trip svg { width:100%; height:100%; }
.sprint-note { bottom:.7rem; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:.32rem; padding:.23rem .52rem; border-radius:.24rem; background:#fff3d8; color:#283e35; font-size:.88rem; font-weight:700; white-space:nowrap; }
.sprint-arrow { display:inline-block; font-size:1.35rem; line-height:1.12; color:#874224; }
.sprint-speed { right:.7rem; bottom:.65rem; display:grid; justify-items:end; line-height:1; padding:.36rem .5rem; border-radius:.22rem; }
.sprint-speed strong { font-size:clamp(1.25rem,3vw,2rem); }
.sprint-speed small { font-size:.66rem; }
.sprint-overlay { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.sprint-overlay strong { font:italic 700 clamp(2.4rem,9vw,5rem)/1 var(--serif); color:#fffae7; text-shadow:0 2px 6px #1c302c; }
.sprint-strip { display:flex; align-items:center; gap:.65rem; }
.sprint-strip progress { flex:auto; width:1px; height:.4rem; accent-color:#b65435; }
.sprint-distance { font:600 .82rem var(--sans); font-variant-numeric:tabular-nums; }
.sprint-pedals { display:grid; grid-template-columns:1fr 1fr 1.15fr 1.15fr 1.2fr; gap:.35rem; }
.sprint-pedals button { touch-action:none; user-select:none; -webkit-user-select:none; min-width:0; padding:.4rem .1rem; border:1px solid #aeb8a9; border-bottom-width:3px; border-radius:.35rem; background:#e9eddf; font-weight:700; color:#263e37; }
.sprint-pedals .key-gas { background:#275748; color:#fff4d8; }
.sprint-pedals .key-left,.sprint-pedals .key-right { font-size:1.4rem; }
.sprint-pedals button.on { background:#f6cb84; color:#402d1b; border-color:#ad7337; }
.sprint-menu { display:flex; flex-wrap:wrap; gap:.45rem; }
.sprint-menu button { min-width:0; }
.sprint-menu .primary { background:#205547; color:#fffdf1; }
.sprint-menu [aria-pressed=true] { border-color:#47715e; background:#deeadf; }
.sprint-status:empty { display:none; }
.sprint-help,.sprint-status { font-size:.9rem; }
.sprint-board { padding-top:.35rem; border-top:1px solid var(--rule); }
.sprint-board p { display:flex; justify-content:space-between; gap:.5rem; margin-top:.3rem; }
@media(max-width:480px) { .sprint-view canvas { height:clamp(220px,41dvh,350px); } .sprint-note { font-size:.74rem; } .sprint-pedals button { font-size:.79rem; min-height:48px; } }
@media(max-height:500px) and (orientation:landscape) { .sprint-view canvas { height:43dvh; } }
@media(max-width:480px) {
 .sprint-pedals { grid-template-columns:minmax(44px,.82fr) minmax(44px,.82fr) minmax(max-content,1.18fr) minmax(max-content,1.18fr) minmax(44px,.88fr); gap:.18rem; }
 .sprint .sprint-pedals .sprint-key { padding-inline:.05rem; white-space:nowrap; line-height:1.15; }
 .sprint-menu { gap:.3rem; }
 .sprint-menu .secondary { padding-inline:.45rem; font-size:.84rem; }
}
