/* Race essentials stay visible; setup details belong in the lobby. */
body.playing #performancePanel,
#hud .hudtop #mode,
#hud #weatherSurface,
#hud #nitroHint,
#hud .gearReadout small,
#hud #finaleDetail,
#hud #pursuitRadio{display:none}
#hud .hudtop{gap:18px}
#hud .hudtop>div{padding:5px 10px;box-shadow:none;border-radius:5px}
#hud .hudtop strong{margin:0}
#hud .hudtop #sharedChallengeHud:not(.hidden){
 display:block;
 color:#e1ff85;
 font-size:clamp(11px,2.6vw,14px);
 line-height:1.35;
 letter-spacing:0;
 font-variant-numeric:tabular-nums;
 white-space:nowrap;
}
#hud #hudSeries{margin:0 0 4px;max-width:180px}
#hud #weatherBadge.hidden{display:none}
#hud #weatherBadge{gap:0}
#hud #closure{max-width:210px;line-height:1.4}
#hud #speedStatus.startThrottleHint{
 display:block;
 visibility:visible;
 color:#e1ff85;
 letter-spacing:0;
 font-size:11px;
}
#touch.startThrottleCue #throttle{
 outline:2px solid var(--lime);
 outline-offset:2px;
 background:#435826cc;
}
#touch.startThrottleCue #throttle:after{opacity:1}
#hud #pursuitHud{padding:8px 10px}
#hud #pursuitDetail{margin-top:4px}
#hud #rivalMirror{min-width:0;padding:5px 10px;gap:7px}
#hud #routeChoice{max-width:min(330px,80vw);box-sizing:border-box}
@media(max-width:700px){
 #hud .hudtop{display:flex;gap:12px;min-height:0}
 #hud .hudtop .timer{width:auto}
 #hud #closure{max-width:170px}
}
@media(max-height:540px) and (orientation:landscape){
 #hud #closure{max-width:160px}
 #hud #routeChoice{max-width:230px}
}

@media (max-width:700px), (any-pointer:coarse) and (max-width:1100px), (max-width:1100px) and (max-height:600px) {
 /* The clock already highlights the final seconds. Keep the road in view. */
 #hud #finaleNotice { display:none; }

 body.playing #countdown.networkWait {
  inset:auto auto max(12px,env(safe-area-inset-bottom)) 50%;
  transform:translateX(-50%);
  width:max-content;
  max-width:min(24rem,calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  padding:7px 12px;
  border-radius:8px;
  background:#101b28ed;
  font:700 13px/1.3 Barlow,Arial,sans-serif;
  letter-spacing:.02em;
 }

 body.playing:has(#countdown.networkWait:not(.hidden)) #hud .hudbottom,
 body.playing:has(#countdown.networkWait:not(.hidden)) #touch { display:none; }
}

#hud #sharedChallengeHud[data-outcome="won"] { color:var(--lime); }
