/* Compact racing HUD. Gameplay IDs and touch controls remain shared. */
body.playing header{left:auto;right:max(20px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));height:36px;padding:0;gap:6px;background:none;border:0}
body.playing header .brand,body.playing header .tag,body.playing #volume{display:none}
body.playing header button{margin:0;padding:8px 10px;font-size:9px;background:#0b142080;min-height:36px}
body.playing #performancePanel{top:54px;right:24px;background:none;font-size:9px;padding:0;opacity:.65;gap:10px}
body.playing #performanceHint{display:none}
#hud{inset:max(24px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left));text-shadow:0 2px 8px #000b}
#hud .hudtop{display:flex;justify-content:flex-start;align-items:flex-start;gap:28px}
#hud .hudtop>div{border-left:2px solid #ffffff55;padding-left:12px}
#hud .hudtop>div:first-child{border-color:var(--lime)}
#hud .hudtop small{font-size:9px;letter-spacing:2px}
#hud .hudtop strong{font:italic 700 38px/1.1 'Barlow Condensed',sans-serif;margin:4px 0 0;font-variant-numeric:tabular-nums}
#hud .timer{text-align:left}#hud #carName{display:none}#hud #hudSeries{font-size:9px;letter-spacing:0;max-width:150px;margin:4px 0}
#hud .progress{width:150px;margin-top:12px;gap:3px;opacity:.8}#hud .progress div{height:2px}
#hud #weatherBadge{top:110px;left:0;right:auto;background:none;border:0;padding:0;gap:3px;opacity:.8}#hud #weatherName{font-size:10px}#hud #weatherSurface{font-size:8px}
#hud .hudbottom{position:absolute;left:auto;right:0;bottom:0;transform:none;display:block;width:240px;height:260px;max-width:none;padding:0;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 44%,#07101b9c,transparent 69%);box-shadow:none;text-align:center}
.raceDial{position:absolute;inset:0;width:240px;height:240px;overflow:visible;fill:none;filter:drop-shadow(0 2px 4px #0008)}
.dialTrack{stroke:#ffffff29;stroke-width:5}#rpmArc{stroke:var(--lime);stroke-width:5;stroke-dasharray:12 100;transition:stroke-dasharray .1s linear;stroke-linecap:butt}#rpmArc.redline{stroke:#ff6756}
.dialTicks{stroke:#f1f6ffb3;stroke-width:5;stroke-dasharray:.4 3.3}.raceDial text{fill:#d5ddec;font:12px Barlow,Arial;stroke:none;text-anchor:middle}.raceDial text.redline{fill:#ff7764}
#hud .hudbottom .speedReadout{position:absolute;top:70px;left:40px;width:160px;border:0;padding:0;text-align:center}
#hud .speedReadout>small{display:none}#hud .speedReadout>div{display:flex;justify-content:center;align-items:baseline;gap:5px}
#hud .hudbottom #speed{font:italic 800 78px/.95 'Barlow Condensed',sans-serif;letter-spacing:-2px;margin:0;color:white}
#hud .speedReadout>div small{font-size:10px;letter-spacing:0;color:#d6deeb}
#hud #speedStatus{font-size:9px;min-height:12px;margin-top:7px}#hud #speedStatus:not(.overLimit){visibility:hidden}
#hud .hudbottom .rev{position:absolute;left:65px;top:159px;display:block;width:110px}
#hud .rev .engineReadout{justify-content:center;gap:12px;align-items:center}#hud .gearReadout{flex-direction:row;align-items:center;gap:4px}#hud .gearReadout b{font:italic 700 27px/1 'Barlow Condensed',sans-serif}#hud .gearReadout small{font-size:7px;letter-spacing:.5px}
#hud .rpmReadout{display:none}#hud .rpmTrack,#hud .rpmScale{display:none}
#hud .hudbottom .nitro{position:absolute;top:211px;left:35px;width:170px;padding:0;text-align:left;transform:skewX(-12deg)}
#hud .nitro>small:first-child{display:block;font-size:9px;font-weight:700;letter-spacing:2px;color:#a6f6ff}#hud .nitro>small span{display:none}
#hud .nitro #nitroBar{height:6px;margin-top:5px;border-radius:0;background:#ffffff26}#hud .nitro #fuel{background:#73eeff;box-shadow:0 0 12px #73eeff55}
#hud .nitro #nitroHint{font-size:8px;line-height:1.3;min-height:0;margin-top:6px;letter-spacing:0;white-space:normal;transform:skewX(12deg);color:#c3d5e4}
#hud.boosting #rpmArc{stroke:#73eeff}#hud.boosting .speedReadout #speed{color:#bcfaff}
#hud .hudbottom .raceActions{position:fixed;left:max(28px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));right:auto;display:flex;gap:6px;transform:none}
#hud .raceActions button{padding:8px 10px;min-height:36px;font-size:9px;border-radius:4px;background:#0b142080}
#hud .driving{left:0;top:auto;bottom:64px;transform:none;text-align:left;background:none;padding:0;max-width:240px;font-size:10px;letter-spacing:1px}
#hud .driving #corner{display:none}#hud .driving #grip{display:none;margin:0;font-size:10px}#hud .driving.hazard #grip{display:inline-block;color:#ffca8f}
#hud #speedLimit{width:34px;height:34px;border-width:4px;font-size:20px;margin-right:8px}
#hud #closure{top:16px;left:50%;max-width:35%;white-space:normal;font-size:10px;line-height:1.5}
#hud #closure:empty{display:none}
#hud #radarWarning,#hud #radarNotice{left:auto;right:0;top:75px;transform:none;max-width:210px;font-size:10px}
#hud #radarWarning strong{font-size:26px}#hud #radarWarning .radarIcon{font-size:25px}
body.playing #toast{top:23%;font-size:13px}
@media(max-width:700px){
 #hud{inset:16px}#hud .hudtop{gap:18px}#hud .hudtop strong{font-size:30px}#hud .hudtop small{font-size:8px}#hud .hudbottom{transform:scale(.78);transform-origin:bottom right}#hud #closure{top:110px;left:0;transform:none;max-width:55%;text-align:left}#hud #weatherBadge{top:90px}#hud #radarWarning,#hud #radarNotice{top:80px;max-width:170px}
}
@media(any-pointer:coarse){
 body.playing header button{min-height:44px}#hud .raceActions button{min-height:44px}#hud .hudbottom{bottom:140px;transform:scale(.68);transform-origin:bottom right}#hud .hudbottom .raceActions{position:absolute;left:auto;right:0;bottom:280px;width:240px;justify-content:flex-end}#hud .driving{bottom:150px}body.playing #performancePanel{display:none}
}
@media(any-pointer:coarse) and (orientation:landscape) and (max-height:600px){
 #hud{inset:12px 18px}#hud .hudbottom{bottom:115px;transform:scale(.58)}#hud .hudtop strong{font-size:28px}#hud #weatherBadge{top:82px}#hud .hudbottom .raceActions{bottom:-185px;right:280px;width:260px}#hud .driving{bottom:120px}#hud #radarWarning,#hud #radarNotice{top:58px;right:165px;max-width:160px}#hud #closure{top:8px;left:45%;max-width:28%;transform:translateX(-50%)}#hud #hudSeries{max-width:110px}body.playing header{top:4px}
}

/* Keep action targets unscaled and separate from the instrument cluster. */
#hud>.raceActions{position:absolute;left:0;bottom:0;display:flex;gap:6px;pointer-events:auto}
@media(any-pointer:coarse){#hud>.raceActions{bottom:145px;left:0}#hud>.raceActions button{min-width:64px;min-height:44px}}
@media(any-pointer:coarse) and (orientation:landscape) and (max-height:600px){#hud>.raceActions{bottom:0;left:50%;transform:translateX(-50%)}#hud>.raceActions button{font-size:8px;padding:6px 8px}}
@media(pointer:fine) and (max-height:600px){
 #hud .hudbottom{transform:scale(.6);transform-origin:bottom right}
 #hud #radarWarning,#hud #radarNotice{top:62px;right:160px;max-width:170px}
 #hud #closure{top:8px;max-width:30%;font-size:9px}
 #hud #weatherBadge{top:100px}
}

/* A dark backing keeps telemetry readable against sky, snow and headlights. */
#hud .hudtop>div{background:#081321c9;border-radius:0 6px 6px 0;box-shadow:5px 0 0 #081321c9}
#hud .hudtop small{color:#e4eaf4;text-shadow:none}
#hud #weatherBadge{background:#081321c9;opacity:1;padding:5px 7px;border-radius:5px;color:#e4eaf4;text-shadow:none}

#hud #flashLights.flashing{opacity:1;background:#d8f4ff;color:#09233d;border-color:#fff;box-shadow:0 0 18px #b8e9ffb0}
