:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#f3f1de;background:#182c30;color-scheme:dark}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select{font:inherit}button,a,select{touch-action:manipulation}button{border:1px solid #82958966;background:#263e40;color:inherit;border-radius:12px;padding:12px 17px;cursor:pointer;min-height:46px}button:hover{background:#395451}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #f2c16b;outline-offset:4px}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}a{color:inherit}#battle,#combat-scene,.vignette{position:absolute;inset:0;width:100%;height:100%}#combat-scene{display:block;outline:none}.vignette{pointer-events:none;background:radial-gradient(ellipse,transparent 40%,#10232a55)}header{position:absolute;z-index:4;left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));top:max(20px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:center}header a{text-decoration:none;letter-spacing:.12em;text-shadow:0 1px 8px #123}header small{display:block;font-size:9px;letter-spacing:.25em;margin-left:24px;margin-top:4px}header>div{display:flex;gap:8px}header button{background:#1c3439d9}.overlay{position:absolute;inset:0;z-index:8;background:#11272c77;backdrop-filter:blur(8px);overflow:auto;display:flex;align-items:center;justify-content:center;padding:28px}.card{width:min(680px,100%);background:linear-gradient(145deg,#21393ded,#13292ff5);border:1px solid #a7b3a844;border-radius:24px;padding:36px;box-shadow:0 30px 100px #06182066}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.2em;color:#dbbe83}h1{font-size:clamp(31px,4vw,48px);line-height:1.12;letter-spacing:-.045em;margin:18px 0}h1 em{font-style:normal;color:#efc77e}h2{font-size:32px;line-height:1.15;margin:16px 0}.intro{color:#c0ceca;font-size:15px;line-height:1.6}.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0}.choices button{text-align:left;padding:20px}.choices button[aria-pressed=true]{border-color:#e7c882;background:#4a5646}.choices span,.choices b,.choices small{display:block}.choices span{font-size:10px;letter-spacing:.12em;color:#d3c49f}.choices b{font-size:21px;margin:8px 0}.choices small{font-size:12px;line-height:1.5;color:#d6ddd1}.options{display:flex;gap:14px;align-items:end;flex-wrap:wrap}.options label{font-size:12px;color:#c4d0c8;flex:1}select{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid #97aaa055;background:#183236;border-radius:8px;font-size:12px}.options .check{flex:0 0 auto;padding-bottom:12px}.primary{background:#e7be72;color:#182c30;border:0;font-weight:800;width:100%;margin:16px 0 10px}.primary:hover{background:#f2d294}.record,#pilot-name{font-size:12px;color:#c3d1c8}.back{display:inline-block;margin-top:16px;font-size:12px;color:#cad7cf}details{font-size:12px;line-height:1.7;margin-top:12px}summary{cursor:pointer;padding:8px 0}details p{color:#c3d1ca}.compact{max-width:430px}.compact>button{display:block;width:100%;margin-top:10px}.mission{position:absolute;z-index:3;top:95px;left:50%;transform:translateX(-50%);width:min(510px,65vw);border:1px solid #abc2af44;border-radius:15px;background:#163138df;padding:12px 18px}.mission strong{font-size:14px}.mission>span{float:right;font-weight:800;color:#e7c57c}.mission p{font-size:12px;color:#d1ddd1;margin:5px 0 0;line-height:1.4}.instruments{position:absolute;left:24px;bottom:28px;z-index:3;padding:14px 18px;border-radius:14px;background:#183237dd;display:grid;grid-template-columns:1fr 1fr;gap:10px 20px;font-size:11px}.instruments b{font-size:22px}.instruments label{display:flex;align-items:center;gap:8px;font-size:10px}meter{width:75px;height:12px;accent-color:#e5bf75}.weapon-status{position:absolute;z-index:3;bottom:28px;left:50%;transform:translateX(-50%);text-align:center;border-radius:14px;background:#183237df;padding:12px 20px;min-width:250px}.weapon-status span{display:block;font-size:12px;margin-top:5px;color:#d0d9cd}#lock-label{font-size:13px;color:#efcc82}#key-hint{font-size:10px}#reticle{position:absolute;width:36px;height:36px;transform:translate(-50%,-50%);border:1px solid #e8f1d5aa;border-radius:50%;pointer-events:none;z-index:2}#reticle:before,#reticle:after{content:'';position:absolute;left:50%;top:50%;background:#f0f2d6;transform:translate(-50%,-50%)}#reticle:before{width:14px;height:2px}#reticle:after{height:14px;width:2px}.target{position:absolute;transform:translate(-50%,-50%);width:45px;height:45px;border:2px solid #f6b499;border-radius:9px;pointer-events:none}.target.locked{border-color:#ffdc72;box-shadow:0 0 14px #f7c96b66}.target.threat{border-color:#ff5f50;box-shadow:0 0 20px #f54a}.target span{position:absolute;top:48px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;background:#122c35df;border-radius:5px;padding:3px 6px}.target.edge{width:28px;height:28px;border:0;font-size:26px;color:#ffce8b}.target.edge span{top:28px}#warning{position:absolute;top:175px;left:50%;transform:translateX(-50%);color:#ffe29e;background:#3b2d29d9;padding:8px 14px;border-radius:10px;font-size:13px;font-weight:700}#warning:empty{display:none}#hit-flash{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 90px #e9502e;opacity:0}#touch-controls{position:absolute;inset:0;pointer-events:none;z-index:5}#touch-controls button,#stick,#rudder{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.touch-left{position:absolute;left:max(18px,env(safe-area-inset-left));bottom:max(20px,env(safe-area-inset-bottom))}.power{display:flex;gap:5px;margin-bottom:10px}.power button{min-width:44px;padding:9px}.stick,.rudder{position:relative;background:#1c3a4066;border:1px solid #d1dfc55e;display:flex;justify-content:center;align-items:flex-start;color:#e4edce;font-size:9px;letter-spacing:.05em}.stick{position:absolute;right:max(18px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));width:142px;height:142px;border-radius:50%;padding-top:15px}.rudder{width:150px;height:62px;border-radius:30px;padding-top:9px}.stick i,.rudder i{position:absolute;top:50%;left:50%;width:31px;height:31px;border:1px solid #e4dbb0;border-radius:50%;background:#d7c79944;transform:translate(calc(-50% + var(--stick-x,0px)),calc(-50% + var(--stick-y,0px)));pointer-events:none}.stick small{position:absolute;bottom:13px;font-size:9px}.weapons{position:absolute;right:178px;bottom:25px;display:flex;flex-direction:column;gap:8px}.weapons button{background:#5e4a33d9;border-color:#e6c78599;min-width:88px;font-size:11px;font-weight:800;min-height:54px}.weapons button.held{background:#b17e3d}.touch-mode .instruments{bottom:auto;top:85px;left:18px;padding:8px 10px;gap:4px 10px}.touch-mode .instruments b{font-size:16px}.touch-mode .instruments label{font-size:8px}.touch-mode meter{width:48px}.touch-mode .mission{top:85px;width:45vw;left:auto;right:18px;transform:none}.touch-mode .weapon-status{bottom:180px;padding:8px 12px;min-width:200px}.touch-mode #key-hint{display:none}.touch-mode #warning{top:175px}
@media(max-width:600px){header{left:12px;right:12px;top:12px}header small{display:none}header a{font-size:12px}header button{font-size:11px;padding:8px 10px}.overlay{padding:12px;align-items:flex-start}.card{padding:22px;border-radius:18px;margin:auto 0}.choices{grid-template-columns:1fr;gap:8px;margin:15px 0}.choices button{padding:13px}.choices b{font-size:18px;margin:5px 0}.choices small{font-size:11px}h1{font-size:32px}.intro{font-size:13px}.options{gap:10px}.mission{top:70px;width:calc(100% - 24px);padding:10px 12px}.instruments{left:12px;bottom:20px;padding:10px}.weapon-status{bottom:115px;width:calc(100% - 24px);min-width:0}.touch-mode .instruments{top:70px;left:12px;width:calc(100% - 24px);display:flex;justify-content:space-between;padding:8px}.touch-mode .mission{top:125px;left:12px;right:12px;width:auto}.touch-mode .weapon-status{bottom:205px;width:auto;min-width:190px}.touch-mode #warning{top:210px;width:90%;text-align:center}.touch-left{left:12px;bottom:18px}.rudder{width:125px}.power{gap:4px}.power button{padding:8px;min-width:38px;font-size:12px}.stick{width:130px;height:130px;right:12px;bottom:18px}.weapons{right:12px;bottom:157px;flex-direction:row;gap:6px}.weapons button{min-width:74px;min-height:44px;font-size:10px}.target span{font-size:9px}}
@media(max-height:500px) and (min-width:601px){header{top:8px;left:12px;right:12px}header small{display:none}.mission,.touch-mode .mission{top:10px;left:50%;right:auto;transform:translateX(-50%);width:43%;padding:8px 12px}.mission p{font-size:10px}.instruments,.touch-mode .instruments{top:70px;bottom:auto;left:12px;gap:4px 8px;padding:8px;font-size:9px}.instruments b{font-size:15px}.instruments label{font-size:8px}meter{width:40px}.weapon-status,.touch-mode .weapon-status{bottom:12px;min-width:160px;padding:8px 10px;width:25%}.touch-mode #warning,#warning{top:85px}.stick{width:116px;height:116px;bottom:12px;right:12px}.touch-left{left:12px;bottom:12px}.weapons{right:143px;bottom:12px}.weapons button{min-width:72px;min-height:42px;padding:8px}.rudder{height:46px;width:130px}.power{margin-bottom:6px}.power button{min-height:38px;padding:7px}.overlay{align-items:flex-start}.card{margin:auto 0}.compact{margin:0}}

.target.edge b{display:block;line-height:28px;transform-origin:center;font-weight:600}.target:not(.edge) b{display:none}

.target.hit{border-color:#fffbe0;box-shadow:0 0 24px #ffd96a}.target.edge.hit{color:#fffbe0}
.choices .adventure-choice{grid-column:1/-1;background:linear-gradient(115deg,#285a58,#344a40)}
.overlay{align-items:flex-start}.card{margin:auto 0}
.choices .adventure-choice[aria-pressed=true]{border-color:#f0d18a;background:linear-gradient(115deg,#376c60,#5a6341)}
.navigation{border-color:#9cf2df;border-style:dashed;border-radius:50%;width:65px;height:65px;color:#9cf2df}
.navigation span{top:68px;color:#b7fff0;font-size:12px}
.navigation.edge{color:#9cf2df}
.target.edge[data-side=left] span{left:0;transform:none}.target.edge[data-side=right] span{left:auto;right:0;transform:none}
.target i{display:none}.target.boss:not(.edge){width:64px;height:64px}
.target.boss:not(.edge) i{display:block;position:absolute;bottom:-8px;left:0;width:var(--health,100%);height:4px;border-radius:3px;background:#ffd47c}
.target.boss:not(.edge) span{top:74px}
#radio{position:absolute;z-index:3;left:50%;top:170px;transform:translateX(-50%);max-width:440px;padding:9px 14px;border-radius:10px;background:#173c40dd;color:#e8f4db;font-size:12px;line-height:1.5;pointer-events:none;text-align:center}
body:not(.touch-mode) #radio{display:none}
#reward{padding:14px;background:#29574b;border:1px solid #77c5ac;border-radius:12px;color:#b7ffe1;line-height:1.5}
.touch-mode #radio{top:calc(var(--hud-top) + 105px);width:calc(100% - var(--hud-left) - var(--hud-right));max-width:410px;font-size:11px;margin:0;padding:6px 10px;background:#173c40aa}
.touch-mode #radio:not([hidden])~#warning:not(:empty){top:calc(var(--hud-top) + 155px)}
@media(max-height:430px) and (min-width:601px){.touch-mode #radio{top:calc(var(--hud-top) + 80px)}.touch-mode #radio:not([hidden])~#warning:not(:empty){top:calc(var(--hud-top) + 124px)}.route-choices{grid-template-columns:1fr 1fr}}
@media(max-height:430px){
 .overlay{padding:12px}.card.compact{padding:18px}
 .compact h2{font-size:25px;margin:8px 0}.compact p{font-size:12px;line-height:1.4;margin:8px 0}
 .compact>button{min-height:44px;margin-top:6px;padding:8px}.compact #reward{padding:8px}.compact>a{font-size:11px}
 #route-panel .card{padding:20px}#route-panel h2{font-size:26px;margin:10px 0}#route-panel .choices{margin:12px 0}#route-panel .choices button{padding:12px}#route-panel .intro{font-size:12px;margin:8px 0}
}

/* Touch flight: keep the horizon and aircraft free of information panels.
   Safe-area offsets apply in both orientations, including short Safari views. */
body.touch-mode{--hud-top:max(8px,env(safe-area-inset-top));--hud-left:max(12px,env(safe-area-inset-left));--hud-right:max(12px,env(safe-area-inset-right));--controls-bottom:max(12px,env(safe-area-inset-bottom))}
.touch-mode #battle{position:fixed;height:100%;height:100dvh}
.touch-mode header{top:var(--hud-top);left:auto;right:var(--hud-right)}
.touch-mode header>a{display:none}
.touch-mode header>div{gap:6px}
.touch-mode header button{min-width:44px;min-height:44px;padding:8px 10px;font-size:11px;background:#18323799}
.touch-mode #hud{pointer-events:none;text-shadow:0 1px 4px #10232a}
.touch-mode .mission{top:var(--hud-top);left:var(--hud-left);right:calc(var(--hud-right) + 128px);transform:none;width:auto;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:none;border-radius:0;padding:0}
.touch-mode .mission strong{font-size:13px}
.touch-mode .mission>span{font-size:14px;white-space:nowrap}
.touch-mode .mission p{display:none}
.touch-mode .instruments{top:calc(var(--hud-top) + 50px);bottom:auto;left:var(--hud-left);right:var(--hud-right);width:auto;min-height:22px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0;border-radius:0;background:none;font-size:9px}
.touch-mode .instruments b{font-size:15px}
.touch-mode .instruments label{gap:4px;font-size:8px}
.touch-mode meter{width:40px;height:10px}
.touch-mode .weapon-status{top:calc(var(--hud-top) + 79px);bottom:auto;left:var(--hud-left);right:var(--hud-right);width:auto;min-width:0;transform:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0;border-radius:0;background:none;text-align:left}
.touch-mode #lock-label{font-size:11px}
.touch-mode .weapon-status span{font-size:10px;margin:0}
.touch-mode #key-hint{display:none}
.touch-mode #warning{top:calc(var(--hud-top) + 105px);width:max-content;max-width:calc(100% - var(--hud-left) - var(--hud-right));font-size:11px;padding:5px 8px;text-align:center}
.touch-mode .touch-left{left:var(--hud-left);bottom:var(--controls-bottom)}
.touch-mode .power{gap:4px;margin-bottom:6px}
.touch-mode .power button{min-width:44px;min-height:44px;padding:8px;font-size:11px;background:#18323788}
.touch-mode .rudder{width:144px;height:48px;background:#1c3a4033}
.touch-mode .stick{right:var(--hud-right);bottom:var(--controls-bottom);width:116px;height:116px;background:#1c3a4033}
.touch-mode .weapons{left:auto;right:calc(var(--hud-right) + 130px);bottom:var(--controls-bottom);flex-direction:column;gap:6px}
.touch-mode .weapons button{min-width:72px;min-height:44px;padding:8px;font-size:10px;background:#5e4a3399}
.touch-mode .stick.held,.touch-mode .rudder.held{background:#1c3a4077}
@media(max-width:600px){
 .touch-mode .weapons{left:var(--hud-left);right:auto;bottom:calc(var(--controls-bottom) + 106px);flex-direction:row}
}
@media(max-height:430px) and (min-width:601px){
 .touch-mode .instruments{right:auto;width:270px}
 .touch-mode .weapon-status{left:auto;width:220px;top:calc(var(--hud-top) + 54px)}
 .touch-mode #warning{top:calc(var(--hud-top) + 83px)}
}

/* The lever holds its setting; the adjacent bar shows actual speed, not thrust. */
.throttle-console{position:absolute;left:var(--hud-left,12px);bottom:calc(var(--controls-bottom,12px) + 58px);display:flex;gap:6px;width:100px;pointer-events:none;text-shadow:0 1px 4px #10232a}
.throttle-column{width:47px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:9px}
.throttle-column>span{font-size:8px;letter-spacing:.04em}
.throttle-column output{height:16px;white-space:nowrap;font-size:11px}.throttle-column output b{font-size:13px}.throttle-column small{font-size:8px}
#throttle-lever,#airspeed-bar{position:relative;width:47px;height:144px;border-radius:12px;background:#17343b55}
#throttle-lever{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ns-resize}
#throttle-lever:focus-visible{outline:3px solid #f2c16b;outline-offset:2px}
#throttle-lever.held{background:#28494caa}
.lever-track,.speed-track{position:absolute;top:12px;bottom:12px;left:19px;width:9px;background:#102b3499;border:1px solid #d9e4cf55;border-radius:5px;pointer-events:none}
.lever-track i,.speed-track i{position:absolute;bottom:0;left:0;width:100%;border-radius:4px;background:#e5bc70}
.lever-track i{height:var(--lever,58.8%)}
.lever-track b{position:absolute;left:50%;bottom:var(--lever,58.8%);transform:translate(-50%,50%);width:35px;height:20px;border-radius:6px;border:1px solid #ffe1a3;background:#d7ad62;box-shadow:0 2px 5px #122c3466}
.speed-track{left:16px;width:15px;background:repeating-linear-gradient(to top,#102b3499 0px,#102b3499 27px,#d9e4cf77 28px,#102b3499 29px)}
.speed-track i{height:var(--speed,0%);background:#86d2ba;opacity:.9}
.touch-mode .instruments>span:first-child{display:none}
.touch-mode .touch-left{display:flex;gap:8px;align-items:center}
.touch-mode .rudder{width:112px;height:48px}
.touch-mode #brake{min-width:52px;min-height:48px;padding:6px;font-size:10px;background:#18323788}
@media(max-width:600px){.touch-mode .weapons{left:calc(var(--hud-left) + 104px);right:auto;bottom:calc(var(--controls-bottom) + 58px);flex-direction:column}}
@media(max-height:430px) and (min-width:601px){#throttle-lever,#airspeed-bar{height:112px}.touch-mode .instruments{width:220px}}
