/* Flight HUD: fixed, separate areas; the aircraft owns the centre of the screen. */
body.playing .topbar{height:64px;min-height:64px;padding:8px 24px;gap:16px;box-sizing:border-box}
body.playing .mission-top,body.playing .compass-wrap,body.playing .map-panel,body.playing .quiz-progress,body.playing .flight-reticle,body.playing #flight-passport{display:none!important}
body.playing #journey-chip{margin-left:auto;font:700 11px/1.3 Arial;color:#f4cb86}
body.playing .top-actions{margin-left:0}
body.playing #risk-hud{position:absolute;top:84px;bottom:auto;left:24px;right:auto;transform:none;width:232px;box-sizing:border-box;padding:11px 13px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;align-items:center;text-align:left;background:#0b2049e8;border:1px solid #7189ae55;border-radius:12px;text-shadow:none}
body.playing #risk-caption{grid-column:1;grid-row:1;font:700 9px/1.4 Arial;letter-spacing:0;color:#f4cb86;min-height:0}
body.playing #risk-message{grid-column:1;grid-row:2;font:400 10px/1.4 Arial;color:#dce6f5;margin:0;min-width:0}
body.playing #risk-multiplier{grid-column:2;grid-row:1/3;font:900 29px/1 Arial;letter-spacing:-1px;min-width:4.5ch;align-self:center}
body.playing #risk-ladder{display:none!important}
body.playing .navigation{top:84px;bottom:auto;left:auto;right:24px;transform:none;width:230px;max-width:none;box-sizing:border-box;padding:11px 13px;gap:10px;background:#0b2049e8;border:1px solid #7189ae55;border-radius:12px}
body.playing .navigation small{font:700 9px/1.4 Arial;letter-spacing:0}
body.playing .navigation strong{font:800 20px/1.2 Arial;margin-top:4px}
body.playing .nav-arrow{font-size:26px;flex:none}
body.playing .instruments{top:auto;bottom:54px;left:50%;right:auto;transform:translateX(-50%);padding:9px 16px;gap:14px;max-width:none;border-radius:12px;box-sizing:border-box;background:#0b2049e8;border:1px solid #7189ae55}
body.playing .instruments>div:last-child,body.playing .instruments>div:nth-last-child(2){display:none!important}
body.playing .instruments>div:not(.instrument-divider){min-width:60px}
body.playing .instruments strong{font:800 27px/1.15 Arial;letter-spacing:0}
body.playing .instruments small,body.playing .instruments span{font:600 8px/1.4 Arial;letter-spacing:0}
body.playing .instrument-divider{height:28px;margin:7px 0 0}
body.playing #bank-flight{right:24px;left:auto;bottom:54px;top:auto;transform:none;min-width:0;width:230px;min-height:64px;box-sizing:border-box;padding:11px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;border-radius:12px;box-shadow:none}
body.playing #bank-flight small{grid-column:1;grid-row:1;font:800 11px/1.3 Arial;text-align:left}
body.playing #bank-flight strong{grid-column:2;grid-row:1/3;font:900 27px/1 Arial}
body.playing #bank-flight>span{grid-column:1;grid-row:2;font:400 10px/1.3 Arial;text-align:left}
body.playing #bank-flight[hidden]{display:none!important}
body.playing #control-guide{right:24px;bottom:66px;width:230px;text-align:center}
body.playing #risk-toast{top:164px;font-size:16px;padding:10px 16px;max-width:calc(100% - 32px)}
#flight-settings .systems{display:block!important;position:static!important;grid-column:1/-1;transform:none!important;box-sizing:border-box;width:100%!important;margin:4px 0 12px;padding:15px!important;border:1px solid #375376;border-radius:10px;background:#10264d}
#flight-settings .systems .system-row{font:500 12px/1.5 Arial;margin:10px 0}
#flight-settings .systems .systems-top{font:700 10px/1.5 Arial}
#flight-settings .systems .system-toggle{font-size:11px}
#pause-overlay .dialog{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
#flight-settings .systems input{width:100%}
body.gate-question #risk-hud{visibility:hidden!important}
body.risk-cinematic #risk-hud{display:none!important}

/* Phone and tablet: header, information strip, open sky, then a control dock. */
body.mobile-flight.playing{--flight-dock:144px;--hud-gap:12px}
body.mobile-flight.playing .topbar{height:50px;min-height:50px;padding:4px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left));gap:10px}
body.mobile-flight.playing .brand{font-size:25px;gap:4px}
body.mobile-flight.playing .brand small{display:none}
body.mobile-flight.playing #journey-chip{font-size:10px;min-width:0;overflow:hidden;text-overflow:ellipsis}
body.mobile-flight.playing #mobile-pause-top{width:38px;height:38px;min-width:38px;min-height:38px;margin:0;padding:0;font-size:18px}
body.mobile-flight.playing #world,body.mobile-flight.playing .vignette{bottom:calc(var(--flight-dock) + env(safe-area-inset-bottom));height:auto}
body.mobile-flight.playing .navigation{left:12px;right:auto;top:62px;bottom:auto;width:calc(100% - 164px);max-width:none;min-height:52px;padding:8px 10px;gap:7px}
body.mobile-flight.playing .navigation small{font-size:8px;line-height:1.4;display:block}
body.mobile-flight.playing .navigation strong{font-size:17px;margin-top:2px}
body.mobile-flight.playing .nav-arrow{font-size:23px}
body.mobile-flight.playing .instruments{left:auto;right:12px;top:62px;bottom:auto;transform:none;width:128px;max-width:none;min-height:52px;padding:7px 8px;gap:7px;justify-content:center}
body.mobile-flight.playing .instruments>div:not(.instrument-divider){min-width:43px}
body.mobile-flight.playing .instruments strong{font-size:22px}
body.mobile-flight.playing .instruments small,body.mobile-flight.playing .instruments span{font-size:6px}
body.mobile-flight.playing .instrument-divider{height:26px;margin:4px 0 0}
body.mobile-flight.playing #risk-hud{left:12px;right:12px;top:126px;bottom:auto;transform:none;width:auto;min-height:52px;padding:8px 11px;gap:3px 10px;border-radius:10px}
body.mobile-flight.playing #risk-caption{font-size:9px}
body.mobile-flight.playing #risk-message{font-size:10px}
body.mobile-flight.playing #risk-multiplier{font-size:27px;min-width:4.5ch}
body.mobile-flight.playing #hud::after{height:calc(var(--flight-dock) + env(safe-area-inset-bottom))}
body.mobile-flight.playing .joystick{left:max(22px,env(safe-area-inset-left));bottom:calc(32px + env(safe-area-inset-bottom));width:88px;height:88px;border-width:1px;box-sizing:border-box}
body.mobile-flight.playing .joystick>span{width:34px;height:34px;left:26px;top:26px;border-width:1px}
body.mobile-flight.playing .joystick small{top:calc(100% + 8px);font-size:8px;letter-spacing:.5px}
body.mobile-flight.playing #bank-flight{left:auto;right:max(12px,env(safe-area-inset-right));bottom:calc(40px + env(safe-area-inset-bottom));width:calc(100% - 144px);min-height:64px;padding:10px 12px;gap:4px 8px;flex-direction:initial}
body.mobile-flight.playing #bank-flight small{font-size:10px}
body.mobile-flight.playing #bank-flight strong{font-size:25px}
body.mobile-flight.playing #bank-flight>span{font-size:9px}
body.mobile-flight.playing #control-guide{left:auto;right:12px;bottom:calc(56px + env(safe-area-inset-bottom));width:calc(100% - 144px)}
body.mobile-flight.playing #control-guide strong{font-size:11px;font-weight:500;line-height:1.5;color:#b9cbe6}
body.mobile-flight.playing .touch-right{left:auto;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:calc(100% - 144px);display:block;visibility:visible}
body.mobile-flight.playing .touch-right #land-button,body.mobile-flight.playing .touch-right #touch-pause{display:none!important}
body.mobile-flight.playing .touch-right [data-hold="Space"]{min-height:38px;width:100%;padding:6px;font-size:10px}
body.mobile-flight.playing:not(.easy-flight) #bank-flight{bottom:calc(62px + env(safe-area-inset-bottom));min-height:56px}
body.mobile-flight.playing #risk-toast{top:190px;font-size:14px;padding:10px 14px}
body.mobile-flight.playing .bottom-controls{display:none!important}
body.mobile-flight.playing.risk-cinematic #hud::after{display:none}
body.mobile-flight.playing.risk-cinematic #world{bottom:0}
body.gate-question #hud::after{display:none!important}
body.gate-question .touch-controls{visibility:hidden!important}

@media(orientation:landscape) and (max-height:600px){
 body.mobile-flight.playing{--flight-dock:96px}
 body.mobile-flight.playing .topbar{height:46px;min-height:46px}
 body.mobile-flight.playing .navigation{left:12px;right:auto;top:58px;width:174px;min-height:48px}
 body.mobile-flight.playing .instruments{right:12px;top:58px;min-height:48px}
 body.mobile-flight.playing #risk-hud{left:198px;right:152px;top:58px;min-height:48px;padding:7px 10px}
 body.mobile-flight.playing #risk-multiplier{font-size:24px}
 body.mobile-flight.playing #risk-caption{font-size:8px}
 body.mobile-flight.playing #risk-message{font-size:9px}
 body.mobile-flight.playing .joystick{left:24px;bottom:calc(14px + env(safe-area-inset-bottom));width:68px;height:68px}
 body.mobile-flight.playing .joystick>span{width:28px;height:28px;left:19px;top:19px}
 body.mobile-flight.playing .joystick small{display:none}
 body.mobile-flight.playing #bank-flight{right:16px;bottom:calc(19px + env(safe-area-inset-bottom));width:220px;min-height:58px}
 body.mobile-flight.playing #control-guide{right:16px;bottom:calc(38px + env(safe-area-inset-bottom));width:220px}
 body.mobile-flight.playing:not(.easy-flight) #bank-flight{right:140px;bottom:calc(19px + env(safe-area-inset-bottom))}
 body.mobile-flight.playing .touch-right{width:110px;bottom:calc(28px + env(safe-area-inset-bottom))}
 body.mobile-flight.playing #risk-toast{top:118px}
}
@media(max-width:360px) and (orientation:portrait){
 body.mobile-flight.playing{--flight-dock:132px}
 body.mobile-flight.playing .navigation{width:calc(100% - 150px);padding:8px}
 body.mobile-flight.playing .instruments{width:114px;padding:7px 5px;gap:5px}
 body.mobile-flight.playing .instruments>div:not(.instrument-divider){min-width:39px}
 body.mobile-flight.playing .joystick{left:16px;width:80px;height:80px;bottom:calc(29px + env(safe-area-inset-bottom))}
 body.mobile-flight.playing .joystick>span{left:22px;top:22px}
 body.mobile-flight.playing #bank-flight,body.mobile-flight.playing #control-guide,body.mobile-flight.playing .touch-right{width:calc(100% - 120px)}
 body.mobile-flight.playing #bank-flight small{font-size:9px}
}

/* Equal card edges and no target badge over the aircraft. */
body.playing #ring-marker:not(.offscreen){display:none}
body.mobile-flight.playing .navigation,body.mobile-flight.playing .instruments,body.mobile-flight.playing #risk-hud{height:56px}
body.mobile-flight.playing #risk-caption{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(orientation:landscape) and (max-height:600px){body.mobile-flight.playing .navigation,body.mobile-flight.playing .instruments,body.mobile-flight.playing #risk-hud{height:52px}}

/* Centred touch yoke, with separate left/right action areas. No animated filters. */
body.mobile-flight.playing{--flight-dock:156px}
body.mobile-flight.playing #joystick{left:50%;right:auto;bottom:calc(34px + env(safe-area-inset-bottom));transform:translateX(-50%);width:104px;height:104px;border:1px solid #7893bb88;border-radius:50%;background:linear-gradient(90deg,transparent 49.5%,#8facd022 49.5%,#8facd022 50.5%,transparent 50.5%),linear-gradient(transparent 49.5%,#8facd022 49.5%,#8facd022 50.5%,transparent 50.5%),radial-gradient(circle at 50% 24%,#25486f,#10294e 72%);box-shadow:0 5px 18px #030c2455,inset 0 1px 0 #a9c2dc22;box-sizing:border-box;touch-action:none}
body.mobile-flight.playing #joystick::before{content:'';position:absolute;inset:9px;width:auto;height:auto;transform:none;left:9px;top:9px;border:1px dashed #88a2c24d;background:none;border-radius:50%;pointer-events:none}
body.mobile-flight.playing #joystick::after{content:'▴';position:absolute;inset:auto;left:50%;top:0;width:auto;height:auto;transform:translateX(-50%);background:none;color:#e8bd78;font:11px/1 Arial;pointer-events:none}
body.mobile-flight.playing #joystick-knob{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);width:40px;height:40px;border:1px solid #eac27b;border-radius:50%;background:linear-gradient(145deg,#f6d89d,#bc8e49);box-shadow:0 3px 9px #030a2470,inset 0 1px 0 #fff7dc88;display:grid;place-items:center;transition:box-shadow .12s ease-out;pointer-events:none}
body.mobile-flight.playing #joystick-knob svg{display:block;width:23px;height:23px;fill:#10254b;pointer-events:none}
body.mobile-flight.playing #joystick:active #joystick-knob{box-shadow:0 0 0 5px #e8bd781a,0 3px 9px #030a2470}
body.mobile-flight.playing #joystick small{position:absolute;top:calc(100% + 11px);left:50%;right:auto;transform:translateX(-50%);width:max-content;font:700 8px/1.3 'Titillium Web',Arial,sans-serif;letter-spacing:1.3px;color:#c1d0e5;display:block;pointer-events:none}
body.mobile-flight.playing #hud #bank-flight{left:auto;right:max(12px,env(safe-area-inset-right));top:auto;bottom:calc(46px + env(safe-area-inset-bottom));width:clamp(72px,calc(50% - 80px),112px);min-height:80px;padding:9px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:12px;text-align:center}
body.mobile-flight.playing #hud #bank-flight small{font-size:9px;line-height:1.35;text-align:center}
body.mobile-flight.playing #hud #bank-flight strong{font-size:26px;line-height:1.1}
body.mobile-flight.playing #hud #bank-flight>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.mobile-flight.playing #control-guide{left:max(12px,env(safe-area-inset-left));right:auto;bottom:calc(64px + env(safe-area-inset-bottom));width:clamp(72px,calc(50% - 80px),112px);text-align:center}
body.mobile-flight.playing #control-guide strong{font-size:10px;line-height:1.5;color:#8fa8cc}
body.mobile-flight.playing .touch-right{left:max(12px,env(safe-area-inset-left));right:auto;bottom:calc(62px + env(safe-area-inset-bottom));width:clamp(72px,calc(50% - 80px),112px)}
body.mobile-flight.playing:not(.easy-flight) #control-guide{display:none}
body.mobile-flight.playing .touch-right [data-hold="Space"]{border-radius:9px;min-height:44px}
@media(orientation:landscape) and (max-height:600px){
 body.mobile-flight.playing{--flight-dock:104px}
 body.mobile-flight.playing #joystick{width:76px;height:76px;bottom:calc(19px + env(safe-area-inset-bottom))}
 body.mobile-flight.playing #joystick-knob{width:34px;height:34px;left:calc(50% - 17px);top:calc(50% - 17px)}
 body.mobile-flight.playing #joystick-knob svg{width:20px;height:20px}
 body.mobile-flight.playing #joystick small{top:calc(100% + 6px);font-size:7px}
 body.mobile-flight.playing #hud #bank-flight{right:max(18px,env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));width:180px;min-height:56px;display:grid;grid-template-columns:1fr auto;padding:10px 14px;gap:10px}
 body.mobile-flight.playing #hud #bank-flight small{text-align:left;font-size:10px}
 body.mobile-flight.playing #control-guide{left:18px;width:160px;bottom:calc(38px + env(safe-area-inset-bottom))}
 body.mobile-flight.playing .touch-right{left:18px;width:120px;bottom:calc(30px + env(safe-area-inset-bottom))}
}
