:root{--bg-top: #f3e9ee;--bg-bottom: #d9cfe2;--ink: #4a3b52;--chip: rgba(255, 255, 255, .72);--chip-border: rgba(120, 90, 130, .18);--chip-active: #6b3f5e;--chip-active-ink: #fff4f7}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:linear-gradient(180deg,var(--bg-top),var(--bg-bottom));color:var(--ink);font-family:PingFang SC,Microsoft YaHei,system-ui,sans-serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}#app{position:fixed;inset:0}#stage{position:absolute;inset:0;touch-action:none}#stage canvas{display:block;width:100%;height:100%}.fade{position:absolute;left:0;right:0;bottom:0;height:26%;background:linear-gradient(180deg,rgba(217,207,226,0),var(--bg-bottom) 88%);pointer-events:none}.toolbar{position:absolute;top:14px;display:flex;flex-direction:column;gap:10px;z-index:5}.toolbar.left{left:14px;flex-direction:row}.toolbar.right{right:14px}.toolbar button{width:58px;min-height:52px;padding:6px 4px 5px;display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid var(--chip-border);border-radius:12px;background:var(--chip);color:var(--ink);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font:inherit;font-size:11px;line-height:1.1;cursor:pointer;box-shadow:0 2px 10px #50325a14;transition:transform .12s ease,background .15s ease,color .15s ease}.toolbar button:hover:not(:disabled){transform:translateY(-1px)}.toolbar button:active:not(:disabled){transform:scale(.96)}.toolbar button[aria-pressed=true]{background:var(--chip-active);color:var(--chip-active-ink);border-color:transparent}.toolbar button:disabled{opacity:.42;cursor:not-allowed}#stage{opacity:0;transform:scale(1.015);transition:opacity .7s ease .1s,transform 1.1s cubic-bezier(.2,.7,.2,1) .1s}#app[data-state=ready] #stage{opacity:1;transform:none}.toolbar{transition:opacity .5s ease .45s}#app[data-state=loading] .toolbar{opacity:0;pointer-events:none}#loader{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:16px;transition:opacity .45s ease,visibility 0s linear .45s}#app[data-state=ready] #loader{opacity:0;visibility:hidden}.loader-card{width:min(300px,72vw);display:flex;flex-direction:column;gap:14px;animation:loader-float 2.6s ease-in-out infinite}.loader-card img{width:100%;height:auto;display:block;border-radius:18px;box-shadow:0 14px 36px #6b3f5e38,0 0 0 4px #ffffffb3}.loader-bar{height:6px;border-radius:6px;overflow:hidden;background:#ffffffb3;box-shadow:inset 0 0 0 1px #785a821f}.loader-bar i{display:block;height:100%;width:100%;transform-origin:left center;transform:scaleX(0);background:linear-gradient(90deg,#f3a6c4,#b98be0,#7fa4f0);border-radius:inherit}.loader-text{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;letter-spacing:.04em;color:var(--ink)}#loader-pct{font-variant-numeric:tabular-nums;opacity:.7}@keyframes loader-float{50%{transform:translateY(-6px)}}@media(prefers-reduced-motion:reduce){.loader-card{animation:none}#stage{transition:opacity .3s ease;transform:none}}#stage[data-cursor=poke]{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M9 2.5a2.5 2.5 0 0 1 5 0V13l7 1.4c2.6.5 3.9 2.6 3.2 5.2L22.6 26H11.4L6.3 18.6c-1-1.5-.5-3.2 1.2-3.6l1.5-.3z' fill='%23fff6f8' stroke='%236b3f5e' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 11 1,pointer}#stage[data-cursor=grab]{cursor:grab}#stage[data-cursor=grabbing]{cursor:grabbing}@media(max-width:520px){.toolbar button{width:50px;min-height:46px;font-size:10px}.toolbar button svg{width:22px;height:19px}}.toolbar a.tool-link{width:58px;min-height:52px;padding:6px 4px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid var(--chip-border);border-radius:12px;background:var(--chip);color:var(--ink);text-decoration:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-size:11px;line-height:1.1;box-shadow:0 2px 10px #50325a14;transition:transform .12s ease,color .15s ease}.toolbar a.tool-link:hover{transform:translateY(-1px);color:var(--chip-active)}.toolbar a.tool-link svg{opacity:.88}@media(max-width:520px){.toolbar a.tool-link{width:50px;min-height:46px;font-size:10px}.toolbar a.tool-link svg{width:auto;height:19px}}body.rhythm-playing .toolbar.right button:not(#rhythm-tool){display:none}.rhythm-lane{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:3}.rhythm-track{position:absolute;left:0;top:0;height:0}.rhythm-track:before{content:"";position:absolute;inset:-1px 0 auto;height:2px;background:linear-gradient(90deg,rgba(155,110,150,.6),rgba(255,240,246,.75) 35%,transparent)}.rhythm-target{position:absolute;left:-18px;top:-18px;width:36px;height:36px;border:2px solid rgba(255,244,248,.8);border-radius:50%;box-shadow:0 0 0 1px #8764888c;background:#fff0f61a}.rhythm-target.following{z-index:2;border-color:transparent;background:none;box-shadow:none}.rhythm-note{position:absolute;left:0;top:-18px;height:36px;will-change:transform;filter:opacity(.72);--note-fill: #ee9fbc}.rhythm-note.single{--note-fill: #a88bc4}.rhythm-note span{position:absolute;left:0;top:0;width:36px;height:36px;display:grid;place-items:center}.rhythm-note span:before,.rhythm-note span:after{content:"";position:absolute;width:30px;height:30px;box-sizing:border-box;border-radius:50%}.rhythm-note span:before{border:2px solid #fffbfd;background:var(--note-fill)}.rhythm-note span:after{border:1.5px solid var(--note-fill);transform:scale(var(--approach-scale, 1));opacity:var(--approach-opacity, 0)}.rhythm-note.held span:after{opacity:0}.rhythm-note.single:before{content:"";position:absolute;left:3px;right:3px;top:3px;height:30px;box-sizing:border-box;border:2px solid #fff6ff;border-radius:15px;background:#9379ab}.rhythm-note.single:after{content:"";position:absolute;right:7px;top:7px;width:22px;height:22px;box-sizing:border-box;border-radius:50%;border:1.5px solid #eee2f5;background:#bda5ce}.rhythm-note.single span{z-index:1}.rhythm-note.single.held span:before{border-color:#fff;background:#8564a3}.rhythm-pointer-dot{position:fixed;top:-6px;left:-6px;width:12px;height:12px;border-radius:50%;border:1px solid rgba(255,255,255,.6);background:#83689899;pointer-events:none}.rhythm-burst{position:absolute;z-index:3;left:-16px;top:-16px;width:32px;height:32px;border:3px solid currentColor;color:#ffd3e2;border-radius:50%}.rhythm-burst[data-kind=hold],.rhythm-burst[data-kind=release]{color:#ecdcff}.rhythm-burst[data-precise=true]:after{content:"";position:absolute;top:50%;left:50%;width:3px;height:3px;margin:-1.5px;border-radius:50%;box-shadow:18px 0,-18px 0,9px 16px,-9px 16px,9px -16px,-9px -16px}.rhythm-streak{position:absolute;left:0;top:26px;transform:translate(-50%);white-space:nowrap;color:#fff4f8;text-shadow:0 1px 4px #5b3d59;font:700 13px/1 system-ui,sans-serif}.rhythm-judge{position:absolute;left:0;top:-40px;transform:translate(-50%);white-space:nowrap;font:800 13px/1 system-ui,sans-serif;letter-spacing:.08em;pointer-events:none;color:#fff6fa;text-shadow:0 1px 6px rgba(91,61,89,.75)}.rhythm-judge[data-grade=perfect]{color:#ffe79a;text-shadow:0 1px 8px rgba(155,80,120,.85)}.rhythm-judge[data-grade=good]{color:#e9d9ff}.rhythm-judge[data-grade=miss]{color:#ffb3c4}.rhythm-beat-tick{position:absolute;left:-1px;top:-7px;width:2px;height:14px;border-radius:1px;background:#fff5fa6b;pointer-events:none}.rhythm-beat-tick.bar{top:-11px;height:22px;background:#fff5fab8}.rhythm-progress{position:fixed;left:0;right:0;top:0;height:3px;background:#785a8224;z-index:6}.rhythm-progress i{display:block;width:100%;height:100%;transform-origin:left center;transform:scaleX(0);background:linear-gradient(90deg,#f3a6c4,#b98be0)}.rhythm-hint{position:fixed;left:50%;bottom:26px;transform:translate(-50%);padding:7px 14px;border-radius:999px;font-size:12px;letter-spacing:.04em;background:#fffafcdb;color:var(--ink);border:1px solid var(--chip-border);box-shadow:0 4px 16px #50325a1f;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);white-space:nowrap}.rhythm-hud{position:fixed;left:50%;top:14px;transform:translate(-50%);z-index:6;display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:var(--chip);border:1px solid var(--chip-border);color:var(--ink);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 2px 12px #50325a17;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.rhythm-hud[hidden]{display:none}.rhythm-hud-sep{opacity:.35}.rhythm-hud-acc{font-weight:700;color:var(--chip-active)}.rhythm-sync{display:inline-flex;align-items:center;gap:4px}.rhythm-sync em{font-style:normal;min-width:38px;text-align:center;opacity:.82}.rhythm-sync button{width:20px;height:20px;padding:0;border-radius:50%;border:1px solid var(--chip-border);background:#ffffffd9;color:var(--ink);font:700 12px/1 system-ui,sans-serif;cursor:pointer;display:grid;place-items:center}.rhythm-sync button:hover{background:var(--chip-active);color:var(--chip-active-ink);border-color:transparent}.rhythm-rank{font-size:17px;font-weight:700;letter-spacing:.04em;color:var(--chip-active);margin-bottom:2px}.rhythm-breakdown{font-size:12px;opacity:.85}.rhythm-credit{font-size:11px;opacity:.62;margin-top:2px}@media(max-width:520px){.rhythm-hud{top:72px;padding:5px 10px;font-size:11px;gap:6px}}.rhythm-touch{position:fixed;width:28px;height:28px;margin:-14px;z-index:4;border:2px solid #fff1f6;border-radius:50%;box-shadow:0 0 5px #9574988c;pointer-events:none}.rhythm-launch{position:absolute;right:14px;top:14px;z-index:6;margin-top:0;text-align:right}body.rhythm-playing .rhythm-launch{top:76px}.rhythm-buffer,.rhythm-retry,.rhythm-message:not(:empty){background:#fffafcf0;color:var(--ink);border:1px solid rgba(255,255,255,.6);border-radius:12px;padding:10px 14px;font-size:13px;line-height:1.3;box-shadow:0 2px 10px #50325a14}.rhythm-buffer{text-align:start;min-width:150px}.rhythm-buffer progress{display:block;width:100%;height:5px;margin-top:7px;accent-color:#8b6493}.rhythm-retry{font:inherit;cursor:pointer}.rhythm-message:not(:empty){margin-top:6px}.rhythm-finale{position:absolute;inset:0;z-index:8;display:grid;place-items:center;padding:16px;background:#4a3b5247;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);animation:finale-in .35s ease both}.rhythm-finale[hidden]{display:none}.rhythm-finale-card{width:min(340px,86vw);display:flex;flex-direction:column;gap:12px;padding:12px;background:#fffafcf5;border-radius:20px;box-shadow:0 18px 44px #6b3f5e47;animation:finale-pop .5s cubic-bezier(.2,1.4,.4,1) both}.rhythm-finale-card img{width:100%;height:auto;display:block;border-radius:14px}.rhythm-finale-stats{text-align:center;font-size:14px;line-height:1.7;color:var(--ink)}.rhythm-finale-stats b{font-variant-numeric:tabular-nums;color:var(--chip-active)}.rhythm-fc{font-size:18px;font-weight:700;letter-spacing:.1em;color:var(--chip-active)}.rhythm-finale-actions{display:flex;gap:10px}.rhythm-finale-actions button{flex:1;padding:10px 0;border-radius:12px;font:inherit;font-size:14px;cursor:pointer;border:1px solid var(--chip-border);background:#fff;color:var(--ink)}.rhythm-finale-actions button[data-act=again]{background:var(--chip-active);color:var(--chip-active-ink);border-color:transparent}@keyframes finale-in{0%{opacity:0}}@keyframes finale-pop{0%{opacity:0;transform:scale(.82) translateY(12px)}}@media(prefers-reduced-motion:reduce){.rhythm-finale,.rhythm-finale-card{animation:none}}
