@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');
:root{color-scheme:dark;--pink:#fc6bc0;--purple:#a795ff;--muted:#a9a2bb;--bg:#100d1c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#fff;font-family:'Outfit','Noto Sans JP',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid #fff;outline-offset:6px}button:disabled{cursor:wait;opacity:.6}button{border:0}a{color:inherit;text-decoration:none}.hidden{display:none!important}.screen{min-height:100svh;position:relative;overflow:hidden}.title-screen{height:100svh;min-height:760px;background:#10101e}.hero-art,.hero-shade,.grain{position:absolute;inset:0}.hero-art{background:url('assets/title.png') center 40%/cover no-repeat;animation:reveal 1.5s ease-out}.hero-shade{background:linear-gradient(90deg,rgba(12,11,25,.96) 0%,rgba(13,11,26,.87) 23%,rgba(15,11,30,.4) 46%,transparent 72%),linear-gradient(0deg,#100d1c 0%,rgba(16,13,28,.6) 14%,transparent 40%,rgba(10,9,19,.3) 100%)}.grain{opacity:.1;background-image:radial-gradient(#c8b5e8 .6px,transparent .6px);background-size:5px 5px;pointer-events:none}.topbar{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:28px 4.3%;border-bottom:1px solid #ffffff13}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:24px;letter-spacing:1px}.brand-mark{color:var(--pink);font-size:34px}.brand-divider{width:1px;height:20px;background:#ffffff32;margin:0 9px}.brand-small{font-size:10px;letter-spacing:2px;font-weight:500}.top-right{display:flex;gap:28px;align-items:center}.edition{font-size:10px;letter-spacing:2px;color:#c4bdcf}.sound-button{background:#1912257d;border:1px solid #ffffff25;border-radius:30px;padding:10px 16px;font-size:10px;letter-spacing:1px}.sound-state{color:var(--pink);margin-left:8px}.title-copy{position:relative;z-index:1;margin:6vh 0 0 7%;max-width:600px}.eyebrow{font-size:10px;letter-spacing:3px;color:#d6c3ed;display:flex;align-items:center;gap:12px}.eyebrow span{height:1px;width:26px;background:var(--pink)}h1{font-size:clamp(47px,5.2vw,82px);font-weight:900;line-height:1.23;letter-spacing:-4px;margin:24px 0 12px;text-shadow:0 4px 30px #0005}.heart{color:#fb86cd;font-weight:500}.title-dot{color:var(--pink)}.english-title{font-size:15px;letter-spacing:7px;font-weight:400;color:#e7dcef}.english-title strong{font-weight:700}.tagline{font-size:17px;font-weight:700;letter-spacing:2px;margin:30px 0 12px}.intro{font-size:12px;line-height:2;color:#bab2ce;letter-spacing:1px}.start-button{margin-top:24px;width:322px;background:linear-gradient(105deg,#ed77bc,#bd95fb);color:#23142f;border:1px solid #ffffff55;padding:17px 23px;display:flex;align-items:center;justify-content:space-between;text-align:left;box-shadow:0 5px 34px #ec65c526;transition:transform .2s,box-shadow .2s}.start-button:hover{transform:translateY(-3px);box-shadow:0 6px 40px #ec65c566}.start-button small{display:block;font-size:9px;letter-spacing:2px;margin-bottom:5px;font-weight:600}.start-button b{font-size:18px;letter-spacing:3px}.button-arrow{font-size:32px;font-weight:400}.sub-actions{display:flex;align-items:center;width:322px;justify-content:center;gap:20px;margin-top:23px}.sub-actions button{background:none;font-size:11px;color:#c8c0d8;letter-spacing:1px}.sub-actions button span{color:var(--pink);padding-left:15px}.sub-actions>span{height:12px;width:1px;background:#ffffff25}.character-label{position:absolute;right:6%;bottom:23%;text-align:right;text-shadow:0 2px 12px #000}.character-label>span{font-size:9px;letter-spacing:3px;color:#ecd7f8}.character-label strong{display:block;font-size:23px;margin:10px 0}.character-label i{font-size:12px;font-style:normal;color:var(--pink);letter-spacing:3px;margin-left:10px}.character-label small{font-size:10px;color:#d9c5e4;letter-spacing:1px}.title-footer{position:absolute;bottom:0;left:7%;right:7%;height:119px;border-top:1px solid #ffffff24;display:flex;align-items:center;gap:55px}.feature{padding-right:35px;border-right:1px solid #ffffff1a}.feature strong{font-size:29px;font-weight:500;color:#f1d8fa}.feature strong span{font-size:10px;letter-spacing:2px;margin-left:5px}.feature small{display:block;font-size:10px;color:#aaa1ba;margin-top:6px}.footer-note{margin-left:auto;font-size:9px;line-height:1.8;letter-spacing:2px;color:#a49ab5}#load-error{color:#ff9eb8;font-size:12px;max-width:360px;margin-top:10px}
#game{height:100svh;min-height:0;background:#101725}#canvas{width:100%;height:100%;display:block;touch-action:none}.game-vignette{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 140px #070612aa}.hud{position:absolute;top:25px;left:30px;right:30px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.health-panel{display:flex;align-items:center;gap:12px;padding:12px 18px;background:#13101edc;border:1px solid #ffffff20;border-radius:5px;min-width:245px}.mini-portrait{width:42px;height:48px;background:url('assets/sprites.png') 0 0/400% 200%;border-radius:7px}.health-panel strong{font-size:12px;letter-spacing:1px}.health-panel strong small{margin-left:15px;color:var(--pink);font-size:10px}.health-panel>div>small{font-size:9px;color:#b9aecb}.health-track{width:155px;height:5px;background:#ffffff20;margin:8px 0 3px;border-radius:5px;overflow:hidden}#health-fill{height:100%;width:100%;background:linear-gradient(90deg,#bc7bf6,#fc7fbc);transition:width .15s}.wave-panel{text-align:center;min-width:180px}.wave-panel>small{display:block;font-size:9px;letter-spacing:3px;color:#c3b0d5}.wave-panel>strong{display:block;font-size:20px;letter-spacing:3px;margin-top:5px}.wave-panel b{font-size:30px;color:#ffb4e6}.wave-panel strong span{font-size:12px;color:#a59bae}#wave-progress{height:2px;background:#f6a7de;width:0;margin-top:6px}.score-panel{display:flex;gap:24px;align-items:center;background:#13101edc;padding:14px 18px;border:1px solid #ffffff20;border-radius:5px;font-size:13px}.score-panel>span:nth-child(2){font-size:10px;color:#bfb5cf}.score-panel b{font-size:16px;color:#fff;margin-left:5px}#pause{pointer-events:auto;background:#ffffff12;border-radius:3px;padding:7px 11px}.xp-track{position:absolute;left:0;right:0;top:0;background:#ffffff0b;height:4px}#xp-fill{height:100%;background:#8ae8fc;box-shadow:0 0 15px #69eaff;width:0}#boss-hud{position:absolute;top:115px;left:30%;width:40%;text-align:center}#boss-hud span{font-size:11px;letter-spacing:2px;color:#ffc0e5}#boss-hud>div{height:7px;margin-top:9px;background:#302036;border:1px solid #ff74b557}#boss-fill{display:block;height:100%;width:100%;background:linear-gradient(90deg,#bd3f8c,#ff83b8)}#wave-banner{position:absolute;top:31%;width:100%;text-align:center;pointer-events:none;font-size:35px;letter-spacing:8px;color:#ffdef2;text-shadow:0 0 25px #eb5cac;opacity:0;transition:opacity .3s}#wave-banner.show{opacity:1}.bottom-hud{position:absolute;left:30px;right:30px;bottom:30px;display:flex;justify-content:space-between;align-items:flex-end}.weapon-dock{display:flex;background:#13101edf;border:1px solid #ffffff25;border-radius:7px;gap:5px;padding:12px}.weapon-dock>div{width:103px;text-align:center;border-right:1px solid #ffffff14}.weapon-dock>div:last-child{border:0}.weapon-icon{display:block;font-size:28px;line-height:32px;text-shadow:0 0 20px currentColor}.pink{color:#ff85cc}.cyan{color:#6de6ff}.gold{color:#ffd889}.weapon-dock small{display:block;font-size:8px;margin:6px 0;color:#cfc3dd}.weapon-dock b{font-size:9px;letter-spacing:1px;color:#b3a5c5}.ultimate-button{display:flex;gap:15px;align-items:center;background:linear-gradient(110deg,#56305fdf,#271b44ed);padding:14px 22px;border:1px solid #e298e2;border-radius:5px;box-shadow:0 0 22px #ee55ca20;text-align:left}.ultimate-button>span{font-size:42px;color:#ffabe6}.ultimate-button small{display:block;font-size:8px;letter-spacing:2px;color:#efb7e9}.ultimate-button b{display:block;font-size:13px;margin:5px 0}.ultimate-button em{font-size:11px;letter-spacing:6px;color:#fb9ae0;font-style:normal}.ultimate-button:disabled{opacity:.4;cursor:default}.move-hint{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:10px;color:#b8a9c9;white-space:nowrap}.move-hint span{color:#766985}#cutin{position:fixed;z-index:20;inset:18% 0;background:#160c23 url('assets/ultimate.png') center/cover;box-shadow:0 0 100px #f953e5;border-top:2px solid #ffb9ec;border-bottom:2px solid #ffb9ec;animation:cutin .3s ease-out;pointer-events:none}#cutin>div{position:absolute;bottom:10%;left:7%;text-shadow:0 3px 16px #200324,0 0 25px #3b074d;background:#230b3b66;padding:20px}#cutin small{font-size:11px;letter-spacing:5px;color:#ffd3f2}#cutin h2{font-size:clamp(24px,4vw,60px);margin:8px 0;font-style:italic}#cutin p{font-size:13px;letter-spacing:7px;margin:0;color:#ffc4ec}.modal{position:fixed;z-index:30;inset:0;background:#080613c9;backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:center;padding:25px}.modal-card{background:linear-gradient(135deg,#261d36,#151021);border:1px solid #b895e244;max-width:720px;width:100%;padding:38px;box-shadow:0 30px 100px #0008;max-height:90svh;overflow:auto}.modal-eyebrow{font-size:10px;letter-spacing:4px;color:var(--pink)}.modal-card h2{font-size:27px;margin:12px 0 22px}.modal-card p{font-size:13px;line-height:2;color:#bdb0ce}.modal-card .primary,.modal-card .secondary{padding:14px 24px;min-width:150px;margin:10px 10px 0 0;border-radius:3px;font-size:12px;letter-spacing:1px}.primary{background:linear-gradient(110deg,#f18ac7,#b79cff);color:#241432;font-weight:700}.secondary{background:#ffffff0c;border:1px solid #ffffff28!important}.instructions{display:grid;grid-template-columns:145px 1fr;gap:18px;font-size:12px;align-items:center;color:#c5bad5;margin-bottom:25px}.instructions b{color:#fff}kbd{display:inline-block;background:#ffffff0c;border:1px solid #ffffff30;border-radius:3px;padding:5px 9px;font:11px 'Outfit',sans-serif;margin-right:3px}.upgrade-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.upgrade{background:#ffffff05;border:1px solid #ffffff20;padding:22px 13px;text-align:left;border-radius:5px;transition:background .2s,transform .2s}.upgrade:hover{background:#d195ee20;transform:translateY(-3px);border-color:#de9ef3}.upgrade .weapon-icon{margin-bottom:20px}.upgrade strong{font-size:12px;display:block}.upgrade p{font-size:11px;line-height:1.8}.upgrade small{font-size:9px;color:var(--pink);letter-spacing:1px}.roster{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.roster figure{margin:0;text-align:center}.roster .sprite{width:100%;aspect-ratio:3/4;background-image:url('assets/sprites.png');background-size:400% 200%;border-radius:15px}.roster figcaption{font-size:10px;margin-top:7px;color:#cec2db}.result-stats{display:flex;gap:35px;padding:20px 0;border-top:1px solid #ffffff20;border-bottom:1px solid #ffffff20;margin-bottom:20px}.result-stats b{font-size:28px;color:#efb4e3;display:block}.result-stats small{font-size:10px;color:#a898b7;letter-spacing:2px}#joystick{display:none;position:absolute;bottom:165px;left:25px;width:105px;height:105px;background:#ffffff09;border:1px solid #ffffff24;border-radius:50%;touch-action:none}#joystick i{position:absolute;width:40px;height:40px;border-radius:50%;background:#cfa4ed66;left:32px;top:32px;pointer-events:none}@keyframes reveal{from{transform:scale(1.04);opacity:.4}to{transform:scale(1);opacity:1}}@keyframes cutin{from{transform:translateX(100%)}to{transform:translateX(0)}}
@media(min-height:950px){.title-copy{margin-top:10vh}.title-footer{height:145px}}@media(max-width:1000px){.title-copy{margin-left:5%}.title-footer{left:5%;right:5%;gap:25px}.feature{padding-right:20px}.footer-note{display:none}.character-label{right:4%}.edition{display:none}.hud{left:15px;right:15px}.score-panel{gap:12px}.health-panel{min-width:210px}.health-track{width:125px}.bottom-hud{left:15px;right:15px}}@media(max-width:650px){.title-screen{min-height:800px}.topbar{padding:18px 6%}.brand-small{font-size:8px;letter-spacing:1px}.brand-divider{margin:0 2px}.top-right{gap:0}.sound-button{padding:9px;font-size:8px}.hero-art{background-position:60% center}.hero-shade{background:linear-gradient(90deg,#0c0b19e8,#0c0b1970),linear-gradient(0deg,#100d1c,transparent 60%)}.title-copy{margin:65px 7% 0}h1{font-size:53px;letter-spacing:-3px}.english-title{font-size:12px;letter-spacing:5px}.eyebrow{font-size:8px;letter-spacing:2px}.tagline{font-size:14px}.intro{font-size:11px}.start-button{width:285px}.sub-actions{width:285px}.character-label{display:none}.title-footer{height:110px;gap:15px;left:7%;right:7%}.feature{padding-right:12px;flex:1}.feature strong{font-size:23px}.feature strong span{font-size:8px;letter-spacing:.5px;margin:0}.feature small{font-size:8px;line-height:1.7}.hud{top:15px;gap:10px;align-items:flex-start}.mini-portrait{display:none}.health-panel{min-width:0;padding:10px}.health-panel strong{font-size:9px}.health-panel strong small{margin-left:5px;font-size:8px}.health-track{width:95px}.wave-panel{min-width:100px}.wave-panel>small{font-size:6px;letter-spacing:1px}.wave-panel>strong{font-size:12px;letter-spacing:1px}.wave-panel b{font-size:23px}.wave-panel strong span{font-size:8px}.score-panel{padding:8px;gap:8px;flex-wrap:wrap;max-width:110px;font-size:11px}.score-panel>span:nth-child(2){display:none}#pause{padding:6px 9px}.bottom-hud{bottom:28px;gap:10px}.weapon-dock{padding:8px;gap:2px}.weapon-dock>div{width:43px}.weapon-dock small{display:none}.weapon-dock b{font-size:8px}.weapon-icon{font-size:24px}.ultimate-button{padding:10px;gap:8px}.ultimate-button>span{font-size:28px}.ultimate-button b{font-size:10px}.ultimate-button small{font-size:6px;letter-spacing:1px}.ultimate-button em{font-size:8px}.move-hint{font-size:8px}.move-hint span{display:none}#boss-hud{left:15%;width:70%;top:95px}.modal-card{padding:25px}.modal-card h2{font-size:22px}.instructions{grid-template-columns:110px 1fr;font-size:10px;gap:15px}.upgrade-grid{gap:8px}.upgrade{padding:13px 8px}.upgrade strong{font-size:10px}.upgrade p{font-size:9px}.upgrade small{font-size:8px}.roster{grid-template-columns:repeat(3,1fr)}.result-stats{gap:22px}#wave-banner{font-size:25px;letter-spacing:3px}}@media(pointer:coarse){#joystick{display:block}.move-hint{display:none}}
@media(max-height:800px) and (min-width:651px){.title-screen{min-height:660px}.topbar{padding-top:18px;padding-bottom:18px}.title-copy{margin-top:28px}h1{font-size:58px;margin-top:18px;margin-bottom:10px}.tagline{margin-top:20px;font-size:15px}.intro{font-size:11px}.start-button{margin-top:18px;padding:14px 22px}.sub-actions{margin-top:18px}.title-footer{height:95px}.character-label{bottom:21%}}
/* MVP 02: arsenal, difficulty and finishing sequence */
.weapon-dock{max-width:min(65vw,760px);flex-wrap:wrap;gap:4px}.weapon-dock>div{width:65px}.weapon-dock small{font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.difficulty h3{font-size:17px;letter-spacing:1px}.difficulty:nth-child(2){border-color:#efaa6655}.difficulty:nth-child(3){border-color:#ff517955}.difficulty:nth-child(3) h3{color:#ff7296}.ingame-sound{pointer-events:auto!important;padding:7px 10px;font-size:9px}.score-panel{gap:14px}
#victory-cutin{position:fixed;z-index:25;inset:8% 0;background:#180e23 url('assets/victory.png') center/cover;border-block:3px solid #ffdda5;box-shadow:0 0 150px #ffcc78;animation:victory-reveal .45s ease-out;pointer-events:none}#victory-cutin:after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,#fff9 45%,transparent 65%);animation:victory-shine 1.4s ease-out both;pointer-events:none}#victory-cutin>div{position:absolute;bottom:8%;left:7%;padding:20px 30px;background:#21102f90;text-shadow:0 2px 20px #000}#victory-cutin small{font-size:12px;letter-spacing:5px;color:#ffe1a4}#victory-cutin h2{font-size:clamp(28px,4vw,60px);margin:12px 0;font-style:italic}#victory-cutin p{font-size:18px;letter-spacing:8px;color:#ffd184;margin:0}@keyframes victory-reveal{from{transform:scale(1.3);filter:brightness(4)}to{transform:scale(1);filter:brightness(1)}}@keyframes victory-shine{from{transform:translateX(-100%)}to{transform:translateX(150%)}}@media(max-width:650px){.weapon-dock{max-width:51vw;padding:6px;gap:2px}.weapon-dock>div{width:30px}.weapon-dock .weapon-icon{font-size:21px}.difficulty h3{font-size:11px;letter-spacing:0}.score-panel{max-width:130px;gap:6px}.ingame-sound{padding:5px;font-size:7px}.ingame-sound .sound-state{margin:0}.score-panel>span:first-child{font-size:9px}#victory-cutin{inset:18% 0}#victory-cutin p{font-size:12px;letter-spacing:4px}}
#victory-cutin{background-size:contain;background-repeat:no-repeat}
#outcome{position:fixed;inset:0;z-index:26;width:100%;height:100svh;background:#090611ed;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;animation:reveal .35s ease-out}#outcome-image{width:100%;height:100%;object-fit:contain}.outcome-copy{position:absolute;left:5%;bottom:max(5%,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;text-align:left;background:#120b23bf;padding:22px 30px;border-left:3px solid #ffdc9c;pointer-events:none}.outcome-copy small{font-size:clamp(17px,3vw,34px);letter-spacing:5px;color:#ffdfa4}.outcome-copy strong{font-size:clamp(13px,2vw,24px)}.outcome-copy>span{font-size:12px;letter-spacing:2px;color:#d6c5e5}#outcome.defeat .outcome-copy{border-color:#c7a0ed}#outcome.defeat small{color:#c7a0ed}#game{touch-action:none;user-select:none}.bottom-hud{bottom:max(30px,env(safe-area-inset-bottom))}#joystick{bottom:max(145px,calc(env(safe-area-inset-bottom) + 125px))}@media(max-width:420px){.hud{left:8px;right:8px;gap:5px}.health-panel{padding:8px}.health-track{width:75px}.health-panel strong{font-size:8px}.wave-panel{min-width:85px}.score-panel{gap:4px;padding:5px;max-width:95px}.wave-panel>small{font-size:5px}.score-panel .sound-button{padding:4px}#pause{padding:5px 7px}.bottom-hud{left:8px;right:8px}.ultimate-button{padding:9px 7px}.weapon-dock{max-width:46vw}.outcome-copy{left:4%;right:4%;bottom:8%;padding:14px}.outcome-copy>span{font-size:10px}}
@media(max-width:650px){h1{font-size:46px;letter-spacing:-3px}}
/* Readable type and compact, scrollable controls */
body{font-size:18px}.intro,.sub-actions button,.feature small,.character-label small{font-size:16px}.eyebrow,.brand-small,.edition,.sound-button,.start-button small,.feature strong span{font-size:14px}.title-screen{min-height:900px}.title-copy{max-width:700px}.title-footer{gap:25px}.footer-note{display:none}.health-panel strong{font-size:18px}.health-panel strong small,.health-panel>div>small{font-size:17px}.health-track{height:9px;width:165px}.wave-panel>small{font-size:14px;letter-spacing:1px}.wave-panel>strong{font-size:24px}.wave-panel strong span{font-size:18px}.wave-panel b{font-size:36px}.score-panel,.score-panel>span:nth-child(2),.ingame-sound{font-size:17px}.score-panel b{font-size:22px}#pause{font-size:22px;min-width:44px;min-height:44px}#boss-hud{top:140px}#boss-hud span{font-size:18px}.weapon-dock{flex-wrap:nowrap;overflow-x:auto;max-width:65%;padding:10px;gap:10px}.weapon-dock>div{flex:0 0 116px;width:116px}.weapon-dock small{display:block;font-size:14px;white-space:normal;line-height:1.4;min-height:40px}.weapon-dock b{font-size:18px;color:#e8ddf4}.weapon-dock .weapon-icon{font-size:32px}.ultimate-button small{font-size:14px;letter-spacing:0}.ultimate-button b{font-size:18px}.ultimate-button em{font-size:17px}.move-hint{font-size:15px}.modal-card{max-width:980px;padding:32px}.modal-card h2{font-size:32px}.modal-card p,.instructions{font-size:18px;line-height:1.8}.modal-eyebrow,.modal-card .primary,.modal-card .secondary,kbd{font-size:17px}.instructions{grid-template-columns:180px 1fr}.upgrade strong{font-size:20px}.upgrade small{font-size:16px;letter-spacing:0}.upgrade p{font-size:17px}.upgrade .growth{color:#f7d9ff;font-size:16px;line-height:1.6}.difficulty h3{font-size:23px}.roster figcaption,.result-stats small{font-size:16px}.outcome-copy>span{font-size:18px}.outcome-copy strong{font-size:clamp(18px,2vw,26px)}
@media(max-width:850px){.hud{top:12px;left:10px;right:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.health-panel{padding:8px;min-width:0}.mini-portrait{display:none}.wave-panel{min-width:0}.wave-panel>small{font-size:12px}.score-panel{grid-column:1/-1;justify-content:flex-end;padding:4px 8px;max-width:none;gap:16px}.score-panel>span:nth-child(2){display:block}.score-panel>span:first-child{font-size:18px}.ingame-sound,.score-panel .sound-button{font-size:16px;padding:7px}.health-panel strong{font-size:16px}.health-panel strong small{font-size:16px;margin-left:6px}.health-track{width:140px}.wave-panel>strong{font-size:19px}.wave-panel b{font-size:30px}.wave-panel strong span{font-size:16px}#boss-hud{top:162px;left:10%;width:80%}#boss-hud span{font-size:16px}.bottom-hud{bottom:max(20px,env(safe-area-inset-bottom));left:8px;right:8px;gap:8px}.weapon-dock{max-width:calc(100% - 166px);padding:6px}.weapon-dock>div{flex-basis:100px;width:100px}.weapon-dock small{font-size:14px}.weapon-dock b{font-size:16px}.ultimate-button{padding:10px 8px;width:158px;gap:0}.ultimate-button>span{display:none}.ultimate-button b{font-size:16px}.ultimate-button small{font-size:12px}.ultimate-button em{font-size:16px}.move-hint{display:none}#joystick{bottom:175px}.modal{padding:12px}.modal-card{padding:22px;max-height:94svh}.modal-card h2{font-size:25px}.upgrade-grid{grid-template-columns:1fr}.upgrade{padding:16px}.upgrade .weapon-icon{float:left;margin:0 18px 5px 0}.upgrade p{margin:8px 0}.instructions{grid-template-columns:1fr;gap:10px}.instructions span{margin-bottom:12px}.result-stats{gap:18px}.title-screen{min-height:960px}.topbar{padding:18px 5%}.brand-small{font-size:12px}.sound-button{font-size:13px}.title-copy{margin:50px 6% 0}.title-footer{height:150px;gap:10px;left:6%;right:6%}.feature{padding-right:8px}.feature small{font-size:13px}.feature strong span{font-size:12px}.intro{font-size:17px}.sub-actions button{font-size:17px}.outcome-copy{padding:14px;left:4%;right:4%;bottom:4%}.outcome-copy>span{font-size:17px}.outcome-copy small{font-size:22px;letter-spacing:2px}}
@media(max-width:380px){.health-track{width:122px}.health-panel strong{font-size:15px}.health-panel strong small{margin-left:3px}.wave-panel>small{font-size:11px}h1{font-size:39px}.brand-small{display:none}}
/* Phone layout: compact controls, readable text, independent world zoom. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}#game{height:100dvh}button{min-width:0}
@media(max-width:850px),(pointer:coarse) and (max-height:600px){
 .title-screen{height:auto;min-height:100svh;display:flex;flex-direction:column;overflow:clip}.topbar{padding:12px 5%;gap:8px}.brand{font-size:20px;gap:6px}.brand-small,.brand-divider,.edition{display:none}.sound-button{font-size:13px;padding:9px 12px}.title-copy{margin:28px 6% 24px;max-width:88%}.eyebrow{font-size:11px;letter-spacing:1px}h1{font-size:clamp(32px,8.8vw,58px);letter-spacing:-2px;margin:18px 0 10px}.english-title{font-size:12px;letter-spacing:3px}.tagline{font-size:16px;letter-spacing:0;margin:20px 0 10px}.intro{font-size:15px;line-height:1.8;letter-spacing:0}.start-button{width:min(100%,320px);margin-top:18px;padding:12px 18px}.start-button b{font-size:18px;letter-spacing:1px}.start-button small{font-size:11px}.sub-actions{width:min(100%,320px);gap:12px;margin-top:18px}.sub-actions button{font-size:15px;padding:8px 0}.sub-actions button span{padding-left:4px}.title-footer{position:relative;left:auto;right:auto;bottom:auto;margin:auto 6% 0;height:auto;padding:16px 0;gap:12px;align-items:flex-start}.feature{min-width:0;flex:1;padding-right:6px}.feature strong{font-size:23px}.feature strong span{font-size:10px;display:block}.feature small{font-size:12px;line-height:1.6}.character-label{display:none}
 .hud{top:max(6px,env(safe-area-inset-top));left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;align-items:center}.health-panel{padding:5px 8px;gap:0;min-width:0}.health-panel>div{width:100%;min-width:0}.health-panel strong{font-size:14px;letter-spacing:0;white-space:nowrap}.health-panel strong small{font-size:14px;margin-left:5px}.health-panel>div>small{font-size:14px}.health-track{width:100%;height:6px;margin:4px 0 1px}.mini-portrait{display:none}.wave-panel>small{font-size:0;letter-spacing:0}.wave-panel>small #difficulty-label{font-size:11px}.wave-panel>strong{font-size:15px;letter-spacing:0;margin:0}.wave-panel b{font-size:25px}.wave-panel strong span{font-size:13px}#wave-progress{margin-top:3px}.score-panel{grid-column:1/-1;padding:0 6px;gap:12px;justify-content:flex-end;border:0;background:#13101eaa;max-width:none;flex-wrap:nowrap}.score-panel,.score-panel>span:first-child,.score-panel>span:nth-child(2){font-size:13px}.score-panel b{font-size:15px}.score-panel .sound-button{font-size:12px;padding:6px 8px;min-height:36px}.score-panel .sound-state{margin-left:4px}#pause{min-height:36px;min-width:40px;font-size:19px;padding:4px 10px}#boss-hud{top:112px;left:12%;width:76%}#boss-hud span{font-size:13px;letter-spacing:0}#boss-hud>div{margin-top:4px;height:6px}#wave-banner{font-size:24px;letter-spacing:2px}
 .bottom-hud{left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));gap:8px;pointer-events:none}.weapon-dock{min-width:0;max-width:calc(100% - 110px);padding:5px;gap:4px;pointer-events:auto;touch-action:pan-x}.weapon-dock>div{flex:0 0 54px;width:54px}.weapon-dock small{display:none}.weapon-dock .weapon-icon{font-size:24px;line-height:27px}.weapon-dock b{font-size:14px;letter-spacing:0}.ultimate-button{pointer-events:auto;flex:0 0 102px;width:102px;padding:6px;min-height:64px;text-align:center;justify-content:center}.ultimate-button small{font-size:0}.ultimate-button small:after{content:'秘技';font-size:15px}.ultimate-button b{display:none}.ultimate-button em{font-size:15px;letter-spacing:2px;white-space:nowrap}.ultimate-button>span{display:none}.move-hint{display:none}#joystick{width:86px;height:86px;left:max(14px,env(safe-area-inset-left));bottom:max(86px,calc(env(safe-area-inset-bottom) + 80px))}#joystick i{left:22px;top:22px}
 .modal{padding:10px}.modal-card{padding:18px;width:100%;max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain}.modal-eyebrow{font-size:12px;letter-spacing:2px}.modal-card h2{font-size:22px;line-height:1.4;margin:10px 0 14px}.modal-card p{font-size:15px;line-height:1.6}.upgrade-grid{grid-template-columns:minmax(0,1fr);gap:8px}.upgrade{padding:12px;min-width:0}.upgrade .weapon-icon{font-size:26px;margin:0 12px 2px 0}.upgrade strong{font-size:17px}.upgrade small{font-size:14px}.upgrade p,.upgrade .growth{font-size:14px;line-height:1.5;margin:6px 0}.difficulty h3{font-size:19px;margin:6px 0}.difficulty p{margin:4px 0}.modal-card .primary,.modal-card .secondary{font-size:16px;min-height:44px;padding:10px 14px;margin:8px 4px 0 0;min-width:0}.instructions{font-size:15px;grid-template-columns:1fr;gap:8px}.instructions span{margin-bottom:8px}kbd{font-size:14px}.roster{gap:8px}.roster figcaption{font-size:13px}.result-stats{gap:12px;justify-content:space-between}.result-stats b{font-size:24px}.result-stats small{font-size:12px;letter-spacing:0}#cutin{inset:15% 0}#cutin>div{padding:12px;left:4%;bottom:4%}#cutin h2{font-size:23px}#cutin p{font-size:12px;letter-spacing:2px}.outcome-copy{left:4%;right:4%;bottom:max(3%,env(safe-area-inset-bottom));padding:12px;gap:7px}.outcome-copy small{font-size:20px;letter-spacing:1px}.outcome-copy strong,.outcome-copy>span{font-size:15px;letter-spacing:0}
}
@media(max-height:500px) and (orientation:landscape){.hud{grid-template-columns:180px 140px minmax(0,1fr);align-items:start}.score-panel{grid-column:auto;gap:8px}.health-panel strong{font-size:13px}.health-panel>div>small{font-size:12px}#boss-hud{top:68px;left:30%;width:40%}.upgrade-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.modal-card{padding:14px}.modal-card h2{font-size:20px;margin:6px 0}.modal-card>p{margin:6px 0}.upgrade{padding:10px}.upgrade strong{font-size:15px}.upgrade .growth{font-size:13px}.title-copy{margin-top:18px}.title-footer{margin-top:10px}#joystick{bottom:80px}.outcome-copy{max-width:60%;padding:8px}.outcome-copy small{font-size:17px}.outcome-copy strong,.outcome-copy>span{font-size:13px}}
/* Floating touch stick never intercepts a second touch or switches to tap movement. */
#joystick{display:none!important;position:fixed;z-index:12;bottom:auto;width:86px;height:86px;transform:translate(-50%,-50%);pointer-events:none;background:#20152b55;border:2px solid #ead5ff99}#joystick.active{display:block!important}#joystick i{left:21px;top:21px;background:#d9b2f699}.weapon-dock{background:#13101e66;border-color:#ffffff30}.game-vignette.danger{box-shadow:inset 0 0 75px 20px #ff163c99;animation:danger-pulse 1.3s ease-in-out infinite}@keyframes danger-pulse{0%,100%{opacity:.35}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.game-vignette.danger{animation:none;opacity:.65}}
.growth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.growth-item{padding:14px;background:#ffffff08;border:1px solid #c6a1eb44;border-radius:8px}.growth-item h3{font-size:18px;margin:0 0 8px}.growth-item p{margin:8px 0}.growth-item button:disabled{cursor:default;opacity:.45}.matter-balance{color:#70ffc3!important;font-weight:700;font-size:22px!important}.hub-actions{display:flex;gap:12px;margin:18px 0}.hub-actions button{flex:1}#cutin{background-size:contain;background-repeat:no-repeat;background-color:#160c23}#cutin>div{bottom:2%;padding:12px}#cutin h2{font-size:clamp(22px,3vw,42px)}@media(max-width:650px){.growth-grid{grid-template-columns:1fr}.growth-item{padding:12px}.growth-item h3{font-size:17px}#cutin{inset:0;background-size:contain}#cutin>div{bottom:max(8%,env(safe-area-inset-bottom));left:4%;right:4%}#cutin h2{font-size:24px}#cutin p{letter-spacing:2px}}
#matter-count{color:#70ffc3!important;font-weight:700;white-space:nowrap}.growth-icon{display:inline-block;font-size:25px;vertical-align:middle;text-shadow:0 0 12px currentColor}.difficulty-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.difficulty:last-child{border-color:#ff4f8580}.difficulty:last-child h3{color:#ff70ba}#growth-top-back{float:right;margin:0 0 12px 12px}#secret-motion{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#cutin{background-image:none!important}#cutin>div{z-index:1}#wave-banner.warning{top:23%;left:50%;width:min(90%,760px);transform:translateX(-50%);background:linear-gradient(120deg,#211323f2,#391623f5);border:2px solid #ff9c85;padding:20px 16px 18px;box-shadow:0 0 38px #ff334f66;letter-spacing:1px;font-size:24px;text-shadow:none;overflow:hidden}#wave-banner.warning:before,#wave-banner.warning:after{content:'';position:absolute;left:0;right:0;height:7px;background:repeating-linear-gradient(125deg,#ffbb76 0 13px,#51232d 13px 26px)}#wave-banner.warning:before{top:0}#wave-banner.warning:after{bottom:0}.warning small{display:block;font-size:12px;color:#ffa0b1;margin-bottom:10px}.warning strong{display:block;font-size:clamp(18px,3vw,28px)}.beacon{display:block;position:relative;margin:0 auto 12px;width:32px;height:24px;border-radius:16px 16px 3px 3px;background:#bc294c;border-bottom:5px solid #f6bec0;box-shadow:0 0 24px #ff4668}.beacon:after{content:'';position:absolute;inset:-35px -80px;background:conic-gradient(from 0deg,transparent 0 65deg,#ff859c88 85deg,transparent 105deg 245deg,#ff859c88 265deg,transparent 285deg);animation:beacon-turn 1.1s linear infinite}@keyframes beacon-turn{to{transform:rotate(360deg)}}@media(max-width:650px){.difficulty-grid{grid-template-columns:1fr}.score-panel{gap:8px}.score-panel #matter-count{font-size:13px}.score-panel>span:nth-child(2){display:inline}.score-panel>span:nth-child(3){display:none}#wave-banner.warning{padding:15px 10px}#wave-banner.warning strong{font-size:18px}#wave-banner.warning small{font-size:10px}}@media(prefers-reduced-motion:reduce){.beacon:after{animation:none}}
/* Moon-pop UI: illustrated panels and shared raster item atlas. */
.item-icon{display:inline-block;flex:none;width:52px;height:52px;border-radius:9px;background-image:url('assets/ui-icons.png');background-size:400% 300%;background-position:calc(var(--ix)*100%/3) calc(var(--iy)*100%/2);vertical-align:middle;box-shadow:0 3px 0 #0006}
.cost-icon,.hud-matter{width:24px;height:24px;border-radius:4px;box-shadow:none}
#matter-count{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.modal-card{background:#181a22;border:2px solid #575968;border-radius:20px 5px 20px 5px;box-shadow:9px 9px 0 #07080be0}
.modal-eyebrow{color:#c2ff5a;font-weight:900;letter-spacing:3px}.modal-card h2{font-weight:950;letter-spacing:-1px}.modal-card .primary{background:#c2ff5a;color:#11151d;box-shadow:3px 3px 0 #08090c;border:2px solid #e4ffa5;font-weight:900}.modal-card .secondary{background:#303340;color:#f4f3ff;border:1px solid #656a7e}.modal-card button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.modal[data-kind='hub'] .modal-card,.modal[data-kind='growth'] .modal-card{background:repeating-linear-gradient(135deg,#ffffff03 0 1px,transparent 1px 14px),#181a22}
.matter-wallet{display:flex;align-items:center;gap:14px;padding:14px 20px;margin:20px 0;background:linear-gradient(115deg,#234436,#122a28);border-left:6px solid #87ffc4;border-radius:3px 18px 18px 3px;width:fit-content;max-width:100%;box-shadow:4px 4px 0 #080e12}.matter-wallet small{display:block;color:#a0dbbb;font-size:11px;letter-spacing:2px;font-weight:800}.matter-wallet strong{display:block;color:#a8ffd4;font-size:30px}.matter-wallet em{font-style:normal;font-size:15px}
.hub-actions{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.base-tile{position:relative;aspect-ratio:1.12;background-image:url('assets/ui-panels.png');background-size:200% 100%;border:2px solid #606775;border-radius:18px 4px;overflow:hidden;text-align:left;padding:0;isolation:isolate;transition:transform .18s,border-color .18s}.base-tile:hover{transform:translateY(-4px);border-color:#c2ff5a}.battle-tile{background-position:left}.enhance-tile{background-position:right}.base-tile:after{content:'';position:absolute;inset:35% 0 0;background:linear-gradient(transparent,#080a13 90%);z-index:-1}.base-tile>span{position:absolute;bottom:18px;left:22px;right:10px}.base-tile small{display:block;color:#c2ff5a;letter-spacing:2px;font-size:12px;font-weight:900}.base-tile strong{display:block;font-size:30px;color:#fff;font-weight:950}.base-tile em{display:block;color:#d5cce7;font-size:14px;font-style:normal}
.growth-item{position:relative;isolation:isolate;overflow:hidden;background:#232633;border:1px solid #595e70;border-radius:12px 3px;padding:18px}.growth-item:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#20232cf0,#20232cdf),url('assets/ui-panels.png') right center/200% 100%;opacity:.9}.growth-item h3{display:flex;align-items:center;gap:10px;font-size:19px;min-height:52px}.growth-item button{max-width:100%}.growth-item p{color:#e3def0}.growth-item .item-icon{width:44px;height:44px}.growth-item .cost-icon{width:22px;height:22px}.weapon-dock .item-icon{width:40px;height:40px}.upgrade>.item-icon{width:60px;height:60px;margin-bottom:10px}
#cutin{inset:0;animation:none;background:#0c0a19!important;overflow:hidden}.secret-still{width:100%;height:100%;object-fit:cover;object-position:50% 43%;display:block}#cutin>div{background:#130d28bb;bottom:4%;left:4%;padding:16px;border-left:5px solid #ff8fdf}
@media(min-aspect-ratio:3/2){.secret-still{object-fit:contain;background:radial-gradient(ellipse,#4d224d,#100d20)}#cutin>div{bottom:5%;left:5%}}
@media(max-width:650px){.hub-actions{gap:10px}.base-tile{aspect-ratio:.65}.base-tile>span{bottom:14px;left:12px}.base-tile strong{font-size:22px}.base-tile small{font-size:10px;letter-spacing:1px}.base-tile em{font-size:12px}.matter-wallet{padding:10px 14px;margin:14px 0}.matter-wallet strong{font-size:25px}.weapon-dock .item-icon{width:30px;height:30px}.growth-item h3{font-size:18px}.modal-card{border-radius:16px 4px}#cutin h2{font-size:24px}}
@media(prefers-reduced-motion:reduce){.base-tile{transition:none}}
.base-tile{aspect-ratio:1.4}.modal[data-kind='hub'] .modal-card{max-width:920px}
@media(max-width:650px){.base-tile{aspect-ratio:.85}.base-tile strong{font-size:20px}.base-tile em{font-size:11px}.hub-actions{margin:18px 0}}
/* Square outcome art keeps faces large in both orientations. */
#outcome{background:radial-gradient(ellipse at center,#382345,#090611 75%);animation:none;height:100dvh}
#outcome-image{object-fit:contain;object-position:50% 44%}
.outcome-copy{bottom:max(2%,env(safe-area-inset-bottom));padding:12px 18px;gap:5px;max-width:90%;background:#120b23c9}
.outcome-copy small{font-size:clamp(16px,2vw,25px);letter-spacing:3px}.outcome-copy strong{font-size:clamp(14px,1.6vw,20px)}
@media(max-aspect-ratio:3/4){#outcome-image{object-fit:contain}.outcome-copy{left:3%;right:3%;bottom:max(2%,env(safe-area-inset-bottom));padding:10px 12px}.outcome-copy small{font-size:17px}.outcome-copy strong{font-size:14px}.outcome-copy>span{font-size:14px}}
/* Compact choice cards and a persistent growth toolbar. */
.modal[data-kind='growth'] .modal-card{padding-top:0}
.growth-sticky{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;background:#1b1728;border-bottom:1px solid #77dbad66;box-shadow:0 10px 20px #100c19aa}
.growth-sticky .matter-wallet{margin:0;padding:7px 12px}.growth-sticky .matter-wallet strong{font-size:23px}.growth-sticky .secondary{margin:0;min-width:90px}.growth-sticky .item-icon{width:34px;height:34px}
.weapon-choice{position:relative;min-width:0}.weapon-choice>.upgrade{width:100%;height:100%;padding-right:42px}.weapon-help{position:absolute;top:8px;right:8px;width:34px;height:34px;border:1px solid #b795cf;border-radius:50%;background:#282036;color:#fff;font:700 19px sans-serif}
#weapon-help-dialog{max-width:min(90vw,520px);max-height:80dvh;overflow:auto;background:#211a30;color:#fff;border:1px solid #b98acb;border-radius:14px;padding:24px}#weapon-help-dialog::backdrop{background:#07050ddb}#weapon-help-copy{white-space:pre-line;line-height:1.8}
.base-tile{background-size:200% auto;background-position:right center;aspect-ratio:1.4}.battle-tile{background-image:url('assets/battle-panel.png');background-size:cover;background-position:center}.enhance-tile{background-size:200% auto;background-position:right center}
@media(max-width:650px){.base-tile{aspect-ratio:1.1}.growth-sticky{gap:6px}.growth-sticky .matter-wallet small{display:none}.growth-sticky .matter-wallet strong{font-size:19px}.growth-sticky .matter-wallet{padding:6px}.growth-sticky .secondary{min-width:70px;padding:8px;font-size:15px}.modal[data-kind='upgrade']{padding:10px}.modal[data-kind='upgrade'] .modal-card{padding:14px;max-height:calc(100dvh - 20px)}.modal[data-kind='upgrade'] h2{font-size:21px;margin:6px 0}.modal[data-kind='upgrade'] .modal-eyebrow{font-size:12px}.modal[data-kind='upgrade'] .upgrade-intro{font-size:14px;line-height:1.3;margin:8px 0}.choices{display:grid;grid-template-columns:1fr;gap:8px}.choices .weapon-detail{display:none}.choices .upgrade{display:grid;grid-template-columns:42px 1fr;gap:4px 10px;padding:12px 42px 12px 12px;min-height:98px;text-align:left}.choices .upgrade>.item-icon{grid-row:1/4;width:42px;height:42px;margin:0;align-self:center}.choices .upgrade strong{font-size:16px}.choices .upgrade small{font-size:13px;line-height:1.2}.choices .choice-action{color:#b1ffcf}.weapon-help{width:32px;height:32px}}
@media(max-height:500px) and (orientation:landscape){.modal[data-kind='upgrade']{padding:8px}.modal[data-kind='upgrade'] .modal-card{padding:12px;max-height:calc(100dvh - 16px)}.choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.choices .weapon-detail{display:none}.choices .upgrade{padding:12px 38px 12px 10px;min-height:140px}.choices .upgrade>.item-icon{width:38px;height:38px}.choices .upgrade strong{font-size:14px}.choices .upgrade small{font-size:12px}.modal[data-kind='upgrade'] h2{margin:4px 0;font-size:20px}.modal[data-kind='upgrade'] .upgrade-intro{margin:6px 0;font-size:13px}}

@media(max-height:500px) and (orientation:landscape){.choices .upgrade{display:flex;flex-direction:column;align-items:flex-start;gap:5px}.choices .upgrade>.item-icon{display:block;margin:0}.choices .upgrade strong{margin:0}}
