/* Approved Compact Tactical layout. Armory palette/type; HUD geometry follows reference. */
body.playing:not(.debriefing)>main>header,
body.playing:not(.debriefing)>main>.command,
body.playing:not(.debriefing)>main>.utility,
body.playing .game>.hud,
body.playing .game>.skill-dock,
body.playing #status,
body.playing #guardian-brace,body.playing #guardian-armor{display:none!important}
body.playing:not(.debriefing)>main{max-width:none;padding:0}
body.playing:not(.debriefing) .game{border:0;border-radius:0;max-width:100%;margin:0 auto}
body.playing:not(.debriefing) #game{display:block;margin:0 auto;max-width:100%;max-height:100dvh;width:auto;height:auto}
@media(pointer:fine){body.playing:not(.debriefing) #game{width:min(100vw,calc(100dvh * 1280 / 650));height:auto}}
/* Direct camera: one viewport-sized raster, with world aspect handled by the renderer. */
body.playing.camera-viewport-fit:not(.debriefing)>main{width:100%;height:100dvh}
body.playing.camera-viewport-fit:not(.debriefing) .game{width:100%;height:100dvh;max-height:none}
body.playing.camera-viewport-fit:not(.debriefing) #game{width:100%;height:100%;max-height:none;aspect-ratio:auto}
#gameplay-hud-v1{position:absolute;z-index:7;pointer-events:none;color:var(--a73-text);font:calc(20 * var(--hud-unit))/1.25 var(--a73-font);font-synthesis:none;text-align:left}
#gameplay-hud-v1[hidden],#gameplay-hud-v1 [hidden]{display:none!important}
.tactical-panel-v1{position:relative;border:1px solid #788580;background:color-mix(in srgb,var(--a73-bg) 90%,transparent);border-radius:0;padding:calc(16 * var(--hud-unit)) calc(20 * var(--hud-unit));box-shadow:inset 0 0 0 2px var(--a73-line)}
.tactical-panel-v1::before{content:'';position:absolute;left:calc(8 * var(--hud-unit));top:calc(7 * var(--hud-unit));width:calc(18 * var(--hud-unit));height:calc(4 * var(--hud-unit));background:var(--a73-amber)}
.hud-player-v1{position:absolute;left:1.6%;top:3%;display:flex;align-items:center;gap:calc(22 * var(--hud-unit));min-height:calc(58 * var(--hud-unit));padding-block:calc(16 * var(--hud-unit))}
#hud-name{font-size:calc(22 * var(--hud-unit));font-weight:400;white-space:nowrap}
/* HP bar (owner reference 2026-11-21): grey pixel frame with a dark inner line, separate segment blocks (one per
   HP_SEGMENT) each lit from the top - light band, main colour, darker lower band, dark base line. Cream lag trails a hit,
   lighter mint marks health just gained, red at low health. Colours sampled from the owner's reference. */
#hud-hp{display:flex;align-items:center;gap:calc(10 * var(--hud-unit));--hp-inset:calc(2 * var(--hud-unit))}
.hud-hp-icon-v1{width:calc(24 * var(--hud-unit));height:calc(21 * var(--hud-unit));background:center/contain no-repeat url(assets/heart-full.svg);image-rendering:pixelated}
.hud-hp-track-v1{position:relative;display:block;width:calc(240 * var(--hud-unit));height:calc(26 * var(--hud-unit));background:#0f1a20;border:calc(2 * var(--hud-unit)) solid #778584;box-sizing:border-box}
.hud-hp-track-v1 i,.hud-hp-ticks-v1{position:absolute;top:var(--hp-inset);bottom:var(--hp-inset);left:var(--hp-inset);display:block}
.hud-hp-ticks-v1{right:var(--hp-inset)}
.hud-hp-fill-v1,.hud-hp-lag-v1,.hud-hp-flash-v1{width:calc((100% - 2 * var(--hp-inset)) * var(--hpf,1))}
.hud-hp-fill-v1{background:linear-gradient(#a9f6bb 0 10%,#8eeea2 10% 18%,#72e38c 18% 50%,#47c26b 50% 86%,#2ea857 86% 94%,#06140f 94%);transition:width .12s linear}
.hud-hp-lag-v1{background:linear-gradient(#f7efdc 0 10%,#f5e9cf 10% 18%,#f0e1c1 18% 50%,#e0c9a0 50% 86%,#e4cb9e 86% 94%,#0b1217 94%);transition:width .45s ease-in .35s}
.hud-hp-gain-v1{left:calc(var(--hp-inset) + (100% - 2 * var(--hp-inset)) * var(--gain-from,0));width:calc((100% - 2 * var(--hp-inset)) * (var(--gain-to,0) - var(--gain-from,0)));opacity:0;background:linear-gradient(#e6fff0 0 10%,#cbfbd8 10% 18%,#a9f3c0 18% 50%,#86e4a5 50% 86%,#62cc88 86% 94%,#06140f 94%)}
.hud-hp-ticks-v1 b{position:absolute;top:calc(-1 * var(--hp-inset));bottom:calc(-1 * var(--hp-inset));width:calc(3 * var(--hud-unit));margin-left:calc(-1.5 * var(--hud-unit));background:#0b1417}
.hud-hp-flash-v1{opacity:0;background:#fff;pointer-events:none}
#hud-hp[data-flash^=hit] .hud-hp-flash-v1{animation:hud-hp-flash-v1 .14s ease-out}
#hud-hp[data-flash$="1"] .hud-hp-flash-v1{animation-name:hud-hp-flash-b-v1}
#hud-hp[data-flash^=heal] .hud-hp-gain-v1{animation:hud-hp-gain-v1 1.1s ease-in}
#hud-hp[data-flash^=heal][data-flash$="1"] .hud-hp-gain-v1{animation-name:hud-hp-gain-b-v1}
@keyframes hud-hp-flash-v1{from{opacity:.6}to{opacity:0}}
@keyframes hud-hp-flash-b-v1{from{opacity:.6}to{opacity:0}}
@keyframes hud-hp-gain-v1{0%,60%{opacity:1}100%{opacity:0}}
@keyframes hud-hp-gain-b-v1{0%,60%{opacity:1}100%{opacity:0}}
#hud-hp-value{font-size:calc(22 * var(--hud-unit));font-weight:400;min-width:7ch;white-space:nowrap;color:#efe9d8}
[data-critical=true] .hud-hp-fill-v1{background:linear-gradient(#ffc2b8 0 10%,#ff9c8f 10% 18%,#f0574a 18% 50%,#d23a30 50% 86%,#a8261e 86% 94%,#1a0806 94%);animation:hud-hp-low-v1 .8s steps(2,end) infinite}
[data-critical=true] #hud-hp-value{color:#ef443e}
@keyframes hud-hp-low-v1{50%{opacity:.6}}
@media(prefers-reduced-motion:reduce){.hud-hp-track-v1 i{transition:none}[data-critical=true] .hud-hp-fill-v1,#hud-hp .hud-hp-flash-v1,#hud-hp .hud-hp-gain-v1{animation:none!important}}
#hud-protection{display:flex;align-items:center;width:calc(22 * var(--hud-unit));height:calc(26 * var(--hud-unit))}
#hud-protection:empty{display:none}
#hud-protection svg{width:100%;height:100%}
#hud-protection[data-empty=true]{opacity:.38}
#hud-health-note{position:absolute;top:calc(100% + 5 * var(--hud-unit));left:0;color:var(--a73-muted);font-size:calc(14 * var(--hud-unit));white-space:nowrap}
[data-critical=true] #hud-health-note{color:#ef443e}
.hud-center-v1{position:absolute;top:2.7%;left:50%;transform:translateX(-50%);width:calc(362 * var(--hud-unit));display:grid;gap:calc(10 * var(--hud-unit));text-align:center}
#hud-operation{display:grid;gap:calc(4 * var(--hud-unit));padding:calc(8 * var(--hud-unit)) calc(20 * var(--hud-unit))}
#hud-operation-type{font-size:calc(17 * var(--hud-unit));color:var(--a73-amber)}
#hud-objective{font-size:calc(22 * var(--hud-unit));font-weight:400;line-height:1.25}
#hud-objective-progress{font-size:calc(15 * var(--hud-unit));color:var(--a73-amber)}
:is(#hud-boss,#hud-sabotage){padding:calc(7 * var(--hud-unit)) calc(16 * var(--hud-unit));display:grid;gap:calc(4 * var(--hud-unit));font-size:calc(16 * var(--hud-unit))}
:is(#hud-boss,#hud-sabotage)::before{display:none}
:is(#hud-boss-bar,#hud-sabotage-bar){height:calc(13 * var(--hud-unit));background:var(--a73-line);display:block}
:is(#hud-boss-bar,#hud-sabotage-bar) i{display:block;height:100%;background:#ef443e}
.hud-right-v1{position:absolute;right:1.6%;top:3%;display:flex;gap:calc(28 * var(--hud-unit));align-items:stretch}
#hud-score{display:flex;align-items:center;gap:calc(34 * var(--hud-unit));min-width:calc(188 * var(--hud-unit));font-size:calc(22 * var(--hud-unit));justify-content:space-between}
/* Mission loot under the score (inside .hud-right-v1): totals the run pays when completed. */
.hud-loot-v1{position:absolute;right:0;top:calc(100% + 10 * var(--hud-unit));min-width:calc(188 * var(--hud-unit));padding:calc(10 * var(--hud-unit)) calc(16 * var(--hud-unit));font-size:calc(18 * var(--hud-unit))}
.hud-loot-v1::before{display:none}
.hud-loot-v1[hidden]{display:none}
.hud-loot-title-v1{display:block;color:var(--a73-muted);font-size:calc(15 * var(--hud-unit))}
.hud-loot-v1 dl{display:grid;grid-template-columns:1fr 1fr;gap:calc(2 * var(--hud-unit)) calc(16 * var(--hud-unit));margin:calc(6 * var(--hud-unit)) 0}
.hud-loot-v1 dl div{display:flex;justify-content:space-between;gap:calc(8 * var(--hud-unit))}
.hud-loot-v1 dd{margin:0;color:var(--a73-amber)}
.hud-loot-note-v1{display:block;color:var(--a73-muted);font-size:calc(14 * var(--hud-unit))}
#hud-score-value{color:var(--a73-amber);font-size:calc(28 * var(--hud-unit));font-weight:400}
#gameplay-hud-v1 #pause{position:static!important;pointer-events:auto;display:block!important;min-width:0;width:calc(59 * var(--hud-unit));height:calc(59 * var(--hud-unit));min-height:0;padding:0;border:1px solid #788580;border-radius:0;background:var(--a73-bg);color:var(--a73-text);font-size:0;box-shadow:none}
#gameplay-hud-v1 #pause::after{content:'';display:inline-block;width:calc(14 * var(--hud-unit));height:calc(24 * var(--hud-unit));border-left:calc(4 * var(--hud-unit)) solid currentColor;border-right:calc(4 * var(--hud-unit)) solid currentColor}
#gameplay-hud-v1 #pause>*{display:none}
.hud-actions-v1{position:absolute;left:1.35%;bottom:2.7%;display:flex;gap:calc(7 * var(--hud-unit));max-width:97.3%;transform:scale(1.25);transform-origin:left bottom}
/* Width follows each operative label; status wraps inside its stable slot. */
.hud-action-v1{box-sizing:border-box;display:grid;grid-template-columns:calc(32 * var(--hud-unit)) auto;align-items:center;gap:calc(8 * var(--hud-unit));flex:none;height:calc(67.6 * var(--hud-unit));padding:calc(6 * var(--hud-unit)) calc(8 * var(--hud-unit))}
#hud-attack{--hud-status-width:10ch}
#hud-ultimate{--hud-status-width:12ch}
.hud-action-v1 .hud-icon-v1{display:block;flex-shrink:0;width:calc(32 * var(--hud-unit));height:calc(32 * var(--hud-unit));background:var(--a73-text);mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}
.hud-action-v1 img{width:100%;height:100%;object-fit:contain;visibility:hidden}
.hud-skill-copy-v1{display:grid;gap:calc(4 * var(--hud-unit));width:max(var(--hud-label-width),var(--hud-status-width,13ch));min-width:0;font-size:calc(14 * var(--hud-unit))}
.hud-action-header-v1{display:flex;align-items:flex-start;justify-content:space-between;gap:calc(8 * var(--hud-unit));min-width:0}
.hud-binding-v1{flex:none;font-size:calc(12 * var(--hud-unit));white-space:nowrap}
.hud-label-v1{font-size:calc(14 * var(--hud-unit));white-space:nowrap}
.hud-value-v1{min-width:0;font-size:calc(14 * var(--hud-unit));font-weight:400;color:var(--a73-amber);white-space:normal;text-align:right;font-variant-numeric:tabular-nums}
#hud-attack .hud-binding-v1{display:none}
#hud-grenade{--hud-status-width:9ch;grid-template-columns:calc(24 * var(--hud-unit)) auto}
#hud-grenade .hud-icon-v1{width:calc(24 * var(--hud-unit))}
.hud-action-v1 .hud-grenade-icon-v1{position:relative;background:transparent}
.hud-grenade-icon-v1 svg{position:absolute;inset:0;width:100%;height:100%}
.hud-action-v1[data-state=cooldown] .hud-icon-v1,.hud-action-v1[data-state=charging] .hud-icon-v1{opacity:.5}
.hud-action-v1[data-state=unavailable]{color:var(--a73-muted)}
.hud-action-v1[data-state=unavailable] .hud-icon-v1{opacity:.38}
.hud-action-v1[data-state=unavailable] .hud-value-v1{color:var(--a73-muted)}
.hud-action-v1::before{display:none}
/* Locked by an enemy (Jammer): the lock owner's full-colour icon, not the monochrome skill mask. */
.hud-action-v1[data-state=jammed]{color:#c39bff}
.hud-action-v1[data-state=jammed] .hud-icon-v1{background:none;mask-image:none!important;-webkit-mask-image:none!important;animation:hud-jammed-v1 .8s steps(2) infinite}
.hud-action-v1[data-state=jammed] img{visibility:visible;image-rendering:pixelated}
@keyframes hud-jammed-v1{50%{opacity:.55}}
/* Jammed grenades (owner 2026-12-03): the same lock icon at the ultimate's size, without the grenade glyph over it. */
#hud-grenade[data-state=jammed]{grid-template-columns:calc(32 * var(--hud-unit)) auto}
#hud-grenade[data-state=jammed] .hud-icon-v1{width:calc(32 * var(--hud-unit))}
#hud-grenade[data-state=jammed] .hud-grenade-icon-v1 svg{display:none}
/* Phones: the lock icon on a dark disc over the touch ultimate / BOMB button while jammed (the touch styles hide button
   children and draw BOMB as the button background, so this forces its own box). */
html .touch-jam-v1{display:block!important;position:absolute!important;left:8%!important;top:8%!important;right:auto!important;bottom:auto!important;width:84%!important;height:84%!important;border-radius:50%;background:var(--jam-icon) center/62% no-repeat rgba(12,12,18,.85);pointer-events:none;z-index:4;opacity:1!important;visibility:visible!important;transform:none!important;image-rendering:pixelated;animation:hud-jammed-v1 .8s steps(2) infinite}
html .touch-jam-v1[hidden]{display:none!important}
html [data-jammed=true]>.pc-action-art{visibility:hidden!important}
.hud-action-v1[data-state=unavailable]::after{content:'×';position:absolute;left:calc(32 * var(--hud-unit));color:#ef443e;font-size:calc(42 * var(--hud-unit))}
#gameplay-pause-v1{width:min(480px,92vw);max-height:92dvh;overflow:auto;padding:26px;border:1px solid #788580;border-radius:0;background:var(--a73-bg);color:var(--a73-text);font-family:var(--a73-font);font-synthesis:none}
#gameplay-pause-v1::backdrop{background:#03080bdb}
#gameplay-pause-v1 h2{font-size:27px;font-weight:400;margin:0 0 18px;color:var(--a73-amber)}
#gameplay-pause-v1 .pause-actions-v1{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pause-actions-v1 button{font:14px/1.25 var(--a73-font);min-height:42px}
.pause-actions-v1 [data-pause=resume]{grid-column:1/-1}
#pause-audio-v1 details{padding-top:18px;font-size:12px}
#pause-audio-v1 label{display:flex;align-items:center;gap:12px;margin-top:12px}
#pause-audio-v1 input{flex:1;min-width:0}
#gameplay-hud-v1 button:focus-visible,#gameplay-pause-v1 button:focus-visible{outline:3px solid var(--a73-text);outline-offset:3px}
@media(pointer:coarse){
 /* Keep the original Thumb Arc and skill buttons. Keyboard cards never cover them. */
 #gameplay-hud-v1 .hud-actions-v1{display:none}
 #gameplay-hud-v1 .hud-center-v1{width:23.2%;top:2.7%}
 #gameplay-hud-v1 #hud-name{font-size:calc(20 * var(--hud-unit))}
 #gameplay-hud-v1 .hud-player-v1{gap:calc(12 * var(--hud-unit))}
 #gameplay-hud-v1 #hud-operation-type{font-size:calc(18 * var(--hud-unit))}
 #gameplay-hud-v1 #hud-objective{font-size:calc(20 * var(--hud-unit))}
 #gameplay-hud-v1 .hud-right-v1{right:max(1.6%,env(safe-area-inset-right));gap:calc(12 * var(--hud-unit))}
 #gameplay-hud-v1 .hud-player-v1{left:max(1.6%,env(safe-area-inset-left))}
 #gameplay-hud-v1 #pause{width:36px;height:36px}
 #gameplay-hud-v1 .hud-player-v1,#gameplay-hud-v1 .hud-center-v1,#gameplay-hud-v1 .hud-right-v1{top:max(3%,env(safe-area-inset-top))}
 #gameplay-pause-v1{padding:18px}
 #gameplay-pause-v1 .pause-actions-v1{gap:8px}
}

/* Intermission reuses the operation panel and Armory outline button tokens. */
#hud-operation[data-intermission=true] #hud-objective{font-size:max(14px,calc(22 * var(--hud-unit)))}
#hud-next-stage{pointer-events:auto;font:14px/1.25 var(--a73-font);color:var(--a73-amber);background:var(--a73-bg);border:1px solid var(--a73-amber);border-radius:0;padding:calc(8 * var(--hud-unit)) calc(20 * var(--hud-unit));min-height:44px}
#hud-next-stage[hidden]{display:none}
#gameplay-hud-v1 #editor-next-stage{pointer-events:auto}
#hud-next-stage:focus-visible{outline:3px solid var(--a73-text);outline-offset:3px}
/* Heavy Armor bar (owner 2026-11-21): thin ivory bar above the health track, Guardian only. */
.hud-player-v1[data-armor=true]{padding-top:calc(34 * var(--hud-unit))}
.hud-armor-v1{position:absolute;left:0;right:0;bottom:calc(100% + 4 * var(--hud-unit));height:calc(18 * var(--hud-unit));background:#0f1a20;border:calc(2 * var(--hud-unit)) solid #778584;box-sizing:border-box}
.hud-armor-fill-v1{position:absolute;top:calc(1 * var(--hud-unit));bottom:calc(1 * var(--hud-unit));left:calc(1 * var(--hud-unit));width:calc((100% - 2 * var(--hud-unit)) * var(--af,1));background:linear-gradient(#fffdf6 0 18%,#ece6d2 18% 60%,#cfc8b3 60% 88%,#0b1217 88%);transition:width .12s linear}
/* Three blocks of finishArmor (40) each, like the health segments. */
.hud-armor-ticks-v1{position:absolute;inset:0}
.hud-armor-ticks-v1 b{position:absolute;top:0;bottom:0;width:calc(3 * var(--hud-unit));margin-left:calc(-1.5 * var(--hud-unit));background:#0b1417}
.hud-armor-ticks-v1 b:first-child{left:33.333%}.hud-armor-ticks-v1 b:last-child{left:66.667%}
#hud-armor-value{position:absolute;left:calc(100% + 8 * var(--hud-unit));top:50%;transform:translateY(-50%);font-size:calc(16 * var(--hud-unit));font-weight:400;color:#ece6d2;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.hud-armor-fill-v1{transition:none}}
