:root{--accent:#20a99b;--accent-strong:#08796f;--amber:#ffbf47;--border:#141a1f24;--danger:#e85d4f;--fire:#ff6b2c;--ink:#172026;--muted:#66727d;--panel:#20262c;--paper:#f7f9f8;--stage:#8ed7ef;--white:#fff;color:var(--ink);background:var(--paper);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:16px/1.45 system-ui,Segoe UI,Roboto,Arial,sans-serif}*,:before,:after{box-sizing:border-box}body{min-width:320px;margin:0;overflow:hidden}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}h2,p{margin:0}#app{min-height:100svh}.app-shell{background:linear-gradient(90deg,#1720260b 1px,#0000 1px) 0 0/52px 52px,linear-gradient(#eef7f3,#e8f1f6 58%,#f9faf7);grid-template-rows:auto minmax(0,1fr);min-height:100svh;display:grid;position:relative;overflow:hidden}.top-bar{min-height:82px;color:var(--white);background:linear-gradient(180deg, #ffffff14, transparent), var(--panel);z-index:6;border-bottom:1px solid #ffffff1a;grid-template-columns:auto minmax(210px,1fr) auto auto;align-items:center;gap:12px;padding:10px 16px;display:grid;box-shadow:0 10px 30px #1720262e}.brand-mark{background:linear-gradient(135deg, #ffbf47f2, #20a99be6), var(--amber);border-radius:14px;place-items:center;width:58px;height:58px;display:grid;box-shadow:0 12px 28px #0003,inset 0 0 0 2px #ffffff52}.brand-mark svg{width:45px;height:45px}.run-strip{background:#ffffff12;border:1px solid #ffffff1f;border-radius:10px;grid-template-columns:minmax(142px,220px) minmax(150px,1fr);align-items:center;gap:12px;min-width:0;padding:9px 12px;display:grid}.run-title{gap:2px;min-width:0;display:grid}.run-title span,.meter-row,.inventory-pill span:not(.asset-icon,.heart-tray,.bullet-tray),.score-card span,.level-drawer-header span,.level-progress-summary span{color:#ffffffb3;text-transform:uppercase;font-size:12px;font-weight:850}.run-title strong{min-width:0;color:var(--white);text-overflow:ellipsis;white-space:nowrap;font-size:18px;line-height:1.1;overflow:hidden}.meter-stack{gap:8px;min-width:0;display:grid}.meter-row{justify-content:space-between;gap:10px;display:flex}.dual-meter{grid-template-columns:minmax(0,1fr);gap:5px;display:grid}.difficulty-fill,.progress-fill{--difficulty:1%;--progress:0%;background:#ffffff24;border-radius:999px;height:8px;overflow:hidden}.difficulty-fill span,.progress-fill span{border-radius:inherit;height:100%;transition:width .16s;display:block}.difficulty-fill span{width:var(--difficulty);background:linear-gradient(90deg,#20a99b,#ffbf47,#e85d4f)}.progress-fill span{width:var(--progress);background:linear-gradient(90deg,#66e3ff,#ffbf47)}.icon-button,.touch-button{color:inherit;-webkit-tap-highlight-color:transparent;background:0 0;border:0}.icon-button{width:42px;height:42px;color:var(--white);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#ffffff14;border:1px solid #ffffff24;border-radius:10px;place-items:center;transition:background .14s,box-shadow .14s,border-color .14s,transform .14s;display:grid;position:relative}.icon-button:hover:not(:disabled),.icon-button:focus-visible,.touch-button:hover,.touch-button:focus-visible{border-color:#ffbf47b3;outline:none;box-shadow:0 10px 24px #0000002e}.icon-button:active:not(:disabled),.touch-button:active,.touch-button.is-active{transform:translateY(1px)}.icon-button.compact{width:40px;height:40px}.icon-button svg,.touch-button svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;width:22px;height:22px}.button-icon{place-items:center;display:grid}.shortcut-badge{color:#102326;pointer-events:none;background:#ffffffeb;border:1px solid #ffffff8c;border-radius:999px;place-items:center;min-width:22px;height:18px;padding:0 5px;font-size:10px;font-weight:900;line-height:1;display:grid;position:absolute;bottom:-7px;right:-5px;box-shadow:0 4px 10px #00000029}.icon-button.is-pulsing,.touch-button.is-pulsing,.overlay-button.is-pulsing{animation:.26s both actionPulse}.fire-action{color:#ffe2bf;border-color:#ff6b2c57}.top-scoreboard{grid-template-columns:minmax(94px,auto) minmax(94px,auto);justify-self:end;gap:7px;display:grid}.score-card{background:#ffffff14;border:1px solid #ffffff1f;border-radius:10px;gap:3px;min-width:94px;padding:8px 10px;display:grid}.score-card strong{color:var(--white);text-align:right;font-size:22px;line-height:1}.primary-score{border-color:#ffbf4757}.quick-hud{align-items:center;gap:7px;min-width:0;min-height:auto;padding:0;display:flex}.inventory-pill{min-height:38px;color:var(--ink);background:#ffffffe0;border:1px solid #ffffff29;border-radius:999px;align-items:center;gap:6px;padding:6px 8px;display:flex;box-shadow:0 7px 16px #0000001f}.inventory-pill strong{white-space:nowrap;font-size:16px;line-height:1}.inventory-pill span:not(.asset-icon,.heart-tray,.bullet-tray){color:var(--muted)}.asset-icon,.life-heart,.fire-bullet{place-items:center;display:inline-grid}.asset-icon svg{width:25px;height:25px;display:block}.heart-tray,.bullet-tray{align-items:center;gap:3px;display:flex}.life-heart svg{filter:drop-shadow(0 2px 3px #c9184a38);width:20px;height:20px;display:block}.life-heart:not(.is-filled){opacity:.22;filter:grayscale()}.fire-bullet svg{width:16px;height:16px;display:block}.fire-bullet:not(.is-loaded){opacity:.22;filter:grayscale()}.has-fire .fire-action,.has-fire .touch-button.fire,.has-fire .fire-pill{animation:1.4s ease-in-out infinite emberPulse}.level-drawer{z-index:10;color:var(--white);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#1f262cf0;border:1px solid #ffffff29;border-radius:12px;gap:12px;padding:14px;animation:.16s both panelIn;display:grid;position:absolute;top:92px;left:18px;right:18px;box-shadow:0 24px 70px #00000057}.level-drawer[hidden]{display:none}.level-drawer-header{justify-content:space-between;align-items:flex-end;gap:16px;display:flex}.level-drawer-header div{gap:2px;display:grid}.level-drawer-header strong{font-size:20px}.level-drawer-header small{color:#102326;background:var(--amber);border-radius:999px;flex:none;padding:6px 10px;font-size:12px;font-weight:900}.level-progress-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.level-progress-summary div{background:#ffffff12;border:1px solid #ffffff1f;border-radius:10px;gap:2px;min-width:0;padding:9px 10px;display:grid}.level-progress-summary strong{min-width:0;color:var(--white);text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:1.1;overflow:hidden}.level-list{scrollbar-width:thin;scroll-behavior:smooth;background:linear-gradient(90deg,#ffbf472e 1px,#0000 1px) 0/82px 2px repeat-x,radial-gradient(circle at 20% 20%,#20a99b2e,#0000 24%),radial-gradient(circle at 76% 82%,#ffbf4729,#0000 28%);border-radius:12px;grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:8px;max-height:310px;padding:10px 4px 4px;display:grid;position:relative;overflow:auto}.level-button{min-height:70px;color:var(--white);background:#ffffff14;border:1px solid #ffffff24;border-radius:9px;align-content:center;justify-items:center;gap:3px;font-size:14px;font-weight:900;transition:background .14s,border-color .14s,color .14s,opacity .14s,transform .14s;display:grid}.level-number{font-size:18px;line-height:1}.level-tag{color:#ffffff80;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;max-width:100%;font-size:9px;line-height:1;overflow:hidden}.level-stars{color:#ffffff38;gap:1px;font-size:13px;line-height:1;display:flex}.level-stars .is-earned,.result-stars .is-earned{color:var(--amber);filter:drop-shadow(0 2px 5px #ffbf475c)}.level-best{color:#ffffff94;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:10px;font-weight:850;line-height:1;overflow:hidden}.level-button:hover,.level-button:focus-visible{border-color:#ffbf47b3;outline:none}.level-button.is-complete{background:#20a99b33;border-color:#20a99b7a}.level-button.is-boss-level{background:linear-gradient(#ff6b2c47,#ffffff0f),#ffffff14;border-color:#ff6b2cb3;box-shadow:inset 0 0 0 1px #ffbf4733}.level-button.is-boss-level .level-tag{color:#ffbf47}.level-button.is-mastered{border-color:#ffbf47b8}.level-button.is-active{color:#102326;border-color:var(--amber);background:var(--amber)}.level-button.is-active .level-best,.level-button.is-active .level-stars,.level-button.is-active .level-tag{color:#10232694}.level-button.is-active .level-stars .is-earned{color:#9a5b00}.level-button.is-locked{color:#ffffff59;background:#ffffff09;border-color:#ffffff14}.level-button.is-locked .level-stars{opacity:.24}.level-button:active{transform:translateY(1px)}.game-area{place-items:center;min-width:0;min-height:0;padding:14px 18px 18px;display:grid}.stage-frame{aspect-ratio:16/9;width:min(100%,177.778svh - 224px);max-width:1660px;display:grid;position:relative}.screen-actions{z-index:3;pointer-events:auto;flex-wrap:wrap;justify-content:flex-end;gap:10px;max-width:min(420px,48vw);display:flex;position:absolute;top:max(16px,2.2vw);right:max(18px,3vw)}.screen-button{background:#17202694;border-color:#ffffff4d;border-radius:999px;width:48px;height:48px;box-shadow:0 12px 28px #0003}.boss-hud{--boss-health:100%;z-index:4;width:min(360px,42vw);color:var(--white);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);pointer-events:none;background:#172026b3;border:1px solid #ffbf4757;border-radius:999px;grid-template-columns:minmax(92px,auto) minmax(110px,1fr) auto;align-items:center;gap:10px;padding:10px 12px;display:grid;position:absolute;top:max(16px,2.2vw);left:max(18px,3vw);box-shadow:0 16px 34px #00000038}.boss-hud[hidden]{display:none}.boss-hud-title{gap:1px;min-width:0;display:grid}.boss-hud-title span,.boss-hud small{color:#ffffffad;text-transform:uppercase;font-size:10px;font-weight:900;line-height:1}.boss-hud-title strong{color:var(--amber);text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.1;overflow:hidden}.boss-meter{background:#ffffff24;border-radius:999px;height:10px;overflow:hidden}.boss-meter span{width:var(--boss-health);border-radius:inherit;background:linear-gradient(90deg,#ffbf47,#ff6b2c,#ff5d73);height:100%;transition:width .16s;display:block}.game-host{aspect-ratio:16/9;background:var(--stage);border:4px solid #14191ef5;border-radius:10px;width:100%;height:100%;overflow:hidden;transform:translateZ(0);box-shadow:0 24px 60px #1720263d,inset 0 0 0 1px #ffffff29}.game-host canvas{display:block;width:100%!important;height:100%!important}.state-overlay{pointer-events:none;place-items:center;padding:24px;display:grid;position:absolute;inset:0}.state-overlay[hidden]{display:none}.state-panel{pointer-events:auto;width:min(430px,90%);color:var(--white);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#181f26c7;border:1px solid #fff3;border-radius:10px;gap:12px;padding:18px;animation:.18s both panelIn;display:grid;box-shadow:0 26px 80px #00000057}.state-panel span{color:var(--amber);text-transform:uppercase;font-size:12px;font-weight:900}.state-panel strong{font-size:30px;line-height:1}.state-panel p{color:#ffffffb8;font-weight:700}.result-panel{background:#ffffff14;border:1px solid #ffffff24;border-radius:10px;gap:10px;padding:12px;display:grid}.result-panel[hidden]{display:none}.result-stars{justify-content:center;gap:8px;font-size:34px;line-height:1;display:flex}.result-stars span{color:#ffffff47;font-size:inherit;text-transform:none;line-height:1}.result-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;display:grid}.result-grid div{background:#ffffff14;border-radius:8px;gap:2px;min-width:0;padding:8px;display:grid}.result-grid strong{text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:1.1;overflow:hidden}.star-criteria{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;display:grid}.star-criteria span{color:#ffffff7a;background:#ffffff0f;border:1px solid #ffffff1f;border-radius:999px;place-items:center;min-height:28px;font-size:11px;font-weight:900;display:grid}.star-criteria .is-earned{color:#102326;border-color:var(--amber);background:var(--amber)}.overlay-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:6px;display:grid}.overlay-button{min-height:42px;color:var(--white);background:#ffffff14;border:1px solid #ffffff29;border-radius:8px;font-weight:900}.overlay-button.primary{color:#102326;border-color:var(--amber);background:var(--amber)}.overlay-button:hover:not(:disabled),.overlay-button:focus-visible{border-color:#ffbf47b8;outline:none}.touch-controls{pointer-events:none;justify-content:space-between;align-items:center;gap:16px;display:flex;position:absolute;bottom:max(18px,3vw);left:max(20px,3vw);right:max(20px,3vw)}.touch-cluster{pointer-events:auto;gap:10px;display:flex}.dpad-cluster{align-items:flex-end}.touch-cluster.actions{margin-left:auto}.touch-button{width:68px;height:68px;color:var(--white);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#1720268f;border:1px solid #ffffff4d;border-radius:999px;place-items:center;transition:border-color .14s,box-shadow .14s,transform .14s;display:grid;position:relative;box-shadow:0 12px 28px #0003}.touch-button.primary{color:#102326;background:#ffbf47e6;border-color:#ffbf47bf;width:86px;height:86px}.touch-button.fire{color:#fff3e0;background:#ff6b2cdb;border-color:#ff6b2ca6;width:74px;height:74px}.touch-button.is-active{border-color:var(--accent-strong);transform:translateY(1px)scale(.96);box-shadow:0 5px 12px #17202629,0 0 0 5px #ffbf4733}@keyframes actionPulse{0%{transform:scale(1)}44%{transform:scale(1.12);box-shadow:0 12px 30px #0003,0 0 0 7px #ffbf4747}to{transform:scale(1)}}@keyframes emberPulse{0%,to{box-shadow:0 0 #ff6b2c00}50%{box-shadow:0 0 22px #ff6b2c61}}@keyframes panelIn{0%{opacity:0;transform:translateY(10px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.settings-dialog{width:min(520px,100vw - 32px);color:var(--ink);background:0 0;border:0;border-radius:10px;padding:0}.settings-dialog::backdrop{background:#0f121575}.settings-panel{border:1px solid var(--border);background:var(--white);border-radius:10px;gap:18px;padding:18px;display:grid;box-shadow:0 30px 80px #17202647}.settings-panel header,.toggle-row,.range-row{justify-content:space-between;align-items:center;gap:18px;display:flex}.settings-panel h2{color:var(--ink);font-size:20px}.shortcut-panel{gap:12px;padding-top:4px;display:grid}.shortcut-panel header{justify-content:space-between;align-items:center;gap:12px;display:flex}.shortcut-panel h3{color:var(--ink);margin:0;font-size:16px}.shortcut-reset,.shortcut-key{border:1px solid var(--border);color:var(--ink);background:#f3f6f4;border-radius:8px;font-weight:850}.shortcut-reset{min-height:34px;padding:0 12px}.shortcut-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.shortcut-row{border:1px solid var(--border);background:#fbfcfb;border-radius:8px;justify-content:space-between;align-items:center;gap:10px;min-width:0;padding:8px;display:flex}.shortcut-name{min-width:0;color:var(--ink);align-items:center;gap:8px;font-size:13px;font-weight:800;display:flex}.shortcut-icon{width:24px;height:24px;color:var(--accent-strong);flex:none;place-items:center;display:grid}.shortcut-icon svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;width:18px;height:18px}.shortcut-key{min-width:68px;min-height:32px;padding:0 10px}.shortcut-key.is-listening{border-color:var(--amber);color:#102326;background:var(--amber)}.settings-panel .icon-button{color:var(--ink);border-color:var(--border);background:#f3f6f4}.toggle-row,.range-row{color:var(--ink);font-weight:700}.toggle-row input{width:22px;height:22px;accent-color:var(--accent-strong)}.range-row input{width:170px;accent-color:var(--accent-strong)}@media (width<=1180px){body{overflow:auto}.app-shell{min-height:100svh;overflow:visible}.top-bar{grid-template-columns:auto minmax(0,1fr) auto}.quick-hud,.top-scoreboard{grid-column:2/4;justify-self:stretch}.quick-hud{flex-wrap:wrap}.score-card{min-width:0}.level-list{grid-template-columns:repeat(auto-fill,minmax(68px,1fr))}.game-host{width:100%}}@media (width<=760px){.top-bar{grid-template-columns:auto minmax(0,1fr);gap:10px;padding:10px}.brand-mark{width:50px;height:50px}.run-strip{grid-template-columns:1fr;gap:8px}.quick-hud,.top-scoreboard{grid-column:1/-1}.screen-actions .icon-button{width:100%}.screen-actions{gap:8px;max-width:176px;top:14px;right:14px}.screen-button{width:42px;height:42px}.top-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-hud{padding:8px 10px}.inventory-pill{min-height:36px;padding:6px 8px}.bullet-tray{display:none}.level-drawer{top:228px;left:10px;right:10px}.level-list{grid-template-columns:repeat(4,minmax(0,1fr));max-height:260px}.boss-hud{border-radius:12px;grid-template-columns:minmax(0,1fr);width:auto;left:14px;right:14px}.game-area{padding:10px}.touch-controls{bottom:14px;left:14px;right:14px}.touch-button{width:58px;height:58px}.touch-button.primary{width:74px;height:74px}.touch-button.fire{width:64px;height:64px}.shortcut-list{grid-template-columns:1fr}}
