html,body{overscroll-behavior:none}body{position:fixed;inset:0}#game{position:relative;max-width:100%;overflow:hidden}#game:fullscreen{width:100vw!important;height:100dvh!important}.screenHelp,#screenMessage{max-width:420px;font-size:12px;line-height:1.5;color:#e0d5ed}#fullScreen{margin-bottom:12px}.touchFlight.inFlight #game{touch-action:none;-webkit-user-select:none;user-select:none}.touchFlight .overlay{touch-action:pan-y;overscroll-behavior:contain}
/* A single shallow HUD, independent of Safari's changing toolbar height. */
body.touchFlight.inFlight header{left:auto;right:max(8px,env(safe-area-inset-right));top:max(5px,env(safe-area-inset-top));height:44px}
body.touchFlight.inFlight header>a,body.touchFlight.inFlight header>span{display:none}
body.touchFlight.inFlight #pause{width:44px;min-height:44px;padding:0;font-size:18px}
body.touchFlight #hud .navigation,body.touchFlight #hud #map,body.touchFlight #hud .ghostStatus,body.touchFlight #hud .challengeHud,body.touchFlight #missionStatus,body.touchFlight #arcadeTarget,body.touchFlight #hud .objective{display:none!important}
body.touchFlight #hud .scoreboard{left:max(10px,env(safe-area-inset-left));right:auto;top:max(8px,env(safe-area-inset-top));transform:none;min-width:0;width:auto;display:flex;flex-direction:row;align-items:center;gap:10px;padding:5px 10px;background:#080b1666;border-radius:10px}
body.touchFlight #hud .scoreboard strong{font-size:20px}body.touchFlight #hud .scoreboard small{font-size:10px}body.touchFlight #hud .scoreboard>span{display:none}
body.touchFlight #hud #missionTelemetry{top:calc(max(8px,env(safe-area-inset-top)) + 38px);left:max(10px,env(safe-area-inset-left));transform:none;width:180px;max-width:32vw;padding:5px 8px;font-size:9px;background:#080b1666;border:0;border-radius:10px}
body.touchFlight #missionTelemetry div{display:flex;align-items:center;gap:6px}body.touchFlight #missionThreat{font-size:8px;margin:0}body.touchFlight #missionStage,body.touchFlight #missionNotice{display:none}body.touchFlight #targetLock{height:4px;margin-top:3px}
body.touchFlight #hud .controls{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
body.touchFlight #hud #stick{width:100px;height:100px}body.touchFlight #hud #knob{width:44px;height:44px;margin:-22px}body.touchFlight .crosshair:after{left:-40px;width:80px}
body.touchFlight #hud .stickWrap>span,body.touchFlight #hud .throttle>label,body.touchFlight #hud .throttle>span,body.touchFlight #hud .boostControls small{display:none}
body.touchFlight #hud .throttle{width:112px;padding:0;background:none;border:0}body.touchFlight #hud .boostControls{margin:0}body.touchFlight #hud .boostControls button{min-height:52px;font-size:12px;padding:8px}body.touchFlight #hud .boostControls progress{height:5px}
body.touchFlight #hud .radio{top:auto;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 290px - env(safe-area-inset-left) - env(safe-area-inset-right));max-width:400px;padding:4px 8px;border-radius:8px;background:#080b1670;text-align:center;opacity:0;pointer-events:none;transition:opacity .2s}
body.touchFlight #hud .radio.captionVisible{opacity:1}body.touchFlight #hud .radio span{display:none}body.touchFlight #hud .radio p{font-size:11px;line-height:1.3;margin:0}
body.touchFlight #hud #warning{top:60px;max-width:55%;white-space:normal;font-size:11px;padding:5px 10px;text-align:center;pointer-events:none}body.touchFlight #hud #pickup{top:95px;bottom:auto;font-size:12px;padding:5px 10px;pointer-events:none}

/* Canvas CSS dimensions must follow rotation as well as its drawing buffer. */
#game #world{width:100%!important;height:100%!important}

/* Keep aircraft roll actions beside the steering control on touch screens. */
body.touchFlight #hud .rollControls:not([hidden]){display:block;max-width:180px;margin:0 0 6px}
body.touchFlight #hud .rollControls>div{display:flex;gap:6px}
body.touchFlight #hud .rollControls button{min-height:44px;min-width:76px;padding:6px 9px;font-size:10px}
body.touchFlight #hud .rollControls small{display:none}

/* Manual power stays where the pilot sets it; Boost is a separate action. */
body.touchFlight #hud .throttle{width:180px;padding:6px 10px;background:#081d2b80;border:1px solid #ffffff25;border-radius:18px}
body.touchFlight #hud .throttleAdjust{display:flex;align-items:center;justify-content:space-between;gap:4px}
body.touchFlight #hud .throttleAdjust button{min-width:44px;min-height:44px;padding:0;font-size:23px;background:#102c3caa}
body.touchFlight #hud .throttleAdjust label{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:8px;letter-spacing:.06em}
body.touchFlight #hud .throttleAdjust b{font-size:15px;color:#f3dca6}
body.touchFlight #hud #throttle{display:block;appearance:none;-webkit-appearance:none;width:100%;height:44px;min-height:44px;margin:0;background:transparent;touch-action:none}
body.touchFlight #throttle::-webkit-slider-runnable-track{height:7px;background:#e9cf98;border-radius:8px}
body.touchFlight #throttle::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:32px;height:32px;margin-top:-12.5px;border:2px solid #fff4db;border-radius:50%;background:#d9bd86;box-shadow:0 2px 8px #0006}
body.touchFlight #throttle::-moz-range-track{height:7px;background:#e9cf98;border-radius:8px}
body.touchFlight #throttle::-moz-range-thumb{width:28px;height:28px;border:2px solid #fff4db;border-radius:50%;background:#d9bd86}
body.touchFlight #hud .boostControls button{min-height:44px}
body.touchFlight #hud .radio{width:calc(100% - 420px - env(safe-area-inset-left) - env(safe-area-inset-right));font-size:10px}

/* Readable flight essentials beside Pause, clear of the central flight path. */
body.touchFlight #hud .instruments{display:flex;top:max(5px,env(safe-area-inset-top));right:calc(max(8px,env(safe-area-inset-right)) + 52px);left:auto;gap:0;border:1px solid #ffffff28;border-radius:12px;background:#081622c9;pointer-events:none}
body.touchFlight #hud .instruments>div{display:flex;flex-direction:column;align-items:center;min-width:72px;padding:4px 8px}
body.touchFlight #hud .instruments>div+div{border-left:1px solid #ffffff20}
body.touchFlight #hud .instruments>div:last-child{display:none}
body.touchFlight #hud .instruments strong{font:700 22px/1.1 monospace;font-variant-numeric:tabular-nums;color:#fff5e3}
body.touchFlight #hud .instruments span{font:9px/1.2 system-ui;letter-spacing:.05em;color:#e0e9ee}
body.touchFlight #hud .instruments small{font:8px/1.2 system-ui;letter-spacing:.04em;color:#c7d8e1}
