*{box-sizing:border-box}body{margin:0;background:#f3f5ef;color:#223a36;font:16px/1.5 system-ui,sans-serif;--panel:#fffdf6;--ink:#223a36;--border:#b8c5b9;--btn:#fff;--accent:#17694e;--soft:#e6f1e8}body[data-theme=dark]{background:#192925;color:#f0f7ef;--panel:#243b35;--ink:#f0f7ef;--border:#64857a;--btn:#344d45;--accent:#287d59;--soft:#314940}main{max-width:970px;margin:auto;padding:12px}header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}h1{font-size:clamp(28px,5vw,43px);line-height:1.1;margin:4px 0}h2{font-size:1.2rem;margin:0 0 10px}p{margin:6px 0}.eyebrow{font-size:12px;letter-spacing:.13em;text-transform:uppercase;font-weight:800;color:inherit}.tools,.toolbar,.stats,.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.race,details{background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:12px;margin-bottom:12px}.toolbar select{flex:1;min-width:0;max-width:100%}button,select{font:inherit;color:var(--ink);background:var(--btn);border:1px solid var(--border);border-radius:10px;padding:8px 10px;min-height:44px;min-width:44px;cursor:pointer;font-weight:650}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #e0972f;outline-offset:2px}button:disabled{opacity:.5;cursor:default}button[aria-pressed=true]{background:var(--accent);color:white;border-color:var(--accent);box-shadow:inset 0 0 0 2px #fff5}.stats{margin:12px 0;font-size:14px;justify-content:space-between;gap:6px}.stats span{background:var(--soft);border-radius:8px;padding:5px 8px;font-weight:700}.progress{height:8px;background:var(--soft);border-radius:10px;overflow:hidden;margin-bottom:10px}.progress i{display:block;height:100%;background:#359764;width:0}.play{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);gap:12px;align-items:start}.scene{--grass:#95bd70;--tree:#3b7856;background:var(--grass);border-radius:14px;overflow:hidden;padding:7px 12%;position:relative}.scene[data-scene=wald]{--grass:#6c9d6d;--tree:#325c4a}.scene[data-scene=kueste]{--grass:#ddc58c;--tree:#4b8c83}.scene[data-scene=berg]{--grass:#a6b0a5;--tree:#596f6b}.scene[data-scene=nacht]{--grass:#425774;--tree:#243e55}.scene:before,.scene:after{content:'';position:absolute;inset:30px 0 0;width:10%;background:radial-gradient(ellipse at center,var(--tree) 0 42%,transparent 45%) 0 0/100% 54px;pointer-events:none}.scene:after{left:auto;right:0}.roadhead,.row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.roadhead{font-size:10px;font-weight:800;color:#fff;text-align:center;background:#405354;padding:4px 0}.road{background:#49515c;border:4px solid #f3e7c1;border-top:0;border-bottom:0}.row{height:40px;border-bottom:1px solid #ffffff24;position:relative}.cell{display:grid;place-items:center;position:relative;min-width:0;border-right:2px dashed #eae2bd80}.cell:last-child{border:0}.row.current{background:#586874}.row.finish .cell{background:repeating-conic-gradient(#f7f2e6 0% 25%,#313944 0% 50%) 0/18px 18px}.row.past{opacity:.6}.cell.target{box-shadow:inset 0 0 0 3px #f7d674;background:#ffffff25}.cell svg{width:29px;height:35px;z-index:2;filter:drop-shadow(0 2px 2px #0005)}.limit{position:absolute;top:2px;left:-23px;background:#fff;color:#242b33;border:2px solid #b43e32;border-radius:50%;width:21px;height:21px;text-align:center;font-size:12px;font-weight:800;z-index:3;line-height:17px}.cockpit{padding:10px;background:var(--soft);border-radius:14px}.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}fieldset{border:0;padding:0;margin:0 0 10px;min-width:0}legend{font-weight:750;margin-bottom:4px}.choices button{padding:6px 2px;font-size:14px;min-height:48px}.primary{background:var(--accent);color:#fff;border-color:var(--accent);font-weight:800}.cockpit .primary{width:100%;margin-bottom:8px}.preview{min-height:3em;font-size:14px;font-weight:650}.status{min-height:1.5em;margin:10px 0;font-weight:650}.panel{text-align:center;background:var(--soft);padding:20px;border-radius:12px}.panel .actions{justify-content:center}.medal{font-size:2rem;color:#bc8220;letter-spacing:5px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}summary{cursor:pointer;font-weight:700}[hidden]{display:none!important}@media(max-width:620px){main{padding:8px}.race{padding:8px}.play{grid-template-columns:1fr}.scene{padding-left:12%;padding-right:12%}.row{height:33px}.cell svg{height:29px;width:25px}.cockpit{padding:8px}.stats{font-size:12px}.toolbar label{width:100%}.toolbar select{font-size:14px}.roadhead{font-size:9px}}@media(prefers-reduced-motion:no-preference){.progress i{transition:width .18s ease}.cell.target{transition:background .12s}}

#throttle{grid-template-columns:repeat(2,minmax(0,1fr))}

.road{min-height:320px;display:flex;flex-direction:column;justify-content:flex-end}.row{flex:none}@media(max-width:620px){.road{min-height:264px}}

.quick-drive{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.quick-drive button{min-height:70px;background:var(--accent);color:white;display:grid;place-items:center;font-size:13px;border:2px solid transparent;padding:4px}.quick-drive b{font-size:29px;line-height:1.1}.quick-drive button.unsafe{background:var(--btn);color:var(--ink);border-color:#b88448}.drive-help{font-size:13px;margin:8px 0}.planning{padding:8px;margin:12px 0}.planning summary{padding:8px 0;min-height:44px}.planning .preview{min-height:0}.planning fieldset{margin-top:8px}.road{min-height:0}.row.current{background:#526e83}.row.current .player-car{background:#fbd77b20}.player-car svg{position:relative;z-index:5;overflow:visible}.scene{overflow:hidden}.roadhead{letter-spacing:.04em}.scene .row{height:42px}@media(max-width:620px){.scene .row{height:32px}.quick-drive button{min-height:60px}.cockpit{position:relative}.roadhead{padding:2px 0}.scene{padding-top:4px}.play{gap:8px}}

.race-finished .cockpit{display:none}.race-finished{grid-template-columns:1fr}.race-finished .scene{max-width:480px;width:100%;margin:auto}.player-car svg{width:35px;height:40px}.row{height:42px}@media(max-width:620px){.player-car svg{width:30px;height:31px}.quick-drive button{min-height:54px}.cockpit h2{font-size:16px;margin-bottom:5px}.drive-help{margin:5px 0}.scene .row{height:31px}.scene .row.current{border-bottom:2px solid #f7d674}.planning{margin:6px 0}.scene{padding-left:9%;padding-right:9%}}

.road{overflow:hidden}.row.current{z-index:2}

/* 1.7.4: illustrated roadside and non-clipped speed signs. No layout-dependent rules. */
.scene[data-scene=wiese]{--roadside:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%22104%22%20viewBox%3D%220%200%2050%20104%22%3E%3Crect%20width%3D%2250%22%20height%3D%22104%22%20fill%3D%22%238ebc75%22%2F%3E%3Cpath%20d%3D%22M0%200H50V104H0Z%22%20fill%3D%22%23afd28c%22%20opacity%3D%22.32%22%2F%3E%3Cpath%20d%3D%22M0%207Q28%200%2050%2023M0%2077Q26%2057%2050%2070%22%20fill%3D%22none%22%20stroke%3D%22%23c2df9d%22%20stroke-width%3D%226%22%20opacity%3D%22.6%22%2F%3E%3Cellipse%20cx%3D%2225%22%20cy%3D%2231%22%20rx%3D%2219%22%20ry%3D%2210%22%20fill%3D%22%2341794e%22%20opacity%3D%22.37%22%2F%3E%3Cpath%20d%3D%22M26%208v27%22%20stroke%3D%22%23775038%22%20stroke-width%3D%225%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2218%22%20r%3D%2213%22%20fill%3D%22%23387e4e%22%2F%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2217%22%20r%3D%2210%22%20fill%3D%22%234c9b57%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%227%22%20fill%3D%22%2384bd70%22%2F%3E%3Cg%20fill%3D%22%23f7edb4%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%2251%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%2258%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%2285%22%20r%3D%222.7%22%2F%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2292%22%20r%3D%222%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M4%2086l3-6%202%207m31-46%203-7%202%207%22%20fill%3D%22none%22%20stroke%3D%22%234e8d55%22%20stroke-width%3D%221.7%22%2F%3E%3C%2Fsvg%3E")}
.scene[data-scene=wald]{--roadside:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%22104%22%20viewBox%3D%220%200%2050%20104%22%3E%3Crect%20width%3D%2250%22%20height%3D%22104%22%20fill%3D%22%23608e66%22%2F%3E%3Cpath%20d%3D%22M0%2048Q26%2028%2050%2040M0%2097Q23%2077%2050%2090%22%20stroke%3D%22%23a5b88a%22%20stroke-width%3D%225%22%20fill%3D%22none%22%20opacity%3D%22.45%22%2F%3E%3Cellipse%20cx%3D%2223%22%20cy%3D%2239%22%20rx%3D%2220%22%20ry%3D%227%22%20fill%3D%22%2326493e%22%20opacity%3D%22.5%22%2F%3E%3Cpath%20d%3D%22M23%2010v31%22%20stroke%3D%22%2379583a%22%20stroke-width%3D%226%22%2F%3E%3Cpath%20d%3D%22M23%201%2036%2023H30L43%2036H3L16%2023H10Z%22%20fill%3D%22%23285d48%22%20stroke%3D%22%23214b3a%22%2F%3E%3Cpath%20d%3D%22M23%201%2025%2036H3L16%2023H10Z%22%20fill%3D%22%2344805a%22%2F%3E%3Cellipse%20cx%3D%2234%22%20cy%3D%2285%22%20rx%3D%2214%22%20ry%3D%226%22%20fill%3D%22%23355849%22%2F%3E%3Cpath%20d%3D%22M34%2057%2046%2078H40L49%2087H19L28%2078H22Z%22%20fill%3D%22%2338745a%22%2F%3E%3Cpath%20d%3D%22M8%2065q3-9%206%200m-9%201q-3-7-5-3%22%20fill%3D%22none%22%20stroke%3D%22%23becd8f%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E")}
.scene[data-scene=kueste]{--roadside:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%22104%22%20viewBox%3D%220%200%2050%20104%22%3E%3Crect%20width%3D%2250%22%20height%3D%22104%22%20fill%3D%22%23dfc78d%22%2F%3E%3Cpath%20d%3D%22M0%200H17Q27%2014%2015%2031T18%2062T14%2090L19%20104H0Z%22%20fill%3D%22%236db9c2%22%2F%3E%3Cpath%20d%3D%22M19%200Q28%2014%2018%2031T21%2062T17%2090L22%20104%22%20fill%3D%22none%22%20stroke%3D%22%23eff9df%22%20stroke-width%3D%223%22%20opacity%3D%22.9%22%2F%3E%3Cpath%20d%3D%22M34%2049q-8-16%201-30%22%20stroke%3D%22%2392673f%22%20stroke-width%3D%224%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M34%2019q-17-12-19%204%2010-7%2019-4%200-17%2014-9-9%201-14%209%2015-6%2015%208-8-7-15-8%207%2011%200%2016-1-11%200-16%22%20fill%3D%22%23408960%22%20stroke%3D%22%23346f54%22%2F%3E%3Cellipse%20cx%3D%2234%22%20cy%3D%2252%22%20rx%3D%229%22%20ry%3D%223%22%20fill%3D%22%238d7852%22%20opacity%3D%22.35%22%2F%3E%3Cpath%20d%3D%22M30%2078q10-8%2013%203-9%203-13-3%22%20fill%3D%22%23f8e6bf%22%20stroke%3D%22%23b6996e%22%2F%3E%3C%2Fsvg%3E")}
.scene[data-scene=berg]{--roadside:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%22104%22%20viewBox%3D%220%200%2050%20104%22%3E%3Crect%20width%3D%2250%22%20height%3D%22104%22%20fill%3D%22%23a7b6ac%22%2F%3E%3Cpath%20d%3D%22M0%200%2015%2010%205%2031%2022%2051%209%2078%2022%20104H0Z%22%20fill%3D%22%237b9190%22%2F%3E%3Cpath%20d%3D%22M6%2017%2020%203%2035%2033%2047%2029%2045%2042%2017%2044Z%22%20fill%3D%22%23718387%22%20stroke%3D%22%235d747b%22%2F%3E%3Cpath%20d%3D%22M20%203%2035%2033%2025%2026%2019%2030%2014%2020%206%2017Z%22%20fill%3D%22%23eff5ee%22%2F%3E%3Cpath%20d%3D%22M29%2070%2042%2053%2049%2083%2021%2091Z%22%20fill%3D%22%237c8e8d%22%20stroke%3D%22%2361797a%22%2F%3E%3Cpath%20d%3D%22M42%2053%2049%2083%2039%2076%2033%2078Z%22%20fill%3D%22%23d9e5e3%22%2F%3E%3Cg%20fill%3D%22%23657e63%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2263%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%2269%22%20r%3D%224%22%2F%3E%3Ccircle%20cx%3D%2237%22%20cy%3D%2299%22%20r%3D%223%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}
.scene[data-scene=nacht]{--roadside:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%22104%22%20viewBox%3D%220%200%2050%20104%22%3E%3Crect%20width%3D%2250%22%20height%3D%22104%22%20fill%3D%22%23334b66%22%2F%3E%3Cellipse%20cx%3D%2224%22%20cy%3D%2218%22%20rx%3D%2219%22%20ry%3D%2219%22%20fill%3D%22%23eac272%22%20opacity%3D%22.13%22%2F%3E%3Cpath%20d%3D%22M24%2013v23%22%20stroke%3D%22%23b4bfbb%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20d%3D%22M24%2014q0-9%207-9h6%22%20fill%3D%22none%22%20stroke%3D%22%23a6b8bf%22%20stroke-width%3D%223%22%2F%3E%3Crect%20x%3D%2231%22%20y%3D%224%22%20width%3D%2210%22%20height%3D%225%22%20rx%3D%222%22%20fill%3D%22%23ffdf8c%22%2F%3E%3Cellipse%20cx%3D%2224%22%20cy%3D%2237%22%20rx%3D%2211%22%20ry%3D%223%22%20fill%3D%22%231f354a%22%2F%3E%3Cpath%20d%3D%22M16%2065%2026%2049%2037%2065H32L42%2077H6L16%2065Z%22%20fill%3D%22%23254759%22%20stroke%3D%22%23203b51%22%2F%3E%3Cg%20fill%3D%22%23d1dff2%22%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%227%22%20r%3D%221.1%22%2F%3E%3Ccircle%20cx%3D%2243%22%20cy%3D%2247%22%20r%3D%221.4%22%2F%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2292%22%20r%3D%221.5%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M30%2092v8m-4-4h8%22%20stroke%3D%22%23e9c67c%22%20stroke-width%3D%221.5%22%2F%3E%3C%2Fsvg%3E")}

.scene{padding-left:12%;padding-right:12%;background:var(--grass);border:1px solid #536e5e;box-shadow:inset 0 0 0 2px #ffffff38,0 3px 0 #173e3620}
.scene:before,.scene:after{inset:0 auto 0 0;width:12%;background:var(--roadside) center top/100% auto repeat-y;opacity:1}.scene:after{left:auto;right:0;transform:scaleX(-1)}
.roadhead,.road{position:relative;z-index:1}.roadhead{background:#263e49;border-left:3px solid #e8dfbd;border-right:3px solid #e8dfbd;padding-left:28px;line-height:1.55;border-radius:4px 4px 0 0}.road{border:3px solid #f5e5bb;border-top:0;border-bottom:3px solid #f5e5bb;background:linear-gradient(90deg,#384853,#4c5961 30%,#424e58 70%,#34434c)}
.scene .row{padding-left:28px;background:transparent;border-bottom:1px solid #b1c6c31c}.scene .row:before{content:attr(data-row);position:absolute;left:0;top:0;bottom:0;width:27px;background:#293b46;display:grid;place-items:center;color:#c5d2d7;font-size:10px;font-weight:750;border-right:1px solid #d5dac470;font-variant-numeric:tabular-nums}.scene .row.current:before{background:#f8da88;color:#3b321d;font-weight:900}.scene .row.past{opacity:1}.scene .row.past .cell{opacity:.63}.scene .row.current{background:#577184;border-bottom:2px solid #f7d674}.scene .row.finish .cell{background:repeating-conic-gradient(#f7f2e6 0% 25%,#313944 0% 50%) 0/14px 14px}.scene .cell{border-right:2px dashed #eee3cba6}.scene .cell:last-child{border:0}.scene .cell.target{box-shadow:inset 0 0 0 2px #ffdf88;background:#ffdd7d29}.scene .cell.target:not(.player-car):after{content:'↑';position:absolute;bottom:2px;right:5px;font-weight:900;font-size:13px;color:#ffe5a7;line-height:1;pointer-events:none}.scene .limit{left:2px;top:50%;transform:translateY(-50%);width:23px;height:23px;line-height:19px;border:2px solid #c23e35;box-shadow:0 1px 2px #14212a88;font-size:12px}.scene .player-car{z-index:2}.scene .player-car svg{filter:drop-shadow(0 3px 2px #071921b8);width:37px;height:40px}.quick-drive button{box-shadow:0 3px 0 #0b342d36}.quick-drive button:active{box-shadow:none;transform:translateY(1px)}.quick-drive button.unsafe{box-shadow:none}.scene .row.finish:before{content:'⚑';font-size:19px;color:#fce5a3}
@media(max-width:620px){.scene{padding-left:10%;padding-right:10%}.scene:before,.scene:after{width:10%}.scene .row{padding-left:26px}.scene .row:before{width:25px}.roadhead{padding-left:26px}.scene .limit{width:22px;height:22px;line-height:18px;left:1px}.scene .player-car svg{width:30px;height:31px}.quick-drive button{min-height:54px}}
@media(prefers-reduced-motion:reduce){.quick-drive button:active{transform:none}}

@media(min-width:900px){main{max-width:1200px}.play:not(.race-finished){grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr)}.scene .row{height:clamp(42px,4.6vw,58px)}.player-car svg{width:43px;height:49px}.race-finished .scene{max-width:600px}}
