/* v15: lock the driving HUD to the bottom edge in every driving mode. */
#hud .hud-bottom{
  position:absolute;
  left:8px;
  right:8px;
  bottom:8px;
  height:190px;
  display:block;
  margin:0;
  pointer-events:none;
}
#hud .map-box{
  position:absolute;
  left:0;
  bottom:0;
  width:218px;
  margin:0;
}
#hud .telemetry{
  position:absolute;
  left:50%;
  bottom:0;
  width:246px;
  margin:0;
  transform:translateX(-50%);
}
#hud .camera-hint{
  position:absolute;
  right:0;
  bottom:0;
  width:132px;
  margin:0;
  text-align:right;
}
#hud .camera-hint button{width:100%}
#hud .camera-hint small{margin:7px 2px 0}
/* Keep optional car status clear of the bottom-right camera control. */
#carStatus{right:8px;bottom:92px}

@media(pointer:coarse){
  #hud .hud-bottom{bottom:86px}
  #carStatus{bottom:168px}
}
@media(max-width:800px){
  #hud .hud-bottom{left:6px;right:6px;bottom:6px;height:164px}
  #hud .map-box{width:165px}
  #hud .telemetry{width:210px;padding:9px 12px}
  #hud .camera-hint{width:106px}
  #hud .camera-hint button{padding:.68rem .55rem;font-size:.7rem}
  #carStatus{right:6px;bottom:78px;width:190px}
}
@media(max-width:520px){
  #hud .hud-bottom{left:4px;right:4px;bottom:4px;height:138px}
  #hud .map-box{width:98px;padding:4px}
  #hud .map-box small{font-size:.56rem}
  #hud .telemetry{width:150px;padding:7px 8px}
  #hud .telemetry .speed b{font-size:1.95rem}
  #hud .telemetry .gear b{font-size:1.7rem}
  #hud .telemetry .tyre-display b{width:30px;height:30px;border-width:2px}
  #hud .telemetry .energy-row{font-size:.58rem}
  #hud .telemetry .power-label{font-size:.52rem}
  #hud .camera-hint{width:62px}
  #hud .camera-hint button{padding:.55rem .35rem;font-size:.58rem}
  #hud .camera-hint small{font-size:.5rem;letter-spacing:.05em}
  #carStatus{right:4px;bottom:64px;width:168px}
}
@media(pointer:coarse) and (max-width:800px){
  #hud .hud-bottom{bottom:82px}
  #carStatus{bottom:150px}
}

/* Preserve cockpit visibility and keep independent mode panels separate. */
#menu header{flex-wrap:wrap;gap:.5rem} #friendsMenu{border-color:#30b4d0}
#friendTracks{max-height:210px;overflow:auto}
.cockpit-mode #hud .telemetry{opacity:.88}
