@font-face{font-family:system;src:local('Avenir Next')}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#173e3c;color:#fff9e9;font-family:system,'Trebuchet MS',sans-serif;touch-action:none;user-select:none;-webkit-user-select:none}button{font:inherit;cursor:pointer;border:0;color:inherit;touch-action:none}button:focus-visible{outline:3px solid #ffd767;outline-offset:4px}button:active{transform:translateY(2px) scale(.98)}.hidden{display:none!important}#world{display:block;width:100%;height:100%;position:fixed;inset:0}#loading{position:fixed;inset:0;background:#123b3c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px;z-index:20;text-align:center}.brand-small,.eyebrow,.edition{font-size:10px;font-weight:800;letter-spacing:2px}#loading strong{font-size:30px;line-height:1.2}#loadText{font-size:13px;color:#b8d2cd}.loadline{height:3px;width:180px;background:linear-gradient(90deg,#ef6444,#f7d170,#ef6444);background-size:200%;animation:load 1s linear infinite}@keyframes load{to{background-position:200%}}#menu{position:fixed;inset:0}.menu-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(12,46,43,.96),rgba(12,46,43,.83) 36%,rgba(12,46,43,.1) 75%)}.menu-copy{position:absolute;left:max(6vw,env(safe-area-inset-left));top:14%;width:58%}.eyebrow{display:flex;align-items:center;gap:9px;color:#fae3a4;font-size:9px;letter-spacing:1.5px}.eyebrow i{width:6px;height:6px;border-radius:50%;background:#ffcf68}h1{font-weight:950;font-size:clamp(56px,8vw,112px);font-style:italic;letter-spacing:-5px;line-height:.92;margin:27px 0 21px;text-shadow:0 6px 0 #173b34}h1 span{display:block;font-style:normal;font-size:clamp(10px,1.4vw,19px);letter-spacing:5px;margin:19px 0;color:#ffc66a;text-shadow:none}#menu p{font-size:clamp(13px,1.3vw,18px);line-height:1.6;color:#d3e0d4;margin-bottom:25px}.menu-actions{display:flex;gap:10px;align-items:center}.primary{background:#ee6042;border:1px solid #ff9472;box-shadow:0 5px 0 #a6372a,0 8px 22px #0b252d44;border-radius:9px;padding:17px 23px;font-weight:900;font-size:13px;letter-spacing:.5px}.primary b{margin-left:20px}.secondary{background:#ffffff10;border:1px solid #ffffff30;border-radius:9px;padding:17px 16px;font-size:12px}.menu-bottom{display:flex;gap:20px;margin-top:35px;align-items:center}.menu-bottom button{background:none;color:#c6d6c6;font-size:10px;font-weight:800;letter-spacing:.7px;padding:4px 0}#bank{color:#ffce6b;margin-left:7px}.hero-badge{position:absolute;bottom:12%;right:9%;transform:rotate(-4deg);background:#fff5d9;color:#264a42;padding:13px 20px;box-shadow:4px 5px 0 #d65d3e;border-radius:4px}.hero-badge span{display:block;font-size:8px;letter-spacing:1.5px;margin-bottom:4px}.hero-badge strong{font-size:16px}.edition{position:absolute;bottom:18px;left:6vw;opacity:.55;font-size:8px}#hud{position:fixed;top:max(18px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;pointer-events:none;text-shadow:0 2px 4px #163431}.hud-left{display:flex;align-items:center;gap:10px;background:#173f39df;border:1px solid #ffffff29;border-radius:14px;padding:6px 15px 6px 6px;box-shadow:0 4px 12px #183f3f33}.avatar{width:44px;height:44px;border-radius:10px;overflow:hidden;background:#e6bd85}.avatar canvas{width:100%;height:100%}.hud-name{font-size:10px;font-weight:900;letter-spacing:1px;display:flex;gap:20px;align-items:center}#hearts{color:#ff8b72;font-size:17px;letter-spacing:2px}.hud-stats{font-size:10px;display:flex;gap:7px;align-items:center;margin-top:5px;color:#dddcc5}.nut{color:#ffd267;font-size:18px;line-height:10px}.divider{width:1px;height:10px;background:#ffffff33;margin:0 4px}.hud-center{text-align:center;font-size:9px;font-weight:900;letter-spacing:1px;width:200px}.progress{height:3px;background:#23463e55;margin-top:8px;border-radius:3px}.progress i{display:block;background:#fff4c5;height:100%;border-radius:3px;width:0}.icon-button{pointer-events:auto;background:#173f39df;border:1px solid #ffffff40;border-radius:12px;width:44px;height:44px;font-size:21px}#toast{position:fixed;left:50%;top:100px;transform:translateX(-50%) translateY(-10px);background:#123f39ed;border:1px solid #e8d09166;padding:12px 22px;border-radius:8px;text-align:center;font-size:13px;box-shadow:0 5px 20px #19382a33;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;max-width:80%;width:max-content;z-index:5}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}#controls{position:fixed;inset:0;pointer-events:none}#controls button{pointer-events:auto;border:1px solid #fff6d86b;box-shadow:0 4px 0 #0d292967,inset 0 2px 0 #ffffff24;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.move-pad{position:absolute;bottom:max(23px,env(safe-area-inset-bottom));left:max(25px,env(safe-area-inset-left));display:flex;gap:12px}.move-pad button{height:68px;width:72px;background:#153f3b9e;border-radius:18px;font-size:47px;line-height:45px}.action-pad{position:absolute;right:max(25px,env(safe-area-inset-right));bottom:max(23px,env(safe-area-inset-bottom));width:255px;height:115px}.action-pad button{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center}.action-pad small{font-size:8px;font-weight:900;letter-spacing:.7px}#attack{bottom:0;right:87px;width:72px;height:72px;background:#164e47db;border-radius:50%}#attack svg{width:32px;height:32px;fill:#ffdd8a;stroke:#fff4cc;stroke-width:1;margin-bottom:4px}#jump{bottom:8px;right:0;width:79px;height:79px;border-radius:50%;background:#e96744ed}#jump span{font-size:33px;line-height:39px}#turbo{bottom:0;left:0;background:#253f3cbd;border-radius:50%;width:55px;height:55px}#turbo span{font-size:25px;color:#ffdb7a}#turbo.ready{background:#d7a134;box-shadow:0 0 20px #ffc660!important}#swap{top:0;right:95px;background:#173f3bc4;border-radius:20px;padding:7px 12px;flex-direction:row;gap:7px;font-size:15px}#swap span{font-size:8px}#controls button.pressed{background:#f2b45b!important;transform:scale(.94)}#bossHud{position:fixed;top:85px;left:50%;transform:translateX(-50%);width:270px;text-align:center;font-size:9px;font-weight:900;letter-spacing:2px;text-shadow:0 2px 3px #000}#bossHud>div{height:8px;background:#203f3e;border:1px solid #fff3bb88;border-radius:5px;margin-top:6px;overflow:hidden}#bossBar{height:100%;width:100%;background:#ef6548;display:block}#modal{position:fixed;inset:0;display:grid;place-items:center;background:#0d2d28a6;backdrop-filter:blur(9px);z-index:10}.panel{position:relative;width:min(620px,88vw);max-height:90vh;overflow:auto;touch-action:pan-y;border:1px solid #cbd8b946;border-radius:20px;padding:25px 30px;background:linear-gradient(150deg,#244e46,#153b36);box-shadow:0 20px 100px #05211a88}.panel h2{font-size:29px;margin:8px 0 10px;letter-spacing:-.7px}.panel p{color:#d4decb;font-size:13px;line-height:1.6;margin:10px 0 18px}.panel .kicker{font-size:9px;color:#ffc876;letter-spacing:2px;font-weight:900}.panel footer{display:flex;gap:12px;margin-top:22px;justify-content:flex-end}.level-grid{display:flex;gap:10px;margin-top:20px}.level-card{flex:1;background:#ffffff0b;text-align:left;border:1px solid #ffffff30;border-radius:10px;padding:17px 14px;min-height:100px}.level-card span{color:#f9c976;font-size:11px;display:block;margin-bottom:12px}.level-card b{font-size:13px;display:block}.level-card:disabled{opacity:.4;cursor:default}.result-stats{display:flex;gap:10px;margin:20px 0}.result-stats div{flex:1;border-radius:10px;background:#ffffff0b;padding:13px}.result-stats b{font-size:24px;display:block;color:#ffda87}.result-stats small{font-size:9px;letter-spacing:1px}.stars{font-size:35px;color:#ffce6a;letter-spacing:10px}.upgrade{display:flex;align-items:center;justify-content:space-between;margin:13px 0;padding:15px;background:#ffffff0a;border-radius:9px;gap:12px}.upgrade b{font-size:13px}.upgrade small{display:block;color:#bbd0bf;font-size:11px;margin-top:4px}.upgrade button{background:#eb6849;border-radius:6px;padding:10px;font-weight:900;font-size:11px;min-width:95px}.upgrade button:disabled{background:#ffffff16;color:#9cae9d}#rotate{display:none;position:fixed;inset:0;background:#163e38;z-index:30;flex-direction:column;align-items:center;justify-content:center;text-align:center}#rotate>span{font-size:80px;color:#ffce72}#rotate h2{font-size:28px;margin:15px}#rotate p{line-height:1.7;color:#c2d5c9}@media(orientation:portrait) and (max-width:900px){#rotate{display:flex}}@media(max-height:500px){.menu-copy{top:10%}h1{font-size:64px;margin:20px 0 14px}h1 span{font-size:11px;letter-spacing:4px;margin-top:13px}#menu p{font-size:12px;margin:10px 0 19px}.primary,.secondary{padding:12px 17px;font-size:10px}.menu-bottom{margin-top:25px;gap:17px}.menu-bottom button{font-size:8px}.hero-badge{bottom:14%;right:8%;padding:10px 14px}.hero-badge strong{font-size:13px}.hero-badge span{font-size:7px}.edition{font-size:7px;bottom:10px}#hud{top:10px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}.hud-left{padding:5px 10px 5px 5px;gap:7px}.avatar{width:32px;height:32px}.hud-name{font-size:8px;gap:13px}#hearts{font-size:14px}.hud-stats{font-size:8px;margin-top:3px}.hud-center{font-size:8px;width:165px}.icon-button{width:36px;height:36px;font-size:18px}#toast{top:65px;font-size:11px;padding:9px 16px}.move-pad{bottom:15px;left:max(20px,env(safe-area-inset-left));gap:9px}.move-pad button{height:58px;width:62px;border-radius:15px}.action-pad{bottom:15px;right:max(20px,env(safe-area-inset-right));transform:scale(.88);transform-origin:bottom right}.panel{padding:19px 25px}.panel h2{font-size:25px}.panel p{font-size:12px;margin:9px 0 12px}.panel footer{margin-top:16px}#bossHud{top:60px;width:220px}.result-stats{margin:12px 0}.result-stats div{padding:9px}.level-card{padding:12px}.upgrade{padding:10px;margin:9px 0}}
/* Expansion: direct tool/power selection and independent audio settings. */
#powerSelect{top:0;left:0;background:#173f3bdf;border-radius:12px;padding:6px 8px;width:62px;height:39px;font-size:8px;gap:3px;font-weight:900;color:#ffdc8e}#powerSelect span{font-size:7px;letter-spacing:.3px}#swap{min-height:35px}#buffs{position:fixed;top:85px;left:22px;font-size:10px;font-weight:900;letter-spacing:1px;color:#d7ffef;text-shadow:0 2px 4px #0a332a;pointer-events:none}.loadout-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:14px}.loadout-card{padding:12px;text-align:left;background:#ffffff0b;border:1px solid #ffffff25;border-radius:10px;min-height:112px}.loadout-card.selected{border-color:#ffd485;background:#ffd47919}.loadout-card:disabled{opacity:.35}.loadout-card>span{display:block;font-size:9px;color:#ffd485;letter-spacing:.7px}.loadout-card>b{display:block;font-size:13px;margin:8px 0 6px}.loadout-card small{display:block;font-size:10px;line-height:1.45;color:#ccdfd3}.loadout-card em{display:block;font-style:normal;font-size:8px;font-weight:900;letter-spacing:.5px;margin-top:8px;color:#ffd485}.level-card{background-size:cover;background-position:center;border-color:#fce4b977;position:relative;overflow:hidden}.level-card span,.level-card b,.level-card small{position:relative;text-shadow:0 2px 5px #082c2c}.level-card small{display:block;font-size:9px;line-height:1.4;margin-top:8px;color:#efe3bc}.map-0{background-image:linear-gradient(#0d393a88,#0d393aee),url('assets/city.png')}.map-1{background-image:linear-gradient(#0d393a77,#0d393aee),url('assets/factory.png')}.map-2{background-image:linear-gradient(#0d393a66,#0d393aee),url('assets/construction.png')}.volume-row{display:block;margin:22px 0;font-size:11px;font-weight:900;letter-spacing:1px}.volume-row output{float:right;color:#ffd178}.volume-row input{display:block;width:100%;margin:15px 0;accent-color:#ee7851;touch-action:pan-x;height:24px}.panel:has(.loadout-grid){width:min(740px,93vw)}
@media(max-height:500px){#buffs{top:65px;left:15px;font-size:8px}.loadout-card{padding:8px;min-height:100px}.loadout-card>b{font-size:11px;margin:6px 0}.loadout-card small{font-size:9px}.loadout-card em{font-size:7px;margin-top:5px}.panel:has(.loadout-grid){padding:15px 20px}.panel:has(.loadout-grid) h2{font-size:20px;margin-bottom:5px}.loadout-grid{gap:7px;margin-top:10px}.volume-row{margin:17px 0}.level-card small{font-size:8px}}
.loadout-grid.powers{grid-template-columns:repeat(2,1fr)}
@media(max-height:360px){.panel:has(.loadout-grid){padding:12px 16px}.panel:has(.loadout-grid) h2{font-size:18px;margin:5px 0}.panel:has(.loadout-grid) .kicker{font-size:7px}.panel:has(.loadout-grid) footer{margin-top:9px}.loadout-grid{gap:6px;margin-top:8px}.loadout-card{padding:7px;min-height:82px}.loadout-card>b{font-size:10px;margin:4px 0}.loadout-card small{font-size:8.5px;line-height:1.3}.loadout-card>span{font-size:7px}.loadout-card em{margin-top:4px;font-size:6.5px}}
@media(max-height:360px){.panel:has(.volume-row){padding-block:16px}.panel:has(.volume-row) .volume-row{margin:12px 0}.panel:has(.volume-row) input{margin:10px 0;height:20px}.panel:has(.volume-row) footer{margin-top:10px}}

/* Run & gun: one eight-way thumb stick and independently held fire/jump/bomb. */
.move-pad{display:block;bottom:max(18px,env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left));text-align:center}
#stick{position:relative;width:138px;height:138px;border-radius:50%;border:2px solid #f5d79555;background:radial-gradient(circle,#1a514bc4 0 35%,#113e35a6 36% 70%,#89b2a333 71%);pointer-events:auto;touch-action:none;box-shadow:inset 0 0 24px #091e2855}
#stick span{position:absolute;color:#ffe8ae;pointer-events:none;font-size:25px;font-weight:900}.stick-up{top:4px;left:calc(50% - 9px)}.stick-down{bottom:3px;left:calc(50% - 9px)}.stick-left{left:8px;top:calc(50% - 16px)}.stick-right{right:8px;top:calc(50% - 16px)}
#stickThumb{position:absolute;left:calc(50% - 23px);top:calc(50% - 23px);width:46px;height:46px;border:2px solid #ffe2a7;border-radius:50%;background:radial-gradient(circle at 35% 30%,#f7cb81,#bc7a45);box-shadow:0 4px 12px #092c2b88;pointer-events:none}.move-pad>small{display:block;font-size:7px;letter-spacing:1px;margin-top:6px;color:#ffedc8;text-shadow:0 1px 3px #102d29}
.action-pad{width:322px;height:125px}#turbo{left:0;bottom:0}#powerSelect{left:0;top:0}#grenade{left:69px;bottom:0;width:64px;height:64px;border-radius:50%;background:#895339dc}#grenade>span{font-size:28px;color:#ffd580}#grenade.empty{opacity:.45}#attack{right:85px;width:80px;height:80px;background:#ab5336e8}#jump{width:72px;height:72px;background:#20574edc;bottom:2px}#swap{right:79px;top:0;min-width:92px}#attack small{font-size:9px}#combatBanner{position:fixed;top:92px;left:50%;transform:translateX(-50%);font-size:12px;letter-spacing:2px;font-weight:900;color:#ffdd92;text-shadow:0 2px 6px #14342b;pointer-events:none}#toast{top:125px}
@media(max-height:500px){#stick{width:116px;height:116px}.move-pad{left:max(16px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom))}.action-pad{transform:scale(.88);right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom))}#combatBanner{top:64px;font-size:10px}#toast{top:91px;font-size:10px;max-width:72%}}
@media(max-height:360px){#stick{width:104px;height:104px}.action-pad{transform:scale(.78)}.hud-center{width:145px;font-size:7px}.hud-name{gap:6px}.hud-stats{font-size:7px}.avatar{width:27px;height:27px}#combatBanner{font-size:8px}#toast{top:86px;padding:6px 12px;font-size:9px}}

.loadout-strip{position:absolute;top:max(82px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));display:flex;gap:8px;pointer-events:none}
.loadout-strip #swap,.loadout-strip #powerSelect{position:static;display:flex;align-items:center;justify-content:center;width:96px;height:38px;min-height:38px;padding:5px 10px;gap:6px;border-radius:11px;background:#173f3bc4;font-size:10px}
.loadout-strip #powerSelect{flex-direction:column;gap:2px;width:75px}.loadout-strip #swap span{font-size:9px}.loadout-strip #powerSelect span{font-size:8px}
@media(max-height:500px){.loadout-strip{top:63px;right:max(16px,env(safe-area-inset-right));gap:6px}.loadout-strip #swap,.loadout-strip #powerSelect{height:32px;min-height:32px;width:88px}.loadout-strip #powerSelect{width:64px}#toast{top:105px}}
@media(max-height:360px){.loadout-strip{top:54px}.loadout-strip #swap,.loadout-strip #powerSelect{height:29px;min-height:29px;font-size:9px}.loadout-strip #swap span{font-size:8px}#toast{top:91px}}

#update{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:50;padding:10px 15px;background:#ffd27a;color:#173f39;border-radius:9px;font-size:11px;max-width:90vw} .menu-bottom{flex-wrap:wrap} .panel{max-height:88dvh;overflow-y:auto;touch-action:pan-y}
