:root{color-scheme:dark;--ink:#e5f4f4;--muted:#9eafb8;--cyan:#a3e8de;--amber:#ffc481;--panel:#0c1a26;--line:rgba(171,214,222,.24);font-family:Arial,'Yu Gothic','Hiragino Kaku Gothic ProN',sans-serif;font-size:16px;color:var(--ink);background:#0a1721}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select,input{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--amber);outline-offset:4px}button:disabled{opacity:.45;cursor:wait}[hidden]{display:none!important}#game{position:relative;width:100%;height:100svh;height:100dvh;overflow:hidden;isolation:isolate;user-select:none;-webkit-user-select:none;touch-action:none}#world,#hud,.glass-shade{position:absolute;inset:0;width:100%;height:100%;display:block}#hud{z-index:2;pointer-events:none}.glass-shade{z-index:1;pointer-events:none;box-shadow:inset 0 -65px 90px rgba(3,13,25,.64),inset 0 45px 85px rgba(3,13,25,.46)}.topbar{position:absolute;top:0;left:0;right:0;z-index:15;padding:calc(18px + env(safe-area-inset-top)) max(26px,env(safe-area-inset-right)) 12px max(26px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(#0a1828b8,transparent);pointer-events:none}.wordmark{font-size:13px;letter-spacing:.16em;font-weight:700;color:#eef7f8;text-decoration:none;display:flex;align-items:center;gap:6px;pointer-events:auto;white-space:nowrap}.wordmark span{font-weight:400;color:#aecacb}.wordmark i{width:1px;height:14px;background:#91b6c168;margin:0 12px}.wordmark small{font-size:11px;font-weight:400;letter-spacing:.16em;color:#b8cbd2}.top-actions{display:flex;gap:5px;pointer-events:auto}.utility{width:40px;height:40px;display:grid;place-items:center;background:#0e2035a8;border:1px solid #b8dfe62a;border-radius:3px;font-size:14px;font-weight:700}.utility:hover{background:#264756bd}.utility svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.utility.muted{color:#81939e}.overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;padding:85px 6vw 40px;overflow:auto;touch-action:pan-y}.start-overlay{background:linear-gradient(90deg,rgba(4,14,26,.93),rgba(8,25,37,.76) 35%,rgba(8,25,37,.12) 69%,rgba(8,25,37,.0))}.start-panel{width:min(420px,100%);position:relative;padding:18px 0}.eyebrow{font-size:11px;font-weight:600;letter-spacing:.19em;color:var(--cyan);margin:0 0 20px}.start-panel h1{font-family:Georgia,'Yu Mincho',serif;font-size:clamp(40px,4.5vw,62px);font-weight:400;letter-spacing:-.04em;line-height:1;margin:0;color:#f4f6f4}.start-panel h1 span{display:inline-block;font-family:Arial,sans-serif;font-size:.35em;font-weight:400;letter-spacing:.06em;color:var(--amber);margin-left:12px;vertical-align:top;margin-top:4px}.subtitle{letter-spacing:.25em;font-size:15px;margin:14px 0 32px;color:#d3e2e7}.mission-brief{padding:0 0 20px;border-bottom:1px solid var(--line);margin-bottom:22px}.micro{display:block;font-size:11px;letter-spacing:.14em;color:#a6c4cf;line-height:1.5}.mission-brief p{font-size:14px;line-height:1.9;max-width:360px;color:#d2dce2;margin:10px 0 0}.difficulty{margin:0;padding:0;border:0}.difficulty legend{font-size:13px;color:#b8cdd4;margin-bottom:11px}.difficulty-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.difficulty-button{min-height:94px;background:rgba(8,25,38,.74);border:1px solid var(--line);border-radius:3px;display:grid;grid-template-columns:1fr;place-items:center;gap:4px;padding:12px 10px}.difficulty-button svg{height:22px;width:22px;stroke:#abcbd5;stroke-width:1.2;fill:none}.difficulty-button strong{font-size:13px;font-weight:400}.difficulty-button small{font-size:10px;letter-spacing:.13em;color:#9eafb8}.difficulty-button.selected{border-color:#9dd6d1;background:linear-gradient(135deg,#3e665856,#142d40a3);box-shadow:inset 0 2px var(--cyan)}.difficulty-button.selected svg,.difficulty-button.selected small{color:var(--cyan);stroke:var(--cyan)}.stage-select-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#b1c9d2;margin:18px 0}.stage-select-row select{max-width:62%;background:#0c1a29;border:1px solid var(--line);padding:8px;color:#e1eef0;font-size:12px}.launch-button{width:100%;min-height:52px;border:1px solid #c3eae3;border-radius:2px;background:linear-gradient(110deg,#b0e5da,#d6eee1);color:#132b33;display:flex;align-items:center;justify-content:space-between;padding:15px 21px;font-weight:700;font-size:15px;letter-spacing:.10em}.launch-button:hover{background:#e0f3e8}.start-links{display:flex;gap:22px;margin-top:16px;align-items:center}.start-links button{background:none;border:0;padding:3px 0;color:#c6d6df;font-size:12px;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#6c8d9770}.start-links>span{margin-left:auto;font-size:11px;color:#a5bbc5}.start-note{color:#94acb8;font-size:11px;line-height:1.7;margin-top:16px}.start-coordinate{position:absolute;right:7%;bottom:13%;display:flex;align-items:flex-end;flex-direction:column;gap:10px;text-shadow:0 2px 8px #071625}.start-coordinate span{font-size:10px;letter-spacing:.2em;color:#cee7ed}.start-coordinate strong{font-weight:300;font-size:90px;letter-spacing:-.06em;line-height:1.1}.start-coordinate i{height:1px;background:#bcdfde70;width:200px;margin:12px 0}.telemetry{position:absolute;inset:0;z-index:3;pointer-events:none;text-shadow:0 1px 4px #071a2f,0 0 9px #071a2f}.mission-status{position:absolute;top:94px;left:32px;max-width:240px}.mission-status strong{display:block;font-size:20px;font-weight:500;margin-top:7px;letter-spacing:.04em}.mission-status p{font-size:12px;margin:10px 0 4px;color:#dce9ec}.mission-status>span:last-child{font-size:11px;color:var(--amber)}.flight-status{position:absolute;right:34px;top:94px;width:170px}.flight-status b{font-size:30px;font-weight:400;font-variant-numeric:tabular-nums}.flight-status small{color:#a8bfc9;font-size:12px}.hp-track,.boss-track{height:3px;background:#3a4f60;margin-top:9px}.hp-track i,.boss-track i{display:block;background:var(--cyan);height:100%;width:100%;transition:width .15s}.flight-readout{position:absolute;top:42%;display:flex;flex-direction:column;gap:3px}.speed-readout{left:7%}.altitude-readout{right:7%;text-align:right}.flight-readout b{font-weight:400;font-size:clamp(26px,3vw,40px);letter-spacing:.06em;font-variant-numeric:tabular-nums}.flight-readout>span:last-of-type{font-size:11px;color:#bad4df}.thrust-bars{font-size:9px;letter-spacing:1px;margin-top:10px;color:var(--cyan)}.base-readout{position:absolute;right:34px;top:190px;text-align:right;display:flex;flex-direction:column;gap:5px}.base-readout b{font-size:24px;font-weight:400;font-variant-numeric:tabular-nums}.base-readout b small{font-size:13px}.base-readout>span:last-child{font-size:10px;letter-spacing:.08em;color:var(--amber)}#boss-panel{position:absolute;top:95px;left:50%;transform:translateX(-50%);width:min(34%,440px)}#boss-panel>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#ffd2af}.boss-track i{background:#ffb57e}#lock-info{position:absolute;top:calc(50% + 76px);left:50%;transform:translateX(-50%);text-align:center;display:flex;flex-direction:column;gap:6px;white-space:nowrap}#lock-state{font-size:11px;letter-spacing:.18em;color:var(--cyan)}#lock-distance{font-size:12px;font-weight:400;color:#dcf7fa}#alert{position:absolute;left:50%;top:24%;transform:translateX(-50%);font-size:14px;letter-spacing:.12em;color:var(--amber);padding:8px 17px;text-align:center;max-width:60%;background:#081b30a8;border-left:2px solid var(--amber);transition:opacity .2s}#alert:empty{display:none}.bottom-console{position:absolute;bottom:41px;left:50%;transform:translateX(-50%);width:min(600px,55vw);padding:15px 20px 10px;background:linear-gradient(135deg,#192b46e8,#0a152bed);border:1px solid #7182ad80;border-top:3px solid #7c91b886;border-radius:8px 8px 2px 2px;box-shadow:0 0 0 5px #08101db3,0 0 0 6px #6487a638;text-shadow:none}.console-info{display:flex;align-items:center;gap:12px;margin-bottom:12px}.console-info .micro{font-size:10px}.console-info strong{font-size:11px;font-weight:400;color:var(--cyan);letter-spacing:.05em}.console-info #clock{margin-left:auto;font-size:15px;letter-spacing:.12em;font-variant-numeric:tabular-nums}.weapons{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.weapon-cell{padding:6px 7px;border-top:1px solid #728ab360;background:#24456627;min-width:0}.weapon-cell.active{border-color:var(--cyan);background:#5794a22d}.weapon-cell>span{display:block;font-size:9px;white-space:nowrap;color:#b9c3dc;overflow:hidden;text-overflow:ellipsis}.weapon-ammo{display:flex;align-items:baseline;gap:4px;margin-top:5px}.weapon-ammo b{font-weight:400;font-size:21px;color:#e1e7fc;font-variant-numeric:tabular-nums}.weapon-ammo small{font-size:9px;color:#8ba3c1}.weapon-cell.reloading .weapon-ammo b{color:var(--amber);font-size:13px;padding:4px 0}.reload-track{width:100%;height:2px;margin-top:5px;background:#6c7e9838}.reload-track i{display:block;height:100%;background:#95bad7;width:100%}.console-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:9px;letter-spacing:.1em;color:#849abb}.desktop-hint{position:absolute;bottom:13px;left:50%;transform:translateX(-50%);font-size:10px;color:#a6c1cd;white-space:nowrap;text-align:center}.result-overlay{background:#051221b8;backdrop-filter:blur(8px);justify-content:center}.result-panel{max-width:460px;width:100%;text-align:center}.result-panel .eyebrow{color:var(--amber)}.result-panel h2{font-family:Georgia,'Yu Mincho',serif;font-size:36px;font-weight:400;margin:16px 0;color:#eef5f4}.result-panel p{font-size:14px;line-height:1.8;color:#bed0d9}#result-stats{display:grid;grid-template-columns:repeat(3,1fr);padding:24px 0 30px}#result-stats span{font-size:12px;color:#b1c8d1}#result-stats b{display:block;font-size:28px;color:#eaf0eb;font-weight:400;margin-top:8px}.secondary-button{background:transparent;border:1px solid var(--line);padding:13px;width:100%;font-size:13px;margin-top:12px;border-radius:2px}dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 40px);border:1px solid #79959c80;border-radius:5px;background:#101f2dee;color:var(--ink);padding:22px 26px;box-shadow:0 30px 100px #0009;touch-action:pan-y;overflow:auto}dialog::backdrop{background:#061322a8;backdrop-filter:blur(6px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:20px}.dialog-header h2{font-family:Georgia,'Yu Mincho',serif;font-size:23px;font-weight:400;margin:0}#modal-content{font-size:14px;line-height:1.7;color:#d1e0e5}#modal-content p{margin:16px 0}.control-table{border-collapse:collapse;width:100%;font-size:13px}.control-table td{padding:9px 4px;border-bottom:1px solid #7397a62b}.control-table td:first-child{color:var(--cyan);white-space:nowrap;padding-right:18px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:18px 0}.setting-row small{font-size:12px;color:#99b3bf;display:block}.setting-row input[type=range]{width:130px;accent-color:var(--cyan)}.setting-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--cyan)}.setting-row select{background:#152c3a;color:#e0eff0;border:1px solid var(--line);padding:8px;max-width:150px}.modal-actions{display:flex;gap:10px;margin-top:25px}.modal-actions button{flex:1}#load-status{position:absolute;bottom:20px;right:25px;z-index:20;font-size:12px;color:#def4f3;background:#142638;padding:8px 12px}#fatal{position:absolute;inset:0;z-index:100;display:grid;place-content:center;max-width:100%;padding:40px;background:#0c1c2e;color:#e5eff3;font-size:16px;line-height:1.9}#touch-controls{position:absolute;inset:0;z-index:7;pointer-events:none}.pad-wrap{position:absolute;bottom:78px;width:138px;display:flex;align-items:center;flex-direction:column;gap:9px}.left-pad{left:max(22px,env(safe-area-inset-left))}.right-pad{right:max(22px,env(safe-area-inset-right))}.pad-title{font-size:10px;letter-spacing:.12em;color:#b1d6dc;text-shadow:0 1px 3px #062137}.joystick{height:138px;width:138px;border:1px solid #a9d6de80;border-radius:50%;background:radial-gradient(circle,#0c2e4159,#0d233da8);position:relative;pointer-events:auto;touch-action:none;box-shadow:inset 0 0 0 9px #6190a31a,0 2px 14px #05112666}.pad-cross{position:absolute;background:#b2d9e438;top:50%;left:50%;transform:translate(-50%,-50%)}.pad-cross.horizontal{width:85%;height:1px}.pad-cross.vertical{height:85%;width:1px}.stick{position:absolute;width:49px;height:49px;left:calc(50% - 24.5px);top:calc(50% - 24.5px);border:1px solid #bcdee9b0;border-radius:50%;background:radial-gradient(circle at 35% 30%,#b6d5df50,#2b4a6380);box-shadow:0 0 20px #9bbad01a}.joystick.active .stick{background:#9ad9dd88;box-shadow:0 0 18px #63deff40}.pad-arrow{position:absolute;font-size:21px;color:#bedfe9bd;line-height:1}.north{top:6px;left:calc(50% - 6px)}.south{bottom:5px;left:calc(50% - 6px)}.west{left:9px;top:calc(50% - 10px)}.east{right:9px;top:calc(50% - 10px)}.touch-vertical{position:absolute;left:max(33px,env(safe-area-inset-left));bottom:238px;display:flex;gap:8px}.touch-roll{position:absolute;right:max(28px,env(safe-area-inset-right));bottom:238px;display:flex;gap:8px}.touch-vertical button,.touch-roll button,.touch-bottom button{pointer-events:auto;touch-action:none;background:#122d43bf;border:1px solid #95c1d366;color:#e1eff4;border-radius:5px;min-width:48px;min-height:42px;font-size:22px;display:flex;align-items:center;justify-content:center;gap:2px;padding:5px 10px}.touch-vertical button span{font-size:9px}.touch-bottom{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:22px;right:22px;display:flex;gap:12px;justify-content:space-between}.touch-bottom button{font-size:11px;letter-spacing:.04em;min-width:85px}.touch-bottom .boost-btn{border-color:#f2c68a80;color:var(--amber)}.touch-bottom button.held,.touch-vertical button.held,.touch-roll button.held{background:#49889f99;border-color:var(--cyan)}

/* Shared, readable glass instruments. Screen-size rules live together below. */
.telemetry-top{display:contents}
.bottom-console{background:linear-gradient(135deg,#0f2133c4,#071423b8);border:1px solid #8fa6ba66;border-radius:0;box-shadow:0 2px 18px #0004;padding:10px 12px;width:min(780px,60vw)}
.weapon-cell{background:#081d35bd;border:1px solid #8093a355;padding:6px;min-width:0}
.weapon-cell.active{background:#244e5ee0;border-color:#a3e8de}
.weapon-cell>span{font-size:12px;line-height:1.4;white-space:normal;overflow:visible;text-overflow:clip;color:#eef6ff;overflow-wrap:anywhere}
.weapon-ammo b{font-size:22px;font-weight:600;color:#fff}
.weapon-ammo small{font-size:11px;color:#d3e4f4}
.console-info strong,.console-info .micro,.console-footer{font-size:12px;color:#dbf3f2}
.console-info{margin-bottom:6px}.console-footer{letter-spacing:0;margin-top:6px}
.mission-status,.flight-status,.base-readout,.flight-readout{background:#07182dcc;padding:8px 10px;border-radius:0;text-shadow:0 1px 3px #000}
.mission-status{max-width:300px}.mission-status strong{font-size:22px}
.mission-status p,.mission-status>span:last-child,.flight-readout>span:last-of-type,.base-readout>span:last-child{font-size:14px;line-height:1.4}
.mission-status .micro,.flight-status .micro,.flight-readout .micro,.base-readout .micro{font-size:12px;color:#d5e9f0}
.flight-status{width:190px}.flight-status b{font-size:32px}.base-readout{top:210px}
#radar-panel{position:absolute;right:35px;bottom:36px;width:152px;height:170px;pointer-events:none}
#radar-panel>span{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:11px;color:#e6f4fb;white-space:nowrap;background:#07182dcc;padding:2px 0}
#boss-panel{padding:6px 8px;background:#07182de6;border:1px solid #97a5b755;border-radius:0}
#boss-panel>div:first-child{font-size:13px;line-height:1.4}#boss-name{overflow-wrap:anywhere}#boss-health{flex:none}
#alert{background:#07182de6;border:1px solid #b1a28d66;font-size:13px;letter-spacing:0;max-width:min(540px,80%);line-height:1.4}
#lock-info{max-width:90%;white-space:normal;line-height:1.4}#lock-distance{font-size:12px}
.utility{width:44px;height:44px;border-radius:0}#language{font-size:12px;white-space:nowrap;padding:0}.top-actions{gap:4px}
.desktop-hint{font-size:11px}.title-intro{font-size:16px;line-height:1.7;color:#e3f0f4;margin:0 0 5px}.title-mission{font-size:13px;line-height:1.5;color:#cbdde7;margin:0 0 16px}
.overlay{align-items:safe center}.start-panel{flex-shrink:0}
.stage-select-row{display:grid;grid-template-columns:1fr;gap:7px;font-size:14px}.stage-select-row select{width:100%;max-width:100%;min-height:44px;font-size:14px}
.start-links button{min-height:44px;padding:8px 0;font-size:14px}.start-note{font-size:12px}
.touch-vertical button,.touch-roll button,.touch-bottom button{min-height:44px;min-width:44px;border-radius:0}
.touch-vertical button span{font-size:11px}
/* Compact layout applies to narrow windows and touch-enabled tablets, including iPad Pro. */
body.compact{--pad-size:112px;--pad-edge:max(12px,env(safe-area-inset-left),env(safe-area-inset-right))}
.compact .topbar{padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left))}
.compact .wordmark small,.compact .wordmark i{display:none}.compact .wordmark{font-size:12px;letter-spacing:.08em}
.compact .telemetry-top{position:absolute;top:calc(68px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 116px;grid-template-areas:'mission mission hp' 'speed altitude base' 'boss boss radar';align-items:start;gap:6px}
.compact .telemetry-top>.mission-status,.compact .telemetry-top>.flight-status,.compact .telemetry-top>.flight-readout,.compact .telemetry-top>.base-readout,.compact #boss-panel,.compact #radar-panel{position:relative;inset:auto;transform:none;width:auto;max-width:none;min-width:0;margin:0}
.compact .mission-status{grid-area:mission;min-height:72px}.compact .mission-status .micro{display:none}
.compact .mission-status strong{font-size:16px;line-height:1.3;margin:0}.compact .mission-status p{font-size:13px;line-height:1.4;margin:4px 0}.compact .mission-status>span:last-child{display:block;font-size:11px;line-height:1.4}
.compact .flight-status{grid-area:hp}.compact .flight-status b{font-size:25px}.compact .flight-status small{font-size:11px}.compact .hp-track{margin-top:5px}
.compact .speed-readout{grid-area:speed}.compact .altitude-readout{grid-area:altitude}.compact .base-readout{grid-area:base}
.compact .flight-readout{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:1px 4px;text-align:left;padding:5px 8px}
.compact .flight-readout .micro{grid-column:1 / -1;font-size:11px;letter-spacing:0}.compact .flight-readout b{font-size:22px;letter-spacing:0}.compact .flight-readout>span:last-of-type{font-size:11px}.compact .thrust-bars{display:none}
.compact .base-readout{padding:5px 8px;gap:1px;text-align:left}.compact .base-readout .micro{font-size:11px;letter-spacing:0}.compact .base-readout b{font-size:20px}.compact .base-readout>span:last-child{font-size:10px;line-height:1.3}
.compact #boss-panel{grid-area:boss;align-self:start}.compact #boss-panel>div:first-child{font-size:12px}
.compact #radar-panel{grid-area:radar;width:100%;height:112px}
.compact #alert{top:calc(50% + 72px);max-width:70%;font-size:12px;padding:6px 9px}
.compact .bottom-console{bottom:calc(58px + env(safe-area-inset-bottom));width:min(680px,calc(100% - 2 * var(--pad-size) - 2 * var(--pad-edge) - 16px));padding:7px}
.compact .weapons{gap:4px}.compact .weapon-cell{padding:4px}.compact .weapon-cell>span{font-size:12px;line-height:1.35}
.compact .weapon-ammo{gap:3px;margin-top:4px}.compact .weapon-ammo b{font-size:18px}.compact .weapon-ammo small{font-size:10px}.compact .weapon-cell.reloading .weapon-ammo b{font-size:11px;padding:0}
.compact .console-info{gap:6px;margin-bottom:5px}.compact .console-info .micro{display:block;font-size:11px;letter-spacing:0}.compact .console-info strong{display:none}.compact .console-info #clock{font-size:12px;letter-spacing:0;margin-left:auto}
.compact .console-footer{font-size:11px}.compact .desktop-hint{display:none}
body.touch .pad-wrap{width:var(--pad-size);bottom:calc(58px + env(safe-area-inset-bottom));gap:5px}
body.touch .joystick{width:var(--pad-size);height:var(--pad-size)}body.touch .left-pad{left:var(--pad-edge)}body.touch .right-pad{right:var(--pad-edge)}
body.touch .pad-title{font-size:11px;letter-spacing:0}
body.touch .touch-vertical,body.touch .touch-roll{bottom:calc(84px + var(--pad-size) + env(safe-area-inset-bottom));gap:4px}
body.touch .touch-vertical{left:var(--pad-edge)}body.touch .touch-roll{right:var(--pad-edge)}
body.touch .touch-vertical button,body.touch .touch-roll button{width:calc((var(--pad-size) - 4px)/2);min-width:0;padding:3px;font-size:19px}
body.touch .touch-vertical button{flex-direction:column;gap:0;line-height:1.05}
body.touch .touch-bottom{bottom:calc(6px + env(safe-area-inset-bottom));left:var(--pad-edge);right:var(--pad-edge);gap:8px}
body.touch .touch-bottom button{font-size:12px;min-width:80px;padding:6px}
body.compact:not(.touch) .bottom-console{width:min(760px,calc(100% - 28px));bottom:18px}
@media(max-width:600px) and (orientation:portrait){
 body.compact{--pad-size:clamp(80px,22vw,104px);--pad-edge:max(6px,env(safe-area-inset-left),env(safe-area-inset-right))}
 .compact .topbar{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));gap:4px}.compact .wordmark{font-size:11px;letter-spacing:0}.compact .top-actions{gap:2px}
 .compact .telemetry-top{top:calc(60px + env(safe-area-inset-top));left:8px;right:8px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 94px;gap:4px}
 .compact .mission-status,.compact .flight-status{padding:5px 6px}.compact .mission-status{min-height:65px}.compact .mission-status strong{font-size:14px}.compact .mission-status p{font-size:12px;margin:3px 0}.compact .flight-status .micro{font-size:11px;letter-spacing:0}.compact .flight-status b{font-size:20px}.compact .flight-status small{font-size:10px}
 .compact .flight-readout,.compact .base-readout{padding:4px 5px}.compact .flight-readout b{font-size:20px}.compact .base-readout b{font-size:18px}
 .compact #radar-panel{height:88px}.compact #radar-panel>span{font-size:10px}
 .compact #boss-panel{padding:4px 5px}.compact #boss-panel>div:first-child{font-size:11px}.compact #alert{font-size:11px;max-width:90%;top:calc(50% + 48px)}
 body.touch .bottom-console{bottom:calc(58px + env(safe-area-inset-bottom));padding:5px}
 body.touch .weapons{grid-template-columns:1fr;gap:3px}body.touch .weapon-cell{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px;padding:3px 4px 5px;position:relative}
 body.touch .weapon-cell>span{font-size:11px;line-height:1.3}body.touch .weapon-ammo{margin:0;justify-content:flex-end;min-width:22px}body.touch .weapon-ammo b{font-size:15px}body.touch .weapon-ammo small{display:none}body.touch .reload-track{position:absolute;bottom:0;left:0;margin:0}
 body.touch .weapon-cell.reloading .weapon-ammo b{font-size:10px;max-width:35px;text-align:right}
 body.touch .console-info{margin-bottom:4px;gap:2px;flex-wrap:wrap}body.touch .console-info #clock{font-size:11px}body.touch .console-footer{display:none}
 body.touch .touch-vertical button,body.touch .touch-roll button{min-height:40px;font-size:18px}body.touch .touch-vertical button span{font-size:10px}
 body.touch .touch-bottom button{min-width:76px;font-size:11px}.compact .pad-title{font-size:10px}
 .overlay{padding:68px 20px 20px;align-items:safe center}.start-panel{width:100%;max-width:420px;padding:0;margin:auto}.start-panel h1{font-size:43px}.eyebrow{font-size:10px;margin-bottom:12px}.subtitle{font-size:13px;margin:10px 0 16px}.title-intro{font-size:14px}.title-mission{font-size:12px}.mission-brief{display:none}.difficulty-button{min-height:72px;padding:7px}.difficulty legend{font-size:13px}.stage-select-row{margin:12px 0}.start-coordinate{display:none}.start-links{gap:16px;margin-top:8px}.start-links>span{font-size:10px}.start-note{font-size:11px;margin-top:4px}
}
@media(orientation:landscape) and (max-height:600px){
 body.compact{--pad-size:88px;--pad-edge:max(8px,env(safe-area-inset-left),env(safe-area-inset-right))}
 .compact .topbar{padding-top:calc(4px + env(safe-area-inset-top))}
 .compact .telemetry-top{top:calc(54px + env(safe-area-inset-top));left:var(--pad-edge);right:var(--pad-edge);grid-template-columns:minmax(140px,1.6fr) 76px repeat(3,minmax(64px,1fr));grid-template-areas:'mission radar speed altitude hp' 'mission radar boss boss base';gap:4px}
 .compact .mission-status{padding:5px 6px;min-height:0}.compact .mission-status strong{font-size:13px}.compact .mission-status p{font-size:11px;margin:3px 0}.compact .mission-status>span:last-child{font-size:10px}
 .compact .flight-status{padding:3px 6px}.compact .flight-status .micro{font-size:10px;letter-spacing:0}.compact .flight-status b{font-size:21px}.compact .flight-status small{font-size:10px}
 .compact .flight-readout{padding:3px 6px}.compact .flight-readout b{font-size:20px}.compact .flight-readout .micro{font-size:10px}.compact .flight-readout>span:last-of-type{font-size:10px}
 .compact .base-readout{padding:3px 5px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 5px}.compact .base-readout .micro{font-size:10px}.compact .base-readout b{font-size:16px}.compact .base-readout>span:last-child{display:none}
 .compact #boss-panel{padding:3px 5px}.compact #boss-panel>div:first-child{font-size:11px}.compact #radar-panel{height:82px}.compact #radar-panel>span{font-size:9px}
 .compact #alert{top:calc(50% - 30px);max-width:52%;font-size:11px;padding:4px 7px}
 body.touch .bottom-console{bottom:calc(6px + env(safe-area-inset-bottom));padding:5px}
 body.touch .console-footer{display:none}body.touch .console-info{margin-bottom:3px}body.touch .weapon-cell{padding:3px}body.touch .weapon-cell>span{font-size:11px}body.touch .weapon-ammo b{font-size:16px}body.touch .weapon-ammo small{display:none}
 body.touch .touch-bottom{justify-content:space-between}body.touch .touch-bottom button:nth-child(2){position:absolute;left:0;bottom:48px}body.touch .touch-bottom button:last-child{margin-left:auto}
 body.touch .pad-wrap{bottom:calc(106px + env(safe-area-inset-bottom))}body.touch .touch-vertical,body.touch .touch-roll{bottom:calc(132px + var(--pad-size) + env(safe-area-inset-bottom))}
 body.touch .touch-vertical button,body.touch .touch-roll button{min-height:38px;font-size:17px}body.touch .pad-title{font-size:10px}
 .overlay{padding:58px max(24px,env(safe-area-inset-right)) 18px max(24px,env(safe-area-inset-left));align-items:flex-start}.start-panel{width:min(600px,100%);padding:0;margin:auto}.start-panel h1{font-size:34px}.eyebrow{margin-bottom:6px;font-size:10px}.subtitle{font-size:12px;margin:6px 0 8px}.title-intro{font-size:13px;line-height:1.4}.title-mission{font-size:12px;margin-bottom:8px}.mission-brief,.start-coordinate,.start-note{display:none}.difficulty-button{min-height:54px;padding:6px;grid-template-columns:24px 1fr}.difficulty-button svg{grid-row:span 2}.difficulty legend{font-size:12px;margin-bottom:5px}.stage-select-row{margin:8px 0;grid-template-columns:110px 1fr;align-items:center}.stage-select-row select{font-size:13px}.launch-button{min-height:44px;padding:10px 15px}.start-links{margin-top:4px}
}
@media(orientation:landscape) and (max-height:420px){
 body.compact{--pad-size:72px}
 body.touch .pad-wrap{bottom:calc(52px + env(safe-area-inset-bottom))}body.touch .touch-vertical,body.touch .touch-roll{bottom:calc(78px + var(--pad-size) + env(safe-area-inset-bottom))}
 body.touch .touch-bottom button:nth-child(2){left:calc(var(--pad-size) + 6px);bottom:0;min-width:64px}
 body.touch .bottom-console{bottom:calc(54px + env(safe-area-inset-bottom));width:calc(100% - 2 * var(--pad-size) - 2 * var(--pad-edge) - 20px)}
 body.touch .touch-bottom button{min-width:68px;font-size:11px}
 .compact .telemetry-top{grid-template-columns:minmax(130px,1.5fr) 64px repeat(3,minmax(60px,1fr))}.compact #radar-panel{height:74px}
 .compact .weapon-cell>span{font-size:10px}.compact .weapon-ammo b{font-size:15px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto;transition:none!important}}

/* Notices temporarily take the objective's place, keeping the aiming area clear. */
.mission-status #alert{position:static;transform:none;width:auto;max-width:none;margin-top:4px;padding:0;border:0;background:none;text-align:left;letter-spacing:0;font-size:12px;line-height:1.4;color:#ffe2b4}
.mission-status:has(#alert:not(:empty)) #objective,.mission-status:has(#alert:not(:empty)) #wave-count{display:none}
.flight-status>div:not(.hp-track){display:flex;align-items:baseline;gap:2px;white-space:nowrap}
@media(min-width:601px) and (min-height:601px){
 .compact .telemetry-top{grid-template-columns:minmax(0,1fr) 140px 140px 126px;grid-template-areas:'mission speed altitude hp' 'boss boss radar base'}
 .compact .telemetry-top>.mission-status{width:min(100%,360px)}.compact #boss-panel{width:min(100%,420px)}
}
@media(max-width:600px) and (max-height:650px) and (orientation:portrait){
 .compact #radar-panel{height:72px}.compact .mission-status{min-height:62px}.compact .mission-status #alert{font-size:11px}
}

/* Keep translated pad titles to one line; reserve a narrow map on short phones. */
html[lang=en] .compact .pad-title{font-size:9px;white-space:nowrap;line-height:14px}
@media(max-width:600px) and (max-height:650px) and (orientation:portrait){
 .compact #radar-panel{width:80px;justify-self:end}
}
@media(orientation:landscape) and (max-height:340px){
 body.compact{--pad-size:64px}
 .compact #radar-panel{height:60px}
 .compact .mission-status #objective{display:none}.compact .mission-status strong{font-size:12px}.compact .mission-status #wave-count{font-size:9px}.compact .mission-status #alert{font-size:10px}
 .compact .flight-status .micro{font-size:9px}.compact .flight-status b{font-size:18px}
 .compact .base-readout .micro{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .compact .base-readout b::before{content:'基地 ';font-size:10px}html[lang=en] .compact .base-readout b::before{content:'BASE '}
 body.touch .touch-vertical,body.touch .touch-roll{bottom:calc(76px + var(--pad-size) + env(safe-area-inset-bottom))}
}

.weapon-range{display:contents}
#energy-status{font-size:12px;line-height:1.4;color:#ffe2b4;margin-top:4px}
.mission-status:has(#energy-status:not([hidden])) #objective,.mission-status:has(#energy-status:not([hidden])) #wave-count,.mission-status:has(#energy-status:not([hidden])) #alert{display:none}
@media(max-width:340px) and (orientation:portrait){
 body.compact{--pad-size:72px}
 body.touch .bottom-console{width:calc(100% - 2 * var(--pad-size) - 2 * var(--pad-edge) - 8px)}
 body.touch .weapon-range{display:block;font-size:10px;line-height:1.15;color:#d1e6f0}
 .compact #radar-panel{width:72px}
 .compact .mission-status #energy-status{font-size:11px}
}

@media(orientation:landscape) and (max-height:340px){.compact .flight-status .micro{line-height:1.1}}
@media(max-width:340px) and (orientation:portrait){body.touch .bottom-console{bottom:calc(52px + env(safe-area-inset-bottom))}}

/* ---- ui6 (2026-09-12): weapon short names, ETA, flip in the top bar, translucent pause, phone layouts ---- */
.wshort,.wcode{display:none}
html[lang=en] .weapon-cell .wfull{display:none}html[lang=en] .weapon-cell .wshort{display:inline}
#eta{display:block;font-size:13px;line-height:1.4;color:var(--amber);font-weight:600;font-variant-numeric:tabular-nums}
#eta[hidden]{display:none}
.mission-status strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact .mission-status strong{font-size:13px}
.flip-btn{display:none;width:auto!important;padding:0 10px!important;font-size:12px;white-space:nowrap}
body.touch.in-sortie .flip-btn{display:grid}
#touch-controls{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
dialog.pause-card{width:min(340px,calc(100vw - 28px));background:rgba(10,24,38,.52);border-color:#9fb6c455;box-shadow:0 10px 40px #0005;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);padding:14px 16px}
dialog.pause-card::backdrop{background:rgba(3,12,22,.14);-webkit-backdrop-filter:none;backdrop-filter:none}
dialog.pause-card #modal-content p{font-size:12px;margin:8px 0;color:#e2edf2;text-shadow:0 1px 2px #000}
dialog.pause-card .launch-button{min-height:44px;padding:10px 16px}
dialog.pause-card .modal-actions{margin-top:10px;gap:8px}
dialog.pause-card .secondary-button{margin-top:8px;padding:10px;background:rgba(8,20,32,.45)}
@media(max-width:600px) and (orientation:portrait){
 .compact .telemetry-top{grid-template-columns:repeat(4,minmax(0,1fr)) 84px;grid-template-areas:'mission mission mission mission radar' 'speed altitude hp base radar' 'boss boss boss boss boss';gap:4px}
 .compact #radar-panel{height:84px;width:84px;justify-self:end}
 .compact .mission-status{min-height:0}
 .compact .mission-status strong{font-size:12px}
 .compact .mission-status p{font-size:11px;margin:2px 0}
 .compact .mission-status>span:last-child{font-size:10px}
 #eta{font-size:11px}
 .compact .flight-status{padding:3px 5px}
 .compact .flight-status .micro{font-size:9px}
 .compact .flight-status b{font-size:16px}
 .compact .flight-status small{display:none}
 .compact .flight-readout,.compact .base-readout{padding:3px 5px}
 .compact .flight-readout .micro,.compact .base-readout .micro{font-size:9px}
 .compact .flight-readout b{font-size:16px}
 .compact .base-readout b{font-size:15px}
 .compact .flight-readout>span:last-of-type{font-size:9px}
 .compact .base-readout>span:last-child{display:none}
 body.touch .weapons{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 body.touch .weapon-cell{grid-template-columns:1fr;padding:2px 4px 4px}
 body.touch .weapon-cell .wfull{display:none}
 body.touch .weapon-cell .wshort{display:inline}
 body.touch .weapon-cell>span{font-size:10px;white-space:nowrap;overflow:hidden}
 body.touch .weapon-ammo{justify-content:flex-start}
 body.touch .weapon-ammo b{font-size:14px}
 body.touch .console-info .micro{display:none}
}
@media(max-width:360px) and (orientation:portrait){
 .compact .top-actions .utility{width:38px;height:38px}
 .compact .flip-btn{padding:0 6px!important;font-size:11px}
}
/* Landscape phones: status only in the top and bottom quarters, nothing opaque over the centre third. */
@media(orientation:landscape) and (max-height:600px){
 body.compact{--band:33.34vw;--cell:calc((var(--band) - var(--pad-edge) - 12px) / 4)}
 .compact .wordmark{display:none}
 .compact .topbar{justify-content:flex-end}
 .compact .top-actions .utility{width:36px;height:36px}
 .compact .telemetry-top{display:block;position:absolute;inset:0;pointer-events:none}
 .compact .telemetry-top>.mission-status,.compact .telemetry-top>.flight-status,.compact .telemetry-top>.flight-readout,.compact .telemetry-top>.base-readout,.compact #boss-panel,.compact #radar-panel{position:absolute;margin:0;transform:none;min-width:0;max-width:none;inset:auto}
 .compact #radar-panel{left:var(--pad-edge);top:calc(6px + env(safe-area-inset-top));width:64px;height:64px}
 .compact #radar-panel>span{display:none}
 .compact .telemetry-top>.mission-status{left:calc(var(--pad-edge) + 70px);top:calc(6px + env(safe-area-inset-top));width:calc(var(--band) - var(--pad-edge) - 74px);min-height:64px;padding:4px 6px}
 .compact .mission-status strong{font-size:12px}
 .compact .mission-status p{font-size:10px;margin:1px 0}
 .compact .mission-status>span:last-child{font-size:10px}
 #eta{font-size:11px}
 .compact #boss-panel{left:var(--pad-edge);top:calc(74px + env(safe-area-inset-top));width:calc(var(--band) - var(--pad-edge) - 4px)}
 .compact .telemetry-top>.flight-readout,.compact .telemetry-top>.flight-status,.compact .telemetry-top>.base-readout{top:calc(46px + env(safe-area-inset-top));width:var(--cell);padding:3px 5px;display:block}
 .compact .telemetry-top>.speed-readout{right:calc(var(--pad-edge) + 3 * var(--cell) + 12px)}
 .compact .telemetry-top>.altitude-readout{right:calc(var(--pad-edge) + 2 * var(--cell) + 8px)}
 .compact .telemetry-top>.flight-status{right:calc(var(--pad-edge) + var(--cell) + 4px)}
 .compact .telemetry-top>.base-readout{right:var(--pad-edge)}
 .compact .flight-readout .micro,.compact .flight-status .micro,.compact .base-readout .micro{display:block;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .compact .flight-readout b,.compact .flight-status b{font-size:16px}
 .compact .base-readout b{font-size:14px}
 .compact .flight-readout>span:last-of-type,.compact .flight-status small,.compact .base-readout>span:last-child,.compact .hp-track{display:none}
 .compact .flight-status>div:not(.hp-track){display:block}
 body.touch .bottom-console{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) var(--band) repeat(3,minmax(0,1fr));gap:0 4px;left:calc(var(--pad-edge) + var(--pad-size) + 6px);right:calc(var(--pad-edge) + var(--pad-size) + 6px);width:auto;transform:none;bottom:calc(6px + env(safe-area-inset-bottom));padding:0;background:none;border:0;box-shadow:none}
 body.touch .bottom-console>.console-info,body.touch .bottom-console>.weapons{display:contents}
 body.touch .console-info .micro,body.touch .console-info strong,body.touch .console-footer{display:none}
 body.touch #weapon-0{grid-column:1}
 body.touch #weapon-1{grid-column:2}
 body.touch #weapon-2{grid-column:3}
 body.touch #weapon-3{grid-column:5}
 body.touch #weapon-4{grid-column:6}
 body.touch #clock{grid-column:7;grid-row:1;align-self:stretch;display:grid;place-items:center;margin:0;background:#081d35bd;border:1px solid #8093a355;font-size:12px}
 body.touch .weapon-cell{grid-row:1;display:block;padding:3px 4px}
 body.touch .weapon-cell .wfull{display:none}
 body.touch .weapon-cell .wshort{display:inline}
 body.touch .weapon-cell>span{display:block;font-size:10px;white-space:nowrap;overflow:hidden}
 body.touch .weapon-ammo{margin:1px 0 0}
 body.touch .weapon-ammo b{font-size:15px}
 body.touch .touch-bottom{left:var(--pad-edge);right:var(--pad-edge);bottom:calc(6px + env(safe-area-inset-bottom));justify-content:space-between}
 body.touch .touch-bottom button{position:static!important;margin:0!important;width:var(--pad-size);min-width:0!important;min-height:40px}
 body.touch .pad-wrap{bottom:calc(52px + env(safe-area-inset-bottom))}
 body.touch .touch-vertical,body.touch .touch-roll{bottom:calc(76px + var(--pad-size) + env(safe-area-inset-bottom))}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:700px){
 body.touch .weapon-cell .wshort{display:none}
 body.touch .weapon-cell .wcode{display:inline}
}
@media(orientation:landscape) and (max-height:340px){
 .compact .top-actions .utility{width:32px;height:32px}
 .compact .telemetry-top>.flight-readout,.compact .telemetry-top>.flight-status,.compact .telemetry-top>.base-readout{top:calc(40px + env(safe-area-inset-top))}
 .compact #radar-panel{width:56px;height:56px}
 .compact .telemetry-top>.mission-status{left:calc(var(--pad-edge) + 62px);width:calc(var(--band) - var(--pad-edge) - 66px);min-height:56px}
 .compact #boss-panel{top:calc(64px + env(safe-area-inset-top))}
}

/* ---- ui6b (2026-09-12): the HP gauge is the most prominent instrument ---- */
.flight-status{border:0}
.flight-status .micro{color:var(--cyan);font-weight:700}
.flight-status b{font-size:38px;font-weight:700;color:#fff;letter-spacing:.02em}
.hp-track{height:7px;background:#23384a;margin-top:6px;border:1px solid #a3e8de55}
.hp-track i{box-shadow:0 0 8px #a3e8dea0}
.flight-status.hp-low{border-left-color:#ff7a5c;animation:hpPulse 1s ease-in-out infinite}
.flight-status.hp-low b{color:#ffb4a0}
@keyframes hpPulse{50%{background:#3a121acc}}
@media(prefers-reduced-motion:reduce){.flight-status.hp-low{animation:none}}
.compact .flight-status b{font-size:26px}
.compact .hp-track{height:6px}
@media(max-width:600px) and (orientation:portrait){
 .compact .telemetry-top{top:calc(52px + env(safe-area-inset-top));grid-template-areas:'mission mission hp hp radar' 'speed altitude base base radar' 'boss boss boss boss boss'}
 .compact .flight-status{padding:4px 6px}
 .compact .flight-status .micro{font-size:10px}
 .compact .flight-status b{font-size:24px}
 .compact .flight-status small{display:inline;font-size:10px}
 .compact .hp-track{display:block;height:6px;margin-top:3px}
}
@media(orientation:landscape) and (max-height:600px){
 .compact .telemetry-top>.flight-status{right:var(--pad-edge);width:calc(2 * var(--cell) + 4px);top:calc(44px + env(safe-area-inset-top));padding:3px 6px}
 .compact .flight-status b{font-size:22px}
 .compact .flight-status small{display:inline;font-size:10px}
 .compact .flight-status .hp-track{display:block;height:5px;margin-top:2px}
 .compact .telemetry-top>.base-readout{right:calc(var(--pad-edge) + 2 * var(--cell) + 8px)}
 .compact .telemetry-top>.speed-readout,.compact .telemetry-top>.altitude-readout{right:calc(var(--pad-edge) + 3 * var(--cell) + 12px);padding:1px 5px}
 .compact .telemetry-top>.altitude-readout{top:calc(68px + env(safe-area-inset-top))}
 .compact .telemetry-top>.speed-readout .micro,.compact .telemetry-top>.altitude-readout .micro{display:none}
 .compact .telemetry-top>.speed-readout b,.compact .telemetry-top>.altitude-readout b{font-size:13px}
 .compact .telemetry-top>.speed-readout>span:last-of-type,.compact .telemetry-top>.altitude-readout>span:last-of-type{display:inline;font-size:9px;margin-left:2px}
}
@media(orientation:landscape) and (max-height:340px){
 .compact .telemetry-top>.flight-status{top:calc(38px + env(safe-area-inset-top))}
 .compact .flight-status b{font-size:18px}
 .compact .telemetry-top>.altitude-readout{top:calc(60px + env(safe-area-inset-top))}
}
/* ---- ui6c: keep status blocks inside the top quarter on narrow phones (no wrapping) ---- */
@media(orientation:landscape) and (max-height:600px){
 .compact .telemetry-top>.mission-status>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .compact .base-readout b{font-size:12px;white-space:nowrap}
 .compact .base-readout b small{font-size:9px}
 .compact .telemetry-top>.base-readout .micro{font-size:8px}
}
@media(max-width:600px) and (orientation:portrait){
 .compact .mission-status>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .compact .flight-readout,.compact .base-readout{padding:2px 5px}
 .compact .base-readout b{white-space:nowrap}
}
/* ---- ui6d: compact pause card so the battle stays visible ---- */
dialog.pause-card .dialog-header{margin-bottom:4px}
dialog.pause-card .dialog-header h2{font-size:18px}
dialog.pause-card .dialog-header .utility{width:36px;height:36px}
dialog.pause-card #modal-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
dialog.pause-card #modal-content>p{grid-column:1 / -1;margin:0}
dialog.pause-card #modal-content>.launch-button,dialog.pause-card #pause-home{grid-column:1 / -1}
dialog.pause-card .modal-actions{display:contents}
dialog.pause-card .secondary-button,dialog.pause-card .launch-button{margin:0;min-height:40px}
@media(orientation:landscape) and (max-height:600px){
 dialog.pause-card{width:min(560px,calc(100vw - 28px));padding:10px 12px}
 dialog.pause-card #modal-content{grid-template-columns:1.4fr repeat(3,minmax(0,1fr))}
 dialog.pause-card #modal-content>.launch-button,dialog.pause-card #pause-home{grid-column:auto}
 dialog.pause-card .launch-button{padding:8px 12px;font-size:13px}
 dialog.pause-card .secondary-button{padding:8px 6px;font-size:12px}
}

/* ---- ui6e (quality gate): pause-card text stays >=4.5:1 even over white cloud; landscape buttons back to 40px ---- */
dialog.pause-card{background:rgba(10,24,38,.6)}
dialog.pause-card h2,dialog.pause-card #modal-content p{text-shadow:0 1px 2px #000,0 0 6px #000a}
@media(orientation:landscape) and (max-height:600px) and (min-height:341px){
 .compact .top-actions .utility{width:40px;height:40px}
}
/* ---- ui6f: narrow landscape phones keep HP and flight data inside the top quarter ---- */
@media(orientation:landscape) and (max-height:600px){
 .compact .telemetry-top>.speed-readout,.compact .telemetry-top>.altitude-readout{white-space:nowrap;overflow:hidden;line-height:1.2}
}
@media(orientation:landscape) and (max-height:420px){
 .compact .flight-status .micro{font-size:8px;line-height:1.2}
 .compact .flight-status b{font-size:20px;line-height:1.1}
 .compact .flight-status .hp-track{margin-top:1px}
 .compact .telemetry-top>.altitude-readout{top:calc(66px + env(safe-area-inset-top))}
}
@media(orientation:landscape) and (max-height:340px){
 .compact .telemetry-top>.flight-status{top:calc(36px + env(safe-area-inset-top))}
 .compact .flight-status b{font-size:17px}
 .compact .telemetry-top>.speed-readout{top:calc(36px + env(safe-area-inset-top))}
 .compact .telemetry-top>.altitude-readout{top:calc(56px + env(safe-area-inset-top))}
}
/* ---- ui7 (2026-09-12): bottom-centre action buttons ---- */
.touch-bottom .center-actions{display:flex;gap:6px;align-items:stretch;pointer-events:none}
.touch-bottom .center-actions button{pointer-events:auto;touch-action:none;min-width:58px;min-height:44px;padding:4px 8px;font-size:12px;line-height:1.15;white-space:normal}
body.touch .touch-bottom .center-actions button{width:auto;min-width:58px}
#bazooka{border-color:#f2c68a99;color:#ffe3b0}
#bazooka.armed{background:#5a3f14cc;border-color:#ffcf6b}
#bazooka:disabled,#evade:disabled{opacity:.42;cursor:default}
@media(max-width:380px) and (orientation:portrait){.touch-bottom .center-actions{gap:4px}.touch-bottom .center-actions button{min-width:0;padding:3px 5px;font-size:10px}}
@media(orientation:landscape) and (max-height:600px){body.touch .touch-bottom .center-actions button{min-height:40px;font-size:11px;padding:3px 6px}}

/* ---- ui7b (2026-09-12): result and start screens fit one screen; scrolling is never blocked outside a sortie ---- */
/* #game used touch-action:none everywhere, which can cancel the overlays' pan-y on real phones. Only lock it during a sortie. */
#game{touch-action:auto}
body.in-sortie #game{touch-action:none}
.overlay{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.result-panel{display:flex;flex-direction:column;align-items:stretch}
.result-panel .launch-button,.result-panel .secondary-button{min-height:44px}
@media(orientation:landscape) and (max-height:600px){
 .result-overlay{padding:10px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left));align-items:center}
 .result-panel{max-width:min(620px,100%);display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'code code' 'title title' 'desc desc' 'stats stats' 'next home';column-gap:10px;text-align:center}
 .result-panel .eyebrow{grid-area:code;margin:0 0 4px;font-size:10px}
 .result-panel h2{grid-area:title;font-size:24px;margin:0 0 4px}
 .result-panel p{grid-area:desc;font-size:12px;line-height:1.5;margin:0 0 6px}
 #result-stats{grid-area:stats;padding:4px 0 10px}
 #result-stats span{font-size:11px}#result-stats b{font-size:20px;margin-top:2px}
 #result-next{grid-area:next;margin:0}#result-home{grid-area:home;margin:0}
 .result-panel .launch-button{min-height:42px;padding:8px 14px;font-size:13px}.result-panel .secondary-button{min-height:42px;padding:8px;font-size:13px}
}
@media(orientation:landscape) and (max-height:340px){
 .result-panel h2{font-size:20px}.result-panel p{font-size:11px;margin-bottom:4px}#result-stats{padding:2px 0 8px}#result-stats b{font-size:17px}
}
/* Start screen on short landscape phones: the launch button must be visible without scrolling. */
@media(orientation:landscape) and (max-height:420px){
 .start-overlay{padding-top:calc(46px + env(safe-area-inset-top));padding-bottom:8px}
 .start-panel h1{font-size:28px}.start-panel .eyebrow{margin-bottom:2px}.subtitle{margin:2px 0 4px}
 .title-intro{font-size:12px;margin-bottom:2px}.title-mission{display:none}
 .difficulty legend{margin-bottom:4px}.difficulty-button{min-height:44px;padding:4px}
 .stage-select-row{margin:6px 0;grid-template-columns:auto 1fr;align-items:center}.stage-select-row select{min-height:38px}
 .launch-button{min-height:42px;padding:8px 14px}.start-links{margin-top:4px}.start-links button{min-height:36px;padding:4px 0}
}
@media(orientation:landscape) and (max-height:340px){
 .start-panel h1{font-size:24px}.title-intro,.subtitle{display:none}.start-panel .eyebrow{display:none}
 .difficulty-button{min-height:40px}.difficulty-button small{display:none}
}
/* A soft fade at the bottom of any overlay that still scrolls tells the player there is more below. */
.overlay::after{content:'';position:sticky;bottom:-40px;display:block;height:0;pointer-events:none}
/* ui7c: centre action buttons keep a 48px touch target in landscape (overrides the pad-width rule) */
@media(orientation:landscape) and (max-height:600px){body.touch .touch-bottom .center-actions button{min-width:48px!important;width:auto!important}}

/* Weapon streaks stay visible over the console without intercepting controls. */
#weapon-fx{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:4;pointer-events:none}
.viewer-link{display:block;width:100%;margin-top:12px;padding:12px 14px;border:1px solid rgba(163,232,222,.46);border-radius:5px;background:rgba(29,69,78,.38);color:#d6fff6;text-decoration:none;text-align:center;font-size:14px;font-weight:700;line-height:1.35;transition:background .15s ease,border-color .15s ease}
.viewer-link:hover,.viewer-link:focus-visible{background:rgba(44,100,106,.58);border-color:var(--cyan)}
@media(prefers-reduced-motion:reduce){.viewer-link{transition:none}}

/* Character controls: native buttons remain clickable through the HUD layer. */
.weapon-cell,.weapon-auto,.frame-actions button{pointer-events:auto;touch-action:none;text-align:left;color:#eef6ff}
.weapon-cell{font:inherit;cursor:pointer}.weapon-cell[aria-pressed=true]{box-shadow:inset 0 3px #e4fff7}
.weapon-auto{display:grid;place-items:center;background:#10283de8;border:1px solid #8093a3;min-height:44px;font-size:12px;text-align:center}
.weapon-auto[aria-pressed=true]{background:#244e5e;border-color:#a3e8de;box-shadow:inset 0 3px #e4fff7}
.weapons{grid-template-columns:repeat(5,minmax(0,1fr)) 56px}
.frame-actions{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);display:flex;gap:6px;width:220px;max-width:calc(100vw - 24px)}
.frame-actions button{flex:1;min-width:0;min-height:44px;background:#10283ded;border:1px solid #97bbc7;padding:6px 8px;text-align:center;font-size:13px;line-height:1.3;border-radius:0}
.frame-actions small{display:block;font-size:10px;color:#c8e7ef;white-space:nowrap}.frame-actions button[aria-pressed=true]{border-color:#a3e8de}
.weapon-cell:hover,.weapon-auto:hover,.frame-actions button:hover{background:#315868}
body:not(.in-sortie) .frame-actions{visibility:hidden}
@media(max-width:600px) and (orientation:portrait){body.touch .weapons{grid-template-columns:repeat(3,minmax(0,1fr))}body.touch .weapon-cell{min-height:44px}body.touch .weapon-auto{min-height:44px;font-size:12px}.frame-actions{width:200px}}
@media(orientation:landscape) and (max-height:600px){
 body.touch .bottom-console{display:block;bottom:calc(54px + env(safe-area-inset-bottom));background:#07182dcc;padding:4px;border:1px solid #8093a355}
 body.touch .bottom-console>.console-info{display:none}body.touch .bottom-console>.weapons{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
 body.touch .weapon-cell,body.touch #weapon-0,body.touch #weapon-1,body.touch #weapon-2,body.touch #weapon-3,body.touch #weapon-4,body.touch .weapon-auto{grid-column:auto;grid-row:auto;min-height:44px}
 body.touch .weapon-auto{font-size:11px}.frame-actions{position:fixed;top:calc(6px + env(safe-area-inset-top));bottom:auto;left:50%;width:190px}.frame-actions button{font-size:12px}
}

@media(max-width:380px) and (orientation:portrait){
 body.touch .touch-bottom{gap:4px;left:6px;right:6px}
 body.touch .touch-bottom>button{flex:1;min-width:0!important;width:0!important;padding:3px;font-size:10px}
 body.touch .touch-bottom .center-actions{flex:3;gap:3px;min-width:0}
 body.touch .touch-bottom .center-actions button{flex:1;min-width:0!important;width:0!important;font-size:10px;padding:3px;overflow-wrap:anywhere}
 body.touch .frame-actions{width:152px}
 body.touch .frame-actions button{padding:4px;font-size:12px}
}
/* Keep form/view controls clear of the player's silhouette. */
.frame-actions{position:fixed;top:94px;bottom:auto;left:50%}
@media(max-width:600px) and (orientation:portrait){.frame-actions{top:calc(172px + env(safe-area-inset-top))}}
@media(orientation:landscape) and (max-height:600px){.frame-actions{top:calc(6px + env(safe-area-inset-top))}}
.compact .frame-actions{top:calc(210px + env(safe-area-inset-top))}
@media(max-width:600px) and (orientation:portrait){.compact .frame-actions{top:calc(172px + env(safe-area-inset-top))}}
@media(orientation:landscape) and (max-height:600px){.compact .frame-actions{top:calc(6px + env(safe-area-inset-top))}body.touch .touch-vertical button{padding-left:2px;padding-right:2px}body.touch .touch-vertical button span{font-size:9px}}
@media(min-width:601px) and (orientation:portrait){.compact .frame-actions{width:190px}}

/* Mobile flight controls share the joystick anchors in both orientations. */
body.touch{--aux-bottom:calc(84px + var(--pad-size) + env(safe-area-inset-bottom));--aux-height:40px}
body.touch .touch-vertical,body.touch .touch-roll{bottom:var(--aux-bottom);height:var(--aux-height)}
body.touch .frame-actions{display:contents}
body.touch .frame-actions button{position:fixed;top:auto;bottom:calc(var(--aux-bottom) + var(--aux-height) + 6px);width:var(--pad-size);min-height:44px;padding:4px;font-size:12px;transform:none;white-space:nowrap}
body.touch #view-toggle{left:var(--pad-edge);right:auto}
body.touch #transform-toggle{right:var(--pad-edge);left:auto}
body.touch .frame-actions small{font-size:9px;letter-spacing:0}
body.touch .flight-readout b,body.touch .flight-status b,body.touch .base-readout b,body.touch .weapon-ammo b,body.touch #boss-health,body.touch #clock{white-space:nowrap;overflow-wrap:normal;word-break:normal;letter-spacing:0;font-variant-numeric:tabular-nums}
body.touch.compact .flight-readout b{font-size:12px;line-height:1.2;min-width:max-content}
body.touch.compact .base-readout b{font-size:13px;line-height:1.2}
body.touch.compact .flight-status b{font-size:19px;line-height:1.1}
body.touch.compact .flight-readout>span:last-of-type{font-size:8px;white-space:nowrap}
@media(orientation:portrait){
 body.touch .telemetry-top>.flight-readout{grid-template-columns:minmax(max-content,1fr) auto;column-gap:2px;padding-left:4px;padding-right:4px}
 body.touch.compact .flight-readout b{font-size:11px}
 body.touch.compact .base-readout b small{font-size:9px}
}
/* Six weapon choices flank the bottom action group, leaving the model unobstructed. */
@media(orientation:landscape) and (max-height:600px){
 body.touch{--aux-bottom:calc(76px + var(--pad-size) + env(safe-area-inset-bottom));--aux-height:40px;--center-actions-width:clamp(144px,25vw,216px);--bottom-gap:6px}
 body.touch .frame-actions button{bottom:var(--aux-bottom);height:var(--aux-height);min-height:40px;width:80px;font-size:11px}
 body.touch #view-toggle{left:calc(var(--pad-edge) + var(--pad-size) + 6px);right:auto}
 body.touch #transform-toggle{right:calc(var(--pad-edge) + var(--pad-size) + 6px);left:auto}
 body.touch .bottom-console{display:block;left:calc(var(--pad-edge) + var(--pad-size) + var(--bottom-gap));right:calc(var(--pad-edge) + var(--pad-size) + var(--bottom-gap));bottom:calc(6px + env(safe-area-inset-bottom));width:auto;transform:none;padding:0;background:none;border:0;box-shadow:none;pointer-events:none}
 body.touch .bottom-console>.console-info,body.touch .bottom-console>.console-footer{display:none}
 body.touch .bottom-console>.weapons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) calc(var(--center-actions-width) + 2 * var(--bottom-gap)) repeat(3,minmax(0,1fr));gap:0 3px;align-items:stretch}
 body.touch #weapons>.weapon-cell,body.touch #weapons>.weapon-auto{grid-row:1;min-height:44px;min-width:0;padding:3px;position:relative;background:#10283ded;pointer-events:auto}
 body.touch #weapons>#weapon-0{grid-column:1}
 body.touch #weapons>#weapon-1{grid-column:2}
 body.touch #weapons>#weapon-2{grid-column:3}
 body.touch #weapons>#weapon-3{grid-column:5}
 body.touch #weapons>#weapon-4{grid-column:6}
 body.touch #weapons>#weapon-auto{grid-column:7;font-size:11px}
 body.touch #weapons>.weapon-cell.active,body.touch #weapons>.weapon-auto[aria-pressed=true]{background:#244e5e}
 body.touch .weapon-cell>span{font-size:9px;line-height:1.1;white-space:nowrap}
 body.touch .weapon-ammo{margin-top:2px}
 body.touch .weapon-ammo b{font-size:12px}
 body.touch .touch-bottom{display:grid;grid-template-columns:var(--pad-size) minmax(0,1fr) var(--center-actions-width) minmax(0,1fr) var(--pad-size);gap:0;left:var(--pad-edge);right:var(--pad-edge);bottom:calc(6px + env(safe-area-inset-bottom));align-items:stretch}
 body.touch .touch-bottom>.boost-btn{grid-column:1}
 body.touch .touch-bottom>.center-actions{grid-column:3;gap:4px;min-width:0;width:100%;display:grid;grid-template-columns:1fr 1.35fr 1fr}
 body.touch .touch-bottom>button:last-child{grid-column:5}
 body.touch .touch-bottom>button,body.touch .touch-bottom .center-actions button{width:100%!important;min-width:0!important;min-height:44px;padding:3px;font-size:10px;line-height:1.15}
}
@media(orientation:landscape) and (max-width:640px){
 body.touch{--center-actions-width:144px;--bottom-gap:4px}
 body.touch .frame-actions button{width:68px}
 body.touch .weapon-cell .wshort{display:none}
 body.touch .weapon-cell .wcode{display:inline}
}

/* Small landscape: reserve actual content widths for values and units. */
@media(orientation:landscape) and (max-height:600px) and (max-width:640px){
 body.touch.compact .telemetry-top>.flight-status{right:var(--pad-edge);width:92px}
 body.touch.compact .telemetry-top>.base-readout{right:calc(var(--pad-edge) + 96px);width:66px;padding:2px 4px;display:block}
 body.touch.compact .telemetry-top>.speed-readout,body.touch.compact .telemetry-top>.altitude-readout{right:calc(var(--pad-edge) + 166px);width:78px;padding:1px 4px;white-space:nowrap;overflow:hidden}
 body.touch.compact .telemetry-top>.base-readout .micro{display:block;position:static;width:auto;height:auto;clip:auto;clip-path:none;overflow:visible;font-size:8px;line-height:1.2;white-space:nowrap}
 body.touch.compact .telemetry-top>.base-readout b::before{content:none}
 body.touch.compact .telemetry-top>.base-readout b{display:block;font-size:12px;line-height:1.2;white-space:nowrap}
 body.touch.compact .telemetry-top>.base-readout b small{font-size:9px;white-space:nowrap}
 body.touch.compact .telemetry-top>.flight-status b{font-size:17px}
 body.touch.compact .telemetry-top>.flight-status small{font-size:9px}
}
/* HP priority: a bright surface and larger number, without a side stripe. */
body .flight-status{border:0;background:#fff0b3;color:#102634;text-shadow:none;box-shadow:0 3px 16px #03101dcc}
body .flight-status .micro{color:#314331;font-weight:700;letter-spacing:.02em}
body .flight-status b{font-size:48px;line-height:1.05;font-weight:800;letter-spacing:-.03em;color:#102634;white-space:nowrap;overflow-wrap:normal;word-break:normal}
body .flight-status small{color:#45513b;font-weight:700;white-space:nowrap}
body .flight-status .hp-track{height:9px;border:0;background:#294548;box-shadow:none}
body .flight-status .hp-track i{box-shadow:none}
body .flight-status.hp-low{border:0;background:#ffd0bf;animation:none}
body .flight-status.hp-low b,body .flight-status.hp-low .micro,body .flight-status.hp-low small{color:#691c13}
body.compact .flight-status b,body.touch.compact .flight-status b{font-size:26px;line-height:1.05;letter-spacing:-.03em}
body.compact .flight-status small{font-size:9px}
body.compact .flight-status .hp-track{height:7px;margin-top:3px}
@media(orientation:portrait) and (max-width:600px){
 body.touch.compact .flight-status b{font-size:clamp(22px,7.2vw,30px)}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:640px){
 body.touch.compact .telemetry-top>.flight-status{padding-left:4px;padding-right:4px}
 body.touch.compact .telemetry-top>.flight-status b{font-size:22px}
 body.touch.compact .flight-status .hp-track{height:6px;margin-top:2px}
}


/* Directional evade controls and desktop console-side view/form controls. */
body:not(.touch){--pc-console-width:min(680px,calc(100vw - 350px));--pc-action-width:90px}
body:not(.touch) .bottom-console{width:var(--pc-console-width);bottom:41px}
body:not(.touch) .frame-actions{display:contents}
body:not(.touch) .frame-actions button{position:fixed;top:auto;bottom:104px;width:var(--pc-action-width);min-height:48px;transform:none}
body:not(.touch) #view-toggle{left:calc(50% - var(--pc-console-width)/2 - var(--pc-action-width) - 10px)}
body:not(.touch) #transform-toggle{right:calc(50% - var(--pc-console-width)/2 - var(--pc-action-width) - 10px)}
body:not(.touch) #touch-controls .pad-wrap,body:not(.touch) #touch-controls .touch-vertical,body:not(.touch) #touch-controls .touch-roll,body:not(.touch) .touch-bottom>.boost-btn,body:not(.touch) .touch-bottom>button:last-child,body:not(.touch) #bazooka{display:none}
body:not(.touch) .touch-bottom,body:not(.touch) .touch-bottom .center-actions{display:contents}
body:not(.in-sortie) .frame-actions button{visibility:hidden}
@media(max-width:800px){body:not(.touch){--pc-console-width:calc(100vw - 208px);--pc-action-width:78px}body:not(.touch) .weapon-cell .wfull{display:none}body:not(.touch) .weapon-cell .wshort{display:inline}body:not(.touch) .desktop-hint{display:none}}

/* Leave the TPS feet visible above the desktop fire controls. */
body:not(.touch) .bottom-console{padding:6px 10px}
body:not(.touch) .console-info{margin-bottom:3px}
body:not(.touch) .console-footer{margin-top:3px;font-size:11px}
body:not(.touch) .weapon-cell,body:not(.touch) .weapon-auto{min-height:62px;padding:4px}
body:not(.touch) .weapon-cell .wfull{display:none}
body:not(.touch) .weapon-cell .wshort{display:inline}
body:not(.touch) .weapon-cell>span{font-size:11px;white-space:nowrap}

/* One continuous roll control; a second press only adds damage immunity. */
.touch-roll button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;line-height:1.1}
.touch-roll button span{font-size:9px;white-space:nowrap}
.touch-roll button.phase-active{border-color:#f5fcff;box-shadow:inset 0 2px #f5fcff}
body.touch .touch-bottom .center-actions{flex:1;display:flex;justify-content:center}
body.touch .touch-bottom .center-actions #bazooka{flex:1}
body:not(.touch) #touch-controls .touch-roll{display:contents}
body:not(.touch) .touch-roll button{position:fixed;bottom:50px;min-height:44px;width:var(--pc-action-width);padding:4px;font-size:15px}
body:not(.touch) .touch-roll [data-hold=rollLeft]{left:calc(50% - var(--pc-console-width)/2 - var(--pc-action-width) - 10px)}
body:not(.touch) .touch-roll [data-hold=rollRight]{right:calc(50% - var(--pc-console-width)/2 - var(--pc-action-width) - 10px)}
body:not(.touch) .touch-roll button span{font-size:11px}
@media(orientation:landscape) and (max-height:600px){
 body.touch{--center-actions-width:clamp(72px,12vw,96px);--bottom-gap:8px;--frame-pad-gap:14px}
 body.touch .frame-actions button{bottom:calc(54px + (var(--pad-size) - 44px)/2 + env(safe-area-inset-bottom));height:44px;min-height:44px;width:80px}
 body.touch #view-toggle{left:calc(var(--pad-edge) + var(--pad-size) + var(--frame-pad-gap))}
 body.touch #transform-toggle{right:calc(var(--pad-edge) + var(--pad-size) + var(--frame-pad-gap))}
 body.touch .touch-bottom>.center-actions{display:flex}
}
@media(orientation:landscape) and (max-width:640px){body.touch .frame-actions button{width:68px}}

body.touch .touch-roll button{width:max(56px,calc((var(--pad-size) - 4px)/2));min-height:44px;padding:2px}

/* Keep labels legible over bright terrain and night water. */
.telemetry .micro,.flight-status small,.flight-readout>span:last-of-type,.weapon-cell>span{color:#d5e8ed}.touch-roll button:disabled{cursor:default;opacity:.34}#lock-state{color:#d8fff5;text-shadow:0 1px 3px #021018,0 0 6px #021018}
