@font-face{font-family:Barlow;src:url('./assets/barlow-condensed-700.woff2') format('woff2');font-weight:700;font-display:swap}
:root{color-scheme:dark;--bg:#111310;--surface:#191c17;--line:#30342b;--text:#f2f1e8;--muted:#818778;--lime:#d5f46b;--orange:#ff9870;--purple:#baabff;--red:#ff6d71;font-family:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.28;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--lime);outline-offset:5px}button{border:0;background:none}button img{display:block;width:21px;height:21px;filter:invert(93%) sepia(6%) saturate(310%)}button:hover:not(:disabled){filter:brightness(1.13)}[hidden]{display:none!important}
.studio{max-width:1800px;margin:auto;padding:0 max(28px,env(safe-area-inset-right)) 14px max(28px,env(safe-area-inset-left));min-height:100svh;display:flex;flex-direction:column}.topbar{height:88px;display:flex;align-items:center;gap:28px;flex-shrink:0}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);white-space:nowrap}.brand>img{width:24px;height:30px;filter:invert(79%) sepia(38%) saturate(947%) hue-rotate(324deg)}.brand>span{font-family:Barlow,'Arial Narrow',Impact,sans-serif;font-weight:700;font-size:32px;letter-spacing:.2px;font-style:italic}.brand-accent{color:var(--orange)}.file-name{flex:1;max-width:340px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:12px}.top-actions{display:flex;gap:12px;align-items:center;margin-left:auto}.local-label{font-size:10px;font-weight:700;letter-spacing:1.6px;color:#969e88;display:flex;align-items:center;gap:8px;margin-right:16px}.dot{width:5px;height:5px;display:inline-block;border-radius:50%;background:var(--lime)}.icon-button{width:42px;height:42px;display:grid;place-items:center;border-radius:50%}.top-actions .icon-button{border:1px solid var(--line)}
.stages{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-height:380px;max-height:calc(100svh - 216px)}.stage{position:relative;overflow:hidden;background:var(--surface);border-radius:10px;isolation:isolate}.stage-top,.stage-bottom{position:absolute;z-index:3;left:22px;right:18px;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.stage-top{top:16px}.stage-bottom{bottom:18px}.stage-top button,.stage-bottom button{pointer-events:auto}.stage-name{font-size:11px;font-weight:700;letter-spacing:1.8px;display:flex;align-items:center;gap:12px;text-shadow:0 1px 5px #000}.index{color:#929c81;font-size:10px}.stage-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#1113108c}.stage-icon img{width:18px;height:18px}.stage-icon[aria-pressed=true]{background:#d5f46b26}.stage-icon[aria-pressed=true] img{filter:invert(87%) sepia(55%) saturate(524%) hue-rotate(23deg)}.live-label{font-size:8px;letter-spacing:1px;color:var(--lime);display:flex;align-items:center;gap:5px}.video-wrap{position:absolute;inset:0;display:grid;place-items:center}.video-wrap video{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.video-wrap canvas{position:absolute;pointer-events:none}.video-wrap.mirrored video,.video-wrap.mirrored canvas{transform:scaleX(-1)}.stage.has-video{background:#090b08}.stage.has-video .stage-top,.stage.has-video .stage-bottom{filter:drop-shadow(0 1px 3px #000)}.empty-state{position:absolute;inset:64px 20px 64px;display:grid;place-items:center}.import-target{display:flex;align-items:center;flex-direction:column;gap:20px;font-size:13px;letter-spacing:1px;color:#b5bdab;padding:30px;position:relative}.empty-icon{width:82px;height:82px;border:1px solid #414735;border-radius:24px;display:grid;place-items:center}.empty-icon img{width:32px;height:32px;opacity:.7}.reference-stage .empty-icon{border-color:#6c674b}.reference-stage .import-target{color:var(--orange)}.reference-stage .empty-icon img{filter:invert(79%) sepia(38%) saturate(947%) hue-rotate(324deg);opacity:1}.tiny-plus{position:absolute;top:22px;right:22px;background:var(--orange);color:#111310;border-radius:50%;font-size:16px;line-height:20px;width:20px;height:20px;text-align:center;letter-spacing:0}.tracking-status{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.8px;color:#929c86;min-height:30px;text-shadow:0 1px 4px #000}.status-dot{width:4px;height:4px;background:#606951;border-radius:50%}.tracking-status.active{color:var(--lime)}.tracking-status.active .status-dot{background:var(--lime)}.source-tag{font-size:9px;color:#69735e;letter-spacing:1.6px}.ghost-toggle{display:flex;align-items:center;gap:7px;font-size:9px;letter-spacing:1.2px;color:var(--purple);height:30px;padding:0 6px}.ghost-toggle[aria-pressed=false]{opacity:.35}.dash-swatch{display:block;width:18px;border-top:2px dashed var(--purple)}.judgment{position:absolute;z-index:4;top:66px;left:15px;right:15px;text-align:center;pointer-events:none;opacity:0;transition:opacity .15s}.judgment.visible{opacity:1}.judgment>span{font-family:Barlow,Impact,sans-serif;font-weight:700;font-style:italic;font-size:clamp(30px,3.8vw,66px);letter-spacing:2px;display:block;color:var(--lime);text-shadow:0 2px 12px #0008}.judgment small{font-size:12px;font-weight:700;color:var(--text);text-shadow:0 1px 4px #000}.judgment[data-grade=good]>span{color:var(--lime)}.judgment[data-grade=normal]>span{color:var(--orange)}.judgment[data-grade=bad]>span{color:var(--red)}.judgment.pulse{animation:hit .35s ease-out}.combo{position:absolute;z-index:3;right:22px;top:45%;display:flex;flex-direction:column;align-items:center;pointer-events:none;text-shadow:0 2px 6px #000}.combo strong{font-family:Barlow,Impact,sans-serif;font-size:40px;font-style:italic;color:var(--orange);line-height:1}.combo span{font-size:8px;letter-spacing:2px;margin-top:5px}.loading-mask{position:absolute;z-index:6;inset:0;background:#111310b8;display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;backdrop-filter:blur(5px)}.spinner{width:18px;height:18px;border:2px solid #656b55;border-top-color:var(--lime);border-radius:50%;animation:spin .75s linear infinite}
.dock{padding-top:22px;flex-shrink:0}.timeline{display:flex;align-items:center;gap:13px;font-variant-numeric:tabular-nums;font-size:10px;color:#a1a793}.timeline>span{min-width:26px}.timeline>span:last-child{text-align:right}.timeline input{width:100%;margin:0}.controls-row{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:84px}.left-controls{display:flex;align-items:center;gap:8px}.left-controls .icon-button img{width:19px;height:19px}.speed-button{min-width:44px;height:42px;font-size:12px;color:#c1c7b7}.skeleton-control[aria-pressed=true]{background:#242b1d}.play-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:62px;height:62px;border-radius:50%;background:var(--orange);display:grid;place-items:center}.play-button img{width:23px;height:23px;filter:none}.scoreboard{display:flex;align-items:center;gap:25px}.scoreboard>div{display:flex;flex-direction:column;gap:4px}.scoreboard>div>span{font-size:8px;letter-spacing:1.5px;color:#8d977e}.scoreboard strong{font-size:22px;font-variant-numeric:tabular-nums;font-weight:400}.points-score strong{letter-spacing:2px;color:#b5bda9}.match-score{padding-left:24px;border-left:1px solid var(--line);min-width:80px}.match-score strong{color:var(--lime);font-weight:700}.match-score small{font-size:12px;margin-left:3px;font-weight:400}input[type=range]{appearance:none;-webkit-appearance:none;height:3px;background:#3b4330;border-radius:6px;cursor:pointer;accent-color:var(--lime);min-width:0}input[type=range]::-webkit-slider-thumb{appearance:none;width:10px;height:10px;background:var(--lime);border-radius:50%}input[type=range]::-moz-range-thumb{width:10px;height:10px;background:var(--lime);border:0;border-radius:50%}input[type=checkbox]{accent-color:var(--lime);width:18px;height:18px;cursor:pointer}.toast{position:fixed;z-index:20;left:50%;bottom:28px;transform:translateX(-50%);max-width:min(90vw,480px);padding:14px 20px;font-size:13px;border-radius:8px;background:#e5e6da;color:#20231b;box-shadow:0 5px 40px #0006;text-align:center}.settings-dialog,.results-dialog{background:#20251c;color:var(--text);border:1px solid #414a35;border-radius:16px;padding:20px 24px;width:min(360px,calc(100vw - 32px))}.settings-dialog::backdrop,.results-dialog::backdrop{background:#0508049c;backdrop-filter:blur(6px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:2px;margin-bottom:18px}.dialog-header .icon-button{width:30px;height:30px}.dialog-header img{width:18px;height:18px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:16px 0;font-size:13px;border-top:1px solid var(--line)}.setting-row input[type=range]{width:115px}.result-match{margin:25px 0 15px;display:flex;flex-direction:column;align-items:center;gap:4px}.result-match strong{font-family:Barlow,Impact,sans-serif;font-size:90px;font-style:italic;color:var(--lime);line-height:1}.result-match>span,.result-points>span{font-size:10px;letter-spacing:2px;color:var(--muted)}.result-points{display:flex;gap:10px;align-items:center;justify-content:center}.result-points strong{font-size:22px;letter-spacing:2px}.result-grades{display:flex;flex-direction:column;margin:24px 0}.result-grades>div{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0;font-size:11px;letter-spacing:1px}.result-grades>div>span:last-child{color:var(--muted)}.replay-button{display:flex;justify-content:center;align-items:center;gap:10px;width:100%;padding:14px;background:var(--orange);color:var(--bg);border-radius:8px;font-size:14px}.replay-button img{filter:none;width:18px;height:18px}@keyframes spin{to{transform:rotate(360deg)}}@keyframes hit{0%{transform:scale(1.10)}100%{transform:scale(1)}}
@media(min-width:1600px){.studio{padding-left:50px;padding-right:50px}.topbar{height:104px}.stages{max-height:calc(100svh - 240px)}}
@media(max-width:700px) and (orientation:portrait){.studio{padding:0 14px max(8px,env(safe-area-inset-bottom));height:100svh;min-height:600px}.topbar{height:64px;gap:12px}.brand>span{font-size:27px}.brand>img{width:20px}.file-name{display:none}.top-actions{gap:6px}.local-label{display:none}.top-actions .icon-button{width:34px;height:34px}.stages{grid-template-columns:1fr;grid-template-rows:1fr 1fr;gap:8px;min-height:0;max-height:none}.stage-top{top:8px}.stage-top,.stage-bottom{left:15px;right:12px}.stage-bottom{bottom:7px}.stage-name{font-size:9px;letter-spacing:1.4px}.stage-icon{width:28px;height:28px}.empty-state{inset:30px 15px}.import-target{flex-direction:row;gap:13px;padding:16px;font-size:12px}.empty-icon{width:50px;height:50px;border-radius:15px}.empty-icon img{width:23px;height:23px}.tiny-plus{display:none}.judgment{top:38px;left:70px;right:70px}.judgment>span{font-size:34px}.combo{right:15px;top:40%}.combo strong{font-size:28px}.dock{padding-top:14px}.controls-row{min-height:76px}.scoreboard{gap:12px}.points-score{display:none!important}.match-score{border:0;padding:0;min-width:55px}.left-controls{gap:0}.play-button{width:52px;height:52px}.skeleton-control{display:none}.timeline{font-size:9px}.tracking-status{font-size:8px}.ghost-toggle{font-size:8px}}
@media(orientation:landscape) and (max-height:600px){.studio{height:100svh;min-height:0;padding:0 max(16px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.topbar{height:48px;gap:16px}.brand>span{font-size:25px}.brand>img{width:19px;height:23px}.top-actions{gap:6px}.top-actions .icon-button{width:30px;height:30px}.top-actions .icon-button img{width:16px;height:16px}.local-label{font-size:8px;margin-right:5px;letter-spacing:1px}.file-name{font-size:10px;max-width:190px}.stages{min-height:0;max-height:none;gap:8px}.stage{border-radius:7px}.stage-top{top:7px}.stage-top,.stage-bottom{left:12px;right:10px}.stage-bottom{bottom:6px}.stage-name{font-size:9px;letter-spacing:1.3px;gap:8px}.stage-icon{width:28px;height:28px}.stage-icon img{width:15px;height:15px}.source-tag{font-size:8px}.tracking-status{font-size:8px}.ghost-toggle{font-size:8px}.empty-icon{width:54px;height:54px;border-radius:16px}.empty-icon img{width:25px;height:25px}.import-target{gap:11px;font-size:11px}.tiny-plus{top:23px;right:23px;font-size:13px;line-height:17px;width:17px;height:17px}.empty-state{inset:30px 10px}.dock{padding-top:10px}.timeline{font-size:8px;gap:8px}.controls-row{min-height:50px}.left-controls{gap:3px}.left-controls .icon-button{width:33px;height:33px}.speed-button{height:33px;min-width:33px;font-size:10px}.play-button{width:39px;height:39px}.play-button img{width:17px;height:17px}.scoreboard{gap:18px}.scoreboard>div{gap:1px}.scoreboard>div>span{font-size:7px}.scoreboard strong{font-size:18px}.match-score{padding-left:17px;min-width:66px}.match-score small{font-size:10px}.judgment{top:37px}.judgment>span{font-size:36px}.judgment small{font-size:10px}.combo{right:13px}.combo strong{font-size:28px}.combo span{font-size:7px}.settings-dialog{max-height:90svh;overflow:auto;padding:12px 20px}.setting-row{padding:10px 0}.dialog-header{margin-bottom:8px}.result-match{margin:8px}.result-match strong{font-size:50px}.result-grades{margin:12px 0;display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.result-grades>div{font-size:9px}}
@media(prefers-reduced-motion:reduce){.judgment.pulse{animation:none}.judgment{transition:none}}
