*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#101617;color:#f4f6ed;font-family:Arial,'Noto Sans KR',sans-serif;touch-action:none}button{font:inherit;cursor:pointer;color:inherit}#game{display:block;width:100%;height:100%}header{position:fixed;top:max(22px,env(safe-area-inset-top));left:28px;right:28px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.brand{font-weight:900;letter-spacing:3px;font-size:24px}.brand span{font-size:12px;letter-spacing:2px;color:#c3cbbf}header button{pointer-events:auto;border:1px solid #ffffff40;background:#10161790;border-radius:6px;width:42px;height:42px}#topstats{position:fixed;top:88px;left:28px;display:flex;gap:18px;font-size:14px;color:#cbd4d0}#remaining{color:#d9ff64}footer{position:fixed;bottom:28px;left:28px;right:28px;display:flex;justify-content:space-between;pointer-events:none}small{display:block;letter-spacing:2px;font-size:12px;color:#c1cbbd}strong{font-size:44px;font-weight:900}.health{width:200px}.track{height:5px;background:#ffffff25}.track div{height:100%;background:#d9ff64;width:100%}.weapon{width:175px;text-align:right}.weapon span{font-size:13px;color:#b3c0b3}#coolbar{height:3px;background:#d9ff64;transform-origin:right}#crosshair{position:fixed;top:50%;left:50%;width:30px;height:30px;transform:translate(-50%,-50%);pointer-events:none}#crosshair i{position:absolute;background:#effbdc;box-shadow:0 0 3px #000;width:2px;height:6px}#crosshair i:nth-child(1){top:0;left:14px}#crosshair i:nth-child(2){bottom:0;left:14px}#crosshair i:nth-child(3){left:0;top:14px;width:6px;height:2px}#crosshair i:nth-child(4){right:0;top:14px;width:6px;height:2px}#hit{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font-size:40px;color:#d9ff64;opacity:0;pointer-events:none}#hurt{position:fixed;inset:0;box-shadow:inset 0 0 100px #e73825;opacity:0;pointer-events:none}#notice{position:fixed;top:25%;width:100%;text-align:center;font-weight:bold;color:#d9ff64;pointer-events:none}#overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(90deg,#0b1415ed,#0b141590);backdrop-filter:blur(4px);padding:24px}#overlay section{max-width:650px;width:100%}.eyebrow{font-size:12px;letter-spacing:3px;color:#d9ff64}h1{font-size:clamp(48px,9vw,92px);margin:16px 0;letter-spacing:-4px;line-height:.95;font-weight:950}h1 span{display:block;font-size:.36em;letter-spacing:6px;line-height:1.8;color:#d9ff64}p{font-size:16px;line-height:1.6;color:#c5cec9}#start{background:#d9ff64;border:0;color:#182018;padding:17px 30px;border-radius:3px;font-size:18px;font-weight:800;margin:14px 0 24px;min-width:220px}#start:disabled{opacity:.5}.instructions{display:flex;gap:30px;font-size:14px;line-height:1.9;color:#bcc9c0}.instructions b{display:block;color:#f4f6ed;letter-spacing:2px}.sub{font-size:12px;color:#82958a}#touch{display:none}body.playing #overlay{display:none}body:not(.playing) #touch{visibility:hidden}@media(pointer:coarse){#touch{display:block}#stick{position:fixed;left:28px;bottom:100px;width:120px;height:120px;border-radius:50%;border:1px solid #ffffff45;background:#ffffff0b}#knob{position:absolute;left:37px;top:37px;width:44px;height:44px;border-radius:50%;background:#d9ff6470;border:1px solid #d9ff64}.actions{position:fixed;right:24px;bottom:112px;display:flex;align-items:end;gap:12px}.actions button{width:60px;height:60px;border-radius:50%;background:#16211acc;border:1px solid #c7d7bc66;font-size:14px}.actions #fire{width:82px;height:82px;border:2px solid #d9ff64;color:#d9ff64;font-weight:bold}.lookhint{position:fixed;right:25px;bottom:210px;font-size:12px;opacity:.65;pointer-events:none}header{left:18px;right:18px}.brand{font-size:20px}.brand span{font-size:10px;letter-spacing:1px}footer{bottom:18px;left:20px;right:20px}.health{width:135px}strong{font-size:32px}#topstats{left:20px;top:72px}.instructions{gap:12px;font-size:12px}#overlay section{max-width:550px}}@media(max-height:500px){#overlay{padding:18px}h1{font-size:46px;margin:10px 0}.eyebrow{font-size:10px}#message{margin:5px 0}#start{margin:5px 0 12px;padding:12px 26px}.sub{display:none}.instructions{font-size:12px}#stick{bottom:80px;width:100px;height:100px}#knob{left:27px;top:27px}.actions{bottom:75px}.lookhint{bottom:169px}}

[hidden]{display:none!important}#maxhp,#maxammo{font-size:16px;color:#bac9b7}#boss{position:fixed;top:85px;left:50%;transform:translateX(-50%);width:min(380px,45vw);font-size:14px;color:#ffd1a1;pointer-events:none}#bossvalue{float:right;font-size:12px}.boss-track{height:7px;background:#281e1ecc;margin-top:8px}#bosshp{height:100%;background:#ff795a;transition:width .12s}#upgrade{position:fixed;inset:0;z-index:100;background:#071110ed;display:flex;align-items:center;justify-content:center;padding:24px;overflow:auto;touch-action:pan-y}#upgrade section{max-width:800px;width:100%}#upgrade h2{font-size:32px;margin:12px 0}#upgrade p{font-size:15px}.upgrade-options{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:24px}.upgrade-options button{text-align:left;padding:25px 20px;min-height:170px;border:1px solid #849a7655;background:#18241e;border-radius:6px}.upgrade-options button:hover,.upgrade-options button:focus-visible{border-color:#d9ff64;background:#243622;outline:2px solid #d9ff64}.upgrade-options b{display:block;font-size:24px;color:#d9ff64;margin-bottom:18px}.upgrade-options span{display:block;font-size:14px;line-height:1.7}.upgrade-options small{font-size:12px;letter-spacing:0;margin-top:12px;color:#a6b49e}@media(max-width:600px){#boss{top:108px;width:70vw}.upgrade-options{grid-template-columns:1fr;gap:10px;margin-top:16px}.upgrade-options button{min-height:0;padding:15px}.upgrade-options b{font-size:20px;margin-bottom:6px}.upgrade-options small{margin-top:4px}#upgrade h2{font-size:26px}#upgrade p{font-size:14px}}@media(max-height:500px){#boss{top:65px;width:35vw}#upgrade{padding:15px}.upgrade-options{grid-template-columns:repeat(3,1fr);margin-top:12px}.upgrade-options button{padding:15px;min-height:130px}#upgrade h2{font-size:24px;margin:6px 0}.upgrade-options b{font-size:20px;margin-bottom:10px}#upgrade p{margin:6px 0}}

#minimap{position:fixed;right:24px;top:118px;width:180px;height:180px;border:1px solid #d9ff6480;background:#0c1715c9;border-radius:4px;image-rendering:auto;pointer-events:none}#dashhud{position:fixed;right:28px;bottom:38px;font-size:12px;letter-spacing:2px;color:#dce8d6}#dashcharges{color:#d9ff64;letter-spacing:5px;font-size:14px}#gloryhint{position:fixed;top:34%;left:50%;transform:translateX(-50%);font-weight:900;font-size:18px;letter-spacing:4px;color:#ff9b45;text-shadow:0 0 12px #ff3d20;pointer-events:none;animation:glow .5s infinite alternate}@keyframes glow{to{transform:translateX(-50%) scale(1.08);opacity:.7}}#touch #dash{display:none}@media(pointer:coarse){#minimap{width:140px;height:140px;top:100px;right:15px}#dashhud{right:18px;bottom:22px}.actions{flex-wrap:wrap;width:210px;justify-content:end}.actions #dash{display:block}.actions #fire{order:3}}@media(max-height:500px){#minimap{width:110px;height:110px;top:58px}.actions{width:180px}.actions button{width:48px;height:48px}.actions #fire{width:64px;height:64px}}

#overlay section{display:contents}#overlay #start{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0}#overlay #message{display:none}

#charge-ui{position:fixed;left:50%;top:50%;width:64px;height:64px;transform:translate(-50%,-50%);pointer-events:none}#charge-ui svg{width:64px;height:64px;transform:rotate(-90deg)}#charge-ring{fill:none;stroke:#70ff67;stroke-width:1.8;stroke-dasharray:126;stroke-dashoffset:0}#charge-ui b{position:absolute;width:5px;height:14px;background:#70ff67;border-radius:3px;box-shadow:0 0 7px #70ff67;opacity:.16}#charge-1{left:-14px;top:25px}#charge-2{right:-14px;top:25px}#charge-3{left:29px;top:-14px}#settings{display:flex;flex-direction:column;gap:18px;margin-bottom:24px}#settings[hidden],#charge-ui[hidden]{display:none}#settings label{display:flex;gap:20px;justify-content:space-between;align-items:center;color:#eaffeb}#settings input{accent-color:#99f469;width:180px}#quit{background:#343d36!important;color:#fff!important;padding:12px!important;font-size:16px!important}footer{justify-content:flex-start;gap:28px}.weapon{min-width:160px}#other-ammo{display:block;margin-top:9px;color:#bcd5b9;font-size:12px}.actions{flex-wrap:wrap;max-width:240px}#weapon1,#weapon2,#alt{font-size:12px}#weapon1,#weapon2{height:38px} @media(max-width:600px){footer{gap:16px}.weapon{min-width:130px}#other-ammo{font-size:10px}#charge-ui{width:48px;height:48px}#charge-ui svg{width:48px;height:48px}#charge-1,#charge-2{top:18px}#charge-3{left:21px}.actions{max-width:195px}}

#overlay section{display:block;max-width:360px;text-align:center}#overlay #start{position:static;transform:none;margin:12px 0}#settings{padding:24px;background:#14231e;border:1px solid #6a806c;border-radius:8px}.weapon{text-align:left}#coolbar{transform-origin:left}#other-ammo{letter-spacing:0}.lookhint{display:none}

#dashtrack{height:4px;margin-top:7px;background:#ffffff25;border-radius:3px;overflow:hidden}#dashfill{display:block;width:100%;height:100%;background:#70ff67;transform-origin:left} 
@media(pointer:coarse){
#touch #dash{display:block!important}#touch .actions{position:static;display:contents}#touch .actions button{position:fixed;touch-action:none;user-select:none;-webkit-user-select:none;margin:0;width:52px;height:52px;font-size:12px}
#touch #fire{right:max(22px,env(safe-area-inset-right));bottom:max(90px,calc(env(safe-area-inset-bottom) + 80px));width:90px;height:90px;border:2px solid #d9ff64;background-color:#18271dd9}
#touch #dash{right:124px;bottom:105px;width:62px;height:62px;border:2px solid #70ff67}
#touch #jump{right:26px;bottom:195px}#touch #melee{right:92px;bottom:195px}#touch #alt{right:158px;bottom:195px}
#touch #weapon1{right:100px;bottom:30px;width:72px;height:38px;border-radius:8px}#touch #weapon2{right:20px;bottom:30px;width:72px;height:38px;border-radius:8px}
#stick{left:max(24px,env(safe-area-inset-left));bottom:95px;width:116px;height:116px}#knob{left:35px;top:35px}#dashhud{right:24px;bottom:255px}footer{right:auto;gap:12px;bottom:12px;left:16px}.health{width:90px}.weapon{width:118px;min-width:118px}footer strong{font-size:26px}footer small{font-size:9px;letter-spacing:.5px}#maxhp,#maxammo{font-size:11px}#other-ammo{font-size:9px}
}
@media(pointer:coarse) and (max-width:500px){footer{bottom:8px;gap:10px}.health{width:70px}.weapon{width:108px;min-width:108px}#touch #weapon1{bottom:56px}#touch #weapon2{bottom:56px}#touch #fire{bottom:112px}#touch #dash{bottom:126px}#touch #jump,#touch #melee,#touch #alt{bottom:214px}#dashhud{bottom:277px}#stick{bottom:120px}}
@media(pointer:coarse) and (max-height:420px){#touch #fire{bottom:60px;width:78px;height:78px}#touch #dash{bottom:73px;right:112px;width:58px;height:58px}#touch #jump,#touch #melee,#touch #alt{bottom:150px;height:46px;width:46px}#touch #weapon1,#touch #weapon2{bottom:10px}#dashhud{bottom:210px}#stick{bottom:72px}#minimap{width:86px;height:86px} }
#damage-direction{position:fixed;inset:-22%;z-index:3;pointer-events:none;opacity:0;background:linear-gradient(90deg,rgba(255,24,24,.88),rgba(255,32,32,.34) 24%,transparent 57%);filter:blur(7px);transform-origin:50% 50%;mix-blend-mode:screen}#hurt{z-index:2;background:radial-gradient(ellipse at center,transparent 37%,rgba(210,0,0,.22) 73%,rgba(150,0,0,.8) 100%);box-shadow:none;transition:opacity .08s linear}
#grenadehud{position:fixed;left:28px;bottom:118px;width:200px;color:#ffcb66;font-size:12px;letter-spacing:1px;pointer-events:none}#grenadetrack{height:5px;margin-top:7px;background:#ffffff25;border-radius:3px;overflow:hidden}#grenadefill{display:block;width:100%;height:100%;background:linear-gradient(90deg,#ff8b32,#ffd26a);transform-origin:left;transform:scaleX(1);transition:transform .08s linear}@media(pointer:coarse){#grenadehud{left:20px;bottom:142px;width:130px;font-size:10px}#touch #grenade{right:224px;bottom:195px;width:56px;height:56px;border:2px solid #ffad4d;color:#ffd184} }@media(max-width:500px) and (pointer:coarse){#grenadehud{left:16px;bottom:174px}#touch #grenade{right:158px;bottom:214px;width:48px;height:48px}}

header{justify-content:flex-end}#minimap{width:110px!important;height:110px!important;top:78px;right:18px}#boss{transform:translateX(-50%);pointer-events:none}#dashhud{width:64px;height:80px;font-size:10px;text-align:center}#dashhud svg{width:48px;height:48px;transform:rotate(-90deg)}#dashring{fill:none;stroke:#70ff67;stroke-width:2;stroke-dasharray:126;stroke-dashoffset:0}#dashcharges{display:block;font-size:12px}#grenadehud{width:90px;height:80px}#grenadehud b{font-size:11px}.grenade-icon{position:relative;width:48px;height:48px;font-size:36px}.grenade-icon span{filter:grayscale(1);opacity:.25}.grenade-icon i{position:absolute;inset:0;font-style:normal;clip-path:inset(0);filter:drop-shadow(0 0 4px #ffbd55)}#grenadefill{width:48px;height:48px;background:none;transform:none;transition:none}#topstats{background:#101617cc;padding:10px;z-index:5}

#dashhud{position:fixed;width:64px;height:64px;font-size:0}#dashhud svg{position:absolute;inset:0;width:64px;height:64px}#dashcharges{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:14px;letter-spacing:1px}#grenadehud{width:88px;height:68px}#grenadehud b{display:block;font-size:10px;margin-bottom:5px}.grenade-icon{width:62px;height:42px;transform:skewX(-18deg);border:2px solid #a2e65c;background:#17251dcc;box-shadow:0 0 8px #84df4933;text-align:center;font-size:28px}.grenade-icon span,#grenadefill{display:block;width:100%;height:100%;font-size:28px;line-height:36px}#grenadefill{color:#bdff62;background:#70bc3b44;filter:none}body:not(.playing) #dashhud,body:not(.playing) #grenadehud{visibility:hidden}

.grenade-icon svg{width:30px;height:36px;transform:skewX(18deg);vertical-align:middle}.grenade-icon span{color:#91a58b;filter:none;opacity:.35}#grenadefill{background:transparent;color:#bdff62}#grenadehud{height:48px}
/* Title, room browser and shared lobby. */
.menu-active #game{filter:blur(5px) brightness(.48);transform:scale(1.025)}.menu-active header,.menu-active footer,.menu-active #overlay,.menu-active #minimap,.menu-active #crosshair,.menu-active #charge-ui,.menu-active #touch,.menu-active #dashhud,.menu-active #grenadehud{display:none!important}
#front-end{position:fixed;inset:0;z-index:40;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:auto;padding:20px;background:linear-gradient(0deg,#080b0ddd,transparent 65%);color:#f2f2e9}#front-end[hidden]{display:none}.title-art{width:min(620px,90vw);height:300px;flex-shrink:0;transition:height .5s,opacity .5s}.butter-seal{position:relative;height:100%;display:grid;place-items:center}.butter-seal h1{font:1000 clamp(64px,13vw,128px)/1 Impact,'Arial Black',sans-serif;letter-spacing:-.055em;color:#e62b24;text-shadow:0 5px 0 #591311,0 0 35px #df26182e;transform:scaleY(1.2);margin:0;z-index:1}.title-butter{position:absolute;left:calc(50% + cos(var(--i)*60deg)*220px);top:calc(50% + sin(var(--i)*60deg)*100px);width:82px;height:82px;transform:translate(-50%,-50%);background:url('./assets/happy-strip.png') 0 0/100% 1500%;filter:grayscale(1) sepia(1) saturate(9) hue-rotate(318deg);opacity:.8}
#front-end:not([data-page=home]) .title-art{height:110px}#front-end:not([data-page=home]) .title-butter{display:none}#front-end:not([data-page=home]) h1{font-size:64px}.menu-panel{width:min(440px,94vw);animation:menu-enter .35s ease both}.menu-panel[hidden]{display:none}.menu-panel.wide{width:min(620px,94vw)}.menu-panel h2{font-size:23px;margin:0 0 18px}.menu-panel button{display:block;width:100%;margin:8px 0;padding:13px 16px;font:700 17px inherit;border:1px solid #dfaa6377;background:#161c21e8;color:#f6e8cc;border-radius:3px;cursor:pointer;min-height:46px}.menu-panel button:hover:not(:disabled){background:#763223;border-color:#ffba7c}.menu-panel button:disabled{opacity:.38;cursor:not-allowed}.menu-panel .subtle{background:#141a1da6;color:#b6c1bf;font-size:14px}.menu-panel label{display:block;font-size:15px;margin:12px 0}.menu-panel input{display:block;width:100%;margin:7px 0;padding:12px;border:1px solid #6d776e;background:#10161be8;color:white;font:16px inherit;border-radius:3px;box-sizing:border-box}.menu-panel .check{display:flex;align-items:center;gap:10px}.check input{width:auto}.menu-panel [hidden]{display:none!important}.panel-heading,.member-row,.lobby-actions{display:flex;align-items:center;gap:12px;justify-content:space-between}.panel-heading button,.member-row button{width:auto}.member-row{padding:10px 12px;border-bottom:1px solid #ffffff20;background:#10161bdd}.member-row span{margin-left:auto;color:#c3d991;font-size:14px}#chat-log{height:130px;overflow:auto;background:#0a1016cc;padding:10px;margin-top:15px;font-size:14px}#chat-log p{margin:4px 0;overflow-wrap:anywhere}#chat-form{display:flex;gap:8px}#chat-form button{width:75px}#ready-hint{font-size:14px;color:#b2bbb9}.controls{display:grid;grid-template-columns:1fr 1.5fr;font-size:14px;gap:10px}.controls dt{color:#f2bc7b}.controls dd{margin:0}.menu-panel p{font-size:14px;line-height:1.6}#room-list{max-height:250px;overflow:auto}#room-list [aria-selected=true]{border-color:#a9f367;background:#344a2c}#menu-error{color:#ffc298;text-align:center;max-width:550px;font-size:14px;min-height:20px}#team-message{position:fixed;top:22%;left:50%;transform:translateX(-50%);z-index:8;text-align:center;font-size:24px;color:#ffd691;pointer-events:none;text-shadow:0 2px 6px black;white-space:pre-line}#revive-ui{position:fixed;bottom:25%;left:50%;transform:translateX(-50%);z-index:8;background:#10191ddd;padding:12px 20px;color:#d8ffb7;text-align:center}#revive-ui progress{display:block;width:220px;margin-top:8px;accent-color:#a8ec68}#revive-touch{position:fixed;right:24px;bottom:310px;z-index:15;padding:16px;color:#dfffbc;background:#274b30;border:1px solid #adea73}#team-list{position:fixed;left:20px;top:75px;color:#dbefd2;font-size:14px;z-index:5;text-shadow:0 2px 3px black}#team-list p{margin:7px 0}@keyframes menu-enter{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}@media(max-width:600px){.title-art{height:220px}.title-butter{left:calc(50% + cos(var(--i)*60deg)*145px);top:calc(50% + sin(var(--i)*60deg)*70px);width:60px;height:60px}#front-end{justify-content:flex-start;padding-top:25px}#chat-log{height:95px}.controls{font-size:13px;gap:7px}}
.peer-label{position:fixed;z-index:6;transform:translate(-50%,-100%);color:#d5ffb5;background:#102019bb;border-radius:3px;padding:3px 7px;font-size:13px;pointer-events:none}.peer-label[hidden]{display:none}
#front-end,#room-list,#chat-log{touch-action:pan-y}#front-end input{touch-action:auto}.menu-active #team-list,.menu-active #team-message{display:none}#revive-ui[hidden],#revive-touch[hidden]{display:none!important}
#edit-touch{padding:12px;background:#273d2c;border:1px solid #98c479;border-radius:4px;width:100%;font-size:16px}#settings{max-height:80dvh;overflow-y:auto;touch-action:pan-y}#settings input[type=range]{touch-action:auto;max-width:48vw}#layout-tools{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:250;display:flex;align-items:center;gap:10px;padding:10px;background:#102019ee;border:1px solid #a7d286;border-radius:6px;font-size:14px;max-width:94vw}#layout-tools span{min-width:100px}#layout-tools button{padding:10px;border:1px solid #a7d286;background:#2a442d;white-space:nowrap;min-height:44px}.layout-editing #overlay{display:none!important}.layout-editing #touch{display:block!important;visibility:visible!important}.layout-editing #touch button,.layout-editing #revive-touch,.layout-editing #pause{display:block!important;visibility:visible!important;z-index:200;outline:2px dashed #d9ff64;opacity:.9;touch-action:none}.layout-editing #revive-touch[hidden]{display:block!important}.layout-editing #stick{pointer-events:none}.layout-editing header{z-index:200}
/* Rescue HUD: readable while aiming, with the same progress on the touch target. */
#revive-ui{--rescue:0;display:flex;align-items:center;gap:14px;bottom:24%;padding:16px 18px;width:min(390px,88vw);border:1px solid #b5ed7c70;border-left:3px solid #c8ff8d;border-radius:12px;background:linear-gradient(130deg,#192a25f5,#0c1818ee);box-shadow:0 12px 35px #0008;text-align:left;pointer-events:none;color:#eeffe4}
.revive-emblem{flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:radial-gradient(circle,#14271f 61%,transparent 64%),conic-gradient(#c8ff8d calc(var(--rescue)*1turn),#ffffff18 0);color:#c8ff8d;font-size:32px;font-weight:400}.revive-copy{min-width:0;flex:1}#revive-text{display:block;font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#revive-detail{font-size:12px;letter-spacing:0;color:#b6cbbd;margin:5px 0 9px}#revive-seconds{font-size:20px;font-variant-numeric:tabular-nums;font-weight:600;color:#ceffa3}#revive-ui progress{width:100%;height:4px;border:0;border-radius:3px;overflow:hidden;margin:0;background:#ffffff15;accent-color:#c8ff8d}#revive-ui progress::-webkit-progress-bar{background:#ffffff15}#revive-ui progress::-webkit-progress-value{background:#c8ff8d;border-radius:3px}#revive-ui progress::-moz-progress-bar{background:#c8ff8d}
#revive-touch{--rescue:0;width:76px;height:76px;border-radius:50%;padding:0;border:1px solid #c8ff8d99;background:radial-gradient(circle,#203a2af2 61%,transparent 64%),conic-gradient(#d0ff9e calc(var(--rescue)*1turn),#52664b 0);color:#e1ffc7;font-size:14px;font-weight:700;box-shadow:0 4px 18px #0007;touch-action:none;user-select:none}#revive-touch.rescuing{box-shadow:0 0 22px #b7f47c35}
#team-list{min-width:130px;max-width:190px}#team-list p{display:flex;justify-content:space-between;gap:14px;padding:8px 11px;border:1px solid #d3ecd322;border-radius:6px;background:#10201cd9;font-size:13px}#team-list p span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#team-list p b{flex:none;color:#ceffa3;font-variant-numeric:tabular-nums}#team-list p.team-downed{border-color:#ed956b77;background:#39221fe8}#team-list p.team-downed b{color:#ffc393}
.home-settings-modal{position:fixed;inset:0;z-index:180;background:#08120eea;display:grid;place-items:center;padding:18px;overflow:auto;touch-action:pan-y}.home-settings-modal section{width:min(400px,94vw);max-height:94dvh;overflow:auto;padding:22px;background:linear-gradient(145deg,#1c3029,#101c19);border:1px solid #9bc77a55;border-radius:16px;box-shadow:0 20px 65px #0008}.home-settings-modal h2{margin:0 0 20px;font-size:26px;font-weight:700}.home-settings-modal #settings{margin:0 0 15px;padding:0;border:0;background:none;gap:24px}.home-settings-modal button{min-height:48px}#home-settings-back{width:100%;padding:13px;border:1px solid #caff9544;border-radius:9px;background:#c9fa98;color:#152418;font-size:16px;font-weight:700}.layout-editing #front-end,.layout-editing .home-settings-modal{display:none!important}.layout-editing header{display:block!important}.layout-editing #game{filter:brightness(.65);transform:none}
@media(pointer:coarse){#settings{border-radius:14px;border-color:#a8d18d55;box-shadow:0 18px 40px #0006}#settings label{font-size:15px;gap:12px}#settings input[type=range]{height:30px;accent-color:#c9fa98}#edit-touch{border-radius:9px;background:#294230;border-color:#b2d89155;padding:14px;margin-top:14px}#layout-tools{border-radius:12px;border-color:#b6db9455;box-shadow:0 8px 28px #0008}#layout-tools button{border-radius:8px;font-size:14px}#layout-done{background:#cbfa9e;color:#14211a;font-weight:700}#touch .actions button{box-shadow:0 4px 14px #0005;border-color:#d4eabc55;background-color:#13251de8;font-weight:600}#touch .actions button:active{background-color:#405a30;box-shadow:0 0 0 3px #c7f99230}#revive-ui{bottom:27%;padding:12px;gap:10px}#revive-detail{font-size:12px}#team-list{top:65px;left:14px;max-width:150px}#team-list p{font-size:12px;padding:6px 9px}}
@media(pointer:coarse) and (max-height:450px){#revive-ui{bottom:16%;width:330px;padding:10px 12px}.revive-emblem{width:42px;height:42px}#revive-touch{bottom:215px;width:66px;height:66px}.home-settings-modal section{padding:16px}.home-settings-modal h2{font-size:21px;margin-bottom:12px}.home-settings-modal #settings{gap:12px}}
#loading-screen{position:fixed;inset:0;z-index:1000;background:#000;touch-action:none;pointer-events:auto}.loading-corner{position:absolute;right:max(30px,env(safe-area-inset-right));bottom:max(26px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:10px}.loading-butter{width:128px;height:128px;background-image:url('./assets/happy-strip.png');background-size:100% 1500%;background-repeat:no-repeat;animation:loading-butter-frames 1.4s steps(14) infinite}.loading-corner span{color:#f7eedc;font-size:16px;font-weight:600;letter-spacing:.5px}@keyframes loading-butter-frames{from{background-position:0 0}to{background-position:0 100%}}@media(max-height:450px){.loading-butter{width:96px;height:96px}.loading-corner{right:24px;bottom:20px}}@media(prefers-reduced-motion:reduce){.loading-butter{animation:none}}

/* The rendering surface always follows the usable mobile viewport. */
html,body{width:100%;height:100%;min-height:100%;margin:0;overflow:hidden}#game{position:fixed;inset:0;display:block;width:100vw;height:100dvh;max-width:none;max-height:none}#touch{position:fixed;inset:0;height:auto;padding-bottom:env(safe-area-inset-bottom)}#touch button{touch-action:none;user-select:none;-webkit-user-select:none}body.menu-active #boss,body.menu-active #hit,body.menu-active #hurt,body.menu-active #damage-direction,body.menu-active #gloryhint,body.menu-active #topstats,body.menu-active #notice,body.menu-active #upgrade,body.menu-active #revive-ui,body.menu-active #revive-touch{display:none!important}
@keyframes grenade-ready-pulse{0%,40%,80%{filter:drop-shadow(0 0 10px #65ff49);border-color:#a5ff8f;color:#bdff9b}20%,60%,100%{filter:drop-shadow(0 0 1px #65ff49)}}
#grenade.grenade-ready,#grenadehud.grenade-ready .grenade-icon{animation:grenade-ready-pulse 1.2s ease-out}#gameover-actions{display:grid;gap:12px}#gameover-actions[hidden]{display:none}#gameover-actions button{width:100%}.game-story{font-size:14px;line-height:1.65;color:#e4d7b5}.menu-panel .game-guide{font-size:14px;line-height:1.6}

#overlay.game-over{display:flex!important;z-index:80;background:radial-gradient(ellipse at center,#0e1318ad,#070a0fe8);backdrop-filter:blur(6px);padding:max(20px,env(safe-area-inset-bottom)) 20px}#overlay.game-over>section{display:block;width:min(420px,100%);max-width:420px;margin:auto}#gameover-actions{width:100%;padding:32px 26px 24px;border:1px solid #73806b;border-top:3px solid #d9ff64;border-radius:10px;background:#10171ef2;box-shadow:0 18px 70px #0009;gap:12px;text-align:center}#gameover-title{margin:0 0 16px;color:#f1f3e8;font-size:clamp(26px,6vw,36px);font-weight:900;letter-spacing:3px}#gameover-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-height:54px;margin:0;padding:14px 16px;border:1px solid #859377;border-radius:5px;background:#202b32;color:#eef3e7;font:700 16px/1.4 Arial,sans-serif;white-space:normal;touch-action:manipulation}#gameover-actions #gameover-lobby{background:#d9ff64;border-color:#d9ff64;color:#182018}#gameover-actions button:hover{filter:brightness(1.12)}#gameover-actions button:focus-visible{outline:3px solid white;outline-offset:3px}#gameover-actions button:disabled{opacity:.5}#gameover-error{margin:0;color:#ffb2a1;font-size:14px}#gameover-error:empty{display:none}body.game-over header,body.game-over footer,body.game-over #hit,body.game-over #boss,body.game-over #crosshair,body.game-over #charge-ui,body.game-over #minimap,body.game-over #hurt,body.game-over #damage-direction,body.game-over #team-list,body.game-over #team-message,body.game-over #topstats{visibility:hidden!important}@media(max-height:460px){#gameover-actions{padding:20px;gap:9px}#gameover-title{margin-bottom:5px;font-size:26px}#gameover-actions button{min-height:46px;padding:10px}}

#touch #weapon3{right:180px;bottom:265px;width:70px;height:42px;border-color:#6bff71;color:#b7ff96}#other-ammo{font-size:11px;letter-spacing:.4px;white-space:normal}@media(max-width:500px) and (pointer:coarse){#touch #weapon3{right:126px;bottom:266px;width:62px;height:38px}}

#weapon-saw{position:absolute;right:180px;bottom:315px;width:80px;height:42px;touch-action:none;}

/* Empty HUD space must pass multitouch drags through to the canvas. */
#touch{pointer-events:none}#touch button,#touch #stick{pointer-events:auto}#topstats,#dashhud,#team-list,#team-message,#revive-ui{pointer-events:none}

#revive-ui{width:auto;min-width:150px;padding:10px 14px;gap:10px;border-radius:8px}.revive-emblem{width:34px;height:34px;font-size:24px}#revive-text{font-size:16px;margin-bottom:6px}#revive-ui progress{width:100px}.butter-seal h1{font-family:'Noto Sans KR',Arial,sans-serif;font-size:clamp(36px,8vw,76px);letter-spacing:-.06em;white-space:nowrap}#front-end:not([data-page=home]) h1{font-size:clamp(32px,7vw,52px)}
#weapon-wheel{position:fixed;inset:0;z-index:90;display:grid;place-items:center;background:#03080c88;backdrop-filter:blur(3px);pointer-events:none}#weapon-wheel[hidden]{display:none}.weapon-disc{position:relative;width:min(70vw,460px);aspect-ratio:1;border:3px solid #697879;border-radius:50%;background:repeating-conic-gradient(from -45deg,#1e292dee 0deg 89deg,#81928b 89deg 90deg);box-shadow:0 0 0 12px #101b20aa,0 0 80px #000}.wheel-slot{position:absolute;width:35%;height:27%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#a7b5b7;border-radius:18%;gap:3px}.wheel-slot:nth-child(1){top:2%;left:32.5%}.wheel-slot:nth-child(2){top:36.5%;right:0}.wheel-slot:nth-child(3){bottom:2%;left:32.5%}.wheel-slot:nth-child(4){top:36.5%;left:0}.wheel-slot.selected{color:#fff6ce;background:#c07820b0;box-shadow:0 0 25px #ecae3766}.wheel-slot svg{width:65px;height:35px}.wheel-slot strong{font-size:24px}.wheel-slot small{opacity:.65}.wheel-center{position:absolute;inset:35%;border-radius:50%;background:#0c151c;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#e5efea;font-size:14px}.wheel-center small{font-size:11px;margin-top:8px;color:#9ea9a7}.wheel-cursor{position:absolute;left:50%;top:50%;width:9px;height:9px;border-radius:50%;background:#ffe296;box-shadow:0 0 12px #ffb320}#sprint-fx{position:fixed;inset:0;pointer-events:none;z-index:6;opacity:0;background:radial-gradient(ellipse at center,transparent 42%,#a5e9f51c 77%,#d4ffff52);transition:opacity .15s}body:not(.playing) #sprint-fx{display:none}#touch #weapon0{right:180px;bottom:30px;width:72px;height:38px;border-radius:8px;font-size:12px}#touch #sprint{left:32px;bottom:245px;width:68px;height:46px;border-radius:10px}@media(pointer:coarse) and (max-height:420px){#touch #weapon0{bottom:10px}#touch #sprint{bottom:200px;left:28px}}@media(pointer:coarse) and (max-width:500px){#touch #weapon0{bottom:56px}}

#touch #grenade{display:none!important}#grenadehud .grenade-icon{border-color:#f46643}#grenadefill{color:#ff6b38}#blood-count{color:#ffd5a2}.blood-ready .grenade-icon{box-shadow:0 0 20px #ff5722;border-color:#ffe29c}.blood-ready #grenadefill{color:#ffcf75}

#dash-wind{position:fixed;inset:-10%;z-index:8;pointer-events:none;opacity:0;background:repeating-conic-gradient(from 8deg at 50% 50%,transparent 0deg 12deg,#d5f8ff88 12.2deg 12.5deg,transparent 12.8deg 26deg);mask-image:radial-gradient(ellipse at center,transparent 30%,#000 80%);filter:blur(.6px)}body:not(.playing) #dash-wind{display:none}

#minimap.full-map{width:min(76vh,84vw)!important;height:min(76vh,84vw)!important;top:50%!important;left:50%!important;right:auto!important;transform:translate(-50%,-50%);z-index:20;border:2px solid #a6ecb7;box-shadow:0 0 0 100vmax #0009;pointer-events:none}body:has(#minimap.full-map) #topstats{z-index:21}

#boss{top:max(22px,env(safe-area-inset-top));left:50%;width:min(480px,55vw);text-align:center;z-index:15}#bossvalue{display:none}#bossname{display:block;font-size:15px;letter-spacing:1px}.boss-track{height:10px;border:1px solid #ff906070;background:#261717db}#wave-score{position:fixed;right:22px;top:160px;z-index:15;width:230px;text-align:right;pointer-events:none;color:#eaffba;text-shadow:0 2px 5px #000}#wave-score small{display:block;font-size:10px;letter-spacing:2px;color:#bccbaf}#score-value{display:block;font-size:30px;font-variant-numeric:tabular-nums}#score-detail{display:block;font-size:10px;line-height:1.6;color:#d7e2c7}@media(max-width:600px){#boss{width:55vw;top:20px}#wave-score{right:12px;top:125px;width:170px}#score-value{font-size:23px}#score-detail{font-size:9px}}

.boss-shield-track{width:100%;height:4px;margin-top:4px;background:#251634aa}#boss-shield{height:100%;width:100%;background:#b26aff;box-shadow:0 0 8px #a349ff;transition:width .18s}

#boss-marker{position:fixed;z-index:18;transform:translate(-50%,-50%);text-align:center;pointer-events:none;color:#ffd765;text-shadow:0 2px 4px #000,0 0 9px #000;font-size:12px;line-height:1.2}#boss-marker b{display:block;font-size:25px;color:#ffbc43;filter:drop-shadow(0 0 5px #ff652d)}#boss-marker span,#boss-marker small{display:block}#boss-arrow{display:none;font-style:normal;font-size:19px}#boss-marker.offscreen #boss-arrow{display:block}#boss-marker.offscreen b{font-size:16px}#boss-alert{position:fixed;top:115px;left:50%;transform:translateX(-50%);z-index:22;color:#edb8ff;text-shadow:0 2px 5px #000,0 0 15px #b347ff;font-size:clamp(16px,3vw,24px);font-weight:800;pointer-events:none;animation:shield-break .3s ease-out}#wave-score{font-style:normal}body:not(.playing) #boss-marker,body:not(.playing) #boss-alert{display:none}@keyframes shield-break{from{opacity:0;transform:translateX(-50%) scale(1.3)}to{opacity:1;transform:translateX(-50%) scale(1)}}

#touch #weapon4{right:270px;bottom:30px;width:72px;height:38px;border-radius:8px;font-size:12px}.weapon-disc{background:repeating-conic-gradient(from -36deg,#1e292dee 0deg 71deg,#81928b 71deg 72deg)}.wheel-slot{width:31%;height:25%;transform:translate(-50%,-50%);font-size:12px}.wheel-center{font-size:0}

/* Separate grenade charge from Blood Punch, keeping the original filled icon. */
#frag-hud{position:fixed;left:132px;bottom:118px;width:70px;height:68px;pointer-events:none;color:#c6ff85;font-size:11px;z-index:4}#frag-hud b{display:block;margin-top:5px;text-align:center;width:62px}#frag-fill{position:absolute;inset:0;display:block;color:#bdff62;clip-path:inset(0)}#frag-hud .grenade-icon{border-color:#a2e65c}#frag-hud.frag-cooling{opacity:.65}#frag-hud.grenade-ready .grenade-icon{animation:grenade-ready-pulse 1.2s ease-out}body:not(.playing) #frag-hud,.menu-active #frag-hud{display:none!important}@media(pointer:coarse){#frag-hud{left:116px;bottom:142px}#touch #grenade{display:block!important;color:#bdff62;border-color:#a2e65c}#grenade svg{width:28px;height:36px}}@media(max-width:500px) and (pointer:coarse){#frag-hud{left:110px;bottom:174px}}

/* One shared row fixes alignment across all ability tiles. */
#ability-hud{position:fixed;left:max(28px,env(safe-area-inset-left));bottom:118px;display:flex;align-items:flex-start;gap:14px;pointer-events:none;z-index:4}
#ability-hud>div{position:static;inset:auto;width:66px;height:66px;font-size:11px;letter-spacing:1px;opacity:1}
#ability-hud .grenade-icon{box-sizing:border-box;width:66px;height:46px;line-height:42px}
#ability-hud b{display:block;width:66px;height:15px;line-height:15px;margin:6px 0 0;text-align:center;font-size:10px}
#ability-hud .grenade-icon span,#ability-hud #grenadefill{line-height:42px}
#ability-hud .frag-cooling{opacity:.65}#ability-hud #grenadehud{color:#ff7a75}#ability-hud #grenadehud .grenade-icon{border-color:#ff5269}#ability-hud #grenadefill{color:#ff596e}#ability-hud #blood-count{color:#ff9aaa}
#ability-hud #saw-hud{color:#ffb128}#ability-hud .saw-box{border-color:#ffb128;background:#291e0d;box-shadow:0 0 8px #ffb12833;overflow:hidden}
.saw-segments{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;background:#291e0d}
.saw-segments i{position:static!important;filter:none!important;clip-path:none!important;background:#ffad240b}
.saw-segments i.charged{background:#ffad2455;box-shadow:none}
#ability-hud .saw-box svg{position:absolute;inset:4px 5px;width:52px;height:34px;color:#ffb128;filter:none;transform:skewX(18deg)}
body:not(.playing) #ability-hud,.menu-active #ability-hud{display:none!important}
@media(pointer:coarse){#ability-hud{left:max(20px,env(safe-area-inset-left));bottom:252px;gap:12px}}
@media(pointer:coarse) and (max-height:500px){#ability-hud{bottom:206px;gap:10px}}

#ability-hud{transform:scale(.88);transform-origin:bottom left}

#scope-overlay{position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle closest-side,transparent 69.8%,#020609f5 70.5%);z-index:2}#scope-overlay[hidden]{display:none}#scope-overlay svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:70vmin;height:70vmin;fill:none;stroke:#94d7b499;stroke-width:.3}#charge-ui.scope-charge b{display:none}#charge-ui.scope-charge{z-index:3}.menu-active #scope-overlay,body:not(.playing) #scope-overlay,body.game-over #scope-overlay{display:none!important}

.scope-active footer,.scope-active #dashhud,.scope-active #minimap,.scope-active #hit,.scope-active #hurt,.scope-active #damage-direction{z-index:4}
/* Fixed tracks keep every difficulty selection at the same size. */
#menu-create.difficulty-panel{width:min(860px,100%);flex-shrink:0}
.difficulty-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:start;gap:22px;margin:20px 0}
.difficulty-options{margin:0;padding:0;border:0;min-width:0}
.difficulty-options legend{font-weight:800;color:#e7f2aa;margin-bottom:10px;letter-spacing:2px}
.menu-panel .difficulty-option{position:relative;margin:7px 0;cursor:pointer}
.difficulty-option input{position:absolute;width:1px;height:1px;opacity:0}
.difficulty-option span{display:flex;align-items:center;gap:12px;height:56px;padding:10px 20px;background:linear-gradient(100deg,#202b23ed,#111b1ce8);border:1px solid #82906b;clip-path:polygon(4% 0,94% 0,100% 100%,0 100%);font-weight:750;font-size:15px;white-space:nowrap;letter-spacing:0}
.difficulty-option small{flex:none;font-size:10px;color:#7b928b;letter-spacing:2px}
.difficulty-long-name span{font-size:13px}
.difficulty-option:has(input:checked) span{background:linear-gradient(90deg,#a15823,#de943e);border-color:#ffe49e;color:#fff9db;box-shadow:inset 0 0 18px #ffbd5933}
.difficulty-option:has(input:checked) small{color:#ffebbc}
.difficulty-option:has(input:focus-visible) span{outline:3px solid white;outline-offset:-5px}
.difficulty-option:hover span{filter:brightness(1.2)}
.difficulty-preview{--difficulty-color:#ffc16c;position:relative;min-width:0;height:430px;display:grid;grid-template-rows:122px 36px minmax(0,1fr);gap:8px;padding:14px 20px 18px;border:1px solid #809260;background:radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--difficulty-color),transparent 86%),#11191ded 75%);clip-path:polygon(6% 0,94% 0,100% 8%,100% 92%,94% 100%,0 100%,0 7%)}
.difficulty-preview h3{display:flex;align-items:center;margin:0;color:var(--difficulty-color);font-size:22px;line-height:1.3;white-space:nowrap;letter-spacing:0}
.difficulty-preview[data-difficulty=yellow100] h3{font-size:17px}
.difficulty-description{margin:0;padding:0 0 0 17px;align-self:start;display:grid;gap:10px;color:#e3e9d8;font-size:13px;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.difficulty-description li::marker{color:var(--difficulty-color)}
.difficulty-emblem{position:relative;height:122px;display:grid;place-items:center}
.difficulty-emblem:before{content:'';position:absolute;width:100px;height:100px;border:2px solid var(--difficulty-color);transform:rotate(45deg);opacity:.35}
.difficulty-emblem i{position:absolute;width:22px;height:112px;background:linear-gradient(transparent,var(--difficulty-color));clip-path:polygon(50% 0,100% 100%,0 100%);transform:rotate(45deg) translateX(42px);opacity:.7}
.difficulty-emblem i:nth-child(2){transform:rotate(-45deg) translateX(-42px)}
.difficulty-emblem i:nth-child(3){height:122px;transform:translateY(-10px);opacity:.3}
.difficulty-emblem b{width:102px;height:102px;background:url('./assets/happy-strip.png') 0 0/100% 1500%;font-size:0;filter:drop-shadow(0 0 13px var(--difficulty-color));z-index:1}
.difficulty-badge{display:inline-block;border:1px solid #9db47455;padding:4px 12px;color:#d8e8aa;font-size:12px;margin-bottom:12px;border-radius:2px}
@media(max-width:700px){
 .difficulty-layout{grid-template-columns:minmax(0,1fr);gap:14px}
 .difficulty-preview{height:386px;grid-template-rows:90px 30px minmax(0,1fr);padding:14px 16px 18px}
 .difficulty-emblem{height:90px}.difficulty-emblem b{width:80px;height:80px}.difficulty-emblem:before{width:72px;height:72px}.difficulty-emblem i{height:84px}
 .difficulty-preview h3{font-size:18px}.difficulty-preview[data-difficulty=yellow100] h3{font-size:16px}
 .difficulty-option span{height:50px;padding:10px 16px;gap:10px}.difficulty-long-name span{font-size:12px}
 #front-end[data-page=create] .title-art{height:70px}
}
/* Currency sits immediately below the compact map; score stages stack beneath it. */
#elif-hud{position:fixed;top:194px;right:18px;width:110px;display:flex;align-items:center;justify-content:flex-end;gap:7px;z-index:15;pointer-events:none;text-shadow:0 2px 5px #000;color:#e9f6ca;font-variant-numeric:tabular-nums}#elif-hud[hidden]{display:none}#elif-hud img{width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 0 5px #a0fac44a)}#elif-value{font-size:17px;letter-spacing:1px}#elif-gain{position:absolute;right:0;top:30px;color:#bafa91;font-size:12px}#wave-score{top:246px;right:18px;width:235px;padding:12px 13px;background:linear-gradient(100deg,transparent,#101a19cf);border-right:2px solid #deeeab66}#score-wave{letter-spacing:2px}#score-value{font-size:34px;color:#f5ffda}#score-detail{margin-top:10px;padding-top:10px;border-top:1px solid #d1edb633}#score-detail[hidden]{display:none}#score-bonus-name{display:block;font-size:15px;color:#ffdb89}#score-detail #score-bonus-value{display:block;font-size:22px;line-height:1.5;color:#cafa9a;font-variant-numeric:tabular-nums}.bonus-pop{animation:score-bonus-pop .45s cubic-bezier(.2,.8,.2,1) both;transform-origin:right center}.reward-pop{animation:elif-reward-pop .7s ease-out}.menu-active #elif-hud,.menu-active #wave-score,body.game-over #elif-hud{display:none!important}@keyframes score-bonus-pop{0%{opacity:0;transform:translateX(16px) scale(1.35);filter:brightness(2)}45%{opacity:1;transform:translateX(0) scale(1.08)}100%{opacity:1;transform:none;filter:brightness(1)}}@keyframes elif-reward-pop{0%{filter:brightness(3);transform:scale(1.2)}100%{filter:brightness(1);transform:none}}@media(max-width:600px),(max-height:500px){#elif-hud{top:194px;right:18px}#elif-value{font-size:15px}#wave-score{top:238px;width:180px;padding:8px 10px}#score-value{font-size:26px}#score-bonus-name{font-size:12px}#score-detail #score-bonus-value{font-size:18px}}
#front-end[data-page=create]{justify-content:flex-start;padding-top:max(20px,env(safe-area-inset-top))}

/* Keep room identity left and difficulty at the right edge. */
#room-list .room-card{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(100deg,color-mix(in srgb,var(--difficulty-color),#11191d 72%),#11191d);border:2px solid var(--difficulty-color);text-align:left;padding:14px 16px;clip-path:none}
.room-card-title{min-width:0;overflow-wrap:anywhere}.room-card-meta{display:flex;flex-direction:column;align-items:flex-end;flex:none;gap:5px}.room-card-meta strong{font-size:12px;color:var(--difficulty-color)}.room-card-meta small{font-size:11px;color:#dfe9d4}
#room-list .room-card[data-difficulty=yellow100]{background:#070707;border-color:#666} .room-card[data-difficulty=yellow100] strong{color:#eee}

.difficulty-option:has(input:checked) span{background:linear-gradient(90deg,color-mix(in srgb,var(--difficulty-color),#111 55%),#17201e);border-color:var(--difficulty-color);color:#fff}
.difficulty-emblem b{filter:grayscale(1) sepia(1) saturate(3) hue-rotate(var(--butter-hue,0deg)) drop-shadow(0 0 10px var(--difficulty-color))}
.difficulty-preview[data-difficulty=mild]{--butter-hue:65deg}.difficulty-preview[data-difficulty=rose]{--butter-hue:285deg}.difficulty-preview[data-difficulty=mara]{--butter-hue:0deg}.difficulty-preview[data-difficulty=magma]{--butter-hue:325deg}
.difficulty-preview[data-difficulty=yellow100] .difficulty-emblem b{filter:grayscale(1) brightness(.23) drop-shadow(0 0 3px #ddd)}
.difficulty-preview[data-difficulty=yellow100] h3,.difficulty-preview[data-difficulty=yellow100] li::marker{color:#eee}.difficulty-preview[data-difficulty=yellow100] .difficulty-emblem:before{border-color:#aaa}
/* Shady's dimensional shop: a warm room with a personal, readable ledger. */
#shop-offer{position:fixed;z-index:25;top:20%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:15px;padding:13px 20px;border:1px solid #c6a4f3;border-radius:12px;background:#20182be8;box-shadow:0 8px 35px #0006;color:#fff0d5;max-width:94vw;font-size:14px}#shop-offer>b{color:#ffdfa1;letter-spacing:3px}#shop-offer button{padding:8px 15px;background:#c4a4f3;color:#21162d;border:0;border-radius:7px;white-space:nowrap}
#shop-room-ui{position:fixed;inset:0;z-index:60;pointer-events:none;color:#f5ead8;font-family:inherit}#shop-room-ui[hidden],#shop-panel[hidden],#shop-codex[hidden],#shop-offer[hidden]{display:none!important}.in-shop.playing #overlay,.in-shop #wave-score{display:none!important}.shop-header{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:22px 4vw;background:linear-gradient(#151220e8,transparent);pointer-events:auto}.shop-header h1{margin:3px 0;font-size:clamp(21px,2.5vw,33px);color:#ffe6b7}.shop-header small{font-size:11px;letter-spacing:3px;color:#d3b9dc}.shop-wallet{display:flex;align-items:center;gap:9px;padding:12px 18px;border:1px solid #a785c366;border-radius:12px;background:#231b2eeb}.shop-wallet img{width:24px;height:24px;object-fit:contain}.shop-wallet strong{font-size:23px}.shop-wallet span{font-size:11px;color:#cfbadc}
#shop-panel{position:absolute;top:100px;left:4vw;right:4vw;bottom:105px;display:grid;grid-template-columns:minmax(180px,23%) 1fr;border:1px solid #987eaa88;border-radius:18px;background:#201b2af5;box-shadow:0 25px 80px #0008;overflow:hidden;pointer-events:auto}.shop-keeper{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;border-right:1px solid #7d65864d;background:radial-gradient(ellipse at 50% 40%,#54364a,#211b2b 75%)}.shop-keeper>img{width:min(100%,320px);aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 14px 18px #0005)}.shop-keeper>b{font-size:22px;color:#ffe0b2}.shop-keeper p{min-height:48px;text-align:center;font-size:14px;line-height:1.7;color:#efccdb}.shop-keeper small{color:#bcabc3;font-size:12px;text-align:center;line-height:1.8}.shop-inventory{padding:22px;overflow-y:auto}.shop-inventory-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.shop-inventory-title h2{font-size:20px;margin:0}.shop-inventory-title button,.shop-toolbar button{border:1px solid #a28cbd88;border-radius:8px;color:#eedaf9;background:#3a2e49;padding:10px 14px;cursor:pointer;font:inherit;font-size:12px}.shop-inventory-title button:hover,.shop-toolbar button:hover{background:#4d3c60}#shop-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.shop-card{display:flex;flex-direction:column;align-items:flex-start;position:relative;min-height:185px;padding:15px;border:1px solid #8c708b66;border-radius:12px;background:linear-gradient(145deg,#382b40,#251f30);color:#f6ead8;text-align:left;font:inherit;cursor:pointer;transition:border-color .16s,transform .16s}.shop-card:hover:not(:disabled){border-color:#edc4a3;transform:translateY(-2px)}.shop-card:focus-visible,.shop-toolbar button:focus-visible{outline:3px solid #d5b8ff;outline-offset:3px}.shop-card:disabled{cursor:default;opacity:.55}.shop-card svg{height:36px;width:66px;margin-bottom:12px}.shop-item-name{font-weight:bold;font-size:16px}.shop-card small{font-size:11px;line-height:1.6;color:#bfaecb;margin:7px 0 13px}.shop-card strong{margin-top:auto;display:flex;align-items:center;gap:7px;color:#ffd998;font-size:14px}.shop-card strong img{width:18px;height:18px;object-fit:contain}.shop-card.upgrade{background:linear-gradient(145deg,#2f333b,#242630);border-color:#718c8666}.shop-toolbar{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:19px 4vw;background:linear-gradient(transparent,#151220f5 35%);pointer-events:auto;z-index:2}.shop-toolbar>div{display:flex;align-items:center;gap:10px}.shop-toolbar small{font-size:11px;color:#dfc9e7}.shop-toolbar #shop-leave{background:#ebcca0;color:#33263c;font-weight:bold;border-color:#efdcbe;padding:13px 20px}#shop-codex{position:absolute;top:105px;left:50%;transform:translateX(-50%);width:min(740px,92vw);max-height:calc(100dvh - 220px);overflow-y:auto;padding:25px;border:1px solid #caaa81;border-radius:14px;background:#e9d8b7;color:#352a35;box-shadow:0 30px 100px #000a;pointer-events:auto}#shop-codex h3{font-size:14px;letter-spacing:2px;border-bottom:1px solid #baa58b;padding:15px 0 9px}#shop-codex article{margin:12px 0;padding:13px 15px;background:#fff5dc7a;border-radius:9px}.codex-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.codex-heading b{font-size:17px}.codex-heading span{font-size:10px;color:#826475}#shop-codex p{font-size:13px;line-height:1.85;margin:10px 0 0}.in-shop.shop-ready #shop-room-ui{opacity:.75}
@media(max-width:800px){#shop-panel{top:84px;bottom:100px;left:2vw;right:2vw;grid-template-columns:135px 1fr}.shop-header{padding:16px 3vw}.shop-wallet{padding:8px 11px}.shop-wallet span{display:none}.shop-wallet strong{font-size:18px}.shop-keeper{padding:8px}.shop-keeper p{font-size:12px}.shop-keeper small{font-size:10px}.shop-inventory{padding:12px}#shop-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shop-card{padding:12px;min-height:160px}.shop-item-name{font-size:14px}.shop-toolbar{padding:15px 3vw}.shop-toolbar small{display:none}.shop-toolbar button{font-size:11px;padding:10px}.shop-toolbar #shop-leave{padding:11px}.shop-inventory-title h2{font-size:16px}.shop-inventory-title button{font-size:10px;padding:7px}#shop-offer{font-size:11px;gap:8px;top:16%}}
@media(max-width:480px){#shop-panel{display:flex;flex-direction:column;top:80px;bottom:102px}.shop-keeper{min-height:77px;flex-direction:row;gap:9px;border-right:0;border-bottom:1px solid #7d65864d;justify-content:flex-start;padding:4px 12px}.shop-keeper>img{width:72px}.shop-keeper>b{font-size:14px}.shop-keeper p{font-size:10px;text-align:left;min-height:0}.shop-keeper small{display:none}.shop-inventory{flex:1;min-height:0}.shop-card{min-height:159px}.shop-toolbar{flex-wrap:wrap;gap:9px}.shop-toolbar>div{gap:6px}.shop-toolbar #shop-leave{font-size:10px}.shop-header h1{font-size:20px}.shop-header small{font-size:9px}#shop-codex{top:82px;max-height:calc(100dvh - 200px);padding:17px}}
.wheel-slot.locked{opacity:.35}.wheel-slot.locked strong{font-size:13px}#shop-walk-pad{display:none;position:absolute;left:20px;bottom:130px;grid-template-columns:repeat(3,44px);gap:5px;pointer-events:auto}#shop-walk-pad button{background:#30253fdd;border:1px solid #ac8dc966;border-radius:8px;color:#ffe7ba;height:44px;font-size:20px;touch-action:none}#shop-walk-pad button:first-child{grid-column:2}#shop-walk-pad button:nth-child(2){grid-column:1}@media(pointer:coarse){.shop-walking #shop-walk-pad{display:grid}}


/* World shop: physical merchandise owns the screen, HUD only supplies context. */
#shop-panel{display:none!important}.shop-header{top:22px;left:28px;right:28px;padding:0;background:none;border:0;box-shadow:none}.shop-header h1{font-size:21px;letter-spacing:2px}.shop-header small{font-size:10px;color:#baa884}.shop-wallet{background:#171b1ddd;border:1px solid #8c7950;border-radius:2px;padding:10px 16px}.shop-toolbar{bottom:28px;left:28px;right:28px;background:none;border:0;padding:0;box-shadow:none}.shop-toolbar small{background:#171b1ddd;border-left:3px solid #d5b46e;padding:12px 18px;color:#fff1cc;font-size:14px}.shop-toolbar button{border-radius:2px;background:#272b28;border:1px solid #b29861}.shop-toolbar button#shop-leave{font-size:12px;background:#171b1dbb}.in-shop #shop-room-ui.no-reticle:after{content:"";position:absolute;top:50%;left:50%;width:4px;height:4px;border:1px solid #fff7da;border-radius:50%;pointer-events:none}#shop-offer{top:auto;bottom:19%;background:#13191de8;border:0;border-left:4px solid #e7ba55;border-radius:0;padding:12px 20px;box-shadow:none}#shop-offer b{font-size:18px;letter-spacing:3px}#shop-message{position:fixed;left:50%;bottom:100px;transform:translateX(-50%);color:#ffe7ab}.in-shop #shop-shady{display:none}

@media(max-width:800px){.shop-header{left:14px;right:14px;top:14px}.shop-toolbar{left:14px;right:14px;bottom:18px;flex-wrap:wrap}.shop-toolbar small{display:block;font-size:11px;padding:8px;max-width:65vw}.shop-toolbar>div{flex-wrap:wrap}#shop-offer{top:auto;bottom:24%;width:90vw;box-sizing:border-box;font-size:11px;gap:8px}.shop-toolbar button#shop-leave{font-size:10px;padding:8px}#shop-message{bottom:125px;width:80vw;text-align:center;font-size:12px}#shop-walk-pad{bottom:105px}}

/* Small field guide: index, model window, story, and turning pages. */
#shop-codex{width:min(660px,90vw);top:50%;transform:translate(-50%,-50%);max-height:85dvh;padding:18px;border-radius:3px;background:#e8dfca;box-shadow:0 20px 70px #0009;border:5px solid #554634}#shop-codex-content{display:grid;grid-template-columns:135px 1fr;gap:18px}#codex-index{border-right:1px solid #ab9c82;padding-right:10px;display:flex;flex-direction:column;gap:7px}#codex-index button{font:inherit;font-size:12px;background:transparent;color:#514434;border:0;border-bottom:1px solid #c4b79e;padding:12px 4px;text-align:left;cursor:pointer}#codex-index button[aria-current=page]{color:#211b14;font-weight:bold;border-left:3px solid #806139;padding-left:7px}#codex-model{height:210px;border:2px solid #655742;background:transparent}#shop-codex #codex-name{margin:12px 0 5px;padding:0;border:0;letter-spacing:0;font-size:19px}#shop-codex #codex-text{font-size:13px;line-height:1.9;margin:6px 0 16px}.codex-pages{display:flex;justify-content:space-between;align-items:center;font-size:11px}.codex-pages button{background:transparent;border:1px solid #a39780;color:#514434;padding:7px;cursor:pointer}.codex-pages button:disabled{opacity:.3}@media(max-width:600px){#shop-codex{padding:12px}#shop-codex-content{grid-template-columns:92px 1fr;gap:10px}#codex-model{height:150px}#codex-index button{font-size:10px;padding:10px 2px}#shop-codex #codex-text{font-size:11px}}

#codex-model canvas{display:block;width:100%;height:100%;pointer-events:none}

.shop-header{justify-content:flex-end;pointer-events:none}#shop-codex #codex-name,#codex-index button{font-weight:700}#shop-codex #codex-text{color:#000}#codex-model{border:0;position:relative;background:transparent}#codex-model img{width:100%;height:100%;object-fit:contain;display:block}#codex-model img[hidden],#codex-model canvas[hidden],#shop-interact[hidden]{display:none!important}.shop-toolbar small{font-size:15px;white-space:nowrap}

@media(pointer:fine){#shop-catalog,#shop-book{display:none!important}}

#shop-interact{position:fixed;transform:translateY(-50%);bottom:auto;z-index:90;pointer-events:none;padding:11px 16px;border-left:3px solid #fff;background:#151b24e8;color:#fff;font-size:15px;max-width:250px;white-space:nowrap}.shop-header{display:none}.shop-toolbar{pointer-events:none}.shop-toolbar button{pointer-events:auto}#shop-message{pointer-events:none;transition:none}.in-shop #shop-walk-pad{display:none!important}

.in-shop:not(.playing) #shop-room-ui{display:none!important}

#upgrade{background:radial-gradient(ellipse at 50% 50%,#1b291cef,#060907f5 75%);backdrop-filter:blur(6px);animation:upgrade-reveal .4s ease both}#upgrade section{max-width:960px;border-top:2px solid #c6ea74;padding:24px 0}.upgrade-kicker{letter-spacing:4px;font-size:11px;color:#bddd79}#upgrade h2{font-size:42px;text-transform:uppercase;letter-spacing:4px;color:#efffcf}.upgrade-options button{position:relative;border-radius:0;border:1px solid #718d4d;background:linear-gradient(145deg,#21331eea,#0c160e);min-height:310px;transition:transform .22s,box-shadow .22s,border-color .22s;animation:upgrade-card .55s .12s backwards;cursor:pointer;overflow:hidden;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px))}.upgrade-options button:nth-child(2){animation-delay:.22s}.upgrade-options button:nth-child(3){animation-delay:.32s}.upgrade-options button:hover,.upgrade-options button:focus-visible{transform:translateY(-12px) scale(1.025);border-color:#e4ff8f;background:linear-gradient(145deg,#3b5226,#172816);box-shadow:0 20px 40px #0009,inset 0 0 35px #c6ed4420}.upgrade-options img{display:block;width:90px;height:90px;object-fit:contain;margin:20px auto;filter:drop-shadow(0 0 16px #b6f45155)}.upgrade-options em{display:block;margin-top:24px;font-style:normal;font-size:12px;letter-spacing:2px;color:#d6f58c}.upgrade-footer{color:#8caa73}@keyframes upgrade-reveal{from{opacity:0}to{opacity:1}}@keyframes upgrade-card{from{opacity:0;translate:0 45px;filter:brightness(2)}to{opacity:1;translate:0 0;filter:brightness(1)}}@media(max-width:600px){#upgrade h2{font-size:28px}.upgrade-options button{min-height:0;padding:14px 20px}.upgrade-options img{float:right;width:58px;height:58px;margin:12px}.upgrade-options em{margin-top:8px}.upgrade-options button:hover{transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){#upgrade,.upgrade-options button{animation:none;transition:none}}

#shop-vote{position:fixed;left:50%;bottom:max(40px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:80;display:flex;align-items:center;gap:14px;padding:14px 20px;background:#13191df2;border:1px solid #e7ba55;color:#fff0d5}#shop-vote b{font-size:18px}#shop-vote button{width:54px;height:44px;font-size:22px;font-weight:800;border:1px solid #90bb76;background:#243425;color:#c6ff9d}#shop-vote-no{border-color:#d77b70!important;background:#392420!important;color:#ffb0a1!important}#shop-vote button:hover,#shop-vote button:focus-visible{filter:brightness(1.3);outline:2px solid #fff0d5}

#match-chat{position:fixed;left:20px;bottom:145px;width:min(380px,calc(100vw - 40px));z-index:35;font-size:14px;color:#f6ead4;pointer-events:none;text-shadow:0 1px 3px #000}#match-chat[hidden],#match-chat-form[hidden]{display:none!important}#match-chat-log{max-height:160px;overflow:auto}#match-chat-log p{margin:5px 0;padding:5px 8px;background:#10151dbb;overflow-wrap:anywhere}#match-chat-form{display:flex;gap:5px;pointer-events:auto;background:#10151dee;padding:8px;border:1px solid #dbad65}#match-chat-input{min-width:0;flex:1;background:#080d12;border:0;color:#fff;font-size:16px;padding:8px}#match-chat-form button{background:#513528;color:#ffe0ab;border:1px solid #b8874d;cursor:pointer}#match-chat-error{color:#ffb7a3;pointer-events:auto;margin:5px 0}.menu-active #match-chat{display:none}
