:root{--bg: #1b1230;--panel: rgba(255, 255, 255, .08);--accent: #ffb545;--good: #4ade80;--bad: #f87171;--text: #f5f0ff;color-scheme:dark}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Apple SD Gothic Neo,Malgun Gothic,sans-serif;overscroll-behavior:none;touch-action:none}#app{position:fixed;top:0;right:0;bottom:0;left:0}#stage{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:block;touch-action:none}#hud{position:absolute;top:calc(env(safe-area-inset-top) + 10px);left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.hud-toy{font-weight:700;font-size:18px;background:var(--panel);padding:6px 12px;border-radius:999px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.hud-metrics{display:flex;gap:6px}.hud-chip{font-weight:600;font-size:14px;background:var(--panel);padding:6px 10px;border-radius:999px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);transition:transform .15s ease}.hud-chip.pop{transform:scale(1.25)}.hud-btn{pointer-events:auto;font:inherit;color:inherit;border:none;cursor:pointer;padding:6px 10px;line-height:1}.hud-btn:active{transform:scale(.9)}.settings-list{display:flex;flex-direction:column;gap:10px;width:100%;max-width:280px;margin-bottom:8px}.toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;font-size:16px;font-weight:600;color:var(--text);background:var(--panel);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:14px 16px}.toggle-state{font-size:14px;font-weight:700;color:var(--good)}.toggle[aria-pressed=false]{opacity:.55}.toggle[aria-pressed=false] .toggle-state{color:var(--bad)}.setting-block{background:var(--panel);border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:14px 16px;text-align:left}.setting-label{display:block;font-size:16px;font-weight:600;margin-bottom:10px}.seg{display:flex;gap:6px}.seg-btn{flex:1;font-family:inherit;font-size:14px;font-weight:700;color:var(--text);background:#ffffff0f;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:9px 4px;cursor:pointer}.seg-btn[aria-pressed=true]{color:#2a1a12;background:var(--accent);border-color:var(--accent)}.setting-hint{margin:10px 0 0;font-size:12px;line-height:1.45;opacity:.6}#progress{position:absolute;top:calc(env(safe-area-inset-top) + 48px);left:12px;right:12px;height:6px;border-radius:999px;background:var(--panel);overflow:hidden}#progress-bar{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--good));transition:width .35s ease}#stage-bar{position:absolute;top:calc(env(safe-area-inset-top) + 60px);left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;font-weight:700;pointer-events:none}#stage-bar.hidden{display:none}#stage-name{font-weight:600;opacity:.6;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#stage-timer.urgent{color:var(--bad);animation:blink .8s steps(2,start) infinite}@keyframes blink{50%{opacity:.35}}#toast{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) scale(.85);padding:12px 22px;border-radius:999px;background:#0f081ed9;border:1px solid rgba(255,255,255,.16);font-size:18px;font-weight:700;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease;z-index:4}#toast.show{opacity:1;transform:translate(-50%,-50%) scale(1)}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:#0f081edb;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:5}.overlay.hidden{display:none}.overlay h1{font-size:34px;margin:0}.subtitle{opacity:.75;margin:0 0 8px;max-width:320px}.mode-tabs{display:flex;gap:6px;padding:5px;border-radius:999px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);margin-bottom:6px}.mode-tab{font-family:inherit;font-size:14px;font-weight:700;color:var(--text);background:transparent;border:none;border-radius:999px;padding:9px 18px;cursor:pointer}.mode-tab[aria-pressed=true]{color:#2a1a12;background:var(--accent)}#picker-list,#stage-list,#shop-list{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;max-width:440px}#picker-list.hidden,#stage-list.hidden,#shop-list.hidden{display:none}#shop-list{flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;width:100%;max-width:340px;gap:10px;max-height:52vh;overflow-y:auto;padding-right:2px}.shop-head{display:flex;flex-direction:column;gap:2px;text-align:left}.shop-balance{font-size:20px;font-weight:800;color:var(--accent)}.shop-hint{font-size:12px;opacity:.55}#shop-items{display:flex;flex-direction:column;gap:10px}.shop-card{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border-radius:16px;font-family:inherit;color:var(--text);background:var(--panel);border:1px solid rgba(255,255,255,.12);text-align:left;cursor:pointer;transition:transform .12s ease}.shop-card:active:not(:disabled){transform:scale(.97)}.shop-card:disabled{cursor:default}.shop-card.poor{opacity:.5}.shop-card.poor .price{color:var(--bad)}.shop-card.owned{border-color:#ffffff47}.shop-card.equipped{border-color:var(--accent);background:#ffffff1f}.shop-card .emoji{font-size:28px;flex:none}.shop-card .body{flex:1;min-width:0}.shop-card .name{font-weight:700;font-size:15px}.shop-card .desc{font-size:12px;opacity:.62;margin-top:2px;line-height:1.35}.shop-card .price{flex:none;font-size:13px;font-weight:700;color:var(--accent);text-align:right;white-space:nowrap}#stage-list{flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;width:100%;max-width:340px;gap:10px}.stage-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;width:100%;padding:6px 4px 2px;margin-top:4px}.stage-section-head:first-child{margin-top:0}.stage-section-head span{font-weight:800;font-size:13px;letter-spacing:.02em}.stage-section-head small{font-size:11px;opacity:.55}.stage-card{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;border-radius:16px;font-family:inherit;color:var(--text);background:var(--panel);border:1px solid rgba(255,255,255,.12);text-align:left;cursor:pointer;transition:transform .12s ease,background .2s ease}.stage-card:active{transform:scale(.97)}.stage-card.locked{opacity:.45;cursor:not-allowed}.stage-card .emoji{font-size:30px;flex:none}.stage-card .body{flex:1;min-width:0}.stage-card .name{font-weight:700;font-size:16px}.stage-card .meta{font-size:12px;opacity:.65;margin-top:2px}.stage-card .mark{flex:none;font-size:13px;font-weight:700;color:var(--accent);text-align:right}.btn-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center}#stage-next.hidden,#settings-home.hidden{display:none}.picker-card{width:130px;padding:18px 12px;border-radius:20px;background:var(--panel);border:1px solid rgba(255,255,255,.12);cursor:pointer;transition:transform .12s ease,background .2s ease}.picker-card:active{transform:scale(.95);background:#ffb54533}.picker-card .emoji{font-size:44px}.picker-card .name{margin-top:6px;font-weight:700}.picker-card .parts{font-size:12px;opacity:.6;margin-top:2px}.picker-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:18px}.ghost-btn{display:inline-block;font-family:inherit;font-weight:600;font-size:14px;color:var(--text);background:transparent;opacity:.7;text-decoration:none;border:1px solid rgba(255,255,255,.18);padding:8px 16px;border-radius:999px;cursor:pointer}.ghost-btn:active{transform:scale(.96)}.badge{font-size:72px;animation:pop .5s ease}@keyframes pop{0%{transform:scale(0)}70%{transform:scale(1.2)}to{transform:scale(1)}}button{font-family:inherit;font-weight:700;font-size:17px;color:#2a1a12;background:var(--accent);border:none;border-radius:999px;padding:14px 28px;cursor:pointer}button:active{transform:scale(.96)}
