:root{--bg-inner: #eef9fa;--bg-mid: #cbe8ed;--bg-outer: #97cad3;--surface: rgba(255, 255, 255, .72);--surface-hover: rgba(255, 255, 255, .9);--surface-border: rgba(255, 255, 255, .78);--text-main: #18343b;--text-muted: #4b6d75;--accent: #0f9fa8;--accent-soft: rgba(15, 159, 168, .14);--shadow: 0 10px 30px rgba(24, 58, 68, .12);--radius-pill: 999px;--radius-panel: 18px}*,*:before,*:after{box-sizing:border-box}html,body,#app{margin:0;padding:0;width:100%;height:100dvh;overflow:hidden;font-family:Segoe UI,PingFang SC,Hiragino Sans GB,Hiragino Kaku Gothic ProN,Yu Gothic UI,Meiryo,Microsoft YaHei,sans-serif;color:var(--text-main);-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}.mmt-shell,.mmt-shell *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent}.mmt-shell{position:relative;width:100%;height:100dvh;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,var(--bg-inner) 0%,var(--bg-mid) 54%,var(--bg-outer) 100%)}.stage-wrap{position:absolute;inset:0;display:block;touch-action:none;cursor:grab}.stage-wrap.is-touching{cursor:grabbing}#stage{display:block;width:100%;height:100%;outline:none;touch-action:none}.cheek-haptic{position:fixed;left:-9999px;top:-9999px;width:36px;height:36px;opacity:.001;pointer-events:none;margin:0}.hud-top{position:fixed;top:calc(14px + env(safe-area-inset-top));left:calc(16px + env(safe-area-inset-left));right:calc(16px + env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:flex-start;gap:12px;pointer-events:none;z-index:20}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;pointer-events:auto}.brand-pill{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 14px;border-radius:var(--radius-pill);background:var(--surface);border:1px solid var(--surface-border);box-shadow:var(--shadow);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);font-size:13px;font-weight:600}.brand-dot{width:9px;height:9px;border-radius:50%;background:linear-gradient(135deg,#39d8dd,#0d9aa6);box-shadow:0 0 10px #39d8ddb3}.brand-divider{width:1px;height:12px;background:#18343b29}.brand-sub{color:var(--text-muted);font-weight:500}.menu-anchor{position:relative}.pill-btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 14px;border-radius:var(--radius-pill);border:1px solid var(--surface-border);background:var(--surface);color:var(--text-main);font-size:13px;font-weight:600;cursor:pointer;box-shadow:var(--shadow);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:background .18s ease,transform .14s ease,border-color .18s ease}.pill-btn:hover{background:var(--surface-hover)}.pill-btn:active{transform:scale(.97)}.pill-btn[aria-expanded=true]{border-color:#0f9fa873;background:#ffffffeb}.pill-primary{background:#f2fdfddb;border-color:#39d8dd73}#bgm-quick-tool[aria-pressed=true]{background:#e6fcfdf0;border-color:#0f9fa88c;color:#09767d}.reaction-layer{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:14}.reaction-badge{position:absolute;width:28px;height:28px;transform:translate(-50%,-50%);filter:drop-shadow(0 4px 10px rgba(24,58,68,.16));will-change:transform,opacity;animation:mmt-reaction-float 1.05s cubic-bezier(.22,1,.36,1) forwards}.reaction-badge svg{width:100%;height:100%;display:block}@keyframes mmt-reaction-float{0%{opacity:0;transform:translate(-50%,-30%) scale(.45) rotate(-8deg)}18%{opacity:1;transform:translate(-50%,-65%) scale(1.12) rotate(4deg)}75%{opacity:.95;transform:translate(-50%,-135%) scale(1) rotate(-3deg)}to{opacity:0;transform:translate(-50%,-185%) scale(.85) rotate(0)}}.icon{width:16px;height:16px;flex:none;color:var(--accent)}.popover-panel{position:absolute;top:calc(100% + 8px);left:0;min-width:176px;padding:6px;border-radius:var(--radius-panel);background:#ffffffe0;border:1px solid var(--surface-border);box-shadow:0 18px 40px #14343c29;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);display:flex;flex-direction:column;gap:2px;z-index:30}.popover-panel[hidden]{display:none}.popover-right{left:auto;right:0}.menu-item{display:flex;align-items:center;justify-content:space-between;width:100%;padding:9px 12px;border:none;border-radius:12px;background:transparent;color:var(--text-main);font-size:13px;font-weight:500;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.menu-item:hover{background:#0f9fa814}.menu-item[aria-pressed=true]{background:var(--accent-soft);color:#09767d;font-weight:600}.menu-item[aria-pressed=true]:after{content:"●";font-size:9px;color:var(--accent)}.menu-sep{height:1px;margin:4px 8px;background:#18343b1a}.hint-pill{position:fixed;left:50%;bottom:calc(56px + env(safe-area-inset-bottom));transform:translate(-50%);padding:8px 16px;border-radius:var(--radius-pill);background:#ffffffb8;border:1px solid var(--surface-border);box-shadow:var(--shadow);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);font-size:12.5px;font-weight:500;color:var(--text-main);white-space:nowrap;pointer-events:none;transition:opacity .4s ease,transform .4s ease;z-index:15}.hint-pill.is-hidden{opacity:0;transform:translate(-50%) translateY(8px)}.hud-bottom{position:fixed;left:calc(16px + env(safe-area-inset-left));bottom:calc(14px + env(safe-area-inset-bottom));pointer-events:none;z-index:12}.credit-pill{padding:5px 11px;border-radius:var(--radius-pill);background:#ffffff80;border:1px solid rgba(255,255,255,.55);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:11px;color:var(--text-muted)}.loading-overlay{position:fixed;inset:0;display:grid;place-items:center;background:#e2f6f9c2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);z-index:50;transition:opacity .35s ease}.loading-overlay.is-done{opacity:0;pointer-events:none}.loading-card{width:min(320px,84vw);padding:22px 24px;border-radius:22px;background:#ffffffe0;border:1px solid rgba(255,255,255,.9);box-shadow:0 20px 50px #183a4424;text-align:center}.loading-badge{display:inline-block;padding:4px 10px;border-radius:var(--radius-pill);background:var(--accent-soft);color:#09767d;font-size:12px;font-weight:700;letter-spacing:.04em;margin-bottom:10px}.loading-text{font-size:13px;color:var(--text-main);margin-bottom:12px}#model-progress{width:100%;height:8px;border:none;border-radius:999px;overflow:hidden;appearance:none;background:#0f9fa826}#model-progress::-webkit-progress-bar{background:#0f9fa826;border-radius:999px}#model-progress::-webkit-progress-value{background:linear-gradient(90deg,#39d8dd,#0f9fa8);border-radius:999px;transition:width .15s ease}@media(max-width:600px){.hud-top{padding:calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 0 calc(10px + env(safe-area-inset-left));gap:6px}.toolbar{gap:5px}.brand-sub,.brand-divider{display:none}.pill-btn,.brand-pill{height:34px;padding:0 10px;font-size:12px}.hint-pill{max-width:90vw;white-space:normal;text-align:center;bottom:calc(52px + env(safe-area-inset-bottom))}}.pill-rhythm{background:linear-gradient(135deg,#ebfdfee6,#fff4f9e0);border-color:#39d8dd8c;color:#09767d}.mmt-shell.is-rhythm .stage-wrap{background:radial-gradient(circle at 50% 24%,#ffffffeb,#d4f6fab8 48%,#bce8f2e6)}.mmt-shell.is-rhythm .hud-top,.mmt-shell.is-rhythm .hint-pill{display:none}.mmt-shell.is-rhythm .hud-bottom{top:calc(60px + env(safe-area-inset-top));bottom:auto}.rhythm-overlay{position:fixed;inset:0;z-index:25;pointer-events:none;display:flex;flex-direction:column;justify-content:space-between}.rhythm-overlay[hidden]{display:none}.rhythm-topbar{position:relative;z-index:26;pointer-events:auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left))}.rhythm-topbar-left{display:flex;align-items:center;gap:6px}.rhythm-track-pill{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:190px;max-width:48vw;padding:7px 14px;border-radius:var(--radius-pill);background:#fffc;border:1px solid var(--surface-border);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:var(--shadow)}.rhythm-track-head{display:flex;align-items:center;gap:7px;max-width:100%}.rhythm-wip-tag{display:inline-block;flex:none;padding:2px 7px;border-radius:var(--radius-pill);background:#ffc66c47;border:1px solid rgba(235,152,46,.42);color:#9e5a07;font-size:10px;font-weight:800;letter-spacing:.02em}.rhythm-track-title{font-size:12px;font-weight:700;color:var(--text-main);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.rhythm-progress{width:100%;height:4px;border:none;border-radius:999px;appearance:none;overflow:hidden;background:#0f9fa829}.rhythm-progress::-webkit-progress-bar{background:#0f9fa829}.rhythm-progress::-webkit-progress-value{background:linear-gradient(90deg,#39d8dd,#ff6d9d)}.rhythm-score-pill{min-width:84px;text-align:center;padding:8px 14px;border-radius:var(--radius-pill);background:#ffffffd6;border:1px solid var(--surface-border);box-shadow:var(--shadow);font-variant-numeric:tabular-nums;font-size:14px;font-weight:800;color:#09767d}.rhythm-combo-box{position:fixed;right:calc(22px + env(safe-area-inset-right));top:22%;text-align:center;opacity:0;transform:scale(.9);transition:opacity .18s ease,transform .14s ease}.rhythm-combo-box.has-combo{opacity:1;transform:scale(1)}.rhythm-combo-num{font-size:clamp(30px,5vw,44px);font-weight:900;line-height:1;color:#0c8e96;text-shadow:0 3px 12px rgba(255,255,255,.9)}.rhythm-combo-label{font-size:11px;font-weight:800;letter-spacing:.12em;color:#ff6296}.rhythm-judge{position:fixed;left:50%;bottom:calc(37dvh + 16px);transform:translate(-50%) scale(.85);font-size:20px;font-weight:900;letter-spacing:.08em;opacity:0;text-shadow:0 2px 10px rgba(255,255,255,.95);transition:opacity .18s ease,transform .14s ease}.rhythm-judge.is-visible{opacity:1;transform:translate(-50%) scale(1.06)}.rhythm-judge[data-kind=perfect]{color:#0999a3}.rhythm-judge[data-kind=great]{color:#2bb57c}.rhythm-judge[data-kind=good]{color:#4e8df5}.rhythm-judge[data-kind=miss]{color:#f05a72}.rhythm-stage-wrap{width:100%;display:flex;flex-direction:column;align-items:center;padding-bottom:calc(16px + env(safe-area-inset-bottom));pointer-events:none}.rhythm-highway{width:min(440px,92vw);display:flex;flex-direction:column;align-items:stretch;perspective:540px}.rhythm-lanes{position:relative;height:clamp(190px,31dvh,270px);display:grid;grid-template-columns:repeat(4,1fr);background:linear-gradient(180deg,#10303824,#1030386b);border-left:2px solid rgba(57,216,221,.65);border-right:2px solid rgba(57,216,221,.65);border-top:1px solid rgba(255,255,255,.35);border-radius:14px 14px 0 0;transform-origin:bottom center;transform:rotateX(34deg);overflow:hidden;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.rhythm-lane-bg{border-right:1px solid rgba(255,255,255,.22);transition:background .08s ease}.rhythm-lane-bg.is-pressed{background:linear-gradient(180deg,#39d8dd0a,#39d8dd3d)}.rhythm-lane-bg:last-of-type{border-right:none}.rhythm-hitline{position:absolute;left:0;right:0;top:85%;height:4px;background:linear-gradient(90deg,#39d8dd,#fff,#ff70a2);box-shadow:0 0 14px #39d8dde6;pointer-events:none}.rhythm-hit-zones{position:absolute;inset:78% 0 0;display:grid;grid-template-columns:repeat(4,1fr);pointer-events:auto;z-index:6}.rhythm-lane-hit{border:none;border-top:1px dashed rgba(255,255,255,.35);border-right:1px solid rgba(255,255,255,.16);background:#39d8dd1a;cursor:pointer;touch-action:none;padding:0;transition:background .06s ease}.rhythm-lane-hit:last-child{border-right:none}.rhythm-lane-hit.is-pressed,.rhythm-lane-hit:active{background:#5ce3e861}.rhythm-start-panel{position:fixed;inset:0;z-index:22;display:grid;place-items:center;padding-bottom:18dvh;pointer-events:none}.rhythm-start-panel[hidden]{display:none}.rhythm-start-card{pointer-events:auto;width:min(340px,86vw);padding:18px 20px;border-radius:22px;background:#ffffffe0;border:1px solid rgba(255,255,255,.95);box-shadow:0 20px 46px #1438442e;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);text-align:center}.rhythm-start-title{margin:8px 0 6px;font-size:16px;font-weight:800;color:var(--text-main)}.rhythm-start-desc{margin:0 0 14px;font-size:12px;line-height:1.45;color:var(--text-muted)}.rhythm-start-cta{padding:0 22px;height:40px;font-size:14px;font-weight:800}.rhythm-notes-layer{position:absolute;inset:0;pointer-events:none}.rhythm-note{position:absolute;top:0;width:25%;padding:0 7px;margin-top:-8px;will-change:transform}.rhythm-note-head{height:16px;border-radius:7px;background:linear-gradient(180deg,#9cf8fb,#24cdd5);border:2px solid #ffffff;box-shadow:0 3px 10px #0f9fa88c}.rhythm-note.is-hold .rhythm-note-head{background:linear-gradient(180deg,#ffe08a,#ff82ad);box-shadow:0 3px 10px #ff70a28c}.rhythm-hold-tail{position:absolute;left:14px;right:14px;bottom:8px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#ff82ad73,#39d8dda6);border-left:2px solid rgba(255,255,255,.72);border-right:2px solid rgba(255,255,255,.72)}.rhythm-pads{pointer-events:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:6px;background:#ffffffc7;border:1px solid rgba(255,255,255,.85);border-radius:0 0 16px 16px;box-shadow:0 12px 30px #12343c33;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.rhythm-pad{height:44px;border:1px solid rgba(15,159,168,.25);border-radius:10px;background:#ecfcfde6;color:#0c7f87;font-size:13px;font-weight:800;cursor:pointer;touch-action:none;transition:transform .06s ease,background .06s ease,box-shadow .06s ease}.rhythm-pad.is-pressed,.rhythm-pad:active{transform:translateY(2px) scale(.97);background:linear-gradient(180deg,#5ce3e8,#1db9c3);color:#fff;box-shadow:0 0 16px #39d8ddbf}.rhythm-hint-text{margin-top:6px;font-size:11px;font-weight:600;color:var(--text-muted);background:#ffffffa6;padding:3px 10px;border-radius:var(--radius-pill)}.rhythm-result{position:fixed;inset:0;z-index:35;display:grid;place-items:center;background:#d7f3f88c;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);pointer-events:auto}.rhythm-result[hidden]{display:none}.rhythm-result-card{width:min(340px,88vw);padding:24px 22px;border-radius:24px;background:#ffffffeb;border:1px solid rgba(255,255,255,.95);box-shadow:0 24px 56px #14384438;text-align:center}.rhythm-result-rank{display:inline-grid;place-items:center;width:58px;height:58px;border-radius:50%;font-size:28px;font-weight:900;color:#fff;background:linear-gradient(135deg,#39d8dd,#0f9fa8);margin-bottom:10px}.rhythm-result-rank[data-rank=S]{background:linear-gradient(135deg,#ffd15c,#ff6d9d)}.rhythm-result-rank[data-rank=C]{background:linear-gradient(135deg,#90a4ae,#607d8b)}.rhythm-result-title{font-size:15px;font-weight:700;color:var(--text-main);margin-bottom:14px}.rhythm-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px 8px;border-radius:14px;background:#0f9fa814;margin-bottom:10px}.rhythm-result-grid small{display:block;font-size:10px;font-weight:700;color:var(--text-muted)}.rhythm-result-grid strong{font-size:16px;font-weight:800;color:#09767d}.rhythm-result-breakdown{font-size:12px;font-weight:600;color:var(--text-muted);margin-bottom:16px}.rhythm-result-actions{display:flex;justify-content:center;gap:10px}@media(max-width:600px){.rhythm-topbar{padding:calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 0 calc(10px + env(safe-area-inset-left));gap:6px}.rhythm-track-pill{order:3;flex:1 0 100%;width:100%;max-width:100%;min-width:0;padding:5px 12px}.rhythm-score-pill{min-width:72px;padding:6px 10px;font-size:13px}.mmt-shell.is-rhythm .hud-bottom{top:calc(106px + env(safe-area-inset-top));left:calc(10px + env(safe-area-inset-left));max-width:calc(100vw - 20px)}.mmt-shell.is-rhythm .credit-pill{font-size:10px;padding:4px 9px}.rhythm-pad{height:54px;font-size:14px}}#mmt-shell.hud-hidden>:not(.stage-wrap):not(#reaction-layer):not(#loading-overlay){display:none!important}
