/* The game uses the same navigation shell, directly above its play area. */
body.game-page:has(#stage) header{height:auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;background:#09080e}
body.game-page:has(#stage) header nav{grid-row:2;grid-column:1/-1;width:100%;margin:0;justify-content:flex-start}
body.game-page:has(#stage) header .language-menu{position:static;grid-row:1;grid-column:2;margin:0}
body.game-page:has(#stage) header .brand>span{display:flex}
body.game-page #stage{height:calc(100dvh - var(--game-header-height,160px));min-height:520px;width:100%;max-width:none;margin:0;padding:0}
#game-loading{display:none}
#stage.game-pending>*:not(#game-loading){visibility:hidden}
#stage.game-pending #game-loading{display:grid;place-items:center;position:absolute;inset:0;padding:24px;color:#ffb4d7;font-size:18px;font-weight:700;background:radial-gradient(ellipse at center,#231630,#0b0b15)}
@media(max-width:360px){body.game-page:has(#stage) header{grid-template-columns:1fr}body.game-page:has(#stage) header .language-menu{grid-column:1;grid-row:2}body.game-page:has(#stage) header nav{grid-row:3}}

/* Driving first: keep the road clear and reveal secondary information on demand. */
body.game-page:has(#stage) #stage{min-height:0}
body.game-page:has(#stage.is-playing)>header{display:block;padding:0 12px;min-height:44px}
body.game-page:has(#stage.is-playing)>header>.brand,
body.game-page:has(#stage.is-playing)>header>.language-menu,
body.game-page:has(#stage.is-playing)>header>.daily-badge,
body.game-page:has(#stage.is-playing)>footer,
body.game-page:has(#stage.is-playing)>.social-footer{display:none}
body.game-page:has(#stage.is-playing)>header nav{min-height:44px;padding:0;gap:22px;align-items:center}
body.game-page:has(#stage.is-playing)>header nav a{font-size:14px;padding:10px 0}
#stage #change-camera,#stage #toggle-map{position:absolute;top:max(12px,env(safe-area-inset-top));z-index:15;height:44px;padding:0 10px;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #b5c3d24d;border-radius:14px;background:#0c1729bf;color:#fff;font:700 12px/1.1 Arial,sans-serif;cursor:pointer}
#stage #change-camera{right:164px;min-width:98px}
#stage #change-camera svg{width:21px;height:21px;flex-shrink:0}
#stage #toggle-map{right:112px;width:46px;padding:0;font-size:11px}
#stage #toggle-map[aria-pressed=true]{background:#a6ead8;color:#102331}
#stage:not(.is-playing) #change-camera,#stage:not(.is-playing) #toggle-map{display:none}
#stage .hud{top:66px;left:12px;right:12px;gap:8px;pointer-events:none}
#stage .contract{padding:7px 10px;max-width:min(58%,310px);background:#091322a6;box-shadow:none}
#stage.is-playing #district-name,#stage .contract #chapter,#stage .contract h1{display:none}
#stage .contract p{margin:0;font-size:12px;line-height:1.3}
#stage .gps-guidance{margin-top:4px;padding:0;border:0;font-size:12px;line-height:1.35;font-weight:600}
#stage .telemetry{padding:7px 9px;margin:0 0 0 auto;gap:3px;font-size:10px;background:#091322a6;max-width:40%;text-align:right}
#stage .telemetry strong{font-size:20px}
#stage .telemetry #wanted,#stage .telemetry .live-score{display:none}
#stage .telemetry #capture.is-alert{font-size:10px}
#stage.free-roam .contract{display:none}
#stage .map-panel{display:none;top:148px;right:12px;left:auto;bottom:auto;max-width:100px}
#stage.show-map .map-panel{display:block}
#stage .map-panel canvas{width:94px;height:94px}
#stage .motion-pad{width:60px;height:126px;gap:6px}
#stage .steering-pad{width:126px;height:60px;gap:6px}
#stage .motion-pad button,#stage .steering-pad button{border-radius:18px;background:#13203399;border:1px solid #dae6f066;box-shadow:none}
#stage .motion-pad svg,#stage .steering-pad svg{width:23px;height:23px}
#stage .touch-controls{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
#stage .speed{left:50%;right:auto;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);gap:3px;text-shadow:0 2px 5px #000;background:#0c172980;padding:5px 9px;border-radius:12px}
#stage .speed strong{font-size:25px}
#stage .speed span{font-size:9px}
#stage #message{top:auto;bottom:155px;width:max-content;max-width:76%;font-size:12px;padding:6px 10px;background:#111b2db3}
#stage #boost-status{right:12px;bottom:82px;font-size:11px;padding:5px 8px}
#stage #game-settings .radio-stream-status,#stage #game-settings .radio-retry{position:static;max-width:none;margin-top:10px;font-size:13px}
#stage #game-settings .radio-stream-status:not([hidden]),#stage #game-settings .radio-retry:not([hidden]){display:block!important}
@media(hover:hover) and (pointer:fine){#stage:not(.remote-mode) .touch-controls{display:none}}
@media(max-width:380px){#stage .speed{left:calc(50% - 20px)}#stage #change-camera{min-width:90px;padding:0 7px}}
@media(max-height:600px) and (orientation:landscape){
 body.game-page:has(#stage.is-playing)>header{display:none}
 #stage .hud{top:12px;right:280px;left:12px}
 #stage .contract{max-width:65%}
 #stage .telemetry{max-width:35%}
 #stage .map-panel{top:68px}
 #stage #message{bottom:86px;max-width:46%}
}
