@font-face{font-family:Arcade;src:url(assets/press-start.ttf)}*{box-sizing:border-box}body{margin:0;background:#11100e;color:#d3cfb2;font:12px Arcade,monospace;min-height:100dvh}header{display:flex;justify-content:space-between;padding:20px 4vw;border-bottom:1px solid #563234;font:10px monospace;letter-spacing:2px}main{width:min(720px,94vw);margin:24px auto}.cabinet{position:relative;border:8px solid #332822;box-shadow:0 0 0 2px #d5c276,0 20px 80px #000}canvas{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:manipulation;background:#11100e;cursor:crosshair;image-rendering:pixelated}#overlay{position:absolute;inset:0;background:linear-gradient(#11100ee8,#11100ec9);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px}#overlay[hidden]{display:none}.eyebrow{color:#d5c276;letter-spacing:6px}h1{font-size:clamp(24px,6vw,54px);line-height:1.3;color:#d3cfb2;text-shadow:3px 3px #5a69bc,-2px -1px #ab2337;margin:20px 0}#blurb{font-size:clamp(8px,1.8vw,12px);line-height:2.2;white-space:pre-line}button{font:10px Arcade,monospace;border:1px solid #d5c276;background:#211f19;color:#d3cfb2;padding:18px;min-height:48px;cursor:pointer}button:hover,button:focus-visible{background:#5a69bc;color:white;outline:2px solid #e8bdd0}#start,#retry{background:#d3cfb2;color:#11100e;margin:16px}nav{display:flex;gap:10px;justify-content:space-between;margin-top:16px}nav button{flex:1;padding:16px 5px;font-size:9px}.note{font:11px/1.8 monospace;color:#a49c91}#status{text-align:center;font:12px monospace;min-height:1em}footer{text-align:center;color:#8f877d;font:10px/1.8 monospace;padding:12px 24px}@media(max-width:500px){header{padding:12px;font-size:8px;gap:20px}main{margin:16px auto}.cabinet{border-width:5px}nav{gap:6px}nav button{font-size:7px}h1{margin:10px 0}.eyebrow{font-size:9px}}

header{justify-content:center;align-items:center;flex-direction:column;gap:12px}.brand{display:block;width:min(330px,70vw);height:auto;image-rendering:pixelated}.title-brand{width:min(270px,65%);height:auto;image-rendering:pixelated}
/* Keep onboarding inside the square cabinet on compact phones. */
@media(max-width:380px){#overlay{padding:10px}.title-brand{width:150px;max-width:64%;flex-shrink:0}h1{font-size:22px;line-height:1.15;margin:7px 0}#blurb{font-size:7px;line-height:1.7;margin:8px 0}#start,#retry{margin:8px 0;padding:12px;min-height:44px;flex-shrink:0}.note{font-size:9px;line-height:1.35;margin:7px 0}header{gap:8px;padding:10px}}

/* Keep score, scene and controls together without vertical scrolling. */
header{padding:12px;border:0}.brand{width:min(240px,60vw)}main{width:min(720px,94vw,calc(100dvh - 170px));margin:8px auto}nav[hidden]{display:none}#status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}nav{margin-top:10px}h1{font-size:clamp(22px,5vw,44px)}

.credits{color:#a8a18a;font:10px monospace;margin-top:8px}

@media(max-width:500px){nav button{font-size:9px}}
@media(max-width:380px){#blurb{font-size:8px}}

/* Crisp arcade panels, restrained palette, same official wordmark. */
#overlay{background:#11100edd;border:2px solid #564c38;box-shadow:inset 0 0 0 4px #15131c}
button{border:2px solid #b7a164;box-shadow:inset 2px 2px #f0dda044,inset -2px -2px #0008;border-radius:0}
button:disabled{opacity:.45;cursor:default}button[hidden]{display:none}
#grenade{display:flex;align-items:center;justify-content:center;gap:3px;color:#f4d16d}
#grenade-icon{width:18px;height:21px;aspect-ratio:auto;background:none;pointer-events:none}
nav{gap:5px}nav button{min-width:0;font-size:9px;padding:12px 3px}
.credits{font-family:Arcade,monospace;font-size:7px}
@media(max-width:380px){nav button{font-size:8px}#grenade{gap:2px}#grenade-icon{width:14px;height:17px}}

#grenade[hidden]{display:none}

/* One-tap controls stay legible and safely clear of the phone's home indicator. */
body{padding-bottom:env(safe-area-inset-bottom,0px)}
nav button{min-height:52px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#grenade-icon{flex-shrink:0}
button:active:not(:disabled){transform:translateY(1px);background:#625c42}
@media(max-width:500px){
 nav{gap:6px}nav button{font-size:8px;padding:10px 4px}
 #overlay{padding:12px}#blurb{font-size:9px;line-height:1.8}
 #start,#retry{min-height:48px}
}
/* Compact landscape chrome preserves more play space without changing flow. */
@media(max-height:500px) and (orientation:landscape){
 header{padding:4px;gap:0}.brand{width:145px}
 main{width:min(720px,94vw,calc(100dvh - 122px));margin:5px auto}
 nav{margin-top:6px}nav button{font-size:7px;padding:7px 2px}
 #overlay{padding:8px}#overlay h1{font-size:18px;line-height:1.15;margin:6px 0}
 #overlay #blurb{font-size:7px;line-height:1.5;margin:5px 0}
 #start,#retry{padding:8px;margin:6px 0;min-height:44px}
}

/* Range-style portrait cabinet: fill the usable screen, never stretch art. */
@media(orientation:portrait){
 html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
 body{height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
 header{flex:none;height:48px;padding:8px;gap:0}
 .brand{width:min(210px,56vw);max-height:30px;object-fit:contain}
 main{flex:1;min-height:0;width:100%;margin:0;display:flex;flex-direction:column}
 .cabinet{flex:1;min-height:0;width:100%;border:0;box-shadow:none;overflow:hidden}
 #game{width:100%;height:100%;aspect-ratio:auto;touch-action:none}
 nav{flex:none;margin:0;padding:8px;gap:6px;background:#11100e;border-top:2px solid #564c38}
 nav button{min-height:52px;font-size:9px;padding:8px 3px}
 #overlay{padding:20px 14px;overflow:auto;overscroll-behavior:contain}
 #overlay h1{font-size:clamp(28px,8vw,44px);margin:16px 0}
 #blurb{max-width:320px;font-size:10px;line-height:2}
 #start,#retry{min-width:180px;min-height:54px}
}
@media(orientation:portrait) and (max-height:600px){
 header{height:36px;padding:5px}.brand{max-height:24px}
 #overlay h1{font-size:26px;margin:8px 0}#blurb{font-size:8px}
 nav{padding:5px}nav button{font-size:8px}
}
/* Review pass: accessible menus and optional, playable practice. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#game:focus-visible{outline:3px solid #f7d583;outline-offset:-3px}
#overlay>button{flex-shrink:0}#practice,#help{margin:4px;min-height:44px;padding:12px}
#utility-panel{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#100f17ef;padding:14px;overflow:auto}
#utility-panel[hidden],#practice-hint[hidden]{display:none}
#utility-panel section{width:min(100%,450px);max-height:100%;overflow:auto;padding:18px;border:2px solid #b7a164;background:#11100e;text-align:center}
#utility-panel h2{font-size:18px;line-height:1.5;color:#f4d16d}#panel-copy{font:12px/1.7 monospace;white-space:pre-line;text-align:left}
#utility-panel button{display:block;width:100%;margin:8px 0;min-height:48px}#utility-panel button[hidden]{display:none}
#practice-hint{position:absolute;top:60px;left:8px;right:8px;z-index:1;text-align:center;padding:12px 6px;background:#11100ee8;color:#f4d16d;border:1px solid #b7a164;font-size:9px;line-height:1.6;pointer-events:none}
@media(max-height:600px){#overlay h1{font-size:24px;margin:5px 0}#overlay #blurb{font-size:8px;line-height:1.7}#start,#retry{margin:6px 0}#practice,#help{padding:8px;margin:3px;min-height:44px}}

/* Approved loadout pass: primary actions stay big; utility controls get their own row. */
#loadout{display:flex;gap:8px;width:min(330px,100%);flex-shrink:0}
#loadout button{flex:1;font-size:9px;padding:12px 5px;min-height:48px}
#loadout button[aria-pressed="true"]{color:#11100e;background:#e2c66d;outline:2px solid #fff0b3;outline-offset:1px}
#loadout-note{font:11px/1.5 monospace;color:#d6c99c;margin:8px 0 0}
#loadout[hidden],#loadout-note[hidden]{display:none}
nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
nav #reload,nav #grenade,nav #weapon-switch{min-height:54px;font-size:9px}
nav #pause,nav #sound,nav #retry-audio{min-height:44px;padding:5px;font:10px/1.2 monospace}
nav #pause{grid-column:1}nav #sound{grid-column:2 / span 2}
nav:has(#retry-audio:not([hidden])) #sound{grid-column:2}
#grenade-icon{width:28px;height:34px;image-rendering:pixelated}
#grenade{gap:5px}#grenade-label{font-size:8px;line-height:1.5;max-width:65px}
#grenade:disabled{opacity:.65}
#overlay{justify-content:safe center}
@media(orientation:portrait) and (max-height:600px){
 #overlay{padding:10px 12px}#overlay h1{font-size:23px;margin:5px 0}
 #loadout button{min-height:44px;padding:8px 3px}#loadout-note{margin:5px 0 0}
 nav{gap:4px;padding:5px}nav #reload,nav #grenade,nav #weapon-switch{min-height:48px;font-size:8px}
}
@media(max-width:380px){#grenade-label{font-size:7px}#loadout button{font-size:8px}}

/* HQ gameplay review: reclaim play space without shrinking touch targets. */
nav{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding:5px 6px calc(5px + env(safe-area-inset-bottom,0px))}
nav #reload,nav #grenade,nav #weapon-switch{grid-column:span 2;min-height:48px;padding:5px 3px;font:700 11px/1.2 system-ui,sans-serif}
nav #pause,nav #sound,nav #settings{grid-column:span 2;min-height:44px;padding:4px;font:600 11px/1.2 system-ui,sans-serif;border-color:#554b32;box-shadow:none}
nav:has(#retry-audio:not([hidden])) #sound{grid-column:span 2}
nav #retry-audio{grid-column:1 / -1;min-height:44px;font:600 11px/1.2 system-ui,sans-serif}
#grenade-label{font:700 10px/1.2 system-ui,sans-serif;max-width:76px}
#grenade-icon{width:25px;height:31px}
#blurb,#loadout-note{font:14px/1.45 system-ui,sans-serif}
#utility-panel{padding:8px;overflow:hidden}
#utility-panel section{display:flex;flex-direction:column;max-height:100%;padding:12px;overflow:auto;overscroll-behavior:contain}
#utility-panel h2{font-size:17px;line-height:1.4;margin:5px 0 12px}
#panel-copy{font:14px/1.5 system-ui,sans-serif;margin:0 0 10px}
.panel-actions{position:sticky;bottom:-12px;background:#11100e;padding:5px 0 calc(3px + env(safe-area-inset-bottom,0px));z-index:1;flex-shrink:0}
#utility-panel .panel-actions button{min-height:44px;margin:4px 0;font:700 12px/1.2 system-ui,sans-serif;padding:10px}
#help-steps[hidden],#settings-panel[hidden]{display:none}
#help-steps ol{padding:0;list-style:none;margin:0;text-align:left}
#help-steps li{display:grid;grid-template-columns:35px 1fr;column-gap:8px;margin:10px 0;padding:8px 0;border-bottom:1px solid #403924;font:14px/1.4 system-ui,sans-serif}
#help-steps strong{color:#f4d16d;font-size:13px}
#help-steps p{grid-column:2;margin:4px 0}
.step-symbol{grid-row:1 / 3;align-self:start;text-align:center;font:28px/1 system-ui,sans-serif;color:#e7c96e}
.help-keyboard{font:12px/1.5 system-ui,sans-serif;color:#c4baa3;text-align:left}
#settings-panel{position:absolute;inset:0;z-index:8;display:grid;place-items:center;background:#100f17f5;padding:10px;overflow:auto}
#settings-panel section{width:min(100%,420px);max-height:100%;overflow:auto;background:#11100e;border:2px solid #b7a164;padding:18px;font:15px/1.5 system-ui,sans-serif}
#settings-panel h2{font:17px/1.4 Arcade,monospace;color:#f4d16d;margin:0 0 12px}
#settings-panel label{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 0;border-bottom:1px solid #403924;cursor:pointer}
#settings-panel input{width:24px;height:24px;accent-color:#e2c66d;flex-shrink:0}
#settings-close{position:sticky;bottom:-18px;width:100%;margin-top:12px;min-height:48px;background:#e2c66d;color:#11100e;font:700 14px system-ui,sans-serif}
@media(orientation:portrait) and (max-height:600px){nav{gap:3px;padding:3px 5px}nav #reload,nav #grenade,nav #weapon-switch{min-height:44px;font-size:10px}nav #pause,nav #sound,nav #settings{min-height:44px}#blurb{font:12px/1.35 system-ui,sans-serif}#utility-panel h2{font-size:15px}#settings-panel section{padding:12px}}
@media(max-height:500px) and (orientation:landscape){main{width:min(900px,98vw);height:calc(100dvh - 40px);display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:8px;margin:2px auto}.cabinet{min-height:0;overflow:hidden}#game{height:100%;width:100%;aspect-ratio:auto}nav{margin:0;align-content:center;grid-template-columns:repeat(2,minmax(0,1fr))}nav #reload,nav #grenade,nav #weapon-switch{grid-column:1 / -1}nav #pause,nav #sound,nav #settings{grid-column:auto}nav #settings{grid-column:1 / -1}#settings-panel section{padding:10px}#utility-panel{padding:4px}}
#asset-status{font:12px/1.4 system-ui,sans-serif;color:#eed589;margin:4px 0}
#asset-status:empty{display:none}
#retry-assets,#skip-warmup{font:700 12px/1.2 system-ui,sans-serif;min-height:44px;padding:10px;margin:4px}
#telemetry{margin-top:12px;font:12px/1.4 system-ui,sans-serif}
#telemetry summary{min-height:44px;padding:12px 0;cursor:pointer;color:#d6c99c}
#telemetry-output{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.5 monospace;color:#c4baa3}
#title-settings{min-height:44px;margin:3px;padding:8px 14px;font:600 11px/1.2 system-ui,sans-serif;background:none;border-color:#554b32;box-shadow:none}

/* Single last-round cue, never an ongoing flash. Empty state is readable without color. */
#reload[data-empty="true"]{background:#8e2431;color:#fff;border:2px solid #ffd7be;font-weight:bold;min-height:52px;}
#reload.reload-pulse{animation:reload-last-round .4s ease-out 1;}
@keyframes reload-last-round{50%{box-shadow:0 0 0 5px #f0555960;transform:scale(1.025);}}
@media(prefers-reduced-motion:reduce){#reload.reload-pulse{animation:none;}}

#reload[data-warning="true"]{background:#8e2431;color:#fff;border-color:#ffd7be;}

/* Gameplay cabinet only: metal deck and tactile arcade keycaps. */
nav:not([hidden]){padding:5px max(6px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));border:1px solid #466383;border-top-color:#7890aa;background:repeating-linear-gradient(0deg,#18283b 0 2px,#1b2e44 2px 3px);box-shadow:inset 0 1px #a8b7c733,inset 0 -2px #070f1b;}
nav>button{color:#f2f6fb;border:1px solid #5f84af;border-radius:5px;background:linear-gradient(#245080,#1c3555 64%,#122845);box-shadow:inset 0 1px #d4e7fb46,inset 0 -3px #07182c,0 1px #091625;text-shadow:0 1px #071525;letter-spacing:.12px;}
nav>#reload,nav>#grenade{border-color:#c07883;background:linear-gradient(#992e3d,#78303d 64%,#511f2a);box-shadow:inset 0 1px #ffd0d050,inset 0 -3px #401520,0 1px #140b0d;}
nav>#reload[data-warning="true"],nav>#reload[data-empty="true"]{border-color:#ffd7be;background:linear-gradient(#a82f40,#7b1e31);color:#fff;}
nav>button:focus-visible{outline:2px solid #fbedbf;outline-offset:1px;}
nav>button:active:not(:disabled){filter:brightness(1.24);box-shadow:inset 0 2px 3px #07182c;}
nav>button:disabled{opacity:.58;}
@media(orientation:portrait) and (max-height:600px){nav:not([hidden]){padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom,0px));}}
/* Reload progress is a quiet lower strip; the label and button remain fixed. */
nav>#reload{position:relative;}
nav>#reload[data-reloading="true"]::after{content:'';position:absolute;bottom:2px;left:4%;width:calc(var(--reload-progress,0%) * .92);height:3px;background:#f7b39e;pointer-events:none;}

/* Approved physical deck artwork. Native controls sit on its two matching keycaps. */
.arcade-deck{position:relative;grid-column:1/-1;aspect-ratio:1220/710;background-color:#141c2a;background-image:url(assets/scene/arcade-deck-v44.webp);background-size:100% auto;background-position:center;background-repeat:no-repeat;}
.arcade-deck>button{position:absolute;top:35.5%;width:23.1%;height:35.5%;min-width:44px;min-height:44px;transform:translate(-50%,-50%);display:grid;place-items:center;padding:0;border:0;border-radius:50%;color:transparent;background:transparent;box-shadow:none;text-shadow:none;touch-action:manipulation;}
.arcade-deck>#reload{left:33.6%}
.arcade-deck>#grenade{left:66.5%}
.arcade-deck>#grenade[hidden]{display:none}
.arcade-deck #grenade-icon{display:none}
.arcade-deck #grenade-label{color:transparent;max-width:none}
.arcade-deck>button:is(:hover,:active):not(:disabled){background:#ffefcf15;box-shadow:inset 0 0 0 2px #ffedc040;color:transparent}
.arcade-deck>button:focus-visible{outline:2px solid #fff2bb;outline-offset:2px;background:#fff7dc18;color:transparent}
.arcade-deck>button:disabled{background:#07131b55;opacity:1}
.arcade-deck>#grenade:disabled #grenade-label{color:#ffefd0;padding:3px;background:#192230e8;border-radius:3px;}
.arcade-deck>#reload:is([data-warning="true"],[data-empty="true"]){background:#ff465321;border:0;box-shadow:inset 0 0 0 2px #ffd9b7;color:transparent;min-height:44px}
.arcade-deck>#reload[data-reloading="true"]::after{content:"";position:absolute;bottom:11%;left:15%;height:3px;width:calc(var(--reload-progress,0%) * .7);background:#ffe6aa;pointer-events:none;}
.arcade-deck>#reload[data-reloading="true"]::before{content:none;}
nav:not([hidden]):has(.arcade-deck){column-gap:4px;row-gap:2px;padding-top:0;}
@media(orientation:portrait) and (max-height:650px){
 .arcade-deck{aspect-ratio:1220/580;background-position:center 44%;}
 .arcade-deck>button{top:33.6%;height:43.2%}
}
@media (forced-colors:active){
 .arcade-deck{background-image:none;aspect-ratio:auto;min-height:54px;}
 .arcade-deck>button{top:27px;width:30%;height:44px;border:1px solid ButtonText;border-radius:0;background:ButtonFace;color:ButtonText;font:11px system-ui,sans-serif;}
 .arcade-deck>#reload{left:25%}.arcade-deck>#grenade{left:75%}.arcade-deck #grenade-label{color:ButtonText;}
}

/* Fixed, non-obstructing cue lane below the playfield and above the deck. */
#combat-caption{display:grid;place-items:center;flex:0 0 30px;min-height:30px;margin:0;padding:0 5px;background:#101a2a;color:#f3d992;font:12px/1 Arcade,monospace;text-align:center;}
#combat-caption[hidden]{display:none}
#combat-caption[data-red="true"]{color:rgba(255,79,84,.5)}
@media(orientation:portrait) and (max-height:650px){
 #combat-caption{flex-basis:24px;min-height:24px;font-size:11px;}
}
@media(max-height:500px) and (orientation:landscape){
 main:has(#combat-caption:not([hidden])){grid-template-rows:minmax(0,1fr) 24px;row-gap:0;}
 main:has(#combat-caption:not([hidden]))>.cabinet{grid-area:1/1}
 #combat-caption{grid-area:2/1;min-height:24px;font-size:11px;}
 main:has(#combat-caption:not([hidden]))>nav{grid-area:1/2/3/3;}
}

/* Keep the transparent target fixed during pointer-down and last-round feedback. */
.arcade-deck>button:active:not(:disabled){transform:translate(-50%,-50%);}
.arcade-deck>#reload.reload-pulse{animation:deck-reload-ring .4s ease-out 1;}
@keyframes deck-reload-ring{50%{box-shadow:0 0 0 5px #f0555960;}}
@media(prefers-reduced-motion:reduce){.arcade-deck>#reload.reload-pulse{animation:none;}}
