/* Option 2: physical fire-control console. All readouts and controls remain live. */
.game-shell{--hud-ink:#e8d1aa;--hud-muted:#c1ab87;--hud-amber:#ffc268;--rim-x:1cqw;--rim-y:.75cqw;grid-template-rows:6% 80% 14%;background:#080b0c;border-color:#373b34}
.game-shell .topbar,.game-shell .hud-housing{position:relative;isolation:isolate;background:none;border:0;border-image:none;color:var(--hud-ink)}
.hud-skin{position:absolute;inset:0;z-index:-1;display:grid;grid-template-columns:var(--rim-x) minmax(0,1fr) var(--rim-x);grid-template-rows:var(--rim-y) minmax(0,1fr) var(--rim-y);pointer-events:none}
.hud-skin>span{display:block;min-width:0;min-height:0;aspect-ratio:auto!important;background-repeat:no-repeat}
.hud-pod-art{position:absolute;inset:0;z-index:-1;aspect-ratio:auto!important;pointer-events:none;background-repeat:no-repeat;clip-path:polygon(1% 0,99% 0,100% 4%,100% 55%,90% 100%,10% 100%,0 55%,0 4%)}
.game-shell .topbar{display:grid;grid-template-columns:1fr 28% 1fr;grid-template-rows:minmax(0,1fr);min-height:0;align-items:center;gap:0;padding:0 2%;margin-inline:1.2%;z-index:3;--header-control-height:clamp(28px,2.6cqw,50px)}
.game-shell .brand{font-size:clamp(12px,1.4cqw,23px);letter-spacing:.17em;gap:.8cqw}
.game-shell .brand-icon{width:1.7cqw;min-width:17px;height:2.1cqw;filter:invert(85%) sepia(35%) saturate(380%)}
.game-shell .mission-instruments{width:100%;height:5.5cqw;align-self:start;display:grid;grid-template-columns:36% 64%;gap:0;padding:.65cqw .55cqw 1.1cqw;top:0;z-index:4}
.game-shell .run-heading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1cqw;width:auto;padding:0}
.game-shell #run-mode{font-size:clamp(8px,.82cqw,13px);color:#d8b67e;letter-spacing:.035em}
.game-shell #run-clock{font-size:clamp(16px,1.75cqw,28px);line-height:1.05;letter-spacing:.025em;font-variant-numeric:tabular-nums}
.game-shell .integrity{display:flex;align-items:center;justify-content:center;gap:.7cqw;padding-left:.2cqw;font-size:clamp(8px,.82cqw,13px);letter-spacing:.035em}
.game-shell .integrity>span{display:flex;flex-direction:column;gap:.15cqw;color:#d8b67e}
.game-shell .integrity strong{font-size:clamp(16px,1.75cqw,28px);line-height:1.05;font-weight:400;color:var(--hud-ink)}
.game-shell .integrity meter{display:block;width:5.3cqw;height:.55cqw;min-height:5px;margin:1.2cqw 0 0;border:1px solid #4d4a31;border-radius:2px;background:#1b2115}
.game-shell .integrity meter::-webkit-meter-bar{height:100%;background:#1b2115}
.game-shell .integrity meter::-webkit-meter-optimum-value{background:#9cce56}
.game-shell .integrity meter::-moz-meter-bar{background:#9cce56}
.game-shell .integrity.critical strong{color:#ff917b}
.game-shell .integrity.critical meter::-webkit-meter-optimum-value{background:#f97861}
.game-shell .integrity.critical meter::-moz-meter-bar{background:#f97861}
.game-shell .header-right{justify-content:flex-end;gap:.8cqw;min-height:0}
.game-shell .header-right>.arsenal-button,.game-shell .header-right>.icon-button{height:var(--header-control-height);min-height:var(--header-control-height);box-sizing:border-box}
.game-shell .header-right>.icon-button{width:var(--header-control-height)}
.game-shell .arsenal-button,.game-shell .icon-button{background:#111411;border:1px solid #756244;border-radius:2px;color:var(--hud-ink);box-shadow:inset 0 0 0 2px #090b09}
.game-shell .arsenal-button{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;line-height:1.1;min-height:2.6cqw;padding:.3cqw .9cqw}
.game-shell .arsenal-button strong{font-size:clamp(9px,.9cqw,14px);letter-spacing:.04em;font-weight:500}
.game-shell .arsenal-button small{font-size:clamp(7px,.55cqw,10px);margin-top:1px;color:var(--hud-muted)}
.game-shell .arsenal-button.ready{border-color:#cc9b4a;background:#282013}
.game-shell .arsenal-button.ready small{color:#ffd493}
.game-shell .arsenal-button kbd{padding:0 0 0 .2cqw;border:0;min-width:0;font-size:inherit;color:#d5ae6a;background:transparent}
.game-shell .icon-button{width:2.7cqw;height:2.6cqw;min-width:27px;min-height:27px}
.game-shell .icon-button img{width:1.3cqw;min-width:13px;height:1.3cqw;filter:invert(86%) sepia(29%) saturate(330%)}
.game-shell button:focus-visible{outline:2px solid #b1f2f1;outline-offset:3px}
.game-shell button:hover:not(:disabled){background-color:#28251a;border-color:#dfbc7a;color:#ffe0a4}
.game-shell .arena-stats{display:flex;align-items:center;gap:1.8cqw;top:1.1cqw;left:2.5%;font-size:clamp(9px,.92cqw,15px);letter-spacing:.045em;color:var(--hud-ink);opacity:1}
.game-shell .stat-label,.game-shell .salvage small{font-size:clamp(8px,.82cqw,13px);color:var(--hud-muted);margin:0}
.game-shell .salvage{display:inline;margin:0;color:var(--hud-ink)}
.game-shell .merit-status{display:inline;margin:0;color:#efbd77;font-size:clamp(8px,.7cqw,12px)}
.game-shell .survival-progress{top:0;height:3px;background:#2b291f;z-index:1}
.game-shell .survival-progress::-webkit-progress-bar{background:#2b291f}
.game-shell .survival-progress::-webkit-progress-value{background:#dfae5b}
.game-shell .survival-progress::-moz-progress-bar{background:#dfae5b}
.game-shell .aim-status{top:1.15cqw;right:3%;font-size:clamp(8px,.85cqw,13px);max-width:36%;color:#dfd3bd}
.game-shell .aim-status.out-of-range{color:#ffc174}.game-shell .aim-status.venting{color:#ff947c}
.game-shell .pressure-label{top:2.8cqw;right:3%;font-size:clamp(8px,.85cqw,13px);color:#93d2d7}
.game-shell .tutorial{bottom:2.2%;padding:.6cqw 1cqw;border-color:#686047;background:#0a1111d9;color:#d8d1c2;font-size:clamp(9px,.85cqw,13px)}
.game-shell .tutorial span{color:#a3e3e3}
.game-shell .toast{top:10%;color:#ffc57a;text-shadow:0 2px 7px #000}
.game-shell .tactical-feed{background:#0c1210e0;border-color:#bdab70;color:#e4d2af}.game-shell .tactical-feed span{color:#bbcdc7}
.game-shell .controlbar{display:grid;grid-template-columns:25% minmax(0,1fr) 29%;grid-template-rows:minmax(0,1fr);min-height:0;gap:1.8cqw;padding:.65cqw 2% .9cqw;border-top:0;background:#080b0c;color:var(--hud-ink);align-items:stretch}
.game-shell .heat-control{position:relative;width:auto;max-width:none;min-width:0;margin-top:-1.25cqw;isolation:isolate;background:none}
.hud-dial-shell{position:absolute;inset:0;z-index:-1;pointer-events:none}
.hud-dial-art{display:block;width:100%;height:100%;aspect-ratio:auto!important;background-repeat:no-repeat;clip-path:polygon(0 24%,21% 24%,24% 20%,28% 14%,32% 10%,37% 6%,43% 2%,50% 0,57% 2%,63% 6%,68% 10%,72% 14%,76% 20%,79% 24%,100% 24%,100% 100%,0 100%)}
.game-shell .heat-label{position:absolute;inset:21% 4% 12%;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:0;margin:0;font-size:clamp(8px,.78cqw,12px);letter-spacing:0;color:var(--hud-ink);pointer-events:none;z-index:2}
.game-shell #heat-label{background:#0a0e0bd9;padding:0 3px;white-space:nowrap}
.game-shell #heat-number{position:absolute;left:59%;bottom:-8%;font-size:clamp(10px,1cqw,16px);font-variant-numeric:tabular-nums;color:var(--hud-amber);background:#0a0e0be0;padding:0 4px;white-space:nowrap}
.dial-limit{position:absolute;top:68%;font-size:clamp(9px,1cqw,16px);color:var(--hud-ink);pointer-events:none}.dial-empty{left:23%}.dial-full{right:20%}
.game-shell .heat-needle{position:absolute;width:clamp(6px,calc(var(--heat-length,60px) * .13),18px);height:var(--heat-length,30%);left:50%;top:84.7%;transform-origin:50% 100%;transform:translate(-50%,-100%) rotate(var(--heat-angle,-64deg));background:none;pointer-events:none;transition:transform 80ms linear;filter:drop-shadow(0 1px 1px #000);z-index:1}
.hud-pointer-art{display:block;width:100%;height:100%;aspect-ratio:auto!important;background-repeat:no-repeat}
.game-shell .heat-pivot{position:absolute;left:50%;top:84.7%;width:clamp(11px,1.2cqw,22px);aspect-ratio:1;transform:translate(-50%,-50%);pointer-events:none;z-index:3;filter:drop-shadow(0 1px 2px #000)}
.game-shell .heat-bars{position:absolute;left:34%;right:34%;bottom:6%;height:2px;gap:2px}
.game-shell .heat-bars span{border:0;border-radius:0;background:#423d29}
.game-shell .heat-bars span.active{background:#edb85e;box-shadow:none}
.game-shell .heat-control.overheated .heat-label,.game-shell .heat-control.overheated #heat-number{color:#ff987f}
.game-shell .heat-control.overheated .heat-needle{filter:sepia(.4) saturate(2.4) hue-rotate(-22deg) drop-shadow(0 0 2px #ff745a)}
.game-shell .heat-control.overheated .heat-bars span.active{background:#ff745a}
.game-shell .heat-control.overdrive .heat-label,.game-shell .heat-control.overdrive #heat-number{color:#a4ffda}.game-shell .heat-control.overdrive .heat-bars span{background:#75d7b2}
.game-shell .weapon-bay{display:grid;grid-template-columns:minmax(0,1fr) 30%;grid-template-rows:minmax(0,1fr);align-items:center;gap:.6cqw;min-width:0;min-height:0;padding:.45cqw 1cqw}
.game-shell .weapon-button{display:grid;grid-template-columns:62% minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:center;min-width:0;min-height:0;height:100%;gap:.5cqw;padding:0;border:0;border-radius:0;background:transparent!important;color:var(--hud-ink)}
.game-shell .weapon-button:disabled{opacity:1;background:transparent;border-color:transparent}
.game-shell #weapon-art{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;width:100%;height:100%;--portrait-height:6.8cqw;pointer-events:none}
.hud-portrait{display:block;width:100%;max-width:calc(var(--portrait-height) * var(--art-ratio));background-repeat:no-repeat;mix-blend-mode:lighten;flex:none}
.game-shell #weapon-art .hud-portrait{filter:brightness(1.25)}
.game-shell .weapon-readout{min-width:0;text-align:left}
.game-shell #weapon-name{display:block;font-size:clamp(10px,1.05cqw,17px);font-weight:500;letter-spacing:0;white-space:nowrap}
.game-shell #weapon-status{display:inline-block;font-size:clamp(8px,.73cqw,12px);letter-spacing:.02em;color:#e2bc7d;margin-top:.45cqw;padding:.3cqw .4cqw;border:1px solid #65543a;border-radius:2px;background:#0b0d0b;white-space:nowrap}
.game-shell .weapon-button.ultimate-weapon{border:0!important;color:#ffe4af!important}.game-shell .ultimate-weapon #weapon-status{border-color:#edb454;color:#ffd893}.game-shell .ultimate-weapon #weapon-art .hud-portrait{filter:brightness(1.4) drop-shadow(0 0 5px #edb45455)}
.game-shell .burst-button{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:.45cqw .3cqw;min-height:0;height:100%;padding:.9cqw .9cqw;border:0;border-radius:0;background:transparent;box-shadow:none;color:#ffd08b;--rim-x:.9cqw;--rim-y:.85cqw}
.game-shell .burst-button strong{font-size:clamp(10px,1cqw,16px);letter-spacing:0;white-space:nowrap;font-weight:500}
.game-shell .burst-button small{grid-row:2;grid-column:1/3;font-size:clamp(8px,.75cqw,12px);color:#dbba83;line-height:1.3}
.game-shell .burst-button:disabled{opacity:1;background:transparent;color:#d7b37a}.game-shell .burst-button:disabled .hud-skin{filter:brightness(.8)}
.game-shell .burst-button:not(:disabled) .hud-skin{filter:brightness(1.25)}
.game-shell .burst-button kbd{grid-column:2;grid-row:1;align-self:center}
.game-shell kbd{border:1px solid #776343;background:#13140f;color:#e9c78d;border-radius:2px;min-width:1.2cqw;padding:.15cqw .25cqw;font-size:clamp(8px,.65cqw,11px)}
.game-shell .support-bay{display:flex;align-items:center;min-width:0;min-height:0;padding:.7cqw .8cqw;gap:.45cqw}
.game-shell .pulse-button{display:flex;flex:1;align-items:center;min-width:0;min-height:0!important;gap:1cqw;height:100%;padding:0;border:0;background:transparent!important;text-align:left;color:var(--hud-ink)}
.game-shell .pulse-button:disabled{opacity:.65}
.game-shell #pulse-art{display:flex;align-items:center;justify-content:center;min-width:0;flex:0 1 40%;width:40%;height:100%;--portrait-height:6.8cqw;pointer-events:none}
.game-shell .pulse-button strong{font-size:clamp(10px,1.05cqw,17px);font-weight:500;letter-spacing:.02em;white-space:nowrap}
.game-shell .pulse-button small{display:inline-block;font-size:clamp(9px,.9cqw,14px);margin-top:.55cqw;color:#91e4eb;white-space:nowrap}
.game-shell .pulse-button kbd{display:inline-grid;margin-left:auto;padding:.5cqw .6cqw;border-color:#786142;box-shadow:inset 0 0 0 2px #090b09;font-size:.9cqw}
.game-shell .sound-button{display:grid;align-self:center;flex:none;width:2.2cqw;height:2.2cqw;min-width:24px;min-height:24px;margin:0}
.game-shell .sound-button img{width:1.1cqw;min-width:12px}
@media(max-width:950px){
 .game-shell .topbar{grid-template-columns:1fr 30% 1fr;margin-inline:.6%;padding-inline:1.5%}.game-shell .mission-instruments{height:6.1cqw}
 .game-shell .controlbar{gap:1cqw;padding-inline:1%}.game-shell .weapon-bay{padding:.9cqw}.game-shell .weapon-button{grid-template-columns:57% minmax(0,1fr)}
 .game-shell #weapon-name,.game-shell .pulse-button strong{font-size:10px}.game-shell #weapon-status{font-size:8px}.game-shell .burst-button strong{font-size:9px}
 .game-shell .pulse-button{gap:.7cqw}.game-shell .pulse-button kbd{display:none}
}
@media(max-width:760px){
 .game-shell{width:100vw;height:min(100svh,calc(57.3vw + 148px));grid-template-rows:50px minmax(0,1fr) 98px;--rim-x:10px;--rim-y:8px}
 .game-shell .topbar{grid-template-columns:1fr 34% 1fr;padding:0 12px}.game-shell .mission-instruments{height:54px;top:2px;padding:7px 5px 11px}
 .game-shell .brand{font-size:11px;letter-spacing:.09em}.game-shell .brand-icon{width:18px;height:23px}
 .game-shell #run-mode,.game-shell .integrity{font-size:8px}.game-shell #run-clock,.game-shell .integrity strong{font-size:16px}.game-shell .integrity meter{width:30px;margin-top:12px}
 .game-shell .arsenal-button{min-height:29px;padding:3px 7px}.game-shell .header-right{gap:8px}
 .game-shell .arena-stats{top:14px;gap:12px}.game-shell .merit-status{font-size:8px}.game-shell .aim-status{top:35px;max-width:60%}.game-shell .pressure-label{top:51px}
 .game-shell .controlbar{padding:7px 6px;gap:6px;grid-template-columns:24% minmax(0,1fr) 28%}.game-shell .heat-control{margin-top:-8px}
 .game-shell .weapon-bay{padding:8px;grid-template-columns:minmax(0,1fr) 32%;gap:4px}.game-shell .weapon-button{grid-template-columns:47% minmax(0,1fr);gap:5px}.game-shell #weapon-art{--portrait-height:65px}
 .game-shell #weapon-name{font-size:9px}.game-shell #weapon-status{font-size:7px;padding:3px;margin-top:5px}
 .game-shell .burst-button{padding:8px;--rim-x:8px;--rim-y:8px;gap:4px}.game-shell .burst-button kbd{display:none}.game-shell .burst-button strong{font-size:8px}.game-shell .burst-button small{font-size:7px}
 .game-shell #pulse-art{width:34%;flex-basis:34%;--portrait-height:60px}.game-shell .pulse-button strong{font-size:9px}.game-shell .pulse-button small{font-size:8px}
 .game-shell .sound-button{min-width:23px;width:23px;height:27px}.game-shell .support-bay{gap:4px;padding:8px}.game-shell .pulse-button{gap:5px}
}
@media(max-width:520px){
 .game-shell{height:calc(57.3vw + 238px);max-height:100svh;grid-template-rows:80px minmax(0,1fr) 158px}
 .game-shell .topbar{grid-template-columns:1fr auto;grid-template-rows:28px 45px;gap:0;padding:2px 10px 5px;margin:0;--header-control-height:26px}
 .game-shell .brand{font-size:12px}.game-shell .brand-icon{width:16px;height:20px}.game-shell .header-right{grid-column:2;grid-row:1;gap:7px}
 .game-shell .arsenal-button{display:flex;flex-direction:row;align-items:center;gap:5px;min-height:24px;padding:3px 5px}.game-shell .arsenal-button small{font-size:7px;margin:0}.game-shell .arsenal-button strong{font-size:8px}
 .game-shell .icon-button{width:26px;height:26px;min-width:26px;min-height:26px}.game-shell .icon-button img{width:13px;height:13px}
 .game-shell .mission-instruments{grid-row:2;grid-column:1/3;width:246px;justify-self:center;height:49px;padding:6px 7px 10px;top:1px}
 .game-shell .run-heading{order:initial}.game-shell .integrity{padding-left:8px;gap:7px}.game-shell .integrity meter{width:40px}.game-shell #run-clock,.game-shell .integrity strong{font-size:18px}
 .game-shell .arena-stats{top:13px;left:3%;gap:12px;flex-wrap:wrap;max-width:94%;font-size:10px}.game-shell .merit-status{flex-basis:100%;font-size:8px;margin-top:-6px}
 .game-shell .aim-status{top:46px;right:3%;max-width:64%;font-size:7px}.game-shell .pressure-label{top:64px;font-size:7px}
 .game-shell .toast{top:auto;bottom:35%;font-size:9px;line-height:1.4;width:88%;white-space:normal}
 .game-shell .tactical-feed{bottom:15%;left:3%;padding:4px 7px;max-width:76%}.game-shell .tactical-feed strong{font-size:8px}
 .game-shell .controlbar{grid-template-columns:45% minmax(0,1fr);grid-template-rows:64px 75px;gap:5px;padding:8px 6px 6px}
 .game-shell .heat-control{grid-row:1;grid-column:1;margin-top:-5px;width:auto}.game-shell .heat-label{font-size:7px}.game-shell #heat-number{font-size:10px}.dial-limit{font-size:8px}
 .game-shell .weapon-bay{grid-row:2;grid-column:1/3;grid-template-columns:minmax(0,1fr) 32%;padding:8px 10px;gap:7px}.game-shell .weapon-button{grid-template-columns:58% minmax(0,1fr);gap:6px}
 .game-shell #weapon-art{--portrait-height:60px}.game-shell #weapon-name{font-size:11px}.game-shell #weapon-status{font-size:8px;padding:3px 5px}
 .game-shell .burst-button{min-height:44px;padding:9px}.game-shell .burst-button strong{font-size:10px}.game-shell .burst-button small{font-size:8px}
 .game-shell .support-bay{grid-row:1;grid-column:2;padding:8px;gap:4px}.game-shell .pulse-button{min-height:44px!important;gap:6px}.game-shell #pulse-art{width:34%;flex-basis:34%;--portrait-height:48px}
 .game-shell .pulse-button strong{font-size:10px}.game-shell .pulse-button small{font-size:8px}.game-shell .sound-button{align-self:center;min-width:26px;width:26px;height:30px;margin:0}
}
@media(prefers-reduced-motion:reduce){.game-shell .heat-needle{transition:none}}

/* Mobile: preserve the 1536×880 battlefield geometry while making every live
   control reachable. Portrait remains functional; landscape is recommended. */
.orientation-hint{display:none}
@media(max-width:520px) and (orientation:portrait){
 body{place-items:start center;padding-top:max(0px,env(safe-area-inset-top))}
 .game-shell{height:calc(57.3vw + 184px);grid-template-rows:72px minmax(0,1fr) 112px}
 .game-shell .topbar{grid-template-rows:26px 44px}
 .game-shell .mission-instruments{height:43px}
 .game-shell .header-right>.arsenal-button,.game-shell .header-right>.icon-button{min-height:44px;height:44px}
 .game-shell .header-right>.icon-button{width:44px}
 .game-shell .controlbar{grid-template-rows:50px 54px;padding:4px 6px}
 .game-shell .heat-control{margin-top:-2px}
 .game-shell .weapon-bay{padding:5px 8px}
 .game-shell .weapon-button,.game-shell .burst-button,.game-shell .pulse-button,.game-shell .sound-button{min-height:44px}
 .game-shell .sound-button{min-width:44px;width:44px}
 .orientation-hint{display:flex;position:fixed;left:12px;right:12px;bottom:max(16px,env(safe-area-inset-bottom));min-height:54px;align-items:center;justify-content:center;flex-direction:column;gap:5px;border:1px solid #6e5c3e;background:#11150ff2;color:#f0c57e;text-align:center;font:700 11px/1.25 var(--mono);letter-spacing:.08em;z-index:30;pointer-events:none}
 .orientation-hint span{color:#aeb7aa;font-size:9px;font-weight:400;letter-spacing:.03em}
}
@media(max-width:950px) and (max-height:520px) and (orientation:landscape){
 .game-shell{height:100svh;grid-template-rows:44px minmax(0,1fr) 64px}
 .game-shell .topbar{--header-control-height:44px}
 .game-shell .mission-instruments{height:48px;padding:5px 5px 8px}
 .game-shell .header-right>.arsenal-button,.game-shell .header-right>.icon-button{min-height:44px;height:44px}
 .game-shell .header-right>.icon-button{width:44px}
 .game-shell .controlbar{padding:5px 7px;gap:7px}
 .game-shell .heat-control{margin-top:-5px}
 .game-shell .weapon-bay,.game-shell .support-bay{padding:5px 7px}
 .game-shell .weapon-button,.game-shell .burst-button,.game-shell .pulse-button,.game-shell .sound-button{min-height:44px;height:44px}
 .game-shell .sound-button{display:grid;min-width:44px;width:44px}
 .game-shell button{touch-action:manipulation}
 .game-shell .tutorial{display:none!important}
}

/* V25 immersive mobile shell. The logical arena keeps its 1536×880 geometry;
   extra-wide phone space becomes a deliberate console surround instead of
   stretched physics or empty black bars. */
#nl-badge-frame,#netlify-badge,[data-netlify-site-badge]{display:none!important}
.mobile-shell-note{max-width:510px;margin:13px 0 0;padding:9px 12px;border-left:2px solid #d3a653;background:#10140f;color:#c9bc9e;font:10px/1.55 var(--mono)}
.mobile-shell-note b{color:#f1c574;font-weight:500}
.mobile-orientation-gate{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:radial-gradient(circle at 50% 42%,#18241ddd,#030605f7 70%);touch-action:none}
.mobile-gate-panel{width:min(430px,92vw);padding:34px 30px;border:1px solid #846d43;box-shadow:inset 0 0 0 4px #090c09,0 24px 90px #000;text-align:center;background:#0d110df5;color:#dcc79e}
.mobile-gate-panel img{width:42px;height:52px;margin-bottom:12px;filter:invert(85%) sepia(38%) saturate(420%)}
.mobile-gate-panel>span{display:block;color:#e6af54;font:10px/1 var(--mono);letter-spacing:.2em}
.mobile-gate-panel h2{margin:14px 0 8px;color:#f2dec0;font:500 clamp(24px,7vw,38px)/1.1 system-ui,sans-serif}
.mobile-gate-panel p{margin:0 auto 22px;max-width:330px;color:#b6b19e;font:13px/1.5 system-ui,sans-serif}
.mobile-gate-panel button{min-height:48px}
html,body{overscroll-behavior:none}

@media(max-width:1100px) and (max-height:700px) and (orientation:landscape){
 body{position:relative;background:#030605;touch-action:none}
 body::before{content:"";position:fixed;inset:-24px;z-index:0;pointer-events:none;background:linear-gradient(90deg,#020504a8 0 4%,transparent 25% 75%,#020504a8 96% 100%),url('assets/colony-shattered-moon-v20.png') center/cover no-repeat;filter:blur(9px) brightness(.46) saturate(.7);transform:scale(1.04)}
 body::after{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;background:repeating-linear-gradient(0deg,#0000 0 3px,#d7bd7a08 4px);box-shadow:inset 0 0 90px #000}
 .game-shell{z-index:1;box-shadow:0 0 0 1px #7d694233,0 0 54px #000}
 .game-shell,.game-shell canvas,.game-shell button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
}

@media(display-mode:fullscreen),(display-mode:standalone){
 body{min-height:100dvh}
 .game-shell{height:min(100dvh,66.6667vw)}
 .orientation-hint{display:none!important}
}

@media(max-width:950px) and (max-height:520px) and (orientation:landscape){
 .mobile-shell-note{font-size:8px;margin-top:8px;padding:6px 9px}
 dialog.terminal-dialog{max-height:calc(100dvh - 12px)}
}

/* Phone combat HUD: use small game-style ribbons instead of desktop briefing
   blocks. Keep the sky readable and reserve large surfaces for touch controls. */
@media(max-width:520px){
 .game-shell{height:calc(57.3vw + 156px);grid-template-rows:54px minmax(0,1fr) 102px}
 .game-shell .topbar{grid-template-columns:74px minmax(0,1fr) 94px;grid-template-rows:52px;padding:1px 5px;margin:0;gap:3px}
 .game-shell .brand{grid-column:1;grid-row:1;font-size:9px;letter-spacing:.05em;gap:3px}.game-shell .brand-icon{width:13px;height:17px}
 .game-shell .mission-instruments{grid-column:2;grid-row:1;width:100%;height:51px;top:0;padding:6px 4px 9px}
 .game-shell #run-mode,.game-shell .integrity{font-size:7px}.game-shell #run-clock,.game-shell .integrity strong{font-size:15px}.game-shell .integrity meter{width:26px;margin-top:9px}
 .game-shell .header-right{grid-column:3;grid-row:1;gap:4px}.game-shell .header-right>.arsenal-button,.game-shell .header-right>.icon-button{height:44px;min-height:44px}
 .game-shell .header-right>.arsenal-button{min-width:46px;padding:2px 4px}.game-shell .arsenal-button small,.game-shell .arsenal-button kbd{display:none}.game-shell .arsenal-button strong{font-size:7px}
 .game-shell .header-right>.icon-button{width:44px;min-width:44px}
 .game-shell .arena-stats{top:5px;left:6px;max-width:72%;gap:8px;flex-wrap:nowrap;font-size:7px;line-height:1}.game-shell .stat-label,.game-shell .salvage small{display:none}.game-shell .salvage{display:inline;margin:0}.game-shell .merit-status{flex-basis:auto;margin:0;font-size:7px;white-space:nowrap}
 .game-shell .aim-status{top:17px;right:5px;max-width:42%;padding:2px 4px;background:#080d0db8;font-size:6px;line-height:1;letter-spacing:.03em}.game-shell .pressure-label{top:5px;right:5px;font-size:6px;line-height:1}
 .game-shell .wave-banner,.game-shell .wave-banner.priority{left:auto;right:5px;top:28px;transform:none;width:auto;max-width:64%;padding:4px 7px;border-left:2px solid #d1a35c;background:#080d0de8;text-align:right;text-shadow:none;transition:opacity .18s}
 .game-shell .wave-banner>span{display:none}.game-shell .wave-banner strong,.game-shell .wave-banner.priority strong{font-size:10px;line-height:1.15;letter-spacing:.04em;margin:0;color:#f0c47d}.game-shell .wave-banner p{display:none}
 .game-shell .toast{left:50%;top:auto;bottom:4px;width:auto;max-width:70%;padding:3px 6px;background:#080d0ddb;font-size:7px;line-height:1.2;white-space:nowrap;text-shadow:none}
 .game-shell .tactical-feed{left:5px;bottom:5px;max-width:55%;padding:3px 5px;border-left-width:1px;background:#080d0ddb;line-height:1}.game-shell .tactical-feed strong{font-size:7px;line-height:1.1;white-space:nowrap}.game-shell .tactical-feed span{display:block;margin-top:2px;font:6px/1.15 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .tactical-feed strong:nth-of-type(n+2),.game-shell .tactical-feed strong:nth-of-type(n+2)+span{display:none}
 .game-shell .controlbar{grid-template-rows:45px 49px;padding:3px 5px;gap:3px}.game-shell .heat-control{margin-top:-1px}.game-shell .weapon-bay{padding:3px 6px}.game-shell #weapon-art{--portrait-height:49px}.game-shell #weapon-name{font-size:9px}.game-shell #weapon-status{font-size:7px;margin-top:2px;padding:2px 4px}
 .game-shell .support-bay{padding:3px 5px}.game-shell #pulse-art{--portrait-height:39px}.game-shell .pulse-button strong{font-size:9px}.game-shell .pulse-button small{font-size:7px;margin-top:2px}.game-shell .burst-button{padding:5px}.game-shell .burst-button strong{font-size:9px}.game-shell .burst-button small{font-size:7px}
 .orientation-hint{left:auto;right:8px;bottom:max(8px,env(safe-area-inset-bottom));min-height:28px;padding:0 9px;gap:0;font-size:8px;letter-spacing:.05em;background:#11150fe8}.orientation-hint span{display:none}
}
@media(max-width:950px) and (max-height:520px) and (orientation:landscape){
 .game-shell .arena-stats{top:5px;left:7px;gap:9px;font-size:7px;line-height:1}.game-shell .stat-label,.game-shell .salvage small{display:none}.game-shell .salvage{display:inline;margin:0}.game-shell .merit-status{font-size:7px}
 .game-shell .aim-status{top:5px;right:7px;padding:2px 4px;background:#080d0db8;font-size:7px;line-height:1}.game-shell .pressure-label{top:18px;right:7px;font-size:6px}
 .game-shell .wave-banner,.game-shell .wave-banner.priority{left:auto;right:7px;top:34px;transform:none;width:auto;max-width:47%;padding:4px 8px;border-left:2px solid #d1a35c;background:#080d0de8;text-align:right;text-shadow:none;transition:opacity .18s}.game-shell .wave-banner>span,.game-shell .wave-banner p{display:none}.game-shell .wave-banner strong,.game-shell .wave-banner.priority strong{font-size:10px;line-height:1.15;margin:0;color:#f0c47d}
 .game-shell .toast{top:5px;bottom:auto;width:auto;max-width:48%;padding:3px 7px;background:#080d0ddb;font-size:7px;line-height:1.2;white-space:nowrap;text-shadow:none}
 .game-shell .tactical-feed{left:7px;bottom:6px;max-width:40%;padding:4px 7px;border-left-width:1px;background:#080d0ddb}.game-shell .tactical-feed strong{font-size:7px;line-height:1.1}.game-shell .tactical-feed span{display:block;margin-top:2px;font:6px/1.15 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .tactical-feed strong:nth-of-type(n+2),.game-shell .tactical-feed strong:nth-of-type(n+2)+span{display:none}
}
