.rally-page{--bg:#111619;--panel:#1a2023;--line:#354044;--text:#f3f1e8;--muted:#a8b0b0;--accent:#e8c251;--mint:#a9cfb6;background:var(--bg)}
.rally-page .shell{max-width:1800px;padding:0 24px 24px}.rally-page .topbar{height:60px}.rally-page .wordmark{font-size:20px}.rally-page .game-nav{background:transparent;border:0;border-radius:0}.rally-page .game-nav a{border-radius:4px}.rally-page .game-nav a[aria-current=page]{background:#2d3538;border-bottom:2px solid var(--accent)}
.rally-page .mode-title{padding:18px 0}.rally-page .mode-title h1{font-size:22px;letter-spacing:-.5px}.rally-page .mode-title h1 small{font-size:16px;font-weight:400;color:var(--muted)}.title-divider{color:#5b666b;margin:0 8px}.rally-page .mode-title p{display:none}.rally-page .eyebrow{letter-spacing:2.4px;font-size:9px}
.rally-page button{border-radius:5px;background:#252e32;border-color:#435055}.rally-page button:hover:not(:disabled){background:#354044;border-color:#b2bcbb}.rally-page button.primary{background:var(--accent);color:#171e20;border-color:var(--accent)}.rally-page button[aria-pressed=true]{background:#36382c;border-color:var(--accent);color:var(--text)}
.rally-page .workbench{grid-template-columns:minmax(0,1fr) 344px;gap:12px;position:relative}.rally-page .arena{height:clamp(520px,74vh,950px);border-radius:7px;border-color:#424c4e;background:#242c2e}.rally-page .workbench>section{top:12px}.rally-page .panel{border-radius:7px;padding:18px;background:#1b2225;border-color:#354044}.rally-page .panel h2{font-size:20px;margin:4px 0 8px}.rally-page .hint{font-size:12px;line-height:1.65}.rally-page .footnote{font-size:11px;color:#899697;line-height:1.7}.rally-page .notice:empty{display:none}.rally-page .rules{margin-top:14px;font-size:12px}
.garage-heading{display:flex;justify-content:space-between;align-items:center}.parts-count{font-size:11px;border:1px solid #4b5659;padding:5px 9px;color:var(--muted)}.rally-page #garage-panel>#start{display:flex;justify-content:space-between;align-items:center;margin:14px 0 18px;min-height:50px;font-size:15px}.rally-page #start span{font-size:23px}.rally-page .slot-grid{gap:7px}.rally-page .slot{min-height:78px;padding:8px;background:#212b2e;box-shadow:none}.rally-page .slot small{font-size:10px}.rally-page .slot strong{margin-top:5px}.rally-page .slot img{height:58px}.rally-page .part-list{gap:5px}.rally-page .part-list button{font-size:10px;padding:4px 1px;background:#242b2d}.rally-page .part-list img{height:45px}.rally-page .panel h3{font-weight:500;color:#c6cccc;font-size:12px;margin:16px 0 9px}.rally-page .car-stats{border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:32px;margin:12px 0}.rally-page .car-stats strong{font:600 20px/1.6 ui-monospace,monospace}.rally-page .course-brief{padding:10px 12px;border-radius:4px;background:#131b1e}.rally-page .course-brief strong{font-size:11px;letter-spacing:1px}.rally-page .course-brief svg{height:72px}.rally-page .course-brief .hint{font-size:11px}
.track-brand{position:absolute;top:22px;left:22px;display:flex;gap:10px;align-items:center;pointer-events:none;color:#e6e9df;text-shadow:0 1px 5px #0005}.track-brand b{border:2px solid currentColor;padding:4px 6px;font:900 22px/1 system-ui;letter-spacing:-2px;font-style:italic}.track-brand span{font:700 11px/1.8 system-ui;letter-spacing:2px}.track-brand small{font-size:8px;color:#c1c9c3}.rally-page .stage-note{bottom:20px;font-size:11px;letter-spacing:.2px}.rally-page[data-phase=garage] .timer-hud{display:none}.rally-page .timer-hud{border-radius:4px;background:#10191de8;backdrop-filter:blur(12px);border-left:3px solid var(--accent);padding:12px 16px;top:22px;left:22px;min-width:218px}.rally-page .hud-number{font:600 34px/1.25 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-1.5px;font-variant-numeric:tabular-nums}.rally-page .timer-hud .hint{font-size:11px;margin-bottom:0}.rally-page .progress-track{height:2px;border-radius:0;margin-top:10px}.rally-page .progress-track i{background:var(--accent)}
.rally-page:not([data-phase=garage]) .workbench{grid-template-columns:1fr}.rally-page:not([data-phase=garage]) .panel{background:transparent;border:0;padding:0;display:flex;justify-content:space-between;align-items:start;gap:20px}.rally-page:not([data-phase=garage]) .panel .rules{margin:0;max-width:700px;border:0;padding:0}.rally-page:not([data-phase=garage]) .arena{height:clamp(530px,80vh,1000px)}.rally-page:not([data-phase=garage]) .track-brand{left:auto;right:22px}.rally-page:not([data-phase=garage]) .mode-title h1 small{display:none}.rally-page:not([data-phase=garage]) .title-divider{display:none}.rally-page .route-cue{top:156px;right:auto;left:22px;max-width:280px;font-size:12px;border-left-color:var(--mint);background:#182526e8;backdrop-filter:blur(8px);padding:10px 12px}
.race-console{position:absolute;right:22px;bottom:22px;display:grid;grid-template-columns:1fr 1fr;gap:7px;width:260px;padding:14px;background:#111b20eb;backdrop-filter:blur(12px);border:1px solid #78868055;border-radius:5px}.race-console .stash{grid-column:1/-1;margin:0;padding:0 0 10px;border-top:0;border-bottom:3px solid #e8c251;align-items:end}.race-console .stash>span{font-size:10px;color:#aab5b7;letter-spacing:1px}.race-console .stash strong{font:600 52px/1 ui-monospace,monospace;color:#f7f5e9;font-variant-numeric:tabular-nums}.race-console .stash small{color:#a8b0b0;font-weight:400}.race-console #charges{grid-column:1/-1;margin:0;font-size:10px;line-height:1.6}.race-console button.wide{margin:0;font-size:11px;min-height:38px;padding:6px}.race-console #recover{grid-column:1/-1}.race-console #edit-during-race{font-size:10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.rally-page .driving-buttons{bottom:22px;left:22px;right:auto;display:flex;flex-direction:column-reverse;gap:8px}.rally-page .driving-buttons button{background:#172226e8;border:1px solid #7c898877;border-radius:5px;backdrop-filter:blur(8px);font:600 14px system-ui;min-width:56px;height:48px}.rally-page .driving-buttons button:active{background:#b2c6b6;color:#152025}.rally-page .driving-buttons #boost,.rally-page .driving-buttons #jump{min-width:88px;color:var(--accent)}.rally-page[data-paused=true] .stage-note{top:45%;bottom:auto;font-size:18px;background:#111b20db;padding:20px;left:30%;right:30%}
.finish-console{position:absolute;top:50%;right:24px;transform:translateY(-50%);width:310px;padding:24px;background:#111b20ed;backdrop-filter:blur(14px);border:1px solid #56635f;border-top:3px solid var(--accent);border-radius:5px;max-height:calc(100% - 40px);overflow:auto}.finish-console h2{font-size:21px;line-height:1.4;margin:8px 0 14px}.finish-console .result-time{font:600 40px/1.2 ui-monospace,monospace;letter-spacing:-2px;font-variant-numeric:tabular-nums}.finish-console .wide{min-height:40px;padding:8px;font-size:12px}.rally-page[data-phase=finished]:not([data-replay=true]) .timer-hud,.rally-page[data-phase=timeout]:not([data-replay=true]) .timer-hud{display:none}.rally-page[data-replay=true] .finish-console{display:none}.rally-page .replay-bar{background:#192226;border-radius:4px;padding:12px}.rally-page .challenge{background:#292d22;border-left-color:var(--accent);color:#daddcc;border-radius:0}
@media(max-width:1050px){.rally-page .shell{padding:0 14px 20px}.rally-page .workbench{grid-template-columns:minmax(0,1fr) 300px}.rally-page .panel{padding:14px}.rally-page .arena{height:640px}.rally-page .slot img{width:44px}.rally-page .slot strong{font-size:11px}}
@media(max-width:720px){.rally-page .shell{padding:0 8px 16px}.rally-page .topbar{height:auto;min-height:54px;padding:10px 4px;gap:8px}.rally-page .wordmark{font-size:18px}.rally-page .game-nav{order:0;width:auto;gap:0;padding:0}.rally-page .game-nav a{padding:8px 6px;font-size:10px}.rally-page .mode-title{padding:14px 4px}.rally-page .mode-title h1{font-size:19px}.rally-page .mode-title h1 small,.title-divider{display:none}.rally-page .mode-title .eyebrow{font-size:8px;letter-spacing:1.5px}.rally-page .workbench{grid-template-columns:1fr}.rally-page .arena{height:360px;border-radius:5px}.rally-page .panel{padding:16px}.rally-page .track-brand{top:14px;left:14px}.rally-page .track-brand b{font-size:18px}.rally-page .track-brand span{font-size:9px}.rally-page .slot img{width:60px;height:55px}.rally-page .slot strong{font-size:13px}.rally-page .part-list img{height:60px}.rally-page .part-list button{font-size:11px}.rally-page .stage-note{font-size:10px;bottom:14px}.rally-page:not([data-phase=garage]) .arena{height:calc(100svh - 60px);min-height:560px;max-height:950px}.rally-page:not([data-phase=garage]) .panel{display:block}.rally-page:not([data-phase=garage]) .track-brand{top:18px;right:12px}.rally-page:not([data-phase=garage]) .track-brand span{display:none}.rally-page .timer-hud{top:14px;left:12px;min-width:185px;padding:10px 12px}.rally-page .hud-number{font-size:28px}.rally-page .route-cue{top:128px;left:12px;right:12px;max-width:none;font-size:11px}.race-console{right:12px;bottom:126px;width:162px;padding:10px;gap:6px}.race-console .stash strong{font-size:34px}.race-console .stash>span{display:none}.race-console #charges{font-size:9px}.race-console button.wide{font-size:10px;padding:5px;min-height:36px}.race-console #edit-during-race{grid-column:1/-1}.race-console #pause{grid-column:1/-1}.rally-page .driving-buttons{left:12px;right:12px;bottom:max(14px,env(safe-area-inset-bottom));flex-direction:column-reverse;gap:8px}.rally-page .driving-buttons .row{justify-content:space-between}.rally-page .driving-buttons button{height:50px;flex:1;min-width:45px;font-size:13px}.rally-page .driving-buttons #boost,.rally-page .driving-buttons #jump{min-width:70px}.finish-console{right:12px;left:12px;width:auto;max-width:330px;top:50%;padding:20px;margin:auto}.finish-console .wide{min-height:42px}.rally-page[data-paused=true] .stage-note{left:12px;right:12px;font-size:14px;top:33%}}
@media(max-width:360px){.rally-page .wordmark{font-size:15px}.rally-page .game-nav a{padding:7px 4px;font-size:9px}.race-console{width:142px}.rally-page .timer-hud{min-width:172px}}
@media(max-height:550px) and (min-width:721px){.rally-page:not([data-phase=garage]) .arena{height:90svh;min-height:360px}.race-console{bottom:12px;right:12px;width:230px}.race-console #charges{display:none}.finish-console{padding:14px}.finish-console .wide{min-height:32px;margin-top:6px;padding:5px}}
.rally-page button.primary:hover:not(:disabled){background:#f0d175;border-color:#f0d175;color:#171e20}
@media(max-width:720px){.rally-page:not([data-phase=garage]) .track-brand{display:none}.rally-page .timer-hud{width:184px;min-width:0}.rally-page .hud-number{font-size:26px}.race-console{top:14px;bottom:auto;right:12px;width:132px;padding:9px;gap:5px}.race-console #charges{display:none}.race-console button.wide{min-height:44px}.race-console .stash strong{font-size:32px}.race-console .stash small{font-size:9px!important}.rally-page .route-cue{top:258px}.rally-page[data-paused=true] .stage-note{top:38%}}
@media(max-width:360px){.rally-page .timer-hud{width:164px;padding:10px}.rally-page .hud-number{font-size:23px}.rally-page .timer-hud .hint{font-size:10px}.race-console{width:110px}.race-console .stash strong{font-size:27px}.race-console #edit-during-race{font-size:9px}}
@media(max-width:720px){.rally-page[data-racing=true] .topbar,.rally-page[data-racing=true] .mode-title{display:none}.rally-page[data-racing=true] .arena{height:calc(100svh - 16px)}}
.rally-modes{display:flex;gap:6px;margin-top:12px}.rally-modes a{font-size:12px;padding:7px 13px;color:#a9b2ac;border:1px solid #535b5144;text-decoration:none;border-radius:3px}.rally-modes a[aria-current=page]{background:#b8b8a5;color:#171e20;border-color:#b8b8a5}#salvage-panel{padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid #62726944}#salvage-panel h2{font-size:19px;margin:5px 0}#piles{display:grid;gap:7px}.salvage-pile{display:grid;grid-template-columns:45px 1fr;gap:3px 9px;text-align:left;padding:9px!important;background:#293029!important;min-height:66px}.salvage-pile img{width:44px;height:44px;object-fit:contain;grid-row:1/3}.salvage-pile span{font-size:12px;font-weight:600}.salvage-pile small{font-size:10px;color:#b7bdaf}.salvage-pile:disabled{opacity:.48}.mirror-frame{position:absolute;pointer-events:none;top:16px;left:50%;transform:translateX(-50%);width:34%;max-width:320px;aspect-ratio:2.8;border:2px solid #606c63;box-shadow:0 2px 12px #0009;border-radius:4px}.mirror-frame span{position:absolute;bottom:3px;left:8px;color:#e0e4db;text-shadow:0 1px 2px #000;font:9px ui-monospace,monospace;letter-spacing:2px}.threat-meter{position:absolute;top:145px;left:50%;transform:translateX(-50%);font:600 13px system-ui;background:#1b231fe8;padding:7px 16px;border:1px solid #87948277;border-radius:3px;color:#d6dfcd}.rally-page[data-danger=true] .threat-meter{color:#ffd6b6;border-color:#ca7754;background:#4b261eea}.physics-readout{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);font:11px system-ui;letter-spacing:.3px;color:#d0d5c9;text-shadow:0 1px 4px #000;background:#151c17bb;padding:6px 10px;border-radius:3px;white-space:nowrap}.physics-readout:empty{display:none}.asset-credit{font-size:9px;color:#7e8b84;line-height:1.6}.rally-page[data-phase=caught]:not([data-replay=true]) .timer-hud,.rally-page[data-phase=wrecked]:not([data-replay=true]) .timer-hud{display:none}.rally-page[data-phase=caught] .mirror-frame,.rally-page[data-phase=wrecked] .mirror-frame{border-color:#ad7058}
@media(max-width:720px){.rally-modes a{font-size:11px}.mirror-frame{left:12px;top:auto;bottom:142px;transform:none;width:160px;max-width:none}.threat-meter{left:12px;top:auto;bottom:204px;transform:none;font-size:11px;padding:5px 10px}.physics-readout{bottom:262px;left:12px;transform:none;font-size:10px}.rally-page[data-mode=escape] .route-cue{top:220px;max-width:230px}.rally-page .mode-title{align-items:start}.rally-page .mode-title>button{font-size:10px;padding:9px}.rally-page:not([data-phase=garage]) .rally-modes{display:none}}

.rally-page .car-stats{gap:12px;display:grid;grid-template-columns:repeat(3,1fr)}.rally-page .car-stats strong{font-size:16px}.rally-page .driving-buttons #horn{color:var(--accent);min-width:60px}.rally-page #clearance-note{color:#d8c595}
.rally-page .sound-toggle{font-size:11px;margin-top:8px;padding:7px 10px;min-height:36px}
.rally-page:not([data-phase=garage]) .workbench>section{position:static}
.rally-page[data-replay=true] .stage-note{bottom:52px}.rally-page[data-replay=true] .mirror-frame{border-color:#606c63}
