@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');
:root{--display:'Oswald','Arial Narrow',sans-serif;--acid:#d9ef42;--muted:#c2b9aa;--line:#625345}
body{background:#191812;color:#f1eee3}.race-screen{background:#493b27}.fullscreen-map{inset:0!important;background:url('assets/wasteland.png') center/cover}.fullscreen-map > svg{filter:none}
.hex{stroke:#f7dfaf55;stroke-width:.65;fill:#c9a16412;transition:fill .15s}.hex.wall{fill:#211c15cc;stroke:#58462e66;stroke-width:.8}.hex.oil{fill:#373b334d}.hex.gravel{fill:#d0b68c38}.hex.reachable{fill:#d9ed4660;stroke:#f5ff77;stroke-width:1.8;filter:drop-shadow(0 0 3px #ccea55)}.hex.danger-step{fill:#ad301d88;stroke:#ff9979}.hex.inrange{fill:#97c9b03b;stroke:#b6decc88}.hex.route{fill:#dff34b80;stroke:#f2ff84;stroke-width:2}.gate-cell{fill:#f9d65430;stroke:#f7ce56;stroke-width:1.6;stroke-dasharray:none;pointer-events:none}.gate-cell.next-gate{fill:#e8f74740;stroke:#ecff61;stroke-width:2.5}.gate-label{fill:#ffe682;paint-order:stroke;stroke:#19170e;stroke-width:5px;font-family:var(--display);font-size:12px;letter-spacing:1px;pointer-events:none}.gate-label.next{fill:#f1ff6b}.car-token{filter:drop-shadow(2px 4px 2px #130d09aa)}.car-token .token-outline{transition:stroke-width .15s}.car-token.inspected .token-outline{stroke:#fff3bb;stroke-width:2.5}.car-token.target .token-outline{stroke:#ff7850;stroke-width:2.5}.car-token text{font-family:var(--display)}
.hud-bottom-right,.hud-bottom-left>.panel,.hud-standings,.hud-report,.race-menu-line{border:3px solid #5f5144;border-radius:5px;background:linear-gradient(115deg,#172027f5,#090f13f5);box-shadow:inset 0 0 0 1px #93806a66,inset 0 0 18px #0009,0 0 0 2px #1e1712,0 8px 20px #0009;backdrop-filter:blur(8px)}
.hud-bottom-right,.hud-bottom-left>.panel{border-image:linear-gradient(130deg,#8b7459,#2c2722 18%,#765135 43%,#342b21 65%,#8b7359) 1}.hud-bottom-left>.panel{position:relative}.race-menu-line{padding:12px;align-items:center}.race-menu-line strong{font-family:var(--display);font-size:26px;line-height:1.1;letter-spacing:1px;text-shadow:2px 2px #000}.race-menu-line span{font-family:var(--display);font-size:13px;color:#d4c8b4}.race-menu-line button{border:2px solid #7e7563;box-shadow:inset 0 0 8px #000;background:#13191b}.hud-top-left{width:300px}.race-round{background:linear-gradient(100deg,#591e14,#29120fee);padding:8px 12px;width:max-content;border-left:4px solid #ab4326;box-shadow:0 3px 8px #0007}.race-round .badge{background:none;border:0;color:#fff0d0;font-family:var(--display);font-size:19px;padding:0}.race-round .muted{color:#e2c7b5}
.hud-top-center{top:14px;width:calc(100vw - 680px)}.hud-top-center>.eyebrow{color:#fff6d8;text-shadow:0 2px 3px #000;font-family:var(--display)}.queue-chips{gap:5px}.queue-car{display:grid;grid-template-columns:1fr auto;min-width:68px;max-width:110px;padding:3px 6px 5px;background:#10171bee;border:2px solid #5e645d;box-shadow:0 4px 7px #0008;border-radius:3px;font-size:12px;line-height:1.15}.queue-car .vehicle-art{grid-column:1/-1;width:65px;height:43px;margin:auto}.queue-car.current{background:#383a13ee;box-shadow:0 0 0 2px #d6e65055}.queue-car.done{opacity:.6}.queue-car>span:not(.vehicle-art){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue-car b{font-size:17px}
.vehicle-art{display:block;background-size:300% 200%;background-position:var(--sx) var(--sy);background-repeat:no-repeat;flex-shrink:0}.pilot-head{position:relative;min-height:100px}.pilot-art{position:absolute;right:-6px;top:12px;width:125px;height:125px;opacity:.95;pointer-events:none}.pilot-head>div:first-of-type{position:relative;z-index:1;max-width:75%}.hud-bottom-left .pilot-head h2{font-size:29px;line-height:1.06;text-transform:uppercase;max-width:150px;text-shadow:2px 2px 4px #000;margin:10px 0}.hud-bottom-left .pilot-head .eyebrow{white-space:nowrap}.hud-bottom-left .pilot-sub{background:#0d141bd9;padding:5px 0;font-size:12px;width:230px;line-height:1.6}.hud-bottom-left .car-number{position:absolute;right:0;bottom:6px;z-index:2;font-family:var(--display);font-size:30px}.racer-name{display:flex;align-items:center;gap:6px}.racer-name .vehicle-art{width:34px;height:30px}.hud-racer{padding:4px 0}.hud-standings summary,.hud-report summary,.hud-action .section-title{font-family:var(--display);letter-spacing:.3px;font-size:18px}.hud-team{border-top:1px solid #69593e55;padding-top:8px}.inspector-weapons{border-top:1px solid #79664d;padding-top:8px}.inspector-weapon{border-bottom:1px solid #ffffff0c}.hud-bottom-left .metric{margin-top:10px}.bar{background:#414238}.bar span{box-shadow:inset 0 2px 1px #fff5}.hud-action .primary{background:linear-gradient(#e2f951,#b7ce27);border:1px solid #effd83;color:#171d07;box-shadow:inset 0 2px 1px #fff8,0 3px 6px #0006;font-weight:800}.hud-control-row button,.brake-controls button,.hud-map-controls button,.hud-utility button{background:linear-gradient(#253037,#111a20);border-color:#776f5f;box-shadow:inset 0 1px #c9c1a54d}.hud-control-row{align-items:center}.hud-control-row .help{font-size:12px;line-height:1.3;max-width:90px;margin:0}.brake-controls small{color:#c7bfae}.hud-bottom-center{background:#111712cc;padding:6px 10px;border:1px solid #756944;border-radius:4px}.next-gate-label{font-family:var(--display);font-size:14px}.hud-bottom-center>span{color:#eee0bd}
.main-menu{background:#171611}.menu-track{background:url('assets/wasteland.png') center/cover}.menu-shade{background:linear-gradient(90deg,#090e10fa 4%,#111611da 40%,#17170b44 100%)}.menu-content h1{font-family:var(--display);font-weight:700;letter-spacing:-2px;line-height:1.03;text-shadow:4px 5px #0c0c09}.menu-buttons button{border-color:#8c785366;background:linear-gradient(100deg,#1f2524ed,#151d21e6)}.menu-buttons .menu-continue{border-color:#d7ed48}.track-notice{max-width:490px;font-size:13px;color:#eed4a4}.menu-track-info{background:#101611dd;padding:22px;border-left:3px solid #a57c41}.brand{font-family:var(--display)}.build-card,.team-setup,.catalog-card{background:#151d20;border-color:#6c5940}.page-title h1{font-family:var(--display)}
@media(min-width:1400px){.hud-bottom-left{width:310px}.hud-bottom-right{width:340px}.pilot-art{width:150px;height:150px}.hud-bottom-left .pilot-head h2{font-size:35px}.hud-bottom-left .pilot-sub{width:260px}}
@media(max-width:1100px){.hud-top-left{width:245px}.race-menu-line{padding:8px}.race-menu-line strong{font-size:21px}.hud-top-center{width:calc(100vw - 530px)}.queue-car{min-width:50px;max-width:80px;font-size:10px}.queue-car .vehicle-art{width:48px;height:30px}.pilot-art{width:110px;height:110px;top:25px}.hud-bottom-left .pilot-head h2{font-size:25px}.hud-bottom-left .pilot-sub{width:205px}.hud-standings summary,.hud-report summary,.hud-action .section-title{font-size:16px}}
@media(max-width:900px){.hud-top-left{width:220px}.hud-top-center{top:150px;left:12px;width:220px}.queue-car .vehicle-art{width:38px;height:25px}.hud-bottom-center{bottom:365px;max-width:210px}.race-round{margin-top:8px}.pilot-head{min-height:100px}.hud-bottom-right{max-height:65vh;overflow:auto}.hud-top-right{max-height:30vh;overflow:auto}}
@media(max-width:560px){.hud-top-left{width:190px}.race-menu-line strong{font-size:17px}.race-menu-line{padding:5px}.race-round .badge{font-size:14px}.race-round{font-size:12px;padding:5px}.hud-top-center{top:122px;width:180px}.queue-car{min-width:45px;max-width:55px}.queue-car .vehicle-art{width:36px;height:23px}.hud-bottom-left .pilot-head{min-height:70px}.pilot-art{width:85px;height:85px;top:8px;right:0;opacity:.8}.hud-bottom-left .pilot-head h2{font-size:19px;max-width:115px}.inspector-weapon{font-size:11px}.inspector-weapons .eyebrow{font-size:9px}.hud-bottom-center{bottom:345px;max-width:150px}.hud-top-right{width:145px}.racer-name .vehicle-art{display:none}.hud-bottom-left>.panel{padding:8px}.hud-action .section-title{font-size:13px}.hud-control-row .help{font-size:10px}.brake-controls button{font-size:10px;padding:6px}.brake-controls small{font-size:10px}.hud-top-right{max-height:27vh}}
/* Terrain imagery owns the surface; polygons only show interaction states. */
.fullscreen-map > svg .hex{fill:transparent;stroke:#fff0cf38;stroke-width:.6}
.fullscreen-map > svg .hex.road:nth-of-type(3n),.fullscreen-map > svg .hex.oil,.fullscreen-map > svg .hex.gravel{fill:transparent}
.fullscreen-map > svg .hex.wall{fill:#c9a16412;stroke:#f7dfaf55;stroke-width:.65}
.fullscreen-map > svg .hex.inrange{fill:#73c9ae42;stroke:#a7efcf88}
.fullscreen-map > svg .hex.reachable{fill:#d9ef4666;stroke:#efff81;stroke-width:2;cursor:pointer}
.fullscreen-map > svg .hex.reachable:hover{fill:#e9ff7390}
.fullscreen-map > svg .hex.route{fill:#e1fb6370;stroke:#f1ff86;stroke-width:2}
.fullscreen-map > svg .hex.danger-step{fill:#d4413670;stroke:#ff9771;stroke-width:2;cursor:pointer}
.terrain-tile.fence,.terrain-tile.obstacle{filter:none}
.hud-fullscreen{top:10px;right:12px;z-index:8}.hud-fullscreen button{background:#10171bf5;border:2px solid #8e795f;padding:5px 10px;font-size:20px}
.hud-top-right{top:58px}.hud-next-goal{margin-top:9px;padding:12px;background:#10191aee;border:2px solid #7a684b;box-shadow:0 5px 12px #0006}.hud-next-goal .next-gate-label{font-size:14px;line-height:1.5}
.hud-journal{bottom:20px;left:50%;transform:translateX(-50%);width:calc(100vw - 640px);max-width:480px;min-width:180px}.hud-journal .hud-report{display:block!important;padding:10px 13px;margin:0;max-height:none;overflow:visible}.hud-journal summary{display:block;position:relative;padding-right:19px;font-size:15px;cursor:pointer}.hud-journal summary:after{content:'⌃';position:absolute;right:0;top:0}.hud-journal details[open] summary:after{content:'⌄'}.latest-event{display:block;color:#d9d0bf;font-family:var(--font);font-size:12px;line-height:1.45;margin-top:5px;font-weight:400;overflow-wrap:anywhere}.journal-expanded{max-height:40vh;overflow:auto;margin-top:10px;border-top:1px solid #685b44}.hud-journal .hud-events{max-height:none}.hud-journal details[open] summary{border-bottom:0}
@media(min-width:1400px){.hud-journal{width:calc(100vw - 740px)}}
@media(max-width:1100px){.hud-journal{width:calc(100vw - 650px);bottom:16px}.hud-journal .hud-report{padding:8px 10px}.hud-top-right{top:54px}}
@media(max-width:900px){.hud-journal{bottom:12px;width:calc(100vw - 600px);min-width:160px}.hud-top-right{max-height:42vh}.hud-next-goal{padding:8px}.hud-next-goal .next-gate-label{font-size:12px}.hud-journal summary{font-size:13px}.latest-event{font-size:11px}}
@media(max-width:760px){.hud-journal{left:12px;transform:none;bottom:auto;top:222px;width:180px;min-width:0;max-width:45vw}.hud-journal .journal-expanded{max-height:23vh}.hud-top-right{top:52px;max-height:37vh}.latest-event{max-height:52px;overflow:auto}.hud-fullscreen{right:10px;top:8px}}
@media(max-height:540px) and (min-width:651px){.hud-journal{width:calc(100vw - 530px);min-width:140px;bottom:10px}.hud-journal .journal-expanded{max-height:32vh}}
/* Compact race HUD: map remains at its original scale. */
.race-screen .hud-layer{inset:0;width:100%;height:100%;zoom:1;transform:none}
/* Scale each panel around its screen anchor, never the containing canvas. */
.race-screen .hud{transform:scale(.7);transform-origin:top left}
.race-screen .hud-top-right,.race-screen .hud-fullscreen{transform-origin:top right}
.race-screen .hud-bottom-left{transform-origin:bottom left}
.race-screen .hud-bottom-right{transform-origin:bottom right}
.race-screen .hud-top-center{left:50%;transform:translateX(-50%) scale(.7);transform-origin:top center}
.race-screen .hud-next-goal{margin-top:0;margin-bottom:10px}
.race-screen .hud-bottom-left .pilot-head{display:block;min-height:0}
.race-screen .hud-bottom-left .pilot-head>div:first-of-type{max-width:100%;width:100%}
.race-screen .hud-bottom-left .pilot-head h2{max-width:100%;margin:5px 0}
.race-screen .hud-bottom-left .pilot-art{position:static;display:block;width:150px;height:100px;margin:0 auto;opacity:1;background-size:300% 200%}
.race-screen .hud-bottom-left .pilot-sub{position:static;display:block;width:auto;background:none;padding:6px 0;font-size:12px}
.race-screen .hud-bottom-left .car-number{display:none}
.race-screen .hud-control-row .help{max-width:none;font-size:13px}
.race-screen .hud-journal{top:auto;bottom:18px;left:50%;transform:translateX(-50%) scale(.7);transform-origin:bottom center;width:320px;max-width:calc(142.857143vw - 610px);min-width:150px}
.race-screen .hud-bottom-left>.panel{max-height:70vh}
.race-screen .hex.wall{pointer-events:all}
@media(max-width:560px){.race-screen .hud-journal{max-width:calc(142.857143vw - 370px);width:200px;min-width:120px}.race-screen .hud-bottom-left .pilot-art{width:110px;height:74px}.race-screen .hud-bottom-left .pilot-sub{font-size:10px}}
/* Keep position and centering together across width/height breakpoints. */
@media(max-width:900px){.race-screen .hud-top-center{top:150px;left:12px;transform:scale(.7);transform-origin:top left}}
@media(max-height:540px) and (min-width:561px) and (max-width:900px){
 .race-screen .hud-top-center{top:12px;left:50%;transform:translateX(-50%) scale(.7);transform-origin:top center;width:calc(142.857143vw - 540px)}
}
/* Long action lists scroll inside the viewport instead of growing above it. */
.race-screen .hud-bottom-right{max-height:calc(142.857143dvh - 280px);overflow:auto;overscroll-behavior:contain}
.race-screen .hud-top-center{max-height:calc(142.857143dvh - 240px);overflow:auto;overscroll-behavior:contain}
.race-screen .queue-chips{min-width:0}
.race-screen .hud-journal .hud-report{max-height:calc(100dvh - 40px);overflow:auto;overscroll-behavior:contain}
/* Crowd-support row wraps its five spends inside the action panel. */
.race-screen .hud-support-row{flex-wrap:wrap;row-gap:4px}
.race-screen .hud-support-row button{font-size:10px;padding:4px 6px}
.race-screen .hud-support-row>span{flex-basis:100%;margin-right:0}
@media(min-width:1400px){.race-screen .hud-support-row button{font-size:11px}}

/* Step-by-step movement: the pencilled segment and the hexes already covered read differently. */
.route-progress span.planned{background:#8aa03a;box-shadow:inset 0 0 0 1px #dff36f80}
.fullscreen-map > svg .hex.route{cursor:pointer}
.fullscreen-map > svg .hex.route:hover{fill:#f3ff9c90}
/* The car whose activation is running idles its engine. */
@keyframes token-idle{0%,100%{transform:translateY(-.7px)}50%{transform:translateY(.9px)}}
.car-token.current .token-body{animation:token-idle .16s ease-in-out infinite}
.race-screen.is-moving .car-token .token-body{animation:none}
@media(prefers-reduced-motion:reduce){.car-token.current .token-body{animation:none}}
/* The crowd-support figure carries its name wherever it is shown. */
.crowd-value{display:inline-flex;align-items:baseline;gap:4px;color:var(--acid);white-space:nowrap}
.crowd-value small{font-size:9px;letter-spacing:.6px;color:#c3cfa6;text-transform:uppercase}
.race-screen .hud-support-row>.crowd-value{flex-basis:100%;margin-right:0}
.hud-team .crowd-value{font-weight:400}
/* The activation order labels its gear instead of leaving a bare number. */
.queue-car{grid-template-columns:1fr}
.queue-gear{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:4px;margin-top:3px;padding-top:2px;border-top:1px solid #ffffff22}
.queue-gear small{font-size:8px;letter-spacing:.5px;color:#c6cdb4}
.queue-gear b{font-size:15px;line-height:1}
@media(max-width:1100px){.queue-gear small{font-size:7px}.queue-gear b{font-size:13px}}

/* Collision endpoints remain red above the ordinary route styling. */
.fullscreen-map .hex.route.crash-route { fill: #ff625c66; stroke: #ff625c; stroke-width: 3; }
.vehicle-art{background:none}
.vehicle-art>svg{display:block;width:100%;height:100%;min-height:0;max-height:none}
.fullscreen-map>svg .car-token .vehicle-sprite{filter:drop-shadow(0 1px 1px #000)}
.fullscreen-map>svg .car-token.current .vehicle-sprite{filter:drop-shadow(0 0 1px #b0ff5e) drop-shadow(0 0 3px #8cff36)}
.fullscreen-map>svg .car-token.inspected:not(.current) .vehicle-sprite,.fullscreen-map>svg .car-token:hover .vehicle-sprite{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #fff)}
.fullscreen-map>svg .hex.inrange{fill:transparent;stroke:#ef655f99}
.fullscreen-map>svg .range-overlay polygon{fill:#ef4e3b48;stroke:#ef655f99;stroke-width:.65}
.terrain-costs{display:grid;gap:3px;margin:10px 0;padding:9px 12px;border-left:3px solid #eec64c;background:#eec64c12;color:#e8ce8a;font-size:13px}
.terrain-costs b{font-size:11px;text-transform:uppercase;letter-spacing:1px}
.race-screen .fullscreen-map{background:#c99b60 none repeat}
.race-screen .fullscreen-map>svg{filter:none}
.terrain-costs.danger,.hud-action .route-status.danger,.hud-bottom-left .badge.danger{display:grid;gap:3px;margin:10px 0;padding:9px 12px;border:0;border-left:3px solid #ff7865;border-radius:0;background:#ff625c18;color:#ffa08f;font-size:13px}
.fullscreen-map>svg .salvo-target{fill:#ff493f66;stroke:#ffcec5;stroke-width:3;stroke-dasharray:4 3}
.fullscreen-map>svg [data-salvo-hex]{pointer-events:all;cursor:crosshair}
.fullscreen-map>svg [data-salvo-hex]:hover{fill:#ff493f55;stroke:#ffcec5;stroke-width:2}
.standings-columns{display:grid;grid-template-columns:minmax(0,1fr) 44px 40px;text-align:right;font-size:10px;color:var(--muted);margin-top:5px}
.hud-team .hud-racer{grid-template-columns:minmax(0,1fr) 44px 40px}
.hud-team .racer-name{min-width:0;overflow:hidden}
.fullscreen-map>svg .blast-target polygon{fill:#ff704a44;stroke:#ffbe79;stroke-width:2;stroke-dasharray:3 2}
/* Jamming aura: outline only, no fill, following its own car above the gate overlay. */
.jam-overlay path{fill:none;stroke:#79c6ff;stroke-width:2;stroke-dasharray:3 2}
.fullscreen-map>svg [data-fire-hex]{cursor:crosshair;pointer-events:all}

.race-screen .fullscreen-map>svg{overflow:visible}
