/* Phone navigation: aircraft stays visible; secondary actions live in a sheet. */
.so-phone-nav{display:none}
.so-phone-menu{box-sizing:border-box;width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:18px;border:1px solid #6986a7;border-radius:18px;background:#15263d;color:#eff7ff;font:700 15px var(--font-ui);overflow:auto}
.so-phone-menu::backdrop{background:#040e20bb}
.so-phone-menu-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.so-phone-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.so-phone-menu button{min-height:48px;border:1px solid #7990b377;border-radius:10px;padding:10px;background:#2c415e;color:inherit;font:inherit}
#touch-flight .tf-more{position:absolute;right:max(12px,env(safe-area-inset-right));top:calc(64px + env(safe-area-inset-top));width:min(300px,calc(100% - 24px));max-height:calc(100dvh - 160px);overflow:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px;box-sizing:border-box;border:1px solid #9ab8d5;border-radius:14px;background:#10233df5;pointer-events:auto}
#touch-flight .tf-more[hidden]{display:none}
#touch-flight .tf-weapons{grid-template-columns:58px 68px;gap:8px}
#touch-flight [data-action=KeyX]{grid-column:1}#touch-flight [data-action=gun]{grid-column:2;grid-row:1 / 3;height:108px}
#touch-flight [data-action=secondary]{grid-column:1;grid-row:2;height:54px}
#touch-flight [data-action=counter]{grid-column:1 / 3;min-height:44px}
#touch-flight .tf-utility{top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
#touch-flight .tf-control-options{top:calc(66px + env(safe-area-inset-top));max-height:calc(100dvh - 90px - env(safe-area-inset-top) - env(safe-area-inset-bottom));box-sizing:border-box;overflow:auto}
body.touch-flight-active #hud .sh-wpn{left:12px;top:12px;width:140px;font-size:10px}
body.touch-flight-active #hud .sh-match{top:14px;width:150px;font-size:10px}
body.touch-flight-active #hud .sh-flight{margin-bottom:4px}
@media(max-width:700px),(pointer:coarse) and (max-width:1100px){
 #ui .so-hangar .so-top{height:60px;padding:6px 12px;align-items:center}
 #ui .so-hangar .so-top-l{gap:0}
 #ui .so-hangar .so-home-brand>svg{width:36px;height:42px}
 #ui .so-hangar .so-home-brand b{font-size:24px;-webkit-text-stroke-width:2px}
 #ui .so-hangar .so-home-brand span{font-size:8px;margin-top:3px}
 #ui .so-hangar .so-top-r{gap:6px}
 #ui .so-hangar .so-top-r>*:not(.so-rp):not([data-key=settings]),
 #ui .so-hangar .so-home-collection,#ui .so-hangar .so-season-entry,
 #ui .so-hangar .so-lobby-left,#ui .so-hangar .so-quick-actions,
 #ui .so-hangar .so-roster,#ui .so-hangar .so-lobby-progress,#ui .so-hangar .so-home-orbit,
 #ui .so-hangar .so-mission-brief,#ui .so-hangar .ad-slot{display:none!important}
 #ui .so-hangar .so-rp{min-width:70px;height:40px;font-size:10px}
 #ui .so-hangar .so-rp b{font-size:19px}
 #ui .so-hangar .so-icbtn{width:44px;height:44px}
 #ui .so-hangar .so-lobby-identity{top:78px;min-width:0;width:calc(100% - 32px);pointer-events:none}
 #ui .so-hangar .so-lobby-identity h1{font-size:30px;-webkit-text-stroke-width:3px}
 #ui .so-hangar .so-lobby-identity p{font-size:10px}
 #ui .so-hangar .so-lobby-rank{font-size:10px}
 #ui .so-hangar .so-lobby-rank>*{padding:3px 6px;border-width:2px}
 #ui .so-hangar .so-stage,#ui .so-hangar.details-hidden .so-stage,#ui .so-hangar[data-tab=loadout] .so-stage,#ui .so-hangar:not(.details-hidden) .so-stage{left:12px!important;right:12px;top:174px;bottom:158px}
 #ui .so-hangar .so-phone-nav{position:absolute;z-index:6;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;left:12px;right:12px;bottom:94px}
 #ui .so-hangar .so-phone-nav button{min-width:0;min-height:48px;padding:8px 2px;border:1px solid #96b0d377;border-radius:10px;background:#273d5aed;color:white;font:800 13px var(--font-ui)}
 #ui .so-hangar .so-cta{left:14px;right:14px;bottom:14px;width:auto;height:64px;gap:8px}
 #ui .so-hangar .so-sortie{min-width:105px;width:34%;height:64px;min-height:64px;transform:none;padding:4px}
 #ui .so-hangar .so-sortie-label{font-size:32px;-webkit-text-stroke-width:3px}
 #ui .so-hangar .so-sortie-label--md{font-size:21px}#ui .so-hangar .so-sortie-label--sm{font-size:16px}
 #ui .so-hangar .so-cta-sum{flex:1;min-width:0;height:64px;min-height:64px;padding:7px 30px 6px 10px;transform:none}
 #ui .so-hangar .so-cta-mode{font-size:18px}
 #ui .so-hangar .so-cta-sum::after{right:9px;font-size:16px}
 #ui .so-hangar .so-cta-map,#ui .so-hangar .so-cta-note{font-size:9px}
 #ui .so-hangar .so-details-toggle{display:none!important}
 #ui .so-hangar:not(.details-hidden) .so-details-toggle{display:flex!important;z-index:12;top:74px;left:auto;right:20px;width:66px;height:44px;min-height:44px;justify-content:center;padding:4px;transform:none;font-size:15px}
 #ui .so-hangar .so-details-toggle svg{display:none!important}
 #ui .so-hangar .so-aircard{left:12px;right:12px;top:66px;bottom:12px;width:auto;max-height:none;z-index:11;background:#12233cf7;overflow:auto;border-radius:14px;padding-top:48px}
 #ui .so-hangar .so-aircard .so-plate{display:none}
 #ui .so-hangar .so-panel{min-height:0;height:100%;max-height:100%;display:flex;flex-direction:column}
 #ui .so-hangar .so-panes{overflow:auto;min-height:0;padding:12px}
 #ui .so-hangar .so-tabs{flex-shrink:0}
 #ui .so-overlay:not(.so-loading){padding:8px;box-sizing:border-box}
 #ui .so-overlay.is-active>div{max-width:100%;max-height:100%;box-sizing:border-box}
 #ui input,#ui select{font-size:16px}
 #online-panel{padding:10px}
 #online-panel .online-card{padding:16px;box-sizing:border-box}
}
@media(max-width:560px){
 #touch-flight #touch-stick{width:108px;height:108px;left:max(12px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom))}
 #touch-flight .tf-throttle{left:calc(130px + env(safe-area-inset-left));bottom:max(22px,env(safe-area-inset-bottom));gap:7px}
 #touch-flight .tf-throttle button{width:44px;min-width:44px;min-height:44px;padding:2px;font-size:9px}
 #touch-flight .tf-weapons{right:max(12px,env(safe-area-inset-right));grid-template-columns:54px 64px}
 body.touch-flight-active #hud .sh-match{top:76px;right:12px;left:auto;transform:none;width:126px}
}
@media(pointer:coarse) and (max-height:600px),(max-width:700px) and (max-height:500px){
 #ui .so-hangar .so-lobby-identity{top:60px;width:60%}
 #ui .so-hangar .so-lobby-identity h1{font-size:25px;margin-top:2px}
 #ui .so-hangar .so-lobby-rank,#ui .so-hangar .so-lobby-identity p{display:none}
 #ui .so-hangar .so-stage,#ui .so-hangar.details-hidden .so-stage,#ui .so-hangar[data-tab=loadout] .so-stage,#ui .so-hangar:not(.details-hidden) .so-stage{top:92px;bottom:88px}
 #ui .so-hangar .so-phone-nav{right:auto;width:44%;bottom:20px;gap:5px}
 #ui .so-hangar .so-phone-nav button{font-size:11px}
 #ui .so-hangar .so-cta{left:48%;height:58px}
 #ui .so-hangar .so-sortie,#ui .so-hangar .so-cta-sum{height:58px;min-height:58px}
 #ui .so-hangar .so-aircard{top:10px;left:10%;right:10%}
 #ui .so-hangar:not(.details-hidden) .so-details-toggle{top:18px;right:calc(10% + 8px)}
 #touch-flight #touch-stick{width:108px;height:108px}
 #touch-flight .tf-throttle{left:calc(136px + env(safe-area-inset-left));gap:5px}
 #touch-flight .tf-throttle button{min-height:44px}
 body.touch-flight-active #hud .sh-wpn{font-size:9px;width:130px}
}
#touch-flight .tf-weapons [data-action=gun]{height:108px}
#touch-flight .tf-weapons [data-action=secondary]{height:54px}
@media(max-width:700px),(pointer:coarse) and (max-width:1100px){
 #ui .so-hangar .furball-ad--lobby{display:none}
 #ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-aircard{position:absolute;left:12px;right:12px;top:66px;bottom:12px;transform:none;width:auto;z-index:11}
 #ui .so-hangar[data-tab=loadout] .so-pane--loadout.is-on{grid-template-columns:minmax(0,1fr);padding:0}
 #ui .so-hangar[data-tab=loadout] .armament-editor{grid-column:1;grid-row:3;min-width:0}
 #ui .so-hangar .so-aircard button{min-height:44px}
 #ui .so-hangar .so-aircard .so-tab{min-height:44px}
 #ui .so-hangar[data-tab=loadout] .arm-scroll{min-height:160px;max-height:38dvh}
}
@media(pointer:coarse) and (max-height:600px){
 #ui .so-hangar .so-lobby-identity .so-lobby-nickname,#ui .so-hangar .so-lobby-identity .so-pilot-rank{display:none}
 #ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-aircard{top:10px;left:10%;right:10%}
}
@media(max-width:700px),(pointer:coarse) and (max-width:1100px){
 #ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-details-toggle{z-index:12}
}

/* Keep the phone HUD readable without the full desktop instrument stack. */
body.touch-flight-active #hud .sh-wpn{box-sizing:border-box;left:max(10px,env(safe-area-inset-left));top:max(10px,env(safe-area-inset-top));width:166px;padding:9px 10px;border-radius:10px;background:#0b20339c;font-size:12px;text-shadow:0 1px 2px #000}
body.touch-flight-active #hud .sh-flight{grid-template-columns:3.5em 1fr;gap:4px 6px;font-size:12px}
body.touch-flight-active #hud [data-telemetry=MACH],body.touch-flight-active #hud [data-telemetry=ALT],body.touch-flight-active #hud [data-telemetry=G]:not(.hot){display:none}
body.touch-flight-active #hud .sh-sensor-name,body.touch-flight-active #hud .sh-slot:not(.sel),body.touch-flight-active #hud .sh-wpn .ky{display:none}
body.touch-flight-active #hud .sh-slot.sel::before{display:none}
body.touch-flight-active #hud .sh-runway-help{bottom:calc(190px + env(safe-area-inset-bottom));width:min(330px,calc(100vw - 40px));max-width:none;box-sizing:border-box;font-size:12px;line-height:1.5;padding:9px 12px;border-radius:8px}
@media(max-height:500px){body.touch-flight-active #hud .sh-wpn{width:156px;font-size:11px}body.touch-flight-active #hud .sh-flight{font-size:11px;gap:2px 6px}body.touch-flight-active #hud .sh-runway-help{bottom:max(16px,env(safe-area-inset-bottom));width:calc(100vw - 420px);min-width:190px;font-size:11px}}

body.touch-flight-active #hud .sh-flight:has(.v[data-telemetry=G].hot) [data-telemetry=G]{display:block}
#touch-rotate[hidden]{display:none!important}
#touch-rotate{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:max(24px,env(safe-area-inset-top)) 24px;background:#0b1728f7;color:#f0f6ff;font:600 16px var(--font-ui);text-align:center;box-sizing:border-box;overflow:auto;touch-action:manipulation}
#touch-rotate>div{max-width:420px}#touch-rotate span{display:block;font-size:84px;line-height:1;color:#f1cb69}#touch-rotate h1{font:800 30px var(--font-display);margin:20px 0 12px}#touch-rotate p{line-height:1.6;color:#c4d6e7}#touch-rotate button{min-height:46px;padding:12px 18px;border:1px solid #839bb1;border-radius:8px;background:#213d58;color:white;font:800 14px var(--font-ui)}
@media(max-height:360px){body.touch-flight-active #hud .sh-wpn{padding:7px 9px}body.touch-flight-active #hud .sh-gun-status,body.touch-flight-active #hud .sh-wpn>.sh-tags:last-child{display:none}}
