:root{color-scheme:dark;--navy:#091e32;--panel:#103854;--cyan:#83edff;--lime:#d4fa6b;--orange:#ffa363;--border:#94e8ee;--safeTop:env(safe-area-inset-top,0px);--safeB:env(safe-area-inset-bottom,0px);font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{background:radial-gradient(ellipse at center,#236a83 0%,#0e334e 51%,#08192c 100%);color:#f2fcff}button{font-family:inherit;cursor:pointer;touch-action:manipulation}[hidden]{display:none!important}
#shell{height:100dvh;display:flex;align-items:stretch;justify-content:center;position:relative;background:linear-gradient(90deg,transparent,rgba(80,221,223,.10) 30%,transparent 70%)}#stage{height:100dvh;width:min(100vw,1480px,156vh);position:relative;overflow:hidden;background:#081b2d;box-shadow:0 0 90px #00111dbc;isolation:isolate;touch-action:none;border-inline:1px solid #58d6e244}canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.vignette{position:absolute;inset:0;background:linear-gradient(180deg,#061a2e90,transparent 27%,transparent 75%,#071b30ad),linear-gradient(90deg,#0722395c,transparent 22%,transparent 76%,#09283a56);pointer-events:none}
.top-bar{position:absolute;z-index:5;top:calc(13px + var(--safeTop));left:clamp(12px,2.2vw,30px);right:clamp(12px,2.2vw,30px);display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none}.brand{display:flex;gap:9px;align-items:center;text-shadow:0 2px 4px #001}.mark{display:grid;place-items:center;width:46px;height:46px;background:var(--lime);color:#09344a;border:4px solid #c0ffff;box-shadow:0 5px 0 #06617b;border-radius:14px;font-weight:1000;font-size:21px;letter-spacing:-2px}.brand-text{font-size:clamp(18px,2vw,24px);font-weight:1000;line-height:1.04;letter-spacing:-.025em}.brand-text b{color:var(--lime)}.brand-text small{display:block;font-size:11px;letter-spacing:.17em;color:#c3f9ff;margin-top:5px}.top-score{font-size:12px;font-weight:900;letter-spacing:.1em;background:#082b44dc;border:1px solid #87c8dc;border-radius:15px;padding:9px 10px;color:#c2edfb;margin-top:4px}.top-score span{background:#b3faff;color:#07354b;padding:5px 8px;border-radius:8px;margin-left:5px}
.home-screen{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:clamp(84px,13vh,125px) 18px calc(35px + var(--safeB));pointer-events:none}.hero-title{width:min(94%,550px);text-align:center;background:linear-gradient(180deg,#08263d9e,#0e3c5180 60%,transparent);padding:12px 10px 21px;border-radius:24px}.eyebrow{font-size:clamp(13px,1.8vw,15px);font-weight:1000;color:#c6f5ff;letter-spacing:.19em}.dot{display:inline-block;width:10px;height:10px;border-radius:100%;background:var(--lime);box-shadow:0 0 16px #d7ff79;margin-right:5px}.hero-title h1{font-size:clamp(41px,7vw,80px);margin:5px 0 4px;letter-spacing:-.07em;line-height:1.08;font-weight:1000;text-shadow:0 6px 0 #00263db9}.hero-title h1 em{font-style:normal;color:var(--lime)}.hero-title p{font-size:clamp(14px,2vw,18px);font-weight:700;line-height:1.4;color:#e6fdff;margin:7px auto;max-width:480px}.home-panel{pointer-events:auto;width:min(94%,530px);padding:18px;background:#0a2b44eb;border:3px solid #7ddde6;border-bottom:8px solid #08415b;border-radius:27px;box-shadow:0 17px 40px #0014248a}.mission-eyebrow{font-size:12px;color:#9cdee6;font-weight:1000;letter-spacing:.13em}.home-panel h2{display:flex;align-items:center;justify-content:space-between;margin:4px 0 12px;font-size:clamp(22px,4vw,34px);letter-spacing:-.045em}.mission-tag{background:#07496c;border:2px solid #7fe9e8;color:#d7ffff;border-radius:12px;padding:5px 11px;font-size:17px}.mini-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:10px 0 13px}.mini-flow span{text-align:center;background:#114662;border:1px solid #62b4cb;border-radius:11px;padding:7px 2px 6px}.mini-flow b{color:#d6ff8a;display:block;font-size:24px}.mini-flow small{font-size:11px;font-weight:1000;letter-spacing:.1em}.btn-primary,.btn-secondary{border:0;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;border-radius:17px;font-size:clamp(18px,3vw,24px);font-weight:1000;letter-spacing:.015em}.btn-primary{background:linear-gradient(#f2ffa5,#c3f267);color:#082f3a;box-shadow:0 7px 0 #79a13d;border:3px solid #f0ffd4}.btn-primary:active{transform:translateY(4px);box-shadow:0 3px 0 #79a13d}.btn-secondary{background:#15516c;color:#d5f7ff;border:2px solid #80daec;box-shadow:0 4px 0 #082d46}.play-triangle{font-size:24px}.bottom-note{color:#c8e5ea;text-align:center;font-size:12px;margin:14px 0 8px}.bestline{border-top:1px solid #69afbd5e;text-align:center;color:#b4e7d8;padding-top:11px;font-weight:900;font-size:12px;letter-spacing:.06em}
.hud{position:absolute;z-index:5;inset:calc(82px + var(--safeTop)) 16px auto;pointer-events:none}.hud-top{display:grid;grid-template-columns:minmax(110px,1fr) minmax(90px,1.3fr) 48px;gap:12px;align-items:center}.health,.hud-mid{background:#08283fdf;border:1px solid #70cbd5;border-radius:15px;padding:8px 11px}.mini-label{display:flex;align-items:center;gap:8px;line-height:1;font-size:19px;color:#e5ffea}.mini-label svg{width:20px;height:20px;stroke:#ff8b8b;stroke-width:2.5;fill:none}.health-track,.timer-track{height:11px;background:#0c2034;border:1px solid #597b8b;border-radius:8px;overflow:hidden}.health-track{margin-top:6px}.health-track>div{height:100%;width:100%;background:linear-gradient(90deg,#57e1f1,#d9ff74);transition:width .15s}.hud-mid{display:flex;flex-direction:column;gap:5px;text-align:center}.hud-mid>span{font-size:11px;font-weight:1000;letter-spacing:.1em;color:#d1f6f9}.timer-track>div{width:0;height:100%;background:linear-gradient(90deg,#65e5fa,#dfff70)}.square-btn{width:48px;height:50px;border:2px solid #8be8f0;border-bottom:5px solid #14627c;background:#0d4764;border-radius:14px;display:grid;place-items:center;pointer-events:auto}.pause-bars{height:24px;width:19px;border-left:6px solid #f1ffff;border-right:6px solid #f1ffff}
.fleet-badge{position:absolute;z-index:4;left:50%;top:68%;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap;background:#093951df;border:2px solid #90f5f4;border-radius:16px;box-shadow:0 5px 0 #06334a,0 5px 22px #18dff888;text-align:center;padding:3px 14px;display:flex;align-items:baseline;gap:6px}.fleet-badge.gain{border-color:#ddff87;box-shadow:0 4px 0 #416c32,0 0 26px #aeff4b99}.fleet-badge.loss{border-color:#ff947b;box-shadow:0 4px 0 #7c312b,0 0 26px #ff745a99}.fleet-badge span{font-size:clamp(32px,4vw,46px);font-weight:1000;color:var(--lime);line-height:1}.fleet-badge small{font-size:12px;font-weight:1000;color:#e2fcff}
.gate-labels{position:absolute;inset:0;z-index:3;pointer-events:none}.gate-label{position:absolute;min-width:112px;max-width:175px;transform:translate(-50%,-100%);text-align:center;background:#06394ee8;border:3px solid var(--gate,#a3ff80);border-bottom:7px solid #06354b;border-radius:17px;box-shadow:0 5px 25px #001c29b0;padding:6px 6px 5px;color:#f7ffff;white-space:nowrap}.gate-label .big{display:block;font-size:clamp(26px,4vw,39px);font-weight:1000;color:var(--gate,#d3ff8e);letter-spacing:-.045em;line-height:1.06}.gate-label .micro{font-size:12px;font-weight:900;color:#e7f7f8}.gate-label .pips{color:#ffffff;letter-spacing:.12em;font-size:18px;line-height:1.2}.gate-label.core{min-width:125px;max-width:150px;background:#153b56ec}.gate-label .core-glyph{display:flex;align-items:center;justify-content:center;width:100%;min-height:40px}.gate-label .core-glyph svg{width:52px;height:52px;display:block;filter:drop-shadow(0 0 10px color-mix(in srgb,currentColor 55%, transparent))}.gate-label .core-glyph-rocket{color:#ffbf70}.gate-label .core-glyph-rail{color:#95f4ff}.gate-label .core-glyph-shield{color:#b8b8ff}.gate-label.core .big{display:flex;align-items:center;justify-content:center;line-height:1}.gate-label.core .micro{letter-spacing:.06em}.gate-label.core{min-width:112px;max-width:118px;padding-top:5px}
.gate-label.boosted{box-shadow:0 0 25px #d5ff80a8}.gate-label .core-icon{font-size:25px}.boss-bar{position:absolute;z-index:5;top:26%;left:50%;transform:translateX(-50%);width:min(440px,80%);background:#09293bdb;border:2px solid #ff8f7c;border-radius:13px;padding:5px 10px;color:#fff4db;text-align:center;font-size:14px;font-weight:1000}.boss-bar>div{height:10px;background:#271d32;border-radius:10px;overflow:hidden;margin-top:5px}.boss-bar i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#ff765a,#ffe480)}.toast{position:absolute;z-index:7;left:50%;top:35%;transform:translateX(-50%);border:2px solid #e3ff96;border-radius:13px;background:#10374eea;padding:10px 16px;font-size:clamp(17px,3vw,23px);font-weight:1000;white-space:nowrap;pointer-events:none}.steer-hint{position:absolute;z-index:6;bottom:calc(26px + var(--safeB));left:50%;transform:translateX(-50%);background:#082e45c9;border-radius:30px;padding:8px 18px;font-size:15px;font-weight:900;color:#cdeaff;white-space:nowrap;pointer-events:none}.steer-hint span{font-size:27px;color:var(--lime);vertical-align:middle}.emp{position:absolute;z-index:5;right:clamp(12px,3vw,35px);bottom:calc(36px + var(--safeB));display:flex;align-items:center;gap:8px;min-height:60px;background:var(--lime);border:3px solid #f2ffe3;border-bottom:7px solid #7fa23e;box-shadow:0 8px 22px #001b32;border-radius:17px;padding:7px 12px;color:#092b37;font-size:18px;font-weight:1000}.emp svg{width:27px;height:27px;fill:currentColor}.emp small{display:block;font-size:11px}.emp:disabled{opacity:.5}
.end-screen,.pause-screen{position:absolute;z-index:15;inset:0;background:#031a2bcf;display:flex;align-items:center;justify-content:center;padding:20px;touch-action:auto}.end-panel,.pause-panel{width:min(100%,480px);max-height:calc(100dvh - 36px);overflow:auto;background:#103750;border:3px solid #88e7ed;border-bottom:8px solid #073148;box-shadow:0 16px 40px #001a2d;border-radius:24px;text-align:center;padding:23px 20px}.end-panel h2,.pause-panel h2{font-size:clamp(30px,6vw,46px);color:var(--lime);margin:8px 0;line-height:1.04}.stars{font-size:45px;letter-spacing:4px;color:#ffdc69;text-shadow:0 3px 0 #9b6c24}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:16px 0}.stats>div{background:#0a2a44;border:2px solid #418da7;border-radius:14px;padding:13px 2px}.stats small{font-size:11px;color:#d0f0ff;font-weight:900;display:block}.stats b{font-size:34px;color:var(--lime)}.result-detail{font-size:15px;color:#d9f1f8;margin:9px 0 16px}.end-panel .btn-secondary,.pause-panel .btn-secondary{margin-top:12px}.pause-panel p{font-size:14px;color:#bddde5;line-height:1.4}.corner-note{position:absolute;left:10px;right:10px;bottom:calc(10px + var(--safeB));font-size:10px;line-height:1.25;color:#c1e5e6a8;pointer-events:none;z-index:4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#error{position:absolute;z-index:30;top:25%;left:8%;right:8%;background:#531e31;border:2px solid #ff8a79;padding:25px;border-radius:13px;text-align:center}
@media(max-width:650px){.top-bar{top:calc(6px + var(--safeTop));left:8px;right:8px}.mark{width:35px;height:35px;border-width:2px;font-size:16px;border-radius:10px}.brand-text{font-size:16px}.brand-text small{font-size:9px;margin-top:3px}.top-score{font-size:9px;padding:7px;margin-top:1px}.home-screen{padding:calc(58px + var(--safeTop)) 8px calc(15px + var(--safeB))}.hero-title{padding:4px 2px}.hero-title h1{font-size:clamp(39px,10.5vw,55px)}.hero-title p{font-size:13px}.home-panel{width:min(96%,440px);padding:12px;border-radius:21px}.home-panel h2{font-size:24px;margin:4px 0 7px}.mini-flow{margin:6px 0 9px}.mini-flow b{font-size:21px}.btn-primary,.btn-secondary{min-height:56px;font-size:18px}.bottom-note{font-size:11px;margin:9px 0 7px}.hud{top:calc(54px + var(--safeTop));left:7px;right:7px}.hud-top{grid-template-columns:minmax(77px,1fr) minmax(70px,1fr) 40px;gap:5px}.health,.hud-mid{padding:6px 7px;border-radius:10px}.mini-label{font-size:15px}.health-track{height:8px}.hud-mid>span{font-size:10px}.square-btn{width:40px;height:44px}.pause-bars{width:17px;height:20px;border-width:5px}.fleet-badge{top:71%;padding:3px 10px}.fleet-badge span{font-size:32px}.gate-label{min-width:86px;max-width:120px;padding:4px;border-width:2px;border-radius:11px}.gate-label.core{min-width:90px;max-width:108px}.gate-label .big{font-size:27px}.gate-label .core-glyph svg{width:42px;height:42px}.gate-label .micro{font-size:10px}.gate-label .pips{font-size:15px}.emp{min-height:52px;bottom:calc(12px + var(--safeB));right:9px;padding:5px 10px;font-size:16px}.emp svg{width:22px;height:22px}.steer-hint{font-size:11px;bottom:calc(75px + var(--safeB));padding:4px 10px}.boss-bar{top:20%}.corner-note{display:none}}
@media(max-height:650px){.hero-title h1{font-size:clamp(34px,7vh,53px)}.home-screen{padding-top:53px;padding-bottom:9px}.hero-title p{display:none}.home-panel{padding:10px}.mini-flow{margin:6px 0}.bottom-note{display:none}.hud{top:48px}.hud-top{gap:7px}.end-panel{padding:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

#stage.hit::after{content:'';position:absolute;inset:0;z-index:13;pointer-events:none;background:radial-gradient(ellipse at center,transparent 30%,#ee455f88 100%);animation:hitflash .34s ease-out both;}
@keyframes hitflash{from{opacity:1}to{opacity:0}}

/* v0.7.1 formation controls: in-world optional tactical choice, clear on touch devices. */
.formation-control{position:absolute;z-index:7;left:clamp(12px,3vw,35px);bottom:calc(34px + var(--safeB));display:flex;flex-direction:column;gap:4px;width:166px;max-width:calc(100vw - 134px);padding:7px;background:#082d46e8;border:2px solid #78dfe9;border-radius:16px;box-shadow:0 7px 21px #00182c;touch-action:manipulation}
.formation-caption{color:#bcecf3;font-size:10px;font-weight:900;letter-spacing:.16em;text-align:center}
.formation-options{display:grid;grid-template-columns:1fr 1fr;gap:4px}
.formation-options button{font-size:13px;font-weight:1000;letter-spacing:.02em;min-height:36px;padding:6px 2px;border-radius:9px;border:1px solid #5a9fb2;color:#e5faff;background:#154b64}
.formation-options button[aria-pressed="true"]{border-color:#d8ff87;background:var(--lime);color:#113642;box-shadow:inset 0 -3px 0 #a7c953}
.formation-control small{color:#cce9ef;text-align:center;font-weight:750;font-size:10px;line-height:1.2}
.formation-options button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:390px){.formation-control{width:148px;left:10px;bottom:calc(14px + var(--safeB));padding:6px}.formation-options button{font-size:12px}.emp{bottom:calc(17px + var(--safeB));right:10px}.fleet-badge{top:65%}}
@media(max-height:610px){.formation-control{bottom:calc(8px + var(--safeB));padding:4px}.formation-caption,.formation-control small{display:none}.formation-options button{min-height:30px}}
@media(prefers-reduced-motion:reduce){.formation-control,.gate-label{transition:none}}

/* v0.7.2: paired labels are laid out with measured widths to prevent crossings. */
.gate-label{transform-origin:center bottom;transition:none;will-change:transform,left,top}

/* v0.7.4: compact number-only fleet indicator; anchored to the actual lead rank by app.mjs. */
.fleet-badge{top:75%;left:50%;min-width:44px;max-width:70px;min-height:30px;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-100%);padding:2px 7px;border:1.5px solid #9ff5ec;border-radius:10px;background:#063d52c9;box-shadow:0 2px 0 #032c40,0 2px 12px #13c6e366;backdrop-filter:none;line-height:1}
.fleet-badge span{font-size:clamp(24px,2.9vw,31px);line-height:1.08;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #001d2b}
.fleet-badge small{display:none}
@media(max-width:650px){.fleet-badge{max-width:62px;min-width:44px;min-height:30px;padding:1px 6px}.fleet-badge span{font-size:27px}}
@media(max-width:390px){.fleet-badge{top:74%;max-width:60px}.fleet-badge span{font-size:25px}}




/* Slimmer in-game telemetry while keeping readable controls. */
.hud-top{gap:8px}.health,.hud-mid{padding:6px 9px}.health-track,.timer-track{height:9px}
@media(max-width:650px){.hud-top{gap:4px}.health,.hud-mid{padding:5px 6px}.health-track,.timer-track{height:7px}}

/* v0.7.8 stage navigation: compact, thumb-friendly, no overlay on the battlefield. */
.stage-selector{display:grid;grid-template-columns:60px minmax(0,max-content) 60px;align-items:center;justify-content:center;gap:clamp(8px,2vw,16px);margin:4px auto 12px;color:#cceff9;font-size:13px;font-weight:1000;letter-spacing:.12em}
.stage-selector button{box-sizing:border-box;border:2px solid #89e8f0;border-radius:14px;background:linear-gradient(180deg,#285f79,#14384e);color:#e3ff91;width:60px;height:50px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0;box-shadow:inset 0 -4px 0 #0a6078,inset 0 1px 0 #d8ffff24,0 4px 10px #001a2b55;cursor:pointer;transition:filter .12s ease}
.stage-selector button:hover:not(:disabled){filter:brightness(1.12)}
.stage-selector button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.stage-selector button:active:not(:disabled){filter:brightness(.92)}
.stage-selector button:disabled{opacity:.42;color:#abd0d8;cursor:default;box-shadow:none}
.stage-selector #selectedStage{min-width:0;text-align:center;white-space:nowrap;line-height:1.2}
.stage-selector .stage-nav-arrow{display:block;width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#nextMission[hidden]{display:none}

/* v0.7.9: small persistent weapon readout in unused health-card space. */
.weapon-status{margin-left:auto;font-size:11px;letter-spacing:.04em;font-weight:950;border:1px solid #9cf7f0;color:#e3ffff;background:#164c61;padding:3px 5px;border-radius:6px;white-space:nowrap}
.weapon-status[data-weapon="rocket"]{color:#fff0cf;border-color:#ffaf68;background:#653e31}
.weapon-status[data-weapon="rail"]{color:#dcfaff;border-color:#90e8ff;background:#25477f}
@media(max-width:420px){.weapon-status{font-size:9px;padding:2px 3px;letter-spacing:0}}

/* v0.8.2: primary gate values are real world-space 3D glyphs; retain only a
   small transparent DOM readout for exact reward/charge details and accessibility. */
.gate-label.in-world-glyph{min-width:76px;max-width:150px;padding:2px 6px 3px;border-width:1px;border-bottom-width:2px;border-radius:8px;background:#072d43ce;box-shadow:0 2px 9px #00152696}
.gate-label.in-world-glyph .big{display:none!important}
.gate-label.in-world-glyph .micro{font-size:11px;line-height:1.25;letter-spacing:0}
.gate-label.in-world-glyph .pips{font-size:12px;line-height:1.08}
@media(max-width:650px){.gate-label.in-world-glyph{min-width:65px;max-width:115px;padding:2px 3px}.gate-label.in-world-glyph .micro{font-size:9px}}

/* v0.8.4 fixed-price progression without obscuring battle or creating click traps. */
.home-actionrow{display:grid;grid-template-columns:minmax(110px,35%) minmax(0,1fr);gap:8px;align-items:stretch}.home-actionrow .btn-primary{min-width:0;font-size:clamp(15px,2vw,21px);padding:8px}
.garage-open{border:2px solid #90e4e9;border-bottom:5px solid #08445c;border-radius:13px;background:#15526b;color:#dbff90;font-weight:1000;font-size:clamp(13px,1.8vw,17px)}
.home-scrap{text-align:center;font-weight:800;font-size:11px;color:#d1f7e2;margin:9px 0 1px}.home-scrap strong{color:#ffe38e;font-size:15px}
.garage-screen{position:absolute;inset:0;z-index:16;display:flex;align-items:center;justify-content:center;padding:calc(12px + var(--safeTop)) 10px calc(12px + var(--safeB));background:#041c30e8;touch-action:auto}
.garage-panel{width:min(96%,570px);max-height:100%;overflow-y:auto;background:#0b344d;border:3px solid #7ae8ee;border-bottom:8px solid #0a5670;border-radius:22px;padding:clamp(10px,2vw,22px);box-shadow:0 14px 32px #001323}
.garage-panel h2{font-size:clamp(22px,5vw,36px);margin:6px 0;color:#d8ff88;text-align:center}.garage-panel .eyebrow{text-align:center;font-size:11px}
.garage-wallet{text-align:center;background:#164b5d;border-radius:12px;padding:7px;color:#ffe7a2;font-weight:1000}.garage-wallet strong{font-size:25px}.garage-help,.garage-tip{font-size:12px;line-height:1.35;text-align:center;color:#c6edf7;margin:7px 0}
.garage-cards{display:grid;gap:8px;margin:9px 0}.garage-card{display:flex;align-items:center;gap:9px;background:#133e58;border:1px solid #59a9c0;border-radius:13px;padding:9px}
.garage-mark{display:grid;place-items:center;min-width:37px;height:37px;background:#256e86;border-radius:9px;font-size:22px;color:#d7ff81}.shield-mark{color:#9df4fa}.armory-mark{color:#ffe399}
.garage-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.garage-copy strong{font-size:clamp(11px,2.3vw,15px);letter-spacing:.02em}.garage-copy strong small{color:#bcf6ff;white-space:nowrap}.garage-copy span{color:#d3edf6;font-size:clamp(10px,2vw,12px)}
.garage-card button{border:2px solid #edffc2;background:#d7ff7a;color:#12384a;font-size:14px;font-weight:1000;border-radius:10px;min-width:68px;min-height:46px;padding:5px 7px;flex-shrink:0}.garage-card button:disabled{opacity:.48;cursor:not-allowed}
.garage-panel #garageClose{min-height:47px;font-size:16px;margin-top:10px}
@media(max-height:650px){.garage-panel{padding:10px}.garage-cards{gap:5px;margin:5px 0}.garage-card{padding:5px}.garage-panel h2{margin:3px 0}.garage-mark{height:32px;min-width:32px}.home-scrap{font-size:9px;margin:4px 0}}
@media(max-width:390px){.home-actionrow{grid-template-columns:35% 1fr}.home-actionrow .btn-primary{font-size:14px;min-height:50px}.garage-open{font-size:12px}.garage-card{gap:6px;padding:7px}.garage-card button{min-width:60px}.garage-mark{min-width:31px;width:31px}}

/* v0.8.5: compact visible stage map, five accessible 44px+ mission stops. */
.campaign-map{display:flex;justify-content:center;align-items:center;gap:5px;margin:0 auto 8px;max-width:390px}
.campaign-map button{flex:1;min-width:0;max-width:66px;min-height:44px;border:2px solid #7fdce5;border-bottom:5px solid #075b6d;border-radius:10px;background:#12506a;color:#e3f8fe;font-weight:1000;font-size:14px;font-variant-numeric:tabular-nums}
.campaign-map button[aria-current="true"]{background:#d5fb75;color:#123742;border-color:#f5ffe0;border-bottom-color:#8cb241}
.campaign-map button:disabled{opacity:.44;color:#9dcad8;cursor:default}
.campaign-map button:focus-visible{outline:2px solid white;outline-offset:2px}
.weapon-status[data-weapon="jammed"]{background:#583074;color:#f7d3ff;border-color:#d1a0ff}
@media(max-height:680px){.campaign-map{margin:0 auto 3px}.campaign-map button{min-height:38px}.stage-selector{margin-bottom:5px}}
@media(max-width:430px){.stage-selector{grid-template-columns:52px minmax(0,max-content) 52px;gap:8px}.stage-selector button{width:52px;height:46px}.stage-selector .stage-nav-arrow{width:26px;height:26px}}

/* v0.8.8 — secondary metadata only, never duplicate the 3D sign reward. */
.gate-label.in-world-glyph.annotation-only{min-width:0!important;max-width:142px!important;width:max-content;box-sizing:border-box;padding:3px 8px 4px!important;background:#041b2bf2;border:1.5px solid var(--gate,#a3ff80);border-radius:8px;box-shadow:0 3px 11px #001521bb;white-space:nowrap}
.gate-label.annotation-only .big{display:none!important}
.gate-label.annotation-only .micro{font-size:clamp(10px,1.4vw,13px);font-weight:900;line-height:1.22;color:#f6fdff;letter-spacing:0}
.gate-label.annotation-only .pips{font-size:11px;line-height:1.0;letter-spacing:.14em;margin-top:3px}
.gate-label.annotation-only[hidden]{display:none!important}
@media(max-width:650px){.gate-label.in-world-glyph.annotation-only{max-width:119px!important;padding:3px 5px!important}.gate-label.annotation-only .micro{font-size:10px;letter-spacing:0}}
.fleet-badge.gate-pop:after{content:attr(data-pop);position:absolute;left:50%;bottom:100%;transform:translateX(-50%);color:#e2ff83;font-weight:1000;font-size:clamp(18px,3vw,29px);text-shadow:0 2px 5px #001421;animation:rf-gate-pop .9s ease-out both;pointer-events:none;white-space:nowrap}
@keyframes rf-gate-pop{0%{opacity:0;transform:translate(-50%,6px) scale(.75)}15%{opacity:1;transform:translate(-50%,-2px) scale(1.12)}85%{opacity:1;transform:translate(-50%,-16px)}100%{opacity:0;transform:translate(-50%,-22px)}}
@media(prefers-reduced-motion:reduce){.fleet-badge.gate-pop:after{animation:none}}

/* v0.9.2: combat notifications are physically inside the existing HUD.
   No informational overlays may cover the enemy sightline. */
.health{position:relative;min-height:74px;padding-bottom:19px!important}
.health .toast{position:absolute;top:auto;left:9px;right:9px;bottom:2px;transform:none;min-height:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;color:#e3ff94;text-shadow:0 1px 2px #001a2a;font-size:clamp(9px,1vw,12px);line-height:13px;font-weight:950;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;pointer-events:none;z-index:1}
.hud-mid .boss-bar{position:static;left:auto;top:auto;transform:none;max-width:none;width:100%;min-height:0;margin:1px 0 0;padding:2px 3px 3px;border-width:1px;border-radius:6px;box-shadow:none;font-size:9px;line-height:1.2}
.hud-mid .boss-bar>div{height:3px;margin-top:2px}
.gate-intel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;width:100%;margin-top:3px;pointer-events:none}
.gate-intel>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#052439e8;border:1px solid #72d3dd;border-radius:5px;padding:2px 6px;color:#e9fff4;font-weight:950;font-size:clamp(9px,1vw,11px);line-height:1.1}
.gate-intel>span:first-child{border-color:#ffbf78;text-align:left}
.gate-intel>span:last-child{border-color:#caff76;text-align:right}
.gate-intel>span[hidden]{visibility:hidden;display:block!important}
@media(max-width:650px){.health{min-height:58px;padding-bottom:16px!important}.health .toast{font-size:9px;bottom:1px;left:5px;right:5px;line-height:11px}.gate-intel{gap:4px;margin-top:2px}.gate-intel>span{padding:2px 3px;font-size:9px;line-height:1.1}.hud-mid .boss-bar{font-size:8px}}
@media(max-height:530px){.health{min-height:50px}.gate-intel{margin-top:1px}}


/* v0.9.3: longer-lived readable messages, still docked fully inside health HUD. */
.health{min-height:82px!important;padding-bottom:25px!important}
.health .toast{font-size:clamp(11px,1.15vw,14px)!important;line-height:16px!important;bottom:3px!important;left:9px!important;right:8px!important;color:#e9ffad!important;letter-spacing:0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:650px){
 .health{min-height:72px!important;padding-bottom:23px!important}
 .health .toast{font-size:11px!important;line-height:13px!important;left:6px!important;right:4px!important;bottom:3px!important}
}
@media(max-height:530px){.health{min-height:66px!important;padding-bottom:21px!important}}
/* Keep the full notice readable rather than truncating long combat information. */
.health{min-height:92px!important;padding-bottom:39px!important}
.health .toast{white-space:normal!important;overflow-wrap:break-word;text-overflow:clip!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;max-height:32px;text-align:left}
@media(max-width:650px){
 .health{min-height:97px!important;padding-bottom:43px!important}
 .health .toast{-webkit-line-clamp:3;line-clamp:3;max-height:39px}
}
@media(max-height:530px){.health{min-height:90px!important;padding-bottom:37px!important}.health .toast{max-height:36px}}

/* v0.9.4: no center-lane overlays; tiny deterministic combo and tutorial in HUD. */
.combo-chip{display:block;font-weight:1000!important;color:#e7ff8a!important;letter-spacing:0!important;font-size:10px!important;line-height:1.1;background:#1a5863;border:1px solid #b8ff86;border-radius:5px;padding:2px 4px;margin-top:2px}
.tutorial-panel{display:flex;align-items:center;gap:7px;justify-content:space-between;margin-top:3px;border:1px solid #92dbe5;border-radius:8px;background:#0a3048f2;padding:3px 8px;color:#e7ffc0;font-size:clamp(10px,1.15vw,13px);font-weight:900;max-width:100%;pointer-events:auto}
.tutorial-panel span{min-width:0;flex:1}.tutorial-panel button{flex:0 0 auto;width:30px;height:28px;background:#164c66;color:#fff;border:1px solid #b6eef4;border-radius:6px;font-size:18px;cursor:pointer}
.tutorial-panel button:focus-visible{outline:3px solid #eaff97;outline-offset:2px}
@media(max-width:650px){.tutorial-panel{font-size:10px;padding:3px 5px;line-height:1.1}}




/* v0.9.5: compact first-time tutorial with a true center-aligned SVG close control. */
#stage .tutorial-panel{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;column-gap:12px;width:fit-content;max-width:min(100%,660px);min-height:52px;padding:5px 7px 5px 13px;margin-top:7px;border-radius:12px;line-height:1.3;box-shadow:0 4px 14px #001d2d65}
#stage .tutorial-panel span{display:block;min-width:0;overflow-wrap:break-word;padding:0 2px;font-size:clamp(12px,1.22vw,16px);line-height:1.3;letter-spacing:.005em}
#stage .tutorial-panel button{appearance:none;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;align-self:center;justify-self:center;background:#164d66;border:1.5px solid #c0fbff;border-radius:10px;line-height:1;box-shadow:inset 0 1px 0 #a6efff22;touch-action:manipulation}
#stage .tutorial-panel button .tutorial-close-icon{display:block;width:20px;height:20px;stroke:#f6ffff;stroke-width:2.6;stroke-linecap:round;fill:none;overflow:visible;transform:none}
#stage .tutorial-panel button:hover{background:#225e7b}
#stage .tutorial-panel button:focus-visible{outline:3px solid #eaff97;outline-offset:2px}
@media(max-width:650px){#stage .tutorial-panel{max-width:100%;min-height:46px;padding:4px 4px 4px 9px;column-gap:6px;grid-template-columns:minmax(0,1fr) 44px}#stage .tutorial-panel span{font-size:12px;line-height:1.2}}

/* v0.9.5: silhouette-first active weapon badge. Decorative SVG groups are static; CSS selects the active one. */
#stage .weapon-status{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:28px;padding:2px 8px 2px 5px;font-size:12px;line-height:1;font-weight:1000;letter-spacing:.04em;border-radius:9px;box-shadow:inset 0 1px 0 #ffffff22}
#stage .weapon-icon{width:23px;height:23px;min-width:23px;display:block;overflow:visible;filter:drop-shadow(0 0 2px currentColor)}
#stage .weapon-icon g{display:none}
#stage .weapon-status[data-weapon="pulse"] .icon-pulse,#stage .weapon-status[data-weapon="rocket"] .icon-rocket,#stage .weapon-status[data-weapon="rail"] .icon-rail,#stage .weapon-status[data-weapon="jammed"] .icon-jammed{display:inline}
#stage .weapon-status[data-weapon="pulse"]{color:#b9fbff;border-color:#68ddeb;background:#0e4861}
#stage .weapon-status[data-weapon="rocket"]{color:#ffe4b4;border-color:#ffae61;background:#633a30}
#stage .weapon-status[data-weapon="rail"]{color:#eff9ff;border-color:#84d9ff;background:#234b75}
#stage .weapon-status[data-weapon="jammed"]{color:#f6d9ff;border-color:#d4a0ff;background:#5c3173}
@media(max-width:420px){#stage .weapon-status{gap:3px;padding:2px 4px;min-height:25px;font-size:10px}#stage .weapon-icon{width:18px;height:18px;min-width:18px}}

/* Compact combo confirmation instead of a full-width bar. No enemy-lane overlays. */
#stage .combo-chip{display:inline-flex;justify-content:center;align-items:center;align-self:center;width:max-content;max-width:100%;min-height:19px;padding:2px 9px;border-radius:9px;background:#184a59;border:1px solid #a9f084;box-shadow:0 0 9px #85f56c22}
#stage .combo-chip[data-tier="high"]{background:#32542c;border-color:#e4ff80;color:#ffffc1!important;box-shadow:0 0 12px #aaff6080}
@media(prefers-reduced-motion:reduce){#stage .combo-chip{transition:none}}

/* v0.9.6: one-line first-run cue; never expand the center-road overlay. */
#stage .tutorial-panel{max-width:min(100%,470px);min-height:48px;padding:3px 5px 3px 11px;column-gap:7px;grid-template-columns:minmax(0,1fr) 44px}
#stage .tutorial-panel span{font-size:clamp(11px,1.05vw,14px);line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
@media(max-width:390px){#stage .tutorial-panel{max-width:100%;min-height:47px;padding-left:7px}}

/* v0.9.6: Stage 6 warning timer pips stay in the side cue, never over enemies. */
#stage .warning .hazard-pips{display:inline-block;font-size:11px;letter-spacing:1px;color:#fff6bb;white-space:nowrap;margin-left:5px;align-self:center}
#stage .warning .hazard-pips[hidden]{display:none!important}
@media(max-width:390px){#stage .warning .hazard-pips{font-size:9px;letter-spacing:0;margin-left:2px}}

/* v0.9.7: warning is a normal-flow HUD child, never a viewport-positioned overlay. */
#stage #hud > .warning{position:static;inset:auto;transform:none;display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:100%;min-height:30px;margin:6px 0 0;padding:3px 8px;border:1.5px solid #ffba71;border-radius:9px;background:#671f30f5;color:#fff4e4;font-size:clamp(11px,1vw,13px);line-height:1.2;box-shadow:0 2px 0 #371c24;pointer-events:none;overflow-wrap:anywhere}
#stage #hud > .warning.side-left{margin-right:auto;margin-left:0}
#stage #hud > .warning.side-right{margin-left:auto;margin-right:0}
#stage #hud > .warning #warningArrow{font-size:20px;line-height:1;color:#ffcb88;flex:none}
#stage #hud > .warning #warningText{min-width:0}
@media(max-width:390px){#stage #hud > .warning{min-height:27px;margin-top:4px;padding:3px 6px;gap:4px;font-size:11px}}

/* Expansion: ten stage tiles remain touchable; daily challenge and outpost scroll on short screens. */
#stage .campaign-map{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:390px;gap:5px}
#stage .campaign-map button{width:100%;max-width:none;min-height:44px}
#stage .daily-card{display:flex;align-items:center;gap:8px;margin:6px 0;color:#c0dce3;font-size:11px;text-align:left}
#stage .daily-card button{flex:none;border:1px solid #82e6ec;background:#164962;color:#dffaff;border-radius:8px;padding:7px;min-height:44px;font-size:11px;font-weight:900}
#stage .daily-card span{min-width:0;line-height:1.25}
#stage .outpost-card{padding:6px;background:#0b2b3c;border:1px solid #3e7182;border-radius:10px;margin-bottom:10px;text-align:center}
#stage #outpostArt svg{width:100%;max-width:400px;display:block;margin:auto;height:auto;max-height:180px}
#stage #outpostStatus{font-size:12px;color:#d9f7ee;margin:2px}
#stage .garage-panel{max-height:100%;overflow-y:auto;touch-action:pan-y}
#stage .home-screen{overflow-y:auto;touch-action:pan-y;pointer-events:auto}
#stage .home-panel{flex-shrink:0}
#stage .boss-bar.segmented>div{position:relative}
#stage .boss-bar.segmented>div::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 2px),#142d40 calc(10% - 2px),#142d40 10%)}
@media(max-height:720px){#stage .mini-flow{display:none}#stage .hero-title p{display:none}#stage .home-screen{padding-bottom:8px}#stage .home-panel{padding:10px}}

#stage[data-view]:not([data-view="play"]){touch-action:pan-y}
#stage .home-screen{justify-content:safe space-between}
#stage .hero-title{flex-shrink:0}

.research-panel{display:grid;gap:8px;padding:10px;border:1px solid #427b8e;border-radius:12px;background:#0a2437;color:#c6eef0;text-align:left}.research-panel #researchList{display:grid;gap:6px}.research-panel button{font-size:12px;white-space:normal;min-height:44px;text-align:left}.research-panel select{min-height:40px;background:#153b50;color:#e8faff;border:1px solid #73c7d1;border-radius:8px;padding:6px}.research-panel small{font-size:11px;color:#bad4dc}

#stage .combo-chip[data-milestone="yes"]{animation:chain-pulse .45s ease-out 2}@keyframes chain-pulse{0%,100%{transform:scale(1)}40%{transform:scale(1.13);box-shadow:0 0 14px #e8ff80}}@media(prefers-reduced-motion:reduce){#stage .combo-chip[data-milestone="yes"]{animation:none}}

.construction-list{display:grid;gap:6px;margin:5px 0 10px}.construction-list button{white-space:normal;text-align:left;line-height:1.35;min-height:44px}

.mission-brief{font-size:clamp(10px,2.6vw,13px);line-height:1.25;color:#b9e2e8;text-align:center;margin:4px 0 6px;min-height:1.25em}

/* Never show empty tactical strips while the first gate-intel update is pending. */
.gate-intel>span:empty{visibility:hidden}

/* Compact mission mastery targets: no extra gameplay HUD occupancy. */
.mastery{margin:4px 0 7px;font-size:12px;color:#c7e6ee;line-height:1.35;text-align:left;padding:6px 9px;border:1px solid #457687;border-radius:8px;background:#0c2637}.mastery summary{cursor:pointer;color:#d7f7a5;font-weight:750}.mastery #starTargets{padding-top:5px}.result-goals{color:#b9e5e8}.campaign-map button:not(:disabled)[data-stars="3"]{box-shadow:inset 0 0 0 2px #ffe183}.campaign-map button:not(:disabled)[data-stars="1"],.campaign-map button:not(:disabled)[data-stars="2"]{border-top-color:#ffe183}

/* Short confirmed-kill accent, no additional on-road HUD. */
#comboStatus[data-pulse="yes"]{outline:1px solid #f4ffb6;box-shadow:0 0 12px #baff7566}
@media(prefers-reduced-motion:reduce){#comboStatus[data-pulse="yes"]{outline:none;box-shadow:none}}

#stage .boss-bar .boss-segments{display:flex;gap:2px;height:5px;border-radius:2px;background:transparent}
.boss-segments>span{display:block;flex-basis:0;min-width:0;background:#263444;overflow:hidden;border-radius:1px}
.boss-segments>span:first-child i,.boss-segments>span:last-child i{background:#7cc8ff}
#stage .boss-bar.segmented>.boss-segments::after{display:none}

/* Weekly contracts and low-cost, interactive projected 3D outpost. */
#stage .weekly-card button{border-color:#e7cc85;background:#493d2a;color:#fff2c4}
#stage .weekly-card span{color:#e8ddbb}
#stage #outpostArt svg{max-height:225px;max-width:440px}
.outpost-controls{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:5px;margin:6px 0}
.outpost-controls button,.outpost-controls select{min-height:44px;color:#e5f8ff;background:#163d53;border:1px solid #638e9a;border-radius:7px;font-size:13px}
.outpost-controls button{font-size:24px}.outpost-controls span{font-size:12px;color:#b9d9dd}.outpost-controls select{grid-column:1/-1;width:100%;padding:5px}#outpostModuleInfo{font-size:12px;color:#d9eead;margin:4px 0}

/* v117: one dominant campaign action, secondary routes stay discoverable. */
#stage .home-panel{padding:16px;border:2px solid #75d3ff;background:#092d4aef;border-radius:22px}
#stage #deploy{min-height:64px;font-size:25px;margin:12px 0 16px;background:linear-gradient(#c7ff7e,#89e634);border-color:#eaffbc;box-shadow:0 5px 0 #3c9b41}
.quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;align-items:start}
.quick-links>button,.challenge-link>summary{min-height:46px;display:flex;justify-content:center;align-items:center;text-align:center;border:1px solid #6ab9dc;background:#174e77;border-radius:10px;color:#e9faff;font-size:12px;font-weight:900;padding:7px;cursor:pointer;list-style:none}
.challenge-link>summary::-webkit-details-marker{display:none}.challenge-link[open]{grid-column:span 3}.challenge-link[open]>summary{background:#215d87}.challenge-link .daily-card{flex-wrap:wrap}.challenge-link .daily-card span{flex-basis:100%;padding:4px 0}.challenge-link .daily-card button{width:100%}
.mission-details>summary{margin-top:12px;text-align:center;padding:11px;color:#cdeaff;font-size:13px;font-weight:800;cursor:pointer;border-top:1px solid #427c9e}
#stage .bottom-note{display:block;margin:5px 0 0;color:#c7e7fb;font-size:11px}
#stage .hero-title{background:linear-gradient(#092d4ae0,#143b5a88,transparent)}
#stage .hero-title p{display:none}.quick-links summary:focus-visible,.mission-details summary:focus-visible{outline:2px solid white;outline-offset:2px}
@media(max-height:650px){#stage .home-panel{padding:11px}#stage #deploy{min-height:56px;margin:7px 0 11px}#stage .hero-title{padding:0}.stage-selector{margin-bottom:5px}}

/* Growth feedback stays anchored to the fleet instead of obscuring the approach road. */
.fleet-badge.gate-pop:after{font-size:clamp(24px,4vw,38px);background:#102c3ce8;border:1px solid #d8ff86;border-radius:10px;padding:4px 10px;box-shadow:0 0 14px #aaff5c66;animation-duration:.95s}
@keyframes rf-gate-pop{0%{opacity:0;transform:translate(-50%,3px) scale(.75)}15%{opacity:1;transform:translate(-50%,-2px) scale(1.18)}65%{opacity:1;transform:translate(-50%,-6px) scale(1)}100%{opacity:0;transform:translate(-50%,-12px)}}
@media(prefers-reduced-motion:reduce){.fleet-badge.gate-pop:after{animation:none}}

#stage .hero-title h1{font-size:clamp(30px,5.7vh,48px)}
#stage .hero-title{background:transparent}

#stage .hero-title h1{font-size:clamp(25px,4.4vh,39px);margin:2px 0}
#stage .hero-title{padding:0 3px 3px}
#comboStatus[data-tier="elite"]{color:#ffd48a;border-color:#ffb86a}
#comboStatus[data-tier="surge"]{color:#fff3af;border-color:#ecff8c;text-shadow:0 0 9px #f3da72}

/* Live deployment count uses a distinct line, not the gate pop pseudo-element. */
#fleetDeploying{display:block;font-size:9px;line-height:1.25;letter-spacing:.06em;color:#bff8ff;text-align:center;white-space:nowrap}#fleetDeploying[hidden]{display:none}
/* The outpost itself is the home hero. Compact header, mission controls at foot. */
#stage .hero-title h1{font-size:clamp(18px,3.3vh,27px);letter-spacing:.04em;margin:3px 0}
#stage .hero-title .home-inventory{display:flex;justify-content:center;gap:12px;font-size:12px;margin:1px 0;color:#e6f7ff;line-height:1.3}
#stage .home-panel{padding:11px 14px;}
#stage .home-panel h2{margin:3px 0 5px;font-size:clamp(19px,4.7vw,27px)}
#stage .home-panel .mission-eyebrow{font-size:10px}
#stage #deploy{margin:7px 0 11px;min-height:56px}
#stage .mission-details>summary{margin-top:8px;padding:7px}
@media(max-height:650px){#stage .hero-title .eyebrow{font-size:10px}#stage .hero-title h1{font-size:17px}#stage .hero-title .home-inventory{font-size:11px}#stage .home-panel{padding:8px 11px}#stage #deploy{min-height:49px;margin:5px 0 9px}}

/* v1.2.6: combat gets the full viewport. Home retains its branding. */
#stage[data-view="play"] #top{display:none}
#stage[data-view="play"] #hud{top:calc(8px + var(--safeTop))}
#stage[data-view="play"] .hud-top{align-items:start}
@media(max-width:650px){#stage[data-view="play"] #hud{top:calc(6px + var(--safeTop))}}
/* Collapse unused notification space in quiet combat. */
#stage[data-view="play"] .health:has(#toast[hidden]){min-height:0!important;padding-bottom:6px!important}

/* v127 active fire control, separate from the EMP; no extra top HUD. */
.surge-action{position:absolute;z-index:7;right:clamp(10px,3vw,35px);bottom:calc(100px + var(--safeB));min-width:80px;min-height:44px;padding:6px 9px;border:2px solid #ffd58d;border-radius:12px;color:#fff2cc;background:#342b25ed;font-weight:900;touch-action:manipulation;box-shadow:0 3px 10px #0007}.surge-action small{display:block;font-size:11px;letter-spacing:.04em}.surge-action:disabled{opacity:.72}.surge-action.active{background:#a75420;color:white;opacity:1}.surge-action:focus-visible{outline:2px solid white;outline-offset:2px}@media(max-width:650px){.surge-action{right:10px;bottom:calc(76px + var(--safeB));min-width:76px}}

#stage .weapon-status{position:relative;pointer-events:auto;touch-action:manipulation}#stage .weapon-status:disabled{cursor:default;opacity:1}#stage .weapon-status[data-swap="yes"]{border-style:double;box-shadow:inset 0 -2px 0 #eaffb7}#stage .weapon-status[data-swap="yes"]:after{content:"↻";position:absolute;right:-3px;bottom:-5px;font-size:10px;line-height:11px;color:#142b32;background:#d6f5ac;border-radius:5px;padding:0 2px}#stage .weapon-status:focus-visible{outline:2px solid white;outline-offset:2px}
/* v130: mastery feedback uses real records, never extra battle HUD panels. */
.next-goal{font-size:11px;color:#cce8ec;text-align:left;font-weight:700;line-height:1.25;margin:7px 0;display:grid;gap:4px}.next-goal progress,.result-comparison progress{appearance:none;width:100%;height:5px;border:0;border-radius:4px;overflow:hidden;background:#091d2c;display:block}.next-goal progress::-webkit-progress-bar,.result-comparison progress::-webkit-progress-bar{background:#091d2c}.next-goal progress::-webkit-progress-value,.result-comparison progress::-webkit-progress-value{background:#b8ed76}.next-goal progress::-moz-progress-bar,.result-comparison progress::-moz-progress-bar{background:#b8ed76}#bestKillsBar::-webkit-progress-value{background:#8ca4b6}#bestKillsBar::-moz-progress-bar{background:#8ca4b6}#bestKillsBar[hidden]{display:none}.result-comparison{font-size:12px;line-height:1.3;display:grid;gap:4px;text-align:left;color:#e2f7ff;background:#0b293e;border-radius:8px;padding:7px}.result-comparison[hidden]{display:none}.result-comparison small{color:#a7c6d5}.result-reward{font-size:16px;font-weight:900;color:#d7ff8d;margin:4px 0}.end-panel{padding:14px 16px}.end-panel h2{font-size:clamp(23px,5.5vw,38px);margin:4px 0}.end-panel .stars{font-size:32px}.end-panel .stats{margin:8px 0;gap:5px}.end-panel .stats>div{padding:5px 2px}.end-panel .stats b{font-size:26px}.end-panel .result-detail{font-size:12px;line-height:1.3;margin:5px 0}.end-panel .result-goals{font-size:10px;margin:5px 0}.end-panel .btn-primary,.end-panel .btn-secondary{min-height:44px;margin:5px 0 0}.end-panel #menu{background:transparent;border-width:1px;box-shadow:none}.end-panel #resultBreak{font-size:12px;color:#bddde5;margin:7px 0}#victoryFlourish{position:absolute;z-index:13;top:39%;left:0;right:0;text-align:center;font-size:clamp(23px,6vw,48px);font-weight:1000;color:#fff2b4;text-shadow:0 3px 0 #17384b,0 0 20px #ffad5e;pointer-events:none;animation:victory-in .3s ease-out both}#victoryFlourish span{display:block;font-size:12px;letter-spacing:.16em;color:#efffff}#victoryFlourish[hidden]{display:none}@keyframes victory-in{from{transform:scale(.82);opacity:0}to{transform:scale(1);opacity:1}}#comboStatus{background-image:linear-gradient(90deg,#baff7540 var(--chain-left,0%),transparent var(--chain-left,0%));} .victory-beat #world{filter:brightness(1.09)}@media(max-height:650px){#stage .end-panel{padding:8px 12px}.end-screen{padding:7px}.end-panel h2{font-size:22px}.end-panel .stars{font-size:26px}.end-panel .stats small{font-size:10px}.end-panel .stats b{font-size:22px}.end-panel .result-goals{line-height:1.2}.next-goal{font-size:10px;margin:5px 0}.end-panel .btn-primary,.end-panel .btn-secondary{min-height:44px}.result-comparison{padding:5px}}

.stage-and-goals{display:flex;align-items:center;justify-content:center;gap:5px;max-width:100%;flex-wrap:wrap}.stage-and-goals #liveGoals{font-size:9px;font-weight:800;letter-spacing:0;color:#dbefa0;white-space:nowrap}.stage-and-goals #liveGoals[hidden]{display:none}@media(max-width:360px){.stage-and-goals{gap:3px}.stage-and-goals #liveGoals{font-size:8px}}

/* Battle Rhythm: preserve exit, keep road visible, replay is always intentional. */
#stage .end-screen{align-items:flex-end;background:linear-gradient(transparent 12%,#031a2b42 45%,#031a2bd9 100%);padding:8px 10px max(10px,env(safe-area-inset-bottom));}#stage .end-panel{max-height:calc(100dvh - 32px);padding:12px;border-width:1px 1px 3px;border-radius:16px;background:#102d40f2;}#stage .end-panel #retry{min-height:54px;font-size:21px;}#stage .end-panel #menu{min-height:38px;font-size:12px;}#resultMore{margin-top:7px;text-align:left}#resultMore summary{cursor:pointer;font-size:12px;font-weight:800;color:#bce9f2;padding:8px 2px;}#resultMore[open]{padding-bottom:3px}.fleet-badge.gate-pop:after{animation-duration:1.2s}.fleet-badge.gate-pop.big-gain>span{animation:rf-count-pop .45s ease-out}@keyframes rf-count-pop{0%,100%{transform:scale(1)}35%{transform:scale(1.18)}}.gate-intel>span[data-kind="rocket"]{border-color:#ffad61}.gate-intel>span[data-kind="rail"]{border-color:#6ce6ff}.gate-intel>span[data-kind="shield"]{border-color:#85aaff}.gate-intel>span[data-kind="cost"]{border-color:#ffc080}.gate-intel>span[data-kind="multiply"]{border-color:#d4fa6b}.gate-intel>span[data-kind="add"]{border-color:#9eff75}@media(prefers-reduced-motion:reduce){.fleet-badge.gate-pop.big-gain>span{animation:none}}

#stage[data-view="end"] #top{display:none}#stage .end-panel .eyebrow{font-size:10px;margin:0}#stage .end-panel h2{font-size:clamp(20px,4.5vw,31px)}#stage .end-panel .stars{font-size:23px;line-height:1.2}#stage .end-panel .stats{margin:5px 0;gap:5px}#stage .end-panel .stats>div{padding:3px 2px;border-width:1px;border-radius:8px}#stage .end-panel .stats b{font-size:21px}#stage .end-panel .result-detail{margin:4px 0}#stage .end-panel .result-reward{font-size:13px}#stage .result-secondary-actions{display:flex;gap:6px}#stage .result-secondary-actions>button{flex:1;min-width:0;font-size:12px;min-height:40px}#stage #resultMore{margin-top:3px}#routeSummary{font-size:11px;color:#b5dce8;margin:4px 0 8px}#stage .end-panel{background:#102d40e8}

#stage #resultUpgrade{font-size:12px;min-height:44px;border-color:#baff75}#resultUpgrade[hidden],#resultUpgradeDetail[hidden]{display:none}#resultUpgradeDetail,#resultUpgradeReceipt{display:block;color:#d9f5d2;font-size:11px;line-height:1.3;margin:3px 0}#resultUpgradeReceipt:empty{display:none}#salvageDetail{font-size:11px;color:#b5dce8}#resultVibration{font-size:12px;min-height:44px}

#resultNextTarget{display:block;color:#cce8ec;font-size:11px;line-height:1.25;margin:5px 0 2px} #weaponStatus #weaponLabel{white-space:nowrap}

/* Contract locks must look and behave like locks, not an unresponsive play button. */
#stage .daily-card button:disabled{opacity:.55;cursor:not-allowed;border-color:#627888;background:#192f40;color:#c5d6df}

.frontline-link{margin:5px 0;max-width:390px;margin-inline:auto}.frontline-link>summary{min-height:34px;display:grid;place-items:center;cursor:pointer;color:#bfeaff;font-weight:800}.frontline-link .daily-card{justify-content:center}.stage-grade{display:block;font-size:10px;color:inherit;line-height:1.0;opacity:.90}

/* Wide tactical arena: keep the board visible and show the actual selected lane. */
#stage[data-view="play"] .vignette{background:linear-gradient(180deg,#061a2e5c,transparent 19%,transparent 83%,#071b3070);}
.gate-intel>span.selected-lane{background:#244f43;border-color:#e8ff96!important;box-shadow:inset 0 -2px 0 #d4fa6b;color:#f4ffcd;}
/* Bright arena, not a dark tunnel: keep HUD contrast without dimming combat. */
#stage[data-view="play"] .vignette{background:linear-gradient(180deg,#0d20343b,transparent 21%,transparent 90%,#122c4022);}

/* Readiness is visible on the action itself; no additional text or HUD rows. */
#stage .surge-action,#stage .emp{isolation:isolate;min-height:44px;min-width:68px;}
#stage .surge-action::before,#stage .emp::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:2px;background:conic-gradient(#dcfb9d var(--ready-angle,0deg),#54717b 0deg);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none;z-index:-1;}
#stage .surge-action:focus-visible,#stage .emp:focus-visible{outline:3px solid #ffffff;outline-offset:3px;}

/* Reward spring is on the number alone, never on the anchored HUD or controls. */
#stage #fleetValue.counter-spring{animation:rf-reward-spring .32s cubic-bezier(.22,.9,.34,1) both;display:inline-block;}
@keyframes rf-reward-spring{0%,100%{transform:scale(1)}30%{transform:scale(1.20);color:#e5ff8a}68%{transform:scale(.97)}85%{transform:scale(1.035)}}
@media(prefers-reduced-motion:reduce){#stage #fleetValue.counter-spring{animation:none!important}}

/* Fit the full 1,200-member count, including its reward spring. */
#stage #fleetBadge{max-width:none;width:max-content;min-height:36px;padding-inline:11px;}
@media(min-width:651px){#stage #fleetBadge{min-height:42px;}}

/* Full Deck: dedicated controls, never overlay the playable army. */
#stage{--actionDock:calc(66px + var(--safeB));}
#stage:is([data-view="play"],[data-view="pause"],[data-view="end"]) #world{height:calc(100% - var(--actionDock));}
#stage[data-view="play"]::after{content:"";position:absolute;z-index:3;left:0;right:0;bottom:0;height:var(--actionDock);background:linear-gradient(180deg,#172e40,#0b1d2d);border-top:1px solid #5e9bab;pointer-events:none;}
#stage[data-view="play"] #formationControl{left:8px;bottom:calc(8px + var(--safeB));width:clamp(132px,25%,178px);padding:2px;min-height:48px;justify-content:center;box-shadow:none;border-radius:10px;}
#stage[data-view="play"] .formation-caption,#stage[data-view="play"] #formationHelp{display:none;}
#stage[data-view="play"] .formation-options button{min-height:44px;padding:3px 1px;font-size:clamp(11px,2.5vw,13px);}
#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{height:48px;min-height:48px;width:70px;min-width:70px;bottom:calc(8px + var(--safeB));padding:3px 4px;justify-content:center;border-radius:10px;box-shadow:none;font-size:14px;}
#stage[data-view="play"] #emp{right:8px;border-bottom-width:3px;gap:3px;}
#stage[data-view="play"] #emp svg{width:16px;height:16px;flex:none;}
#stage[data-view="play"] #surge{right:86px;}
#stage[data-view="play"] #steerHint{left:8px;bottom:calc(16px + var(--safeB));top:auto;transform:none;font-size:11px;padding:3px 7px;}
#stage[data-view="play"] #formationControl:not([hidden]) ~ #steerHint{display:none;}
@media(min-width:650px){#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{width:86px;}#stage[data-view="play"] #surge{right:102px;}}
@media(max-height:450px){#stage{--actionDock:calc(56px + var(--safeB));}#stage[data-view="play"] #formationControl,#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{bottom:calc(3px + var(--safeB));}}
@media(max-height:450px){#stage[data-view="play"] #steerHint{bottom:calc(6px + var(--safeB));}}

/* Third active skill fits the same dock; no scene height or camera changes. */
#stage[data-view="play"] #overclock{position:absolute;z-index:7;right:194px;bottom:calc(8px + var(--safeB));width:70px;min-height:48px;height:48px;border:2px solid #7ae9ff;border-radius:18px;color:#eaffff;background:linear-gradient(to top,#196e8b var(--energy,100%),#183144 var(--energy,100%));font-size:12px;font-weight:900;touch-action:none;user-select:none;padding:3px 1px;}
#overclock small{display:block;font-size:11px;}#overclock.active{border-color:#fff4a0;background:linear-gradient(to top,#c76e29 var(--energy),#183144 var(--energy));}#overclock:focus-visible{outline:2px solid white;outline-offset:2px;}
#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{border-radius:18px;}
@media(max-width:649px){#stage[data-view="play"] #formationControl{left:6px;width:124px;}#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{width:58px;min-width:58px;font-size:12px;}#stage[data-view="play"] #emp{right:6px;}#stage[data-view="play"] #surge{right:68px;}#stage[data-view="play"] #overclock{right:130px;width:54px;}}
@media(max-height:450px){#stage[data-view="play"] #overclock{bottom:calc(3px + var(--safeB));}}

@media(max-width:380px){#stage[data-view="play"] #steerHint{left:6px;padding-inline:3px;font-size:10px;max-width:118px;}}

/* Portrait reference: a quiet HUD, readable controls, no overlay on the steering surface. */
#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{border-radius:50%;width:50px;min-width:50px;height:50px;min-height:50px;flex-direction:column;gap:0;font-size:12px;line-height:13px;text-align:center;}
#stage[data-view="play"] #emp svg{display:none;}
#stage[data-view="play"] #emp small,#stage[data-view="play"] #surge small,#stage[data-view="play"] #overclock small{font-size:12px;letter-spacing:0;}
#stage[data-view="play"] #emp{right:6px;}#stage[data-view="play"] #surge{right:62px;}
#stage[data-view="play"] #overclock{right:118px;width:74px;color:#fff9b4;border-color:#ffde60;font-size:13px;border-radius:12px;}
#stage[data-view="play"] .formation-options button{font-size:12px;}
#stage[data-view="play"] .hud-mid>span,#stage[data-view="play"] .weapon-status{font-size:12px;}
@media(max-width:359px){#stage[data-view="play"] #formationControl{width:112px;}#stage[data-view="play"] #overclock{width:80px;} }
@media(min-width:650px){#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{width:54px;min-width:54px;height:54px;}#stage[data-view="play"] #surge{right:68px;}#stage[data-view="play"] #overclock{right:130px;width:112px;}}
@media(max-height:450px){#stage[data-view="play"] #emp,#stage[data-view="play"] #surge{height:48px;min-height:48px;}}

#stage[data-view="play"] .formation-options{grid-template-columns:1fr;width:100%;}
#stage[data-view="play"] #formationControl{width:104px;}
#stage[data-view="play"] #formationToggle{font-size:12px;white-space:normal;border:1px solid #86d9ee;color:#e7faff;background:#154b64;}
#stage[data-view="play"] #formationToggle[aria-pressed="true"]{background:#c5f3fb;color:#123750;}
#stage[data-view="play"] #steerHint{font-size:12px;}
@media(max-width:380px){#stage[data-view="play"] #steerHint{max-width:108px;line-height:14px;white-space:normal;}#stage[data-view="play"] #steerHint span{font-size:18px;}}

/* Immediate weapon feedback, with no repositioning of the control or HUD. */
#healthBar[data-health="good"]{background:linear-gradient(90deg,#4ddd69,#caff6d)}
#healthBar[data-health="low"]{background:linear-gradient(90deg,#f3b34d,#ffdb6e)}
#healthBar[data-health="critical"]{background:linear-gradient(90deg,#e34a4c,#ff8271)}
#weaponStatus.weapon-pop .weapon-icon{animation:rf-weapon-pop .28s ease-out both}
@keyframes rf-weapon-pop{0%,100%{transform:scale(1)}45%{transform:scale(1.16)}}
@media(prefers-reduced-motion:reduce){#weaponStatus.weapon-pop .weapon-icon{animation:none}}

/* Commander counter: distinct from gate rewards; fits four digits. */
#stage #fleetBadge{gap:6px;border-radius:9px;background:#102c42ee;box-shadow:0 2px 4px #061e3166;padding-block:3px;align-items:center;}
#stage #fleetBadge .fleet-caption{font-size:12px;font-weight:800;color:#d1edf7;letter-spacing:.055em;text-shadow:none;}
#stage #fleetBadge #fleetValue{font-size:clamp(23px,3vw,32px);color:#e1ff8b;}

/* V17 compact, keyboard-accessible help in the existing scrollable panels. */
.rf17-help{font-size:13px;line-height:1.5;text-align:left;color:#e0f3ff;padding:6px 4px}.rf17-help p{margin:0 0 9px}.rf17-help strong{color:#fff}.rf17-pause-help summary{min-height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:800;color:#bdeeff}.rf17-pause-help summary:focus-visible{outline:2px solid white;outline-offset:2px}.rf17-pause-help{width:100%;text-align:left}

/* V51 startup status is visible before module evaluation; never intercept input after ready. */
#bootScreen{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 40%,#173c50,#071622 72%);padding:20px;color:#edfaff;text-align:center}#bootScreen[hidden]{display:none!important}.boot-card{width:min(100%,340px);padding:28px 20px;border:1px solid #426a7e;border-radius:16px;background:#0d2638;box-shadow:0 12px 50px #0007}.boot-card>strong{font-size:27px;letter-spacing:.08em}.boot-card>strong b{color:#86dcff}.boot-card>small{display:block;letter-spacing:.22em;color:#a3c9d9}.boot-card p{margin:24px 0 12px;font-size:14px}.boot-card progress{width:100%;height:12px;accent-color:#63d6e9}.boot-card button{margin-top:18px;min-height:44px;width:100%;border:1px solid #7ac6df;border-radius:8px;background:#174258;color:white;font-weight:700}.boot-card button[hidden]{display:none!important}

/* V39: home only; existing IDs, controls, progress and gameplay layout preserved. */
#stage[data-view="home"] .hero-title{padding:3px 6px 5px;text-shadow:0 2px 8px #071827;background:linear-gradient(180deg,#0b253aab,transparent);border-radius:12px}
#stage[data-view="home"] .hero-title h1{letter-spacing:.025em;text-shadow:0 3px 0 #12364c,0 5px 10px #06182f}
#stage[data-view="home"] .home-inventory>span{padding:3px 8px;border:1px solid #83c5e45e;border-radius:7px;background:#102c43e8;white-space:nowrap}
#stage[data-view="home"] .home-panel{border:1px solid #83cde9;border-top:3px solid #7be8e3;border-radius:18px;background:linear-gradient(150deg,#173f59fa,#0b253def 58%,#081d31fa);box-shadow:0 12px 30px #051624a8,inset 0 1px 0 #d4ffff33}
#stage[data-view="home"] .mission-eyebrow{color:#a9e8ed;letter-spacing:.16em}
#stage[data-view="home"] #homeStageTitle{line-height:1.12;overflow-wrap:anywhere}
#stage[data-view="home"] .mission-tag{border:1px solid #83e1e7;border-radius:8px;color:#bff9ff;background:#123f52;box-shadow:inset 0 0 0 2px #65dde51a}
#stage[data-view="home"] .stage-selector button{background:linear-gradient(#2b6580,#15384f);border:2px solid #84ddeb}
#stage[data-view="home"] #deploy{background:linear-gradient(180deg,#d8ff99,#99ec4e 65%,#80d839);border:2px solid #eaffbc;border-radius:13px;box-shadow:0 4px 0 #3b923d,inset 0 1px 0 #fff9;letter-spacing:.06em}
#stage[data-view="home"] #deploy:active{transform:translateY(3px);box-shadow:0 1px 0 #3b923d}
#stage[data-view="home"] .quick-links>button,#stage[data-view="home"] .challenge-link>summary{background:linear-gradient(#214c66,#16394f);border-color:#639eba;border-radius:8px;min-height:44px}
#stage[data-view="home"] .challenge-link[open]>summary{background:#2b5d78}
#stage[data-view="home"] .mission-details>summary{min-height:44px;display:flex;align-items:center;justify-content:center;line-height:1.25}
#stage[data-view="home"] .mission-details>summary::before{content:'▸';margin-right:7px;color:#86dce6}
#stage[data-view="home"] .mission-details[open]>summary::before{content:'▾'}
#stage[data-view="home"] .home-panel :is(button,summary):focus-visible{outline:3px solid #e4ff9c;outline-offset:2px}
#stage[data-view="home"] .next-goal{color:#d8edf5}
@media(max-height:650px) and (max-width:650px){
 #stage[data-view="home"] .home-panel{padding:7px 10px 6px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);column-gap:6px}
 #stage[data-view="home"] .home-panel>:not(.frontline-link):not(.mission-details){grid-column:1/-1}
 #stage[data-view="home"] .home-panel h2{margin:2px 0 3px}
 #stage[data-view="home"] .stage-selector{margin:0 auto 2px}
 #stage[data-view="home"] #deploy{margin:4px 0 8px;min-height:49px}
 #stage[data-view="home"] .frontline-link{width:100%;margin:2px 0 0}
 #stage[data-view="home"] .mission-details>summary{margin:2px 0 0;padding:4px;border:1px solid #639eba;border-radius:8px;font-size:11px;background:#153a51}
 #stage[data-view="home"] .home-panel:has(.frontline-link[open],.mission-details[open]) :is(.frontline-link,.mission-details){grid-column:1/-1}
}
@media(min-width:900px) and (min-height:650px) and (min-aspect-ratio:6/5){
 #stage[data-view="home"] .home-screen{align-items:flex-end;padding-right:clamp(18px,3vw,46px);padding-bottom:calc(28px + var(--safeB))}
#stage[data-view="home"] .corner-note{left:clamp(10px,2vw,18px);right:clamp(10px,2vw,18px);bottom:calc(12px + var(--safeB));font-size:clamp(10px,.95vw,12px);line-height:1.25;color:#cde9ee9c;text-align:left;z-index:5}
 #stage[data-view="home"] .hero-title{align-self:center}
 #stage[data-view="home"] .home-panel{width:min(40%,430px)}
}

/* V42: reference-inspired action dock. Same reserved canvas height and actual ability state. */
#stage[data-view="play"]::after{background:linear-gradient(180deg,#557a90 0px,#203e55 2px,#102e45 6px,#0c2235 55%,#091a2a 100%);border-top:1px solid #83d6e9;box-shadow:inset 0 3px 0 #1a536b,inset 0 -2px 0 #061521;}
#actionDockV42{display:contents;}
#stage[data-view="play"] #actionDockV42{position:absolute;z-index:7;left:50%;transform:translateX(-50%);bottom:var(--safeB);height:calc(var(--actionDock) - var(--safeB));width:min(100%,720px);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) clamp(48px,13vw,60px) clamp(48px,13vw,60px);gap:5px;align-items:center;padding:3px 6px;pointer-events:none;}
#stage[data-view="play"] #actionDockV42>button,#stage[data-view="play"] #actionDockV42>#formationControl{position:relative;inset:auto;transform:none;width:100%;min-width:0;margin:0;pointer-events:auto;grid-row:1;}
#stage[data-view="play"] #actionDockV42>#formationControl{grid-column:1;height:52px;min-height:44px;padding:0;border:0;background:transparent;}
#stage[data-view="play"] #actionDockV42 .formation-options{height:100%;}
#stage[data-view="play"] #actionDockV42 #formationToggle{width:100%;height:100%;min-height:44px;border:1px solid #7ce8fd;border-bottom:3px solid #23738d;border-radius:11px;background:linear-gradient(145deg,#246280,#0b2b40 64%);color:#f2fcff;box-shadow:inset 0 1px 0 #9deafa66,0 2px 4px #0008;font-size:clamp(11px,2.8vw,14px);font-weight:900;line-height:1.1;}
#stage[data-view="play"] #actionDockV42 #formationToggle::before{content:"↔";display:block;color:#93edff;font-size:17px;line-height:17px;}
#stage[data-view="play"] #actionDockV42 #formationToggle[aria-pressed="true"]{background:linear-gradient(145deg,#246a75,#114638);border-color:#bafa8a;color:#efffd3;}
#stage[data-view="play"] #actionDockV42>#steerHint{grid-column:1;grid-row:1;position:relative;inset:auto;transform:none;max-width:none;white-space:normal;text-align:center;line-height:1.15;padding:2px;font-size:10px;background:transparent;color:#b8ddea;}
#stage[data-view="play"] #actionDockV42>#overclock{grid-column:2;height:56px;min-height:44px;isolation:isolate;display:grid;grid-template-columns:20px minmax(0,1fr);grid-template-rows:1fr 12px;column-gap:4px;align-items:center;padding:3px 6px 5px;border:2px solid #baff62;border-bottom:3px solid #4ea43b;border-radius:12px;background:linear-gradient(150deg,#246a43,#0b342b 60%,#092a2c);color:#f5ffeb;box-shadow:inset 0 0 9px #7cff4438,0 0 9px #83ff4644,0 2px 3px #0008;line-height:1;}
#stage[data-view="play"] #actionDockV42:has(#surge[hidden])>#overclock{grid-column:2/4;}
#stage[data-view="play"] #actionDockV42>#overclock .boost-icon{width:20px;height:25px;fill:#eaff42;filter:drop-shadow(0 0 2px #b8ff6a57);}
#stage[data-view="play"] #actionDockV42>#overclock .boost-label{min-width:0;display:grid;justify-items:center;gap:2px;font-size:clamp(12px,3vw,16px);font-weight:1000;letter-spacing:.01em;}
#stage[data-view="play"] #actionDockV42>#overclock #overclockText{font-size:11px;color:#eaff94;font-weight:900;}
#stage[data-view="play"] #actionDockV42>#overclock .boost-meter{grid-column:1/-1;width:100%;height:9px;border:1px solid #93d56e;border-radius:5px;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),#092b2d calc(25% - 1px),#092b2d 25%),linear-gradient(90deg,#b7fc2e var(--energy,100%),#092b2d var(--energy,100%));box-shadow:inset 0 1px 2px #061c20;}
#stage[data-view="play"] #actionDockV42>#overclock.active{border-color:#ffe66d;background:linear-gradient(140deg,#855122,#423724 70%);box-shadow:inset 0 0 8px #ffcd5666,0 0 8px #ffcc4533;}
#stage[data-view="play"] #actionDockV42>#surge,#stage[data-view="play"] #actionDockV42>#emp{--ring:#69e6ff;--ring-dim:#3c697e;grid-column:3;height:clamp(48px,13vw,60px);min-height:44px;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:4px 1px;border:1px solid #95dbea;border-bottom:2px solid #244b60;border-radius:50%;background:linear-gradient(150deg,#244b66,#0b253d 66%);color:#f5fcff;box-shadow:inset 0 0 0 2px #071b2f,0 2px 4px #0008;opacity:1;isolation:isolate;line-height:1.03;font-size:10px;font-weight:900;}
#stage[data-view="play"] #actionDockV42>#emp{grid-column:4;--ring:#e7a4ff;--ring-dim:#654873;border-color:#d6a8f4;background:linear-gradient(150deg,#493b66,#18283e 66%);}
#stage[data-view="play"] #actionDockV42>#surge::before,#stage[data-view="play"] #actionDockV42>#emp::before{inset:2px;padding:3px;z-index:0;background:conic-gradient(var(--ring) var(--ready-angle,0deg),var(--ring-dim) 0deg);}
#stage[data-view="play"] #actionDockV42>#surge svg,#stage[data-view="play"] #actionDockV42>#emp svg{display:block;width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
#stage[data-view="play"] #actionDockV42>#surge small,#stage[data-view="play"] #actionDockV42>#emp small{font-size:9px;letter-spacing:0;line-height:1.05;color:var(--ring);font-weight:900;}
#stage[data-view="play"] #actionDockV42>#surge:disabled,#stage[data-view="play"] #actionDockV42>#emp:disabled{color:#c0cbd8;box-shadow:inset 0 0 0 2px #071b2f;}
#stage[data-view="play"] #actionDockV42>#surge.active{background:linear-gradient(145deg,#146783,#0d344d);color:white;}
#stage[data-view="play"] #actionDockV42 button:focus-visible{outline:2px solid white;outline-offset:1px;}
/* Match top status modules to the dark mechanical dock, without moving them. */
#stage[data-view="play"] :is(.health,.hud-mid,.square-btn){background:linear-gradient(150deg,#164360ed,#082439f2 65%);border-color:#74d9f4;box-shadow:inset 0 1px 0 #b8f7ff40,0 2px 5px #051d3066;border-radius:11px;}
#stage[data-view="play"] .mini-label>svg{fill:#fa6677;stroke:#ffadb4;}
#stage[data-view="play"] :is(.health-track,.timer-track){border-color:#4a90ad;background:#07192c;box-shadow:inset 0 1px 2px #020c14;}
#stage[data-view="play"] #fleetBadge{border-color:#7ce2f8;background:linear-gradient(160deg,#1c5270ed,#09263dee 70%);box-shadow:0 2px 4px #061e3166,inset 0 1px 0 #d6faff33;}
@media(max-width:359px){#stage[data-view="play"] #actionDockV42{gap:4px;padding-inline:4px;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 48px 48px;}#stage[data-view="play"] #actionDockV42>#overclock{grid-template-columns:16px minmax(0,1fr);padding-inline:4px;}#stage[data-view="play"] #actionDockV42>#overclock .boost-icon{width:16px;}}
@media(max-height:450px){#stage[data-view="play"] #actionDockV42>#overclock,#stage[data-view="play"] #actionDockV42>#formationControl{height:48px;}#stage[data-view="play"] #actionDockV42>#surge,#stage[data-view="play"] #actionDockV42>#emp{height:48px;width:48px;justify-self:center;}#stage[data-view="play"] #actionDockV42>#overclock .boost-meter{height:7px;}}

/* V43 reference finishing: actual controls and values remain unchanged. */
#stage[data-view="play"] .hud-top{align-items:start;}
#stage[data-view="play"] .health{min-height:0!important;padding-bottom:6px!important;}
#stage[data-view="play"] .health .toast:not([hidden]){position:static!important;display:block!important;max-height:none!important;margin-top:4px;line-height:1.18!important;overflow-wrap:anywhere;}
#stage[data-view="play"] #actionDockV42>#emp{--ring:#f0baff;--ring-dim:#4b375f;background:radial-gradient(ellipse at 40% 24%,#594373 0%,#292c4a 46%,#101e36 78%);border-color:#b69cd9;box-shadow:inset 0 0 0 2px #0a1830,inset 0 0 9px #af6fff33,0 2px 4px #0008;}
#stage[data-view="play"] #actionDockV42>#emp:not(:disabled){border-color:#f1bcff;box-shadow:inset 0 0 0 2px #112843,inset 0 0 11px #c478ff55,0 0 7px #ce80ff66;}
#stage[data-view="play"] #actionDockV42>#emp svg{width:21px;height:21px;color:#f5e4ff;stroke-width:2.2;}
#stage[data-view="play"] #actionDockV42>#emp #empText{color:#f4c5ff;font-size:9px;}
#stage[data-view="play"] #actionDockV42>#emp:disabled svg{color:#b8a9cb;}
#stage[data-view="play"] #actionDockV42>#emp:disabled{box-shadow:inset 0 0 0 2px #0b1a2e;}
#stage[data-view="play"] #actionDockV42>#emp:active:not(:disabled){filter:brightness(1.2);}
@media(max-width:359px),(max-height:450px){#stage[data-view="play"] #actionDockV42>#emp svg{width:18px;height:18px;}}

/* V44: separate BOOST from the adjacent ability; preserve dock/canvas height. */
#stage[data-view="play"] #actionDockV42{column-gap:8px;}
#stage[data-view="play"] #actionDockV42:has(#surge[hidden])>#overclock{width:calc(100% - 8px);justify-self:start;}
@media(min-width:650px){#stage[data-view="play"] #actionDockV42{column-gap:10px;}}

/* V45 — accessibility and containment, retain V44 dock spacing and canvas reservation. */
#stage[data-view="play"] .hud-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;}
#stage[data-view="play"] #pause{width:44px;min-width:44px;min-height:44px;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge){gap:0;padding:2px 3px 6px;line-height:1;overflow:visible;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>svg{width:16px;height:16px;flex:0 0 16px;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>span{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;position:relative;z-index:1;font-size:10px;flex:none;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>span>small{position:static;display:block;font-size:8px;line-height:1;white-space:nowrap;margin-top:1px;}
#stage[data-view="play"] #actionDockV42>#emp #empText{font-size:8px;}
#stage .tutorial-panel{position:static;inset:auto;transform:none;margin-top:4px;width:max-content;max-width:100%;}
#stage .tutorial-panel span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}
#stage .campaign-map{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));}
#stage .campaign-map button{min-width:44px;min-height:44px;}
#stage #home{overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;}
#stage #homeSfx{min-height:44px;margin:6px 0;font-size:14px;}
#stage #saveWarning{border:1px solid #ffc16b;border-radius:10px;background:#392719;padding:8px;color:#fff1cd;margin-bottom:8px;overflow-wrap:anywhere;}
#stage #saveWarning p{font-size:12px;margin:0 0 6px;}
#stage #saveWarning button{min-height:44px;font-size:13px;margin:5px 0;}
#stage #graphicsRecovery{position:absolute;z-index:31;left:6%;right:6%;top:calc(8px + var(--safeTop));background:#392719;border:1px solid #ffc16b;border-radius:10px;padding:10px;color:#fff1cd;text-align:center;font-size:14px;pointer-events:none;}
@media (max-height:500px) and (min-aspect-ratio:6/5){#stage[data-view="home"] #home{justify-content:flex-start;gap:8px;padding-top:44px;padding-bottom:12px;}#stage[data-view="home"] .hero-title{padding:4px;}#stage[data-view="home"] .home-panel{margin-bottom:12px;}}
/* Fit each text line inside the inner circular ring, including 48px controls. */
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge){padding:1px 3px 8px;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>span{font-size:9px;}
#stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>svg{width:15px;height:15px;flex-basis:15px;}
@media(max-width:359px),(max-height:450px){#stage[data-view="play"] #actionDockV42>#surge #surgeText{font-size:7px;letter-spacing:-.15px;}}


/* V52 optional steering and replay recommendations live in existing expanded panels. */
#stage #homeSteering,#stage #replayTarget{min-height:44px;width:100%;font-size:12px;white-space:normal;line-height:1.25}#stage #pauseSteering{min-height:56px;width:100%;font-size:17px;white-space:normal;line-height:1.2;padding-inline:14px}#stage #replayHint{font-size:12px;line-height:1.4;color:#d9f3ff;margin:8px 0}

#mirrorReplay{margin-top:6px;min-height:44px}
#mirrorReplayHelp{font-size:11px;color:#c6edf7;margin:5px 0}

/* V61: credits participate in home-panel flow, never cover gameplay or sit behind a panel. */
#stage #home .corner-note{position:static;display:block;width:100%;min-width:0;margin:8px 0 0;padding:7px 0 0;border-top:1px solid #72b9cb40;color:#bfdce5;text-align:center;font-size:10px;line-height:1.4;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;pointer-events:none;}
#stage[data-view="home"] #home{padding-bottom:max(14px,calc(10px + var(--safeB)));}


/* V62 mobile: visible controls share one dock; no reserved empty slots or road overlays. */
@media (max-width:650px){
 #stage[data-view="play"] #actionDockV42{display:flex;justify-content:center;align-items:center;gap:6px;padding:3px 8px;width:100%;}
 #stage[data-view="play"] #actionDockV42>:is(#formationControl,#overclock,#surge,#emp){position:relative;inset:auto;transform:none;height:52px;min-height:44px;margin:0;justify-self:auto;aspect-ratio:auto;}
 #stage[data-view="play"] #actionDockV42>#formationControl{flex:1 1 68px;min-width:64px;max-width:110px;}
 #stage[data-view="play"] #actionDockV42 #formationToggle{font-size:11px;border-radius:11px;}
 #stage[data-view="play"] #actionDockV42>#steerHint{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);white-space:nowrap;pointer-events:none;background:#082e45e8;}
 #stage[data-view="play"] #actionDockV42>#overclock,#stage[data-view="play"] #actionDockV42:has(#surge[hidden])>#overclock{flex:1.4 1 106px;min-width:96px;max-width:190px;width:auto;padding:4px 7px;grid-template-columns:17px minmax(0,1fr);grid-template-rows:1fr 7px;border-radius:11px;justify-self:auto;}
 #stage[data-view="play"] #actionDockV42>#overclock .boost-label{font-size:13px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 5px;}
 #stage[data-view="play"] #actionDockV42>#overclock .boost-label::after{content:"HOLD";font-size:9px;color:#dcf4ca;width:100%;text-align:center;}
 #stage[data-view="play"] #actionDockV42>#overclock .boost-icon{width:16px;height:22px;}
 #stage[data-view="play"] #actionDockV42>#overclock #overclockText{font-size:10px;}
 #stage[data-view="play"] #actionDockV42>#overclock .boost-meter{height:7px;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge){flex:1 1 58px;min-width:54px;max-width:88px;width:auto;display:flex;gap:2px;padding:4px 3px;border-radius:11px;border:2px solid var(--ring);border-bottom:3px solid var(--ring-dim);box-shadow:inset 0 1px 0 #ffffff26,0 2px 4px #0008;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge)::before{display:none;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>svg{width:17px;height:17px;flex-basis:17px;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>span{font-size:11px;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge)>span>small,#stage[data-view="play"] #actionDockV42>#emp #empText{font-size:10px;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge):disabled{border-color:var(--ring-dim);opacity:.8;}
 #stage[data-view="play"] .hud-top{gap:4px;}
 #stage[data-view="play"] .hud-mid .combo-chip{min-height:17px;padding:1px 7px;border-radius:8px;font-size:10px!important;}
 #stage[data-view="play"] .gate-intel{gap:4px;margin-top:3px;}
 #stage[data-view="play"] .gate-intel>span{font-size:10px;padding:3px 4px;line-height:1.15;}
 #stage[data-view="play"] .hud-mid .boss-bar{padding:2px 4px 3px;font-size:9px;line-height:1.15;}
 #stage[data-view="pause"] #pauseMenu .rf17-pause-help summary{min-height:46px;border:1px solid #7fd8eb;border-radius:12px;background:#123b52;box-shadow:inset 0 1px 0 #c5fbff24,0 2px 0 #082941;margin-top:12px;}
 #stage[data-view="pause"] #pauseMenu .rf17-pause-help summary::before{content:"▸";margin-right:8px;}
 #stage[data-view="pause"] #pauseMenu .rf17-pause-help[open] summary::before{content:"▾";}
}
@media(max-width:650px) and (max-height:450px){#stage[data-view="play"] #actionDockV42>:is(#formationControl,#overclock,#surge,#emp){height:46px;}}


/* V66: interactive game surfaces are not text-selection editors. */
#stage summary,#stage button,#stage .end-panel,#stage .pause-panel{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
/* Mobile landscape: reserve side rails, instead of putting opaque cards across the gate approach.
   Keep the central canvas projection and the approved board styles; portrait is unchanged. */
@media (min-aspect-ratio:3/2) and (min-width:540px) and (max-height:600px){
 #stage:is([data-view="play"],[data-view="pause"],[data-view="end"]){width:min(100vw,1480px);--rail:clamp(118px,18vw,180px);}
 #stage:is([data-view="play"],[data-view="pause"],[data-view="end"]) #world{left:var(--rail);right:auto;width:calc(100% - 2 * var(--rail));}
 #stage[data-view="play"] #hud{left:0;right:0;top:calc(6px + var(--safeTop));display:grid;grid-template-columns:var(--rail) minmax(0,1fr) var(--rail);gap:4px 0;align-items:start;grid-auto-rows:auto;}
 #stage[data-view="play"] .hud-top,#stage[data-view="play"] .gate-intel:not([hidden]){display:contents;}
 #stage[data-view="play"] .health,#stage[data-view="play"] .hud-mid,#stage[data-view="play"] #gateIntelLeft,#stage[data-view="play"] #gateIntelRight,#stage[data-view="play"] #tutorialPanel,#stage[data-view="play"] #warning{min-width:0;width:auto;max-width:calc(100% - 12px);margin:0 6px;justify-self:stretch;overflow-wrap:anywhere;}
 #stage[data-view="play"] .health{grid-column:1;grid-row:1;padding:5px 5px!important;}
 #stage[data-view="play"] .hud-mid{grid-column:3;grid-row:1;padding:5px;gap:4px;}
 #stage[data-view="play"] #pause{grid-column:3;grid-row:3;justify-self:center;height:44px;}
 #stage[data-view="play"] #gateIntelLeft{grid-column:1;grid-row:2;}
 #stage[data-view="play"] #gateIntelRight{grid-column:3;grid-row:2;}
 #stage[data-view="play"] .gate-intel>span{white-space:normal;text-align:left;line-height:1.2;padding:4px;font-size:10px;}
 #stage[data-view="play"] #tutorialPanel{grid-column:1;grid-row:3;grid-template-columns:minmax(0,1fr) 44px;gap:2px;padding:3px;}
 #stage[data-view="play"] #tutorialPanel span{font-size:10px;}
 #stage[data-view="play"] #warning{grid-column:1;grid-row:4;flex-wrap:wrap;line-height:1.2;}
 #stage[data-view="play"] .mini-label{gap:4px;flex-wrap:wrap;font-size:15px;}
 #stage[data-view="play"] .weapon-status{font-size:10px;padding:3px 4px;max-width:100%;}
 #stage[data-view="play"] .health .toast{font-size:10px;}
 #stage[data-view="play"] .hud-mid .boss-bar{font-size:9px;}
}
/* A hazard warning takes priority over tutorial coaching on short landscape screens. */
@media (min-aspect-ratio:3/2) and (min-width:540px) and (max-height:380px){
 #stage[data-view="play"] #hud:has(#warning:not([hidden])) #tutorialPanel{display:none!important;}
 #stage[data-view="play"] #hud #warning{grid-row:3;}
}

/* V68: keep short-landscape dialogs below the native status protection strip.
   WebView may report zero safe-area inset even when Android overlays 24 CSS px.
   The 32px minimum includes an 8px clearance; larger reported insets take precedence.
   Scope to modal overlays only: portrait, world canvas and combat HUD stay unchanged. */
@media (min-aspect-ratio:3/2) and (min-width:600px) and (max-height:600px){
 #stage .pause-screen,#stage .end-screen{
  padding-top:max(32px,calc(var(--safeTop) + 8px));
  padding-bottom:max(10px,calc(var(--safeB) + 8px));
 }
 #stage .pause-panel,#stage .end-panel{
  min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;
 }
}

/* V69 comprehensive audit: keep undersized secondary actions usable and
   reserve native-dialog clearance at every supported short landscape width. */
#stage .end-panel #menu,#stage .end-panel #nextMission{min-height:44px; font-size:14px;}
#stage #resultMore>summary,#stage #masteryProgress{display:flex;align-items:center;min-height:44px;line-height:1.35;padding-block:8px;font-size:14px;cursor:pointer;}
#stage #skinSelect{min-height:44px;font-size:14px;}
#stage .quick-links:has(>details[open]){grid-template-columns:minmax(0,1fr);}
#stage .quick-links:has(>details[open])>details{grid-column:1/-1;}
#stage .quick-links:has(>details[open])>button{width:100%;}
@media (min-aspect-ratio:3/2) and (max-height:600px){
 #stage .pause-screen,#stage .end-screen{padding-top:max(32px,calc(var(--safeTop) + 8px));padding-bottom:max(10px,calc(var(--safeB) + 8px));}
 #stage .pause-panel,#stage .end-panel{min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;}
}
/* Disclosure affordances survive flex alignment; equal paired actions collapse
   to one full-width Home action on defeat. */
#stage #resultMore>summary::before,#stage #masteryProgress::before{content:'▸';margin-right:8px;flex:none;}
#stage #resultMore[open]>summary::before,#stage details[open]>#masteryProgress::before{content:'▾';}
#stage .result-secondary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;}
#stage .result-secondary-actions:has(#nextMission[hidden]){grid-template-columns:minmax(0,1fr);}

/* V70: short-width landscape uses the same HUD rails as wider landscape. */
@media (min-aspect-ratio:3/2) and (min-width:540px) and (max-width:599px) and (max-height:600px){
 #stage:is([data-view="play"],[data-view="pause"],[data-view="end"]){--rail:clamp(108px,19vw,118px);}
}

/* V73: weight and spacing independent of platform arrow glyph. */
#garageClose{display:flex;align-items:center;justify-content:center;gap:10px;}
#garageClose .back-arrow{flex:0 0 24px;width:24px;height:24px;}
#garageClose span{min-width:0;text-align:center;}

/* V75 desktop: visible controls pack into a centered group. Preserve the mobile
   touch and short-landscape dock, and the existing world-height reservation. */
@media(min-width:900px) and (min-height:601px) and (hover:hover) and (pointer:fine){
 #stage[data-view="play"] #actionDockV42{display:flex;width:100%;justify-content:center;align-items:center;gap:12px;padding-inline:12px;}
 #stage[data-view="play"] #actionDockV42>#formationControl{flex:0 0 126px;width:126px;}
 #stage[data-view="play"] #actionDockV42>#steerHint{flex:0 0 108px;width:108px;font-size:11px;}
 #stage[data-view="play"] #actionDockV42>#overclock,#stage[data-view="play"] #actionDockV42:has(#surge[hidden])>#overclock{flex:0 0 220px;width:220px;max-width:220px;height:56px;}
 #stage[data-view="play"] #actionDockV42>:is(#emp,#surge){flex:0 0 60px;width:60px;height:60px;}
}

/* V80: chapter selection only; combat layout unchanged. */
#stage[data-view="home"] #chapterPicker:not([hidden]){width:100%;min-height:44px;box-sizing:border-box;padding:5px 8px;border:1px solid #83cde9;border-radius:8px;background:#153a51;color:#eefaff;font:inherit;font-size:12px;}
#stage[data-view="home"] #chapterPicker:focus-visible{outline:2px solid #e4ff9c;outline-offset:2px;}

/* Quvilo RF10: short-landscape home. Secondary outpost actions stay reachable; a cue shows when the menu scrolls. */
.home-more{position:fixed;right:max(4px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));z-index:30;min-height:44px;min-width:44px;max-width:56px;padding:6px 6px;border-radius:14px;border:1px solid #9fe7ffaa;background:#0b2436ee;color:#e8fbff;font:800 12px/1.15 system-ui,sans-serif;letter-spacing:.02em;white-space:normal;box-shadow:0 6px 18px #0009;cursor:pointer}
.home-more[hidden]{display:none}
@media (orientation:landscape) and (max-height:420px){
 #home{padding-top:40px;gap:4px}
 #home .hero-title .eyebrow{margin:0}
 #home .hero-title h1{margin:0;font-size:22px;line-height:1.05}
 #home .home-inventory{margin:2px 0 0}
 #home .home-panel .mission-eyebrow{display:none}
 #home .home-panel h2{margin:0 0 2px}
 #home .stage-selector{margin:2px 0}
 #home .quick-links{margin-top:4px}
}
