@font-face{font-family:PressStart;src:url('/fonts/lisnard-arcade-latin.woff2') format('woff2');font-display:swap}
*{box-sizing:border-box} [hidden]{display:none!important}
:root{color-scheme:dark;--gold:#d7b77c;--ivory:#f2e7d0;--muted:#b5ada0;--red:#ab3c34;--pixel:PressStart,monospace;font-family:Arial,Helvetica,sans-serif;background:#0c0b0e;color:var(--ivory)}
body{margin:0;overflow:hidden;min-width:320px;background:#0c0b0e}button,a,input{touch-action:manipulation}button,a{color:inherit}button{cursor:pointer;font:inherit}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #f1d59a;outline-offset:5px}button:disabled{opacity:.45;cursor:default}
.topbar{height:70px;position:fixed;inset:0 0 auto;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 34px;background:linear-gradient(#08080c9e,transparent);pointer-events:none}.topbar>*{pointer-events:auto}.brand{text-decoration:none;font:8px/1.7 var(--pixel);color:var(--gold)}.chapter{font-size:10px;letter-spacing:3px;color:#d9d2c4}.chapter i{font-size:8px;font-style:normal;color:#8b8478;margin-left:15px}.topbar button{background:#18141970;border:1px solid #bb9d6659;padding:9px 13px;font-size:12px;color:#e0d2b8}.topbar button:hover{background:#b39a6d33}
.arena{position:relative;width:100vw;height:100svh;overflow:hidden;background:#08090e}canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}.vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 40%,#0008 100%);z-index:1}
.map-label{position:absolute;top:99px;left:36px;font-size:10px;letter-spacing:2px;color:#dfd6bf;pointer-events:none;z-index:2;text-shadow:0 2px 8px #000}.map-label small{display:block;font-size:10px;font-weight:400;letter-spacing:.2px;color:#aaa194;margin-top:8px}.location-dot{display:inline-block;width:5px;height:5px;background:#b8463c;margin-right:8px;box-shadow:0 0 10px #d23a32}
.wave{position:absolute;right:38px;top:96px;text-align:right;pointer-events:none;z-index:2;text-shadow:0 2px 10px #000}.wave>span{font-size:8px;letter-spacing:3px;color:#bfb19a}.wave strong{display:block;font:46px/1.2 Georgia,serif;color:#e5c78f;margin:6px 0}.wave small{font-size:10px;color:#bcb2a5}
.crosshair{position:absolute;top:50%;left:50%;width:24px;height:24px;transform:translate(-50%,-50%);pointer-events:none;z-index:3;opacity:.8;transition:width .1s,height .1s}.crosshair i{position:absolute;background:#eee4cc;box-shadow:0 0 3px #0009}.crosshair i:nth-child(1){left:0;top:11px;width:6px;height:1px}.crosshair i:nth-child(2){right:0;top:11px;width:6px;height:1px}.crosshair i:nth-child(3){left:11px;top:0;width:1px;height:6px}.crosshair i:nth-child(4){left:11px;bottom:0;width:1px;height:6px}.crosshair.hit{transform:translate(-50%,-50%) rotate(45deg);opacity:1}.crosshair.hit i{background:#f5cb76}.crosshair.kill i{background:#f08763}.crosshair.aiming{opacity:.45}.damage-direction{position:absolute;top:50%;left:50%;width:160px;height:160px;margin:-80px 0 0 -80px;border-top:3px solid #df614d;border-radius:50%;opacity:0;pointer-events:none;z-index:3}
.hud{position:absolute;bottom:42px;left:36px;right:36px;display:flex;align-items:flex-end;justify-content:space-between;pointer-events:none;z-index:3;filter:drop-shadow(0 2px 5px #000)}.identity{display:flex;gap:14px;align-items:center}.portrait{width:46px;height:62px;position:relative;overflow:hidden;border:1px solid #9d855d;background:#17203b;opacity:.9}.portrait img{position:absolute;width:587%;max-width:none;left:-235%;top:-73.6%}.hud small{font-size:9px;letter-spacing:1.7px;color:#d5c8ad}.hud strong{display:block;font:28px/1.25 Georgia,serif;letter-spacing:1px}.hud i{font:12px Arial;font-style:normal;color:#998f80}.health-track{height:3px;width:145px;background:#92826c42;margin:7px 0 4px}.health-track span{display:block;height:100%;background:#e6ce9e;transition:width .15s}.stamina-track{height:2px;width:145px;background:#92826c25}.stamina-track span{display:block;width:100%;height:100%;background:#8caaae}.stamina-label{display:block;font-size:7px;letter-spacing:1px;color:#a49b8b;margin-top:6px}.points{text-align:left;position:absolute;left:0;bottom:110px}.points>strong{color:#d4b781;font-size:23px;margin-top:4px}.weapon{text-align:right}.weapon strong{font-size:38px;margin:5px 0 4px}.weapon>span{font-size:10px;letter-spacing:.6px;color:#ada18b}.reload-track{height:2px;width:140px;background:#8f836520;margin:10px 0 0 auto}.reload-track span{height:100%;display:block;width:0;background:#e5c996}.perks{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px;max-width:210px}.perks span{border:1px solid #c9b68066;background:#1a2423c4;font-size:8px;padding:4px;color:#d6d1b7}
.toast{position:absolute;left:50%;top:22%;transform:translateX(-50%);width:min(540px,70%);text-align:center;background:linear-gradient(90deg,transparent,#0e0c11bd,transparent);border-top:1px solid #c4a06c36;padding:13px 22px;color:#dfc9a4;font-size:13px;line-height:1.8;pointer-events:none;z-index:4;text-shadow:0 2px 5px #000}.toast:empty,.prompt:empty,.mouse-hint:empty{display:none}.prompt{position:absolute;left:50%;bottom:25%;transform:translateX(-50%);width:max-content;max-width:80%;text-align:center;color:#eed8a4;background:#0d0c11d9;border:1px solid #c7a76b6b;box-shadow:0 0 28px #0006;padding:13px 20px;font-size:12px;letter-spacing:.4px;z-index:4;pointer-events:none}.mouse-hint{position:absolute;left:50%;bottom:116px;transform:translateX(-50%);font-size:10px;color:#e7d5b6;background:#0c0a0ecc;padding:8px 14px;z-index:4;pointer-events:none;text-align:center}
.bottom-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:25px;z-index:4;max-width:42%;pointer-events:none}.bottom-bar p{margin:0;font-size:10px;line-height:1.6;text-align:center;color:#b9ad9b;text-shadow:0 1px 5px #000}.bottom-bar strong{font-size:8px;letter-spacing:1.7px;color:#d2b87e;display:block;margin-bottom:7px}.live-dot{display:none}.bottom-bar.hidden{opacity:0}.bottom-bar{transition:opacity .5s}
.overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:flex-start;background:linear-gradient(90deg,#09080eee 0%,#100c15d6 37%,#0f0c145e 70%,#09080e33);backdrop-filter:blur(2px);overflow-y:auto;padding:90px max(7vw,28px) 45px}.start-card{width:min(610px,100%);margin:auto 0}.eyebrow{font-size:9px;letter-spacing:4px;color:#bda67f;margin:0 0 22px}h1{font:500 clamp(36px,5.5vw,74px)/.99 Georgia,serif;letter-spacing:1px;margin:0;text-transform:uppercase;color:#f2e7d4;text-shadow:0 3px 18px #0009}h1 em{font-style:normal;color:#d5b77b;display:inline-block;margin-top:8px}.start-card> .intro-heading>p:not(.eyebrow){font-size:15px;line-height:1.85;color:#bfb5a6;margin:25px 0}.features{display:flex;flex-wrap:wrap;gap:18px;margin:27px 0 30px}.features span{font-size:8px;letter-spacing:1.3px;color:#c5b391;border-left:1px solid #936b49;padding-left:9px}.primary{display:flex;gap:25px;align-items:center;justify-content:space-between;width:min(335px,100%);padding:18px 21px;border:1px solid #b59a63;background:linear-gradient(110deg,#bba16d,#e7d1a0);color:#211b19;font-size:10px;font-weight:700;letter-spacing:2px;box-shadow:0 5px 30px #0005}.primary span{font-size:19px;font-weight:400}.primary:hover{filter:brightness(1.13)}.controls-legend{display:flex;flex-wrap:wrap;gap:10px 18px;max-width:440px;margin:25px 0 22px;color:#938b80;font-size:10px;line-height:1.6}.controls-legend b{font-size:9px;color:#d0c3ae;margin-right:3px}.touch-hint{display:none}.settings{border-top:1px solid #bba47b25;padding-top:17px;display:flex;flex-wrap:wrap;align-items:center;gap:17px 24px;max-width:500px}.audio-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.audio-controls label,.sensitivity{display:flex;align-items:center;gap:6px;font-size:10px;color:#a99d89}.settings input{accent-color:#d1b37d}.settings input[type=range]{width:60px}.settings input[type=checkbox]{width:12px;height:12px}.settings output{font-size:10px;min-width:25px}.guide{margin-top:18px;font-size:11px;color:#9f9484;line-height:1.8;max-width:540px}.guide summary{cursor:pointer;color:#c0a674;font-size:10px;letter-spacing:.5px}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.guide-grid p{margin:14px 0 0}.guide-grid strong{display:block;color:#d0c2aa}.disclaimer{color:#756e65;font-size:9px}.return-link{display:inline-block;margin-top:17px;font-size:10px;color:#8e8372;text-decoration:none;border-bottom:1px solid #7b6b4a66;padding-bottom:3px}.graphics-status{font-size:11px;line-height:1.7;color:#d4b57f;margin:14px 0 0}.touch-controls{display:none}.game-running .topbar{opacity:.75}.game-running .chapter{opacity:.4}.game-overlay .map-label,.game-overlay .wave,.game-overlay .hud,.game-overlay .bottom-bar,.game-overlay .crosshair,.game-overlay .toast,.game-overlay .prompt,.game-overlay .mouse-hint,.game-overlay .touch-controls{visibility:hidden}.game-overlay .chapter{display:none}
@media(max-width:750px),(pointer:coarse){.topbar{height:58px;padding:0 15px}.brand{font-size:7px}.chapter{display:none}.topbar button{font-size:11px;padding:7px 10px}.map-label{top:76px;left:17px;font-size:8px;max-width:62%}.map-label small{font-size:8px}.wave{right:17px;top:76px}.wave>span{font-size:7px}.wave strong{font-size:34px}.wave small{font-size:8px}.hud{left:15px;right:15px;bottom:145px}.portrait{display:none}.identity{gap:0}.hud small{font-size:7px;letter-spacing:1px}.hud strong{font-size:24px}.health-track,.stamina-track{width:100px}.stamina-label{font-size:6px}.weapon strong{font-size:28px}.weapon>span{font-size:8px}.reload-track{width:100px}.points{bottom:89px}.points strong{font-size:20px}.points small{font-size:7px}.perks{max-width:170px}.perks span{font-size:7px;padding:3px}.bottom-bar{bottom:7px;max-width:90%;width:90%}.bottom-bar strong{display:none}.bottom-bar p{font-size:8px}.touch-controls{position:absolute;bottom:42px;left:15px;right:15px;display:flex;justify-content:space-between;align-items:end;pointer-events:none;z-index:5}.touch-controls button{pointer-events:auto;background:#0c101bcc;border:1px solid #b9a27488;color:#e9d3a4;min-width:40px;min-height:40px;font-size:17px;touch-action:none;user-select:none;-webkit-user-select:none}.touch-controls button:active,.touch-controls button.active{background:#cfb37d;color:#171924}.toast{top:27%;font-size:11px;width:87%;padding:10px}.prompt{bottom:260px;font-size:10px;max-width:90%;padding:10px}.mouse-hint{display:none}.overlay{padding:83px 24px 36px;background:linear-gradient(90deg,#09080eee,#100c15d1 80%,#100c15b8)}.start-card{margin:auto;width:100%}.eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:20px}h1{font-size:clamp(36px,9vw,60px)}.start-card>.intro-heading>p:not(.eyebrow){font-size:13px;margin:21px 0}.features{gap:11px;margin:21px 0 25px}.features span{font-size:7px}.primary{width:100%;font-size:9px;padding:16px 18px}.controls-legend{display:none}.touch-hint{display:block;font-size:10px;line-height:1.8;color:#a99d8c;margin:20px 0}.settings{gap:13px}.sensitivity{display:none}.audio-controls{gap:12px}.guide-grid{grid-template-columns:1fr}.guide{margin-top:15px}.crosshair{transform:translate(-50%,-50%) scale(.8)}}
@media(max-height:700px) and (min-width:751px){.overlay{padding-top:75px;padding-bottom:25px}.eyebrow{margin-bottom:14px}h1{font-size:48px}.start-card>.intro-heading>p:not(.eyebrow){margin:15px 0;font-size:13px}.features{margin:18px 0}.primary{padding:14px 18px}.controls-legend{margin:16px 0}.settings{padding-top:12px}.guide,.return-link{margin-top:12px}}

@media(pointer:fine) and (max-width:750px){.touch-controls,.touch-hint{display:none}.controls-legend{display:flex}.sensitivity{display:flex}.hud{bottom:55px}.bottom-bar{bottom:12px;max-width:45%}.mouse-hint{display:block;bottom:135px}.mouse-hint:empty{display:none}}
.perks{font-size:8px;color:#c9bb93;letter-spacing:.5px}
.primary:disabled{opacity:.55;cursor:wait;filter:none}.weapon>.book-title{display:block;max-width:245px;margin:7px 0 0 auto;color:#dac9a9;font-size:10px;line-height:1.4}
.library{margin:17px 0 0;max-width:610px;border:1px solid #bba47b3d;background:#0d0c12bb}.library>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 15px}.library>summary::-webkit-details-marker{display:none}.library>summary small{display:block;font-size:8px;letter-spacing:1.7px;color:#a99c84}.library>summary strong{display:block;margin-top:5px;font:14px/1.4 Georgia,serif;color:#e6d7ba}.library-open{flex-shrink:0;font-size:10px;color:#c9af7c}.library-open i{font-style:normal;margin-left:5px}.library[open] .library-open i{display:inline-block;transform:rotate(45deg)}.library-content{padding:0 15px 16px;border-top:1px solid #bba47b25}.library-copy{font-size:11px;line-height:1.65;color:#b4aa98;margin:14px 0}.library-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.library-book{padding:9px 7px 8px;display:flex;flex-direction:column;align-items:stretch;border:1px solid #c3a66c25;background:#16141d;min-width:0}.library-book.selected{border-color:#d8b977;background:#30271f}.library-book img{display:block;width:100%;height:116px;object-fit:contain;object-position:center;filter:drop-shadow(0 3px 5px #0007)}.library-book.locked img{opacity:.65}.library-badge{font-size:6px;font-weight:700;letter-spacing:.4px;line-height:1.5;color:#bfa77d;margin-top:10px;min-height:18px}.library-book h3{font:11px/1.4 Georgia,serif;color:#e0d5c1;margin:5px 0 12px;flex:1}.library-book button{width:100%;padding:8px 3px;background:#cbb17c;color:#1b1717;border:1px solid #d5bd8c;font-size:9px;cursor:pointer}.library-book button:disabled{cursor:default;background:transparent;color:#978b76;border-color:#bba47b25}.library-book.selected button{color:#e4c890;border-color:#ba9a5a77}.library-status{font-size:10px;line-height:1.6;color:#b7a88b;min-height:16px;margin:13px 0 0}.library-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin-top:13px}.library-actions a,.library-actions button{font:10px Arial,Helvetica,sans-serif;color:#dbc28e;border:0;border-bottom:1px solid #bba47b55;background:transparent;text-decoration:none;padding:0 0 4px;cursor:pointer}.library-actions button:disabled{opacity:.5;cursor:wait}.library :focus-visible{outline:2px solid #e8ce93;outline-offset:4px}
@media(max-width:600px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.library-book{padding:12px}.library-book img{height:150px}.library-badge{font-size:7px;min-height:auto}.library-book h3{font-size:13px}.library-book button{font-size:10px;padding:9px}.library>summary{padding:12px}.library>summary strong{font-size:13px}.library-open{font-size:9px}.weapon>.book-title{font-size:8px;max-width:145px}}

/* Mobile play is landscape: low HUD, thumb-sized controls and a clear aiming lane. */
@media(orientation:landscape){
 html[data-mobile-game=touch] .arena{width:100%;height:100dvh;min-height:0}
 html[data-mobile-game=touch] .topbar{height:48px;top:env(safe-area-inset-top);padding:0 max(12px,env(safe-area-inset-left)) 0 max(12px,env(safe-area-inset-right));justify-content:flex-end}
 html[data-mobile-game=touch] .game-running .topbar .brand{display:none}
 html[data-mobile-game=touch] .topbar #pause{min-height:44px;min-width:44px;padding:10px}
 html[data-mobile-game=touch] .map-label{top:calc(env(safe-area-inset-top) + 15px);left:max(16px,env(safe-area-inset-left));font-size:8px;max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-mobile-game=touch] .wave{top:calc(env(safe-area-inset-top) + 15px);right:calc(max(12px,env(safe-area-inset-right)) + 82px);display:flex;align-items:center;gap:9px}
 html[data-mobile-game=touch] .wave strong{font-size:27px;margin:0}
 html[data-mobile-game=touch] .wave>span{font-size:6px;letter-spacing:1px}
 html[data-mobile-game=touch] .wave small{display:none}
 html[data-mobile-game=touch] .hud{top:calc(env(safe-area-inset-top) + 48px);bottom:auto;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));align-items:flex-start}
 html[data-mobile-game=touch] .hud .portrait{display:none}
 html[data-mobile-game=touch] .hud .identity .vitals>small,html[data-mobile-game=touch] .hud .stamina-label,html[data-mobile-game=touch] .hud .book-title,html[data-mobile-game=touch] #reload-label{display:none}
 html[data-mobile-game=touch] .hud .health-track,html[data-mobile-game=touch] .hud .stamina-track{width:93px}
 html[data-mobile-game=touch] .hud #health{font-size:21px}
 html[data-mobile-game=touch] .hud #health i{font-size:10px}
 html[data-mobile-game=touch] .points{top:0;bottom:auto;left:50%;transform:translateX(-50%);text-align:center}
 html[data-mobile-game=touch] .points strong{font-size:19px;margin:2px 0}
 html[data-mobile-game=touch] .points small{font-size:6px}
 html[data-mobile-game=touch] .hud .weapon strong{font-size:25px;margin:1px 0}
 html[data-mobile-game=touch] .hud .weapon>small{font-size:7px}
 html[data-mobile-game=touch] .reload-track{margin-top:5px;width:93px}
 html[data-mobile-game=touch] .perks{justify-content:center;max-width:220px;margin-top:3px;font-size:6px}
 html[data-mobile-game=touch] .touch-controls{position:absolute;z-index:5;display:flex;left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));justify-content:space-between;align-items:end;pointer-events:none}
 html[data-mobile-game=touch] .touch-controls button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
 html[data-mobile-game=touch] .touch-controls .joystick{position:relative;display:block;width:132px;height:132px;min-width:132px;min-height:132px;padding:0;border:1px solid #e6cd8466;border-radius:50%;background:radial-gradient(circle,#111f415c 0 46%,#0a153b8c 47% 72%,#0a153b38 73%);box-shadow:inset 0 0 0 5px #0a153b42,0 3px 15px #0004;outline-offset:4px;overflow:visible;transition:border-color .12s,box-shadow .12s}
 html[data-mobile-game=touch] .joystick.active{border-color:#ffe49d;box-shadow:inset 0 0 0 5px #f3d69114,0 0 18px #edcb5425}
 html[data-mobile-game=touch] .stick-rim{position:absolute;inset:14%;border:1px solid #e8d79e32;border-radius:50%;pointer-events:none}
 html[data-mobile-game=touch] .joystick-move .stick-rim:before{content:'';position:absolute;top:-13px;left:calc(50% - 13px);width:26px;height:4px;background:#e9d89666;border-radius:3px}
 html[data-mobile-game=touch] .stick-knob{position:absolute;left:50%;top:50%;width:52px;height:52px;border:2px solid #e9d296a8;border-radius:50%;transform:translate(calc(-50% + var(--stick-x,0px)),calc(-50% + var(--stick-y,0px)));background:radial-gradient(circle at 40% 30%,#3e4e73ee,#101c3fe8);box-shadow:inset 0 0 0 4px #eed58e10,0 4px 9px #0006;pointer-events:none;will-change:transform}
 html[data-mobile-game=touch] .joystick.active .stick-knob{border-color:#ffebb7;background:radial-gradient(circle at 40% 30%,#d6be77,#96773f);box-shadow:inset 0 0 0 4px #f6e3a730,0 4px 9px #0006}
 html[data-mobile-game=touch] .stick-label{position:absolute;bottom:9px;left:0;right:0;text-align:center;color:#f2dca3;font:6px/1.5 var(--pixel);letter-spacing:.2px;pointer-events:none;text-shadow:0 1px 3px #000}
 html[data-mobile-game=touch] .stick-reticle{position:absolute;inset:14px;border:1px solid #f0dca5;border-radius:50%}
 html[data-mobile-game=touch] .stick-reticle:before,html[data-mobile-game=touch] .stick-reticle:after{content:'';position:absolute;background:#f0dca5}
 html[data-mobile-game=touch] .stick-reticle:before{width:26px;height:1px;left:-4px;top:8px}
 html[data-mobile-game=touch] .stick-reticle:after{height:26px;width:1px;left:8px;top:-4px}
 html[data-mobile-game=touch] .joystick-look.active .stick-reticle{border-color:#182442}
 html[data-mobile-game=touch] .joystick-look.active .stick-reticle:before,html[data-mobile-game=touch] .joystick-look.active .stick-reticle:after{background:#182442}
 html[data-mobile-game=touch] .touch-right{display:flex;align-items:end;gap:12px;pointer-events:none}
 html[data-mobile-game=touch] .touch-utilities{display:flex;flex-direction:column;gap:8px;padding-bottom:5px}
 html[data-mobile-game=touch] .touch-utilities button{min-width:56px;min-height:44px;padding:6px;border:1px solid #e8d09569;border-radius:8px;background:#101c3dcc;color:#f0dda9;font-size:9px}
 html[data-mobile-game=touch] .touch-utilities button:active{background:#e8d095;color:#101c3d}
 html[data-mobile-game=touch] .touch-hint{display:block}
 html[data-mobile-game=touch] .controls-legend{display:none}
 html[data-mobile-game=touch] .toast{top:28%;width:60%;padding:8px 12px;font-size:10px}
 html[data-mobile-game=touch] .prompt{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 25px);max-width:calc(100% - 340px);padding:9px 12px;font-size:10px;white-space:normal}
 html[data-mobile-game=touch] .mouse-hint{display:none}
}
@media(orientation:landscape) and (max-height:370px){html[data-mobile-game=touch] .toast{top:35%}}

@media(orientation:landscape) and (max-height:370px){html[data-mobile-game=touch] .touch-controls{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}html[data-mobile-game=touch] .touch-controls .joystick{width:120px;height:120px;min-width:120px;min-height:120px}html[data-mobile-game=touch] .touch-right{gap:8px}html[data-mobile-game=touch] .touch-utilities button{min-width:52px;font-size:8px}}
@media(prefers-reduced-motion:reduce){.touch-controls .joystick{transition:none}}

/* Context only: the machine tells the player what a purchase actually does. */
.prompt.machine-prompt{width:min(370px,80vw);max-width:80%;padding:15px 18px 13px;border:1px solid #cdb677;background:linear-gradient(135deg,#10172bf5,#10111cf2);box-shadow:0 0 0 3px #080d20b3,0 8px 30px #0009;text-align:left;pointer-events:auto;bottom:23%}
.machine-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.machine-name{font:8px/1.7 var(--pixel);color:#f2dda1;overflow-wrap:anywhere}.machine-timer{font:bold 12px/1 monospace;color:#e8d493;white-space:nowrap;border:1px solid #e8d49355;padding:5px}.machine-effect{font:12px/1.5 Arial,sans-serif;color:#fff7e3;margin:9px 0}.machine-current{font:10px/1.4 Arial,sans-serif;color:#b2b8ca;margin:4px 0 9px}.machine-actions{display:flex;gap:8px;margin-top:11px}.machine-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:8px 10px;border:1px solid #e2cc89;font:11px/1.3 Arial,sans-serif;flex:1}.machine-take{background:linear-gradient(#f9e9b0,#cfb975);color:#0d1630}.machine-keep{background:#111a34;color:#e2d2a3}.machine-actions button:disabled{opacity:.65}.machine-actions kbd{font:bold 10px monospace;border:1px solid currentColor;min-width:19px;padding:2px;text-align:center}.machine-prompt[data-status=poor] .machine-actions button{color:#ffd1b8;background:#442c2b;border-color:#b77c69;opacity:1}
.weapon>.weapon-mode{display:block;font-size:10px;color:#ddcb9a;margin-top:6px}.weapon #combat-toggle{pointer-events:auto;display:block;margin:10px 0 0 auto;border:1px solid #dbc78570;background:#101a34d9;color:#eddaa3;padding:7px 10px;font-size:10px}.crosshair.melee{width:42px;height:42px;border:1px solid #e8b96a80;border-radius:50%}.crosshair.melee i{opacity:.5}
@media(pointer:coarse),(max-width:750px){.prompt.machine-prompt{padding:10px 12px;width:min(335px,82vw);bottom:240px}.machine-name{font-size:7px}.machine-effect{font-size:11px;margin:7px 0}.machine-actions{margin-top:8px;gap:7px}.machine-actions button{min-height:42px}.weapon #combat-toggle{font-size:9px}}
@media(orientation:landscape){html[data-mobile-game=touch] .prompt.machine-prompt{bottom:calc(max(9px,env(safe-area-inset-bottom)) + 4px);left:calc(50% - 34px);width:min(330px,calc(100vw - 400px));max-width:calc(100vw - 400px);padding:9px 11px}html[data-mobile-game=touch] .machine-effect{font-size:10px;margin:5px 0}html[data-mobile-game=touch] .machine-current{font-size:9px;margin:3px 0 5px}html[data-mobile-game=touch] .machine-actions{margin-top:6px}html[data-mobile-game=touch] .machine-actions button{min-height:40px;padding:6px;font-size:10px}html[data-mobile-game=touch] .weapon #combat-toggle{display:none}html[data-mobile-game=touch] .weapon>.weapon-mode{font-size:8px;margin:2px 0}html[data-mobile-game=touch] .touch-utilities{gap:5px}html[data-mobile-game=touch] .touch-utilities button{min-height:38px}}
@media(orientation:landscape) and (max-width:700px){html[data-mobile-game=touch] .machine-name{font-size:6px}html[data-mobile-game=touch] .machine-actions button{font-size:9px}}

@media(orientation:landscape) and (max-height:370px){html[data-mobile-game=touch] .prompt.machine-prompt{left:calc(50% - 28px);width:min(330px,calc(100vw - 360px));max-width:calc(100vw - 360px)}}

/* Time-sampled combat presentation: game pause freezes these poses exactly. */
.wave-announcement{position:absolute;inset:0;z-index:7;pointer-events:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;opacity:var(--announcement-opacity,0);background:radial-gradient(ellipse at center,#0711275c 0,#050b20a6 65%,#020611cc);isolation:isolate;text-shadow:0 4px 0 #47341c,0 8px 32px #000;overflow:hidden}
.wave-announcement:before,.wave-announcement:after{content:'';position:absolute;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#ffe8a1,transparent);box-shadow:0 0 20px #ffc46180;z-index:-1}
.wave-announcement:before{top:25%}.wave-announcement:after{bottom:21%}
.wave-announcement>i{position:absolute;inset:-50% -30%;z-index:-1;background:linear-gradient(115deg,transparent 47%,#e4b35c15 49%,#fff2b948 50%,#e4b35c15 51%,transparent 53%);transform:translateX(var(--announcement-travel,0%))}
.wave-announcement>span{font:clamp(13px,2.1vw,28px)/1.5 var(--pixel);letter-spacing:.3em;padding-left:.3em;color:#f9e7b4;transform:scale(var(--announcement-scale,1))}
.wave-announcement>strong{font:clamp(88px,15vw,202px)/1.12 var(--pixel);color:#ffe3a0;transform:scale(var(--announcement-scale,1));filter:drop-shadow(0 0 27px #e3a04d55)}
.combat-pulse{position:absolute;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse at 67% 82%,transparent 25%,#ffd27819 70%,#ffcf6244 100%);box-shadow:inset 0 0 80px #ffc9682b}
.weapon-announcement{position:absolute;left:50%;top:19%;z-index:4;max-width:70%;text-align:center;pointer-events:none;transform:translate(-50%,var(--reward-lift,0px));padding:13px 30px;background:linear-gradient(90deg,transparent,#080f24c9 20% 80%,transparent);filter:drop-shadow(0 3px 8px #000)}
.weapon-announcement:before{content:'';display:block;height:2px;margin:0 auto 13px;width:80px;background:linear-gradient(90deg,transparent,#f6cc79,transparent)}
.weapon-announcement>span{display:block;font:7px/1.7 var(--pixel);letter-spacing:.16em;color:#d4bb85;margin-bottom:10px}
.weapon-announcement>span:empty{display:none}
.weapon-announcement>strong{font:clamp(10px,1.2vw,17px)/1.7 var(--pixel);color:#fff0bb}
.weapon-announcement[data-kind=weapon-mode]>strong{font-size:10px}
.crosshair.hit{transform:translate(-50%,-50%) rotate(45deg) scale(calc(1 + var(--hit-confirm,0)*.2))}
.weapon>strong{filter:drop-shadow(0 0 calc(var(--reload-confirm,0)*9px) #ffda89)}
.game-overlay .wave-announcement,.game-overlay .weapon-announcement,.game-overlay .combat-pulse{display:none}
@media(orientation:landscape) and (max-height:500px){.wave-announcement{gap:12px}.wave-announcement>span{font-size:12px}.wave-announcement>strong{font-size:100px}.weapon-announcement{top:24%;padding:8px 14px;max-width:55%}.weapon-announcement>span{font-size:6px;margin-bottom:5px}.weapon-announcement>strong{font-size:9px}.weapon-announcement:before{margin-bottom:7px}}
@media(prefers-reduced-motion:reduce){.wave-announcement>i{display:none}.weapon-announcement{transform:translateX(-50%)}.crosshair.hit{transform:translate(-50%,-50%) rotate(45deg)}}

.weapon-feedback-active .toast{display:none}

/* C — portraits in hexagonal arcade emblems. One shared combat resource. */
.ultimate-hud{position:absolute;z-index:5;bottom:22px;left:50%;transform:translateX(-50%);width:346px;color:#f3dfad;pointer-events:none;filter:drop-shadow(0 4px 6px #000b)}
.ultimate-hud[hidden]{display:none}.ultimate-hud[hidden] *{animation-play-state:paused!important}
.ultimate-charge{position:relative;width:270px;height:23px;margin:0 auto 10px;background:#0b14288c;text-align:center;overflow:hidden;border-bottom:1px solid #857047;box-shadow:0 1px 0 #081025}
.ultimate-charge>i{position:absolute;left:0;bottom:0;width:var(--ultimate-charge,0%);height:3px;background:#e2c27e;box-shadow:0 0 9px #f4c97866}.ultimate-charge>span{position:relative;font:7px/17px var(--pixel);letter-spacing:.05em;color:#f4e5b9;text-shadow:0 1px 2px #000}
.ultimate-choices{display:flex;gap:16px;justify-content:center;align-items:flex-end}
.ultimate-choice{position:relative;flex:0 0 100px;width:100px;min-height:155px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#f5e4b5;pointer-events:auto;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.ultimate-portrait{position:relative;isolation:isolate;display:block;width:100%;height:111px;overflow:hidden;clip-path:polygon(50% 0,100% 21%,100% 79%,50% 100%,0 79%,0 21%);background:linear-gradient(135deg,#fff1b8,#9d7947 45%,#e8c478);filter:brightness(.83) saturate(.8)}
.ultimate-portrait:before{content:'';position:absolute;inset:4px;z-index:-1;clip-path:inherit;background:radial-gradient(ellipse at 50% 45%,#384263,#0b1534 75%)}
.ultimate-portrait img{position:absolute;left:0;bottom:0;display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(2px 2px #08102b);pointer-events:none}
.ultimate-name{display:flex;align-items:center;justify-content:center;white-space:pre-line;height:38px;margin:6px -2px 0;font:8.2px/1.6 var(--pixel);letter-spacing:-.1px;text-align:center;color:#dfd1ae;text-shadow:1px 2px #080f29}
.ultimate-choice kbd{z-index:2;position:absolute;left:3px;top:1px;display:grid;place-items:center;width:21px;height:21px;border:1px solid #e4c77d;background:#14234b;box-shadow:0 2px 3px #0008;color:#f8e6b2;font:10px/1 var(--pixel)}
.ultimate-choice:disabled{opacity:1;cursor:default}.ultimate-choice:focus-visible{outline:2px solid #fff2b0;outline-offset:5px}
.ultimate-hud[data-ready=true] .ultimate-portrait{filter:brightness(1) saturate(1);animation:ultimate-ready-glow 2.4s ease-in-out infinite}.ultimate-hud[data-ready=true] .ultimate-name{color:#fff0bf}
.ultimate-choice:not(:disabled):hover .ultimate-portrait{filter:brightness(1.12);transform:translateY(-2px)}.ultimate-choice:not(:disabled):active .ultimate-portrait{transform:translateY(1px)}
.ultimate-hud[data-active]:not([data-active='']) .ultimate-choice:not([data-active=true]) .ultimate-portrait{filter:brightness(.65) saturate(.7)}
.ultimate-choice[data-active=true] .ultimate-portrait{filter:brightness(1.16) saturate(1.12);background:linear-gradient(135deg,#fff5d6,#b28548 45%,#ffe5a3);box-shadow:inset 0 0 12px #fff0b8;animation:ultimate-active-glow .9s ease-in-out infinite}.ultimate-choice[data-active=true] .ultimate-name{color:#fff3c9}
@keyframes ultimate-ready-glow{0%,100%{filter:brightness(1) saturate(1)}50%{filter:brightness(1.12) saturate(1.05)}}
@keyframes ultimate-active-glow{0%,100%{filter:brightness(1.16) saturate(1.12)}50%{filter:brightness(1.3) saturate(1.2)}}
.ultimate-help{position:absolute;right:0;top:-4px;width:27px;height:27px;border:1px solid #a88e5b;border-radius:50%;background:#101a34eb;color:#f0dca4;font:14px Georgia,serif;pointer-events:auto;touch-action:manipulation}
.ultimate-help-panel{position:absolute;bottom:185px;left:50%;transform:translateX(-50%);width:280px;max-height:calc(100vh - 210px);overflow:auto;padding:11px 14px;border:1px solid #c3a36c;background:#0c1428f5;box-shadow:0 8px 30px #0009;color:#ead7b0;pointer-events:auto}.ultimate-help-panel[hidden]{display:none}.ultimate-help-panel p{font:11px/1.45 Arial,sans-serif;margin:7px 0}.ultimate-help-panel strong{color:#ffe5a8}
.pickup-buffs{display:flex;justify-content:center;gap:7px;min-height:0;margin:0 0 4px}.pickup-buffs span{font:10px/1.2 monospace;color:#f5daa1;background:#0b1227d9;padding:2px 5px;border:1px solid #d2ad6940}.pickup-buffs span[hidden]{display:none}
@media(orientation:landscape) and (max-height:500px){.ultimate-hud{bottom:12px;width:298px}.ultimate-choices{gap:12px}.ultimate-choice{flex-basis:88px;width:88px;min-height:132px}.ultimate-portrait{height:94px}.ultimate-name{font-size:7px;height:32px;line-height:1.55}.ultimate-choice kbd{font-size:9px;width:19px;height:19px}.ultimate-charge{width:242px;height:18px;margin-bottom:7px}.ultimate-charge>span{font-size:6.5px;line-height:14px}.ultimate-help-panel{bottom:155px;max-height:calc(100vh - 175px)}}
html[data-mobile-game=touch] .ultimate-hud{bottom:max(9px,env(safe-area-inset-bottom));left:calc(50% - 30px);width:294px}html[data-mobile-game=touch] .ultimate-choices{gap:12px}html[data-mobile-game=touch] .ultimate-choice{flex-basis:88px;width:88px;min-height:132px}html[data-mobile-game=touch] .ultimate-portrait{height:94px}html[data-mobile-game=touch] .ultimate-name{font-size:7px;height:32px;line-height:1.55}html[data-mobile-game=touch] .ultimate-help{right:-4px;top:-6px;width:30px;height:30px}
@media(orientation:landscape) and (max-width:700px){html[data-mobile-game=touch] .ultimate-hud{width:264px;left:calc(50% - 30px)}.ultimate-choices,html[data-mobile-game=touch] .ultimate-choices{gap:10px}.ultimate-choice,html[data-mobile-game=touch] .ultimate-choice{flex-basis:78px;width:78px;min-height:118px}.ultimate-portrait,html[data-mobile-game=touch] .ultimate-portrait{height:83px}.ultimate-name,html[data-mobile-game=touch] .ultimate-name{font-size:6.2px;height:29px;line-height:1.5;letter-spacing:-.15px}.ultimate-charge{width:208px;margin-left:18px;margin-right:18px}.ultimate-help-panel{width:250px;bottom:142px;max-height:calc(100vh - 162px)}}
@media(orientation:landscape) and (max-width:620px){html[data-mobile-game=touch] .ultimate-hud{width:228px;left:calc(50% - 24px)}html[data-mobile-game=touch] .ultimate-choices{gap:8px}html[data-mobile-game=touch] .ultimate-choice{flex-basis:68px;width:68px;min-height:106px}html[data-mobile-game=touch] .ultimate-portrait{height:73px}html[data-mobile-game=touch] .ultimate-name{font-size:5.9px;letter-spacing:-.2px}.ultimate-charge{width:184px;margin-left:14px;margin-right:14px}}
@media(prefers-reduced-motion:reduce){.ultimate-portrait{animation:none!important}.ultimate-choice:not(:disabled):hover .ultimate-portrait,.ultimate-choice:not(:disabled):active .ultimate-portrait{transform:none}}
