.arcade-hud{display:grid;grid-template-columns:1.2fr 1.28fr .55fr;gap:8px;margin:0 0 13px;align-items:stretch;image-rendering:pixelated}
.arcade-hud[hidden]{display:none}
.hud-panel{position:relative;border:3px solid #07131a;border-radius:12px;min-width:0;box-shadow:0 4px 0 #17373a,inset 0 0 0 2px #d6e0dc,inset 0 0 0 5px #263637}
.hud-level{display:flex;align-items:center;justify-content:center;gap:1px;background:linear-gradient(#ffeb28,#ffd600 65%,#efa700);padding:10px 7px}
.hud-word{width:68%;height:auto;object-fit:contain;filter:drop-shadow(1px 2px #81530c)}
.hud-digits{display:inline-flex;align-items:center;justify-content:center;gap:0;line-height:1}
.hud-digits img{display:block;height:34px;width:auto;max-width:27px;object-fit:contain;image-rendering:pixelated}
.hud-level .hud-digits img{height:48px;max-width:35px}
.hud-progress{background:linear-gradient(#22c0ff,#0476de 72%,#064d96);display:flex;flex-direction:column;justify-content:center;padding:9px 8px 7px;gap:5px}
.hud-counter{display:flex;align-items:center;justify-content:center;gap:3px}
.hud-slash{font:900 34px monospace;color:#ffdc00;-webkit-text-stroke:1px #342214;text-shadow:2px 2px #1d171a;line-height:1}
.hud-track{height:12px;background:#15254c;border:2px solid #263341;box-shadow:0 2px #a4b4c5;overflow:hidden}
.hud-fill{height:100%;width:0;background:linear-gradient(#c0ff7d 0 23%,#25df32 25% 72%,#0a9f32 74%);transition:width .14s steps(4,end)}
.hud-side{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:5px}
.pause-game{width:43px;height:41px;padding:0;border:3px solid #09282a;border-radius:10px;background:linear-gradient(#73f95b,#08aa38);box-shadow:inset 0 0 0 2px #bcf8b5,inset 0 -5px #168747,0 3px #164b42;display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer}
.pause-game i{display:block;width:7px;height:17px;background:#fff8b0;border:1px solid #082a24;box-shadow:1px 1px #082a24}
.pause-game[aria-pressed=true] i:first-child{width:0;height:0;border-top:9px solid transparent;border-bottom:9px solid transparent;border-left:13px solid #fff8b0;background:none;box-shadow:none}
.pause-game[aria-pressed=true] i:last-child{display:none}
.hud-life{display:flex;align-items:center;justify-content:center;gap:3px;color:#fff5b1;font:900 17px monospace;text-shadow:2px 2px #092126}
.pixel-heart{width:25px;height:24px;display:block;background:#4a1727;clip-path:polygon(0 15%,15% 0,35% 0,50% 17%,65% 0,85% 0,100% 15%,100% 48%,50% 100%,0 48%);position:relative}
.pixel-heart:after{content:'';position:absolute;inset:3px;background:linear-gradient(135deg,#ffb6b0 0 13%,#ec4050 15% 45%,#ac1f39 70%);clip-path:inherit}
.hud-meta{grid-column:1/-1;text-align:center;font:900 10px monospace;letter-spacing:.4px;color:#0c3833;text-shadow:0 1px #a1efb0;padding-top:1px}
.screenframe{border-color:#0d1d28;background:#263942;box-shadow:inset 0 -5px #75858c}
.screenframe:before{display:none}
.screen-trim{position:absolute;bottom:1px;left:23%;right:23%;height:11px;z-index:8;background:linear-gradient(#d0d5d9,#89969e 45%,#4a5964);border:2px solid #182835;clip-path:polygon(8% 0,92% 0,100% 100%,0 100%);pointer-events:none}
.screen-trim:after{content:'';position:absolute;inset:2px 8%;background:radial-gradient(circle at 8% 50%,#81e95e 0 2px,transparent 3px),radial-gradient(circle at 92% 50%,#81e95e 0 2px,transparent 3px)}
.pause-screen{position:absolute;inset:9px;z-index:9;background:#102839e8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:#ffe36b;font:900 28px monospace;text-shadow:3px 3px #07131e}
.pause-screen[hidden]{display:none}
.pause-screen button{font:900 16px monospace;background:#42c879;border:3px solid #081e27;padding:12px 20px;color:#0b302c;box-shadow:3px 3px #07131e;cursor:pointer}
.menu-scroll.main-menu-art{display:grid;grid-template-columns:.85fr 1.5fr;grid-template-rows:repeat(3,minmax(0,1fr));align-items:center;justify-items:center;gap:7px;width:100%;height:195px;flex:0 0 195px;max-height:none!important;overflow:visible!important;padding:8px 3px}
.menuitem.art-button{border:0!important;outline:none;background:transparent!important;box-shadow:none;padding:0!important;width:100%;height:100%;min-height:0!important;display:flex;align-items:center;justify-content:center;cursor:pointer}
.art-button img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 3px 0 #071327)}
.art-button.selected img,.art-button:focus-visible img{filter:drop-shadow(0 3px 0 #071327)}
.art-button:active img{transform:translateY(3px)}
.art-play{grid-column:1;grid-row:1/4}
.art-infinite{grid-column:2;grid-row:1}.art-scores{grid-column:2;grid-row:2}.art-controls{grid-column:2;grid-row:3}
.status{display:none}
@media(max-width:390px){.arcade-hud{gap:5px}.hud-panel{border-width:2px;border-radius:9px}.hud-level{padding:8px 4px}.hud-level .hud-digits img{height:36px;max-width:24px}.hud-digits img{height:26px;max-width:20px}.hud-slash{font-size:27px}.hud-progress{padding:8px 6px;gap:4px}.pause-game{width:35px;height:34px}.hud-life{font-size:14px;gap:1px}.pixel-heart{width:21px;height:20px}.hud-meta{font-size:8px}.menu-scroll.main-menu-art{height:162px;flex-basis:162px}.hud-track{height:10px}}

/* Square viewport: menu artwork fits without unused vertical space. */
#game{aspect-ratio:1/1!important}
.overlay{justify-content:flex-start;gap:6px;padding:10px 12px;background:linear-gradient(#071329b8,#071329ee),url('../assets/backgrounds/cafeteria-cuadrada.png') center/cover}
.overlay .logo{height:28%;max-height:100px;min-height:0;width:70%;margin:0 auto;flex:none}
.overlay .menu-scroll{max-height:none!important;min-height:0;flex:1}
.menu-scroll.main-menu-art{height:auto;flex:1 1 0;min-height:0;padding:3px 1px;gap:5px}
.overlay #menuFoot{font-size:8px;line-height:1.2;margin:0;flex:none}
.menuitem.art-button.selected,.menuitem.art-button:focus-visible{outline:none!important}
.menuitem.selected,.menuitem:focus-visible,.menuitem:active{outline:1px solid #9edfeb;outline-offset:2px}
.art-button.selected:before{content:'›';position:absolute;left:-9px;top:calc(50% - 10px);font:bold 18px monospace;color:#9edfeb;text-shadow:1px 1px #071327;pointer-events:none}
.art-button:focus-visible{box-shadow:inset 0 0 0 1px #9edfeb!important}
.pause-game{background:none;border:0;border-radius:0;box-shadow:none;gap:0;padding:0}
.pause-game img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.pause-game[aria-pressed=false]:active img{content:url('../assets/ui/pause-pressed.png')}
.pause-game[aria-pressed=true]:active img{content:url('../assets/ui/resume-pressed.png')}
.hud-heart{width:27px;height:25px;object-fit:contain;image-rendering:pixelated}
.resume-art{display:flex;align-items:center;justify-content:center;gap:10px}
.resume-art img{width:35px;height:35px;object-fit:contain}
@media(max-width:390px){.menu-scroll.main-menu-art{height:auto;flex-basis:0}.overlay{padding:8px 9px;gap:4px}.overlay .logo{max-height:82px}.hud-heart{width:23px;height:22px}.pause-game{width:35px;height:35px}}

.bitmap-accessible{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bitmap-text{display:inline-flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;column-gap:.32em;row-gap:.12em;max-width:100%;line-height:1}
.bitmap-word{display:inline-flex;align-items:flex-end;white-space:nowrap;gap:.015em}
.bitmap-text .bitmap-char{height:1.167em!important;width:auto!important;max-width:none!important;object-fit:contain;image-rendering:pixelated;filter:none!important;flex:none}
.bitmap-text .bitmap-char.bitmap-accent{height:1.458em!important}
.bitmap-symbol{color:#ffdc32;font-family:monospace;line-height:1}
#hudWord{display:inline-flex;justify-content:center;align-items:center;font-size:20px;filter:none;width:68%}
#hudWord .bitmap-text{background:#79500c;border:1px solid #b17b16;border-radius:2px;padding:3px 2px}
.hud-digits img{filter:none}
.hud-meta{text-shadow:none;font-size:9px}
.hud-life{text-shadow:none;font-size:16px}
.hud-slash{-webkit-text-stroke:0;text-shadow:none;color:#ffcf24}
.menuitem,.pause-screen,.pause-screen button{text-shadow:none}
@media(max-width:390px){#hudWord{font-size:15px}.hud-meta{font-size:7px}.hud-life{font-size:13px}}

/* Hard stepped edges and flat colour bands, rather than rounded UI cards. */
.hud-panel{border-radius:0;border:4px solid #102630;clip-path:polygon(0 8px,4px 8px,4px 4px,8px 4px,8px 0,calc(100% - 8px) 0,calc(100% - 8px) 4px,calc(100% - 4px) 4px,calc(100% - 4px) 8px,100% 8px,100% calc(100% - 8px),calc(100% - 4px) calc(100% - 8px),calc(100% - 4px) calc(100% - 4px),calc(100% - 8px) calc(100% - 4px),calc(100% - 8px) 100%,8px 100%,8px calc(100% - 4px),4px calc(100% - 4px),4px calc(100% - 8px),0 calc(100% - 8px));box-shadow:inset 0 0 0 2px #ced6c3,inset 0 0 0 4px #5e664d}
.hud-level{background:#b8790c;box-shadow:inset 0 0 0 2px #fff58b,inset 0 4px #ffdc48,inset 0 -5px #82520a}
.hud-progress{background:#096bb9;box-shadow:inset 0 0 0 2px #9ee9ff,inset 0 5px #269ee4,inset 0 -5px #16427b}
#hudWord .bitmap-text{background:none;border:0;border-radius:0;padding:0}
.hud-fill{background:#30df38;box-shadow:inset 0 3px #a4ff79,inset 0 -3px #14912d}
.hud-level .hud-digits img{max-width:calc(35px / var(--digit-count,1))}
@media(max-width:390px){.hud-level .hud-digits img{max-width:calc(24px / var(--digit-count,1))}.hud-counter .hud-digits img{height:24px;max-width:17px}.hud-counter .hud-slash{font-size:24px}}
