/* Touch-first app layer. The painted playfield and aircraft remain unchanged. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
html,body{height:100%;height:100dvh;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#game{height:var(--app-height,100dvh)}
button{min-height:44px;touch-action:manipulation}button:not(:disabled):active{filter:brightness(1.18)}
#loading .load-track{width:180px;height:3px;background:#ffffff18;border-radius:4px;overflow:hidden}#loadProgress{display:block;background:#f7da51;width:0;height:100%;transition:width .2s ease}
.install-button{display:flex;gap:9px;align-items:center;justify-content:center;margin-top:13px;padding:10px 14px;border:1px solid #d8dfce32;border-radius:14px;background:#0c272985;color:#e5e8d5;font:10px Mono;letter-spacing:.04em;min-width:238px}
.install-button span{font-size:17px;color:#f4da62}.game-wordmark{top:calc(26px + var(--safe-top));right:calc(32px + var(--safe-right))}.intro-brand{bottom:calc(25px + var(--safe-bottom));right:calc(32px + var(--safe-right))}
.pause-card{width:min(360px,calc(100vw - 56px));padding:28px;border:1px solid #c4d1ad30;border-radius:25px;background:linear-gradient(145deg,#17332fef,#081e20fa);box-shadow:0 30px 90px #0008}
.pause-card h2{font-size:52px;line-height:1;margin:15px 0 22px}.pause-card .primary{width:100%;border-radius:14px;min-height:48px;min-width:0}.modal{padding:12px;box-sizing:border-box;background:#0313159e;backdrop-filter:blur(12px)}
.pause-settings{display:flex;gap:9px;margin-top:14px}.setting{flex:1;min-height:44px;display:flex;justify-content:space-between;align-items:center;border:1px solid #c5d0ba28;border-radius:12px;background:#f5f3ce07;padding:0 12px;font:10px Mono;color:#b8c9bc}.setting b{font-weight:400;color:#f3dc7a}.setting[aria-pressed=false] b{color:#8c9e96}.pause-card .text-button{width:100%;margin:8px 0 -8px}
#installHelp{z-index:110}#installHelp p{font-size:14px;line-height:1.65;color:#bdcfc3;margin:0 0 20px}#installHelp h2{font-size:44px}.personal-best{font:10px Mono;color:#e8d47d;letter-spacing:.06em;margin:0 0 16px}
#touchCoach{display:none;position:absolute;z-index:7;pointer-events:none;left:50%;bottom:calc(26px + var(--safe-bottom));transform:translateX(-50%);font:10px Body;color:#dce3cd;padding:9px 16px;border:1px solid #cdd7be22;border-radius:24px;background:#09251ed9;white-space:nowrap}.touch-device #touchCoach{display:block}
#boost{display:none;position:absolute;right:18px;bottom:119px;width:56px;height:48px;min-height:48px;border-radius:19px;border:1px solid #e3dd9b50;background:#14372eaa;color:#dfdfb5;backdrop-filter:blur(5px);font:8px Mono;pointer-events:auto;align-items:center;justify-content:center;flex-direction:column;gap:2px}#boost svg{width:17px;height:17px}#boost.held{background:#c3b95dcc;color:#152a23;border-color:#f5e59e}
#game[data-feedback=protected]:after,#game[data-feedback=refilled]:after{content:'';position:absolute;z-index:4;inset:0;pointer-events:none;border:1px solid #c6dfad44;box-shadow:inset 0 0 50px #c2df9a15;animation:feedbackFade .8s both}
#game[data-feedback=drop] #action{animation:dropPress .32s ease-out}#game[data-feedback=low-fuel] .fuel-stat{animation:fuelPulse .65s 3}
@keyframes feedbackFade{from{opacity:1}to{opacity:0}}@keyframes dropPress{0%{transform:scale(.88)}60%{transform:scale(1.04)}100%{transform:scale(1)}}@keyframes fuelPulse{50%{opacity:.35}}
@media(pointer:coarse),(max-width:1000px){
 .primary{border-radius:15px;min-height:48px}.intro-copy{margin-left:calc(5% + var(--safe-left))}.install-button{min-width:205px}.mission-title{left:calc(22px + var(--safe-left));top:calc(16px + var(--safe-top))}
 .stats{left:calc(22px + var(--safe-left));top:calc(41px + var(--safe-top));gap:23px}.stats label{font-size:8px;letter-spacing:.07em}.stats strong{font-size:32px}.stats strong span{font-size:17px}.stats i{width:59px;height:2px}
 .top-actions{right:calc(13px + var(--safe-right));top:calc(8px + var(--safe-top));gap:4px}.top-actions button{width:44px;height:44px;min-height:44px;background:#08202055;border-color:#dfecd523;font-size:17px}
 .finder{top:calc(62px + var(--safe-top));right:calc(17px + var(--safe-right));width:112px}.finder canvas{width:112px;height:63px;border:1px solid #e2e7c71c;border-radius:12px;background:#08201b40}.wind{font-size:7px;margin:6px 2px;gap:7px}.wind span{display:none}
 .joystick{left:calc(9px + var(--safe-left));bottom:calc(9px + var(--safe-bottom));width:142px;height:142px;border:0;background:none;--dx:0px;--dy:0px;--ox:0px;--oy:0px}
 .joystick:before{content:'';position:absolute;width:98px;height:98px;border:1px solid #e0e7c744;border-radius:50%;left:calc(50% - 50px + var(--ox));top:calc(50% - 50px + var(--oy));background:radial-gradient(circle,#c5d5b708,#09271940);box-shadow:inset 0 0 20px #f1edb90a;transition:border-color .15s}
 .joystick:after{inset:auto;width:63px;height:63px;left:calc(50% - 32px + var(--ox));top:calc(50% - 32px + var(--oy));border-color:#dbe4c31c}
 #stick{width:42px;height:42px;left:calc(50% - 22px + var(--ox));top:calc(50% - 22px + var(--oy));transform:translate(var(--dx),var(--dy));background:radial-gradient(circle at 40% 30%,#e1e7bf4a,#b0c4a725);border:1px solid #eef0cb70;box-shadow:0 5px 15px #00190c55;transition:transform .12s ease-out}
 .joystick.held #stick{transition:none;background:#d1dcb747;border-color:#f4e7a9}.joystick.held:before{border-color:#e5dfa275}.joystick>span{bottom:0;font-size:7px;opacity:.7;letter-spacing:.16em}
 .action-wrap{right:calc(22px + var(--safe-right));bottom:calc(24px + var(--safe-bottom))}#action{width:92px;height:92px;background:radial-gradient(circle at 35% 25%,#244d39e0,#092c24d9);border:1px solid #e1d58f99;box-shadow:inset 0 0 0 5px #e5d46a08,0 7px 22px #041c175c;transition:transform .13s,background .13s}#action:active{transform:scale(.92)}#action svg{width:29px;height:29px}#action strong{font-size:9px}#actionHint{display:none}#boost{display:flex}
 #skill{bottom:calc(45px + var(--safe-bottom));width:clamp(225px,32vw,300px);border-radius:19px;padding:12px 17px 10px;background:#092821e8;box-sizing:border-box}#skill>span{font-size:18px}#skill p{font-size:9px;margin:5px 0 13px}#skillFooter{font-size:7px;letter-spacing:.03em}
 #objective{bottom:calc(10px + var(--safe-bottom));font-size:9px;max-width:calc(100% - 290px);white-space:normal;text-align:center;justify-content:center}#toast{top:calc(17px + var(--safe-top));left:50%;width:auto;min-width:0;max-width:calc(100% - 370px);white-space:normal;font-size:11px;border-radius:22px;padding:10px 17px;line-height:1.35;background:#102e26e8;border:1px solid #d7d5a226}
 .touch-hint{font-size:10px;line-height:1.45;color:#aabfb0;max-width:260px}.result-copy{margin-left:calc(7% + var(--safe-left));max-width:65%}.result-stats{gap:30px}.result-copy .primary{min-width:220px}.personal-best{font-size:8px}
}
@media(max-height:450px) and (orientation:landscape){
 .intro-copy h1{font-size:clamp(38px,7.6vh,54px);line-height:.98;margin:12px 0}.intro-copy p{font-size:12px;margin:0 0 13px}.brief-pills{margin-bottom:14px;font-size:7px;gap:11px}.brief-pills span+span:before{margin-right:11px}.intro-copy .primary{min-height:46px;padding:13px 18px}.touch-hint{margin-top:12px;max-width:260px}.install-button{position:absolute;left:calc(100vw - 5vw - var(--safe-left) - var(--safe-right) - 215px);bottom:0;white-space:nowrap;min-width:180px;font-size:8px;background:#092321c9}
 .game-wordmark{width:146px;right:calc(22px + var(--safe-right));top:calc(20px + var(--safe-top))}.intro-brand{bottom:calc(80px + var(--safe-bottom));right:calc(26px + var(--safe-right))}.intro-brand img{width:42px}
 .pause-card{padding:22px 26px;width:320px}.pause-card h2{font-size:42px;margin:12px 0 17px}.pause-card .text-button{margin-top:2px}.pause-settings{margin-top:10px}.result-copy h1{font-size:54px;margin:12px 0}.result-copy p{font-size:12px;line-height:1.4}.result-stats{margin:16px 0}.result-stats strong{font-size:34px}.result-stats label{font-size:8px}
}
@media(max-height:345px) and (orientation:landscape){
 .intro-copy h1{font-size:clamp(27px,12vh,38px);margin:7px 0 9px}.intro-copy p{font-size:11px;line-height:1.4;margin:0 0 9px}.brief-pills{margin-bottom:10px}
 .intro-copy .primary{min-height:42px;padding:10px 15px;min-width:185px}.touch-hint{margin-top:8px;font-size:9px;line-height:1.35}
 .install-button{min-height:38px;padding:6px 11px;font-size:7px;min-width:160px;margin-top:8px}.intro-brand{display:none}.game-wordmark{width:104px}
 .result-copy h1{font-size:42px;margin:8px 0}.result-copy p{font-size:11px;margin-bottom:8px}.result-stats{margin:10px 0 14px;gap:24px}.result-stats strong{font-size:28px}
}
@media(max-width:680px) and (orientation:landscape){.joystick{width:125px;height:125px}.finder{width:94px}.finder canvas{width:94px;height:53px}.stats{gap:16px}.stats strong{font-size:28px}#skill{width:220px;bottom:calc(37px + var(--safe-bottom))}#skill p{font-size:8px}#skillFooter{display:none}#action{width:80px;height:80px}.action-wrap{right:calc(17px + var(--safe-right));bottom:calc(21px + var(--safe-bottom))}#boost{bottom:102px;right:12px}#toast{max-width:calc(100% - 310px);font-size:10px}.game-wordmark{width:120px}.install-button{left:calc(100vw - 5vw - var(--safe-left) - var(--safe-right) - 185px);min-width:165px}.brief-pills{gap:9px;font-size:6px}.brief-pills span+span:before{margin-right:9px}}
@media(orientation:portrait) and (max-width:800px){#portrait{padding:30px;box-sizing:border-box;background:radial-gradient(ellipse at 50% 20%,#24423b,#061c1d 70%)}#portrait h2{font-size:50px;line-height:1.02;margin:26px 0 10px}#portrait p{font-size:14px;max-width:270px;line-height:1.6;margin-bottom:24px}#portrait .primary{width:240px;border-radius:16px}#portrait .rotate-icon{border:1px solid #b1c8ad32;border-radius:25px;padding:19px 23px;font-size:48px}.install-button{position:static}#portrait .portrait-brand{position:absolute;bottom:calc(35px + var(--safe-bottom));width:170px;opacity:.8}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition:none!important}}

.offline-status{display:block;text-align:center;margin:11px 0 0;font:8px Mono;letter-spacing:.04em;color:#9ab8a5}.pause-card #updateGame{color:#f4d878;margin-top:0}.pause-card #updateGame:not([hidden]){min-height:32px}.pause-card #restart{min-height:38px}

/* Secondary actions keep separate 44px hit areas, including compact phones. */
.pause-secondary{display:flex;gap:8px;margin-top:10px}.pause-secondary .text-button,.pause-card #restart,.pause-card #updateGame,.pause-card #updateGame:not([hidden]){flex:1;min-height:44px;margin:0;padding:0 7px;border:1px solid #c5d0ba22;border-radius:12px;font-size:11px}.pause-card #updateGame{color:#f4d878}
@media(max-height:360px) and (orientation:landscape){.pause-card{padding:16px 22px}.pause-card h2{font-size:36px;margin:8px 0 14px}.pause-secondary{margin-top:8px}.offline-status{margin-top:8px}}
