:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font-family:system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{color:#cfd6e4;background:#0b0e14;margin:0}.player{grid-template-columns:minmax(0,1fr) 340px;grid-template-areas:"main side1""main side2""trans trans";align-items:start;gap:14px;width:100%;max-width:1280px;margin:0 auto;display:grid}.area-video{grid-area:main}.area-graphs{grid-area:side1}.area-side{grid-area:side2}.area-trans{grid-area:trans}.area-rail{display:none}.player.swapped{grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"main vid""main rail""opts opts""trans trans"}.player.swapped .area-graphs{grid-area:main}.player.swapped .area-video{grid-area:vid}.player.swapped .area-rail{grid-area:rail;display:block}.player.swapped .area-side{grid-area:opts}.player.swapped .side{flex-flow:row;align-items:stretch;gap:14px}.player.swapped .side .beatgrid{flex:auto}.stage{background:#000;border-radius:12px;margin-inline:auto;position:relative;overflow:hidden}.area-video.stage:not(.fs){width:auto;max-width:100%;height:70vh}.player.swapped .area-video.stage:not(.fs){width:auto;max-width:100%}.stage.fs{z-index:9000;background:#000;border-radius:0;width:100vw;height:100vh;margin:0;position:fixed;inset:0}.video-holder{position:absolute;inset:0}.video{object-fit:contain;background:0 0;width:100%;height:100%;display:block}.video-holder.pip{cursor:grab;z-index:50;opacity:.62;touch-action:none;border-radius:10px;height:auto;transition:opacity .2s;position:fixed;inset:auto;overflow:hidden;box-shadow:0 6px 24px #0009}.video-holder.pip:hover{opacity:.9}.video-holder.pip:active{cursor:grabbing}.video-holder.pip .video{height:100%}.pip-resize{cursor:nesw-resize;touch-action:none;z-index:6;background:linear-gradient(45deg,#0000 45%,#ffffffb3 45% 55%,#0000 55%);width:20px;height:20px;position:absolute;bottom:0;left:0}.spinner-overlay{z-index:6;color:#9aa4b6;background:#0b0e14;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:13px;display:flex;position:absolute;inset:0}.spinner-overlay.error{color:#ff9b9b;text-align:center;padding:16px}.spinner{border:3px solid #2c3647;border-top-color:#4f9dff;border-radius:50%;width:38px;height:38px;animation:.8s linear infinite spin}.buffering-overlay{z-index:4;background:#00000052;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.buffering-overlay .spinner{width:30px;height:30px}.play-overlay{z-index:3;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.play-overlay svg{filter:drop-shadow(0 2px 8px #00000080);transition:transform .12s}.play-overlay:hover svg{transform:scale(1.06)}.video-guides{z-index:4;pointer-events:none;position:absolute;inset:0}.guide-clip{pointer-events:none;position:absolute;inset:0;overflow:hidden}.guide-line{pointer-events:auto;touch-action:none;position:absolute}.guide-line.v{cursor:ew-resize;justify-content:center;width:20px;display:flex;top:0;bottom:0;transform:translate(-50%)}.guide-line.v:before{content:"";background:#ff5d5d;width:2px;height:100%;box-shadow:0 0 0 1px #00000073}.guide-line.h{cursor:ns-resize;align-items:center;height:20px;display:flex;left:0;right:0;transform:translateY(-50%)}.guide-line.h:before{content:"";background:#4ad9ff;width:100%;height:2px;box-shadow:0 0 0 1px #00000073}.rect-mask{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.draw-surface{pointer-events:auto;cursor:crosshair;touch-action:none;position:absolute;inset:0}.rect-frame{box-sizing:border-box;pointer-events:none;border:1.5px solid #ffffffe6;position:absolute;box-shadow:0 0 0 1px #00000073}.rh{pointer-events:auto;z-index:5;touch-action:none;background:0 0;justify-content:center;align-items:center;width:38px;height:38px;display:flex;position:absolute;transform:translate(-50%,-50%)}.rh:before{content:"";background:#ffffffe6;border-radius:50%;width:12px;height:12px;box-shadow:0 0 0 1px #00000080}.rh-nw,.rh-se{cursor:nwse-resize}.rh-ne,.rh-sw{cursor:nesw-resize}.vtools{pointer-events:none;flex-direction:column-reverse;align-items:center;gap:8px;display:flex;position:absolute;bottom:10px;right:10px}.vtools-toggle,.vtool{pointer-events:auto;color:#fff;cursor:pointer;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#14182052;border:1px solid #ffffff59;border-radius:50%;justify-content:center;align-items:center;width:36px;height:36px;transition:background .15s,opacity .15s,transform .12s;display:flex}.vtools-toggle{opacity:.45}.vtools.open .vtools-toggle,.vtools-toggle:hover{opacity:1}.vtools.open .vtools-toggle{background:#2d82dc8c;transform:rotate(30deg)}.vtool:hover,.vtools-toggle:hover{background:#283040b3}.vtool.active{background:#2d82dc99;border-color:#78b4ffcc}.vtool:disabled{opacity:.35;cursor:default}.vtools-actions{flex-direction:column;align-items:center;gap:8px;display:flex}.video-holder.pip .vtools{gap:6px;bottom:6px;left:auto;right:6px}.video-holder.pip .vtools-toggle,.video-holder.pip .vtool{width:28px;height:28px}.video-holder.pip .vtools-toggle svg{width:16px;height:16px}.video-holder.pip .vtool svg{width:15px;height:15px}.stage.fs .video-holder:not(.pip) .vtools{bottom:72px;right:16px}@keyframes spin{to{transform:rotate(360deg)}}.graph-wrap{flex-direction:column;gap:10px;display:flex;position:relative}.ig-wrap{width:100%;position:relative}.ig-spinner{background:#11141c;border-radius:8px;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.ig-spinner .spinner{width:22px;height:22px}.maximize-btn{color:#cfd6e4;cursor:pointer;opacity:.4;z-index:2;background:#11141cb8;border:1px solid #2c3647;border-radius:6px;justify-content:center;align-items:center;width:24px;height:24px;padding:0;transition:opacity .15s,background .15s;display:flex;position:absolute;top:6px;right:6px}.graph-wrap:hover .maximize-btn{opacity:1}.maximize-btn:hover{color:#fff;background:#232c3d}.maximize-btn.active{opacity:1;color:#07101f;background:#4f9dff;border-color:#4f9dff}.video-max{opacity:.85;z-index:7;position:absolute;top:8px;left:8px;right:auto}.graph-controls{z-index:2;gap:5px;display:flex;position:absolute;top:6px;right:6px}.gbtn{color:#cfd6e4;cursor:pointer;opacity:.4;background:#11141cb8;border:1px solid #2c3647;border-radius:6px;justify-content:center;align-items:center;width:24px;height:24px;padding:0;transition:opacity .15s,background .15s;display:flex}.graph-wrap:hover .gbtn{opacity:1}.gbtn:hover{color:#fff;background:#232c3d}.gbtn.active{opacity:1;color:#07101f;background:#4f9dff;border-color:#4f9dff}.gbtn.muted{opacity:1;color:#ff9b9b;background:#3a2330;border-color:#ff6b6b}.graphs{flex-direction:column;gap:10px;min-width:0;display:flex}.player.swapped .graphs{gap:12px}.rail-graphs{flex-direction:column;gap:8px;display:flex}.side{flex-direction:column;gap:14px;display:flex}.transport{background:#11141c;border:1px solid #1c2330;border-radius:10px;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px;display:flex}.stage.fs .transport{z-index:5;background:linear-gradient(#0000,#000000d1);border:none;border-radius:0;position:absolute;bottom:0;left:0;right:0}.transport .time{font-variant-numeric:tabular-nums;color:#fff;min-width:132px;font-size:13px}.scrub{accent-color:#4f9dff;flex:1}.menu-wrap{display:inline-flex;position:relative}.menu-pop{z-index:60;background:#11141c;border:1px solid #2c3647;border-radius:10px;flex-direction:column;gap:6px;min-width:188px;padding:8px;display:flex;position:absolute;bottom:calc(100% + 8px);right:0;box-shadow:0 8px 28px #0009}.menu-item{color:#cfd6e4;cursor:pointer;text-align:left;background:#1b2230;border:1px solid #2c3647;border-radius:6px;padding:7px 10px;font-size:13px}.menu-item:hover{background:#232c3d}.menu-item:disabled{opacity:.6;cursor:default}.menu-sep{background:#1c2330;height:1px;margin:2px 0}.menu-label{color:#7c869a;padding:0 2px;font-size:11px}.speed-row{grid-template-columns:repeat(4,1fr);gap:5px;display:grid}.speed-btn{color:#cfd6e4;cursor:pointer;background:#1b2230;border:1px solid #2c3647;border-radius:6px;padding:5px 0;font-size:12px}.speed-btn:hover{background:#232c3d}.speed-btn.active{color:#07101f;background:#4f9dff;border-color:#4f9dff}.btn{color:#cfd6e4;cursor:pointer;white-space:nowrap;background:#1b2230;border:1px solid #2c3647;border-radius:6px;align-items:center;gap:5px;padding:4px 10px;font-size:12px;display:inline-flex}.btn-icon{align-items:center;display:inline-flex}.btn-icon.fit{letter-spacing:.5px;font-size:10px;font-weight:700}.btn:hover{background:#232c3d}.btn.active{color:#07101f;background:#4f9dff;border-color:#4f9dff}.btn.play{justify-content:center;gap:0;min-width:40px;font-size:14px}.btn.loop-active{color:#cfe2ff;background:#243449;border-color:#4f9dff}.btn.tiny{padding:3px 7px;font-size:11px}.btn:disabled{opacity:.5;cursor:default}.panel{background:#11141c;border:1px solid #1c2330;border-radius:10px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}.panel-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.panel.beatgrid{flex-flow:wrap;align-items:flex-start;gap:8px 18px}.bg-group{flex-direction:column;gap:5px;display:flex}.bg-group.enable{gap:4px}.beatgrid .fld{min-width:140px}.beatgrid .pick-row{align-items:center;gap:6px;display:flex}.beatgrid .legend{flex-direction:column;align-items:flex-start;gap:4px;padding-top:0}.beatgrid .hint{margin:0}.panel .chk{color:#e7ecf5;align-items:center;gap:6px;font-size:13px;font-weight:600;display:flex}.panel .row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.panel .val{color:#9aa4b6;font-variant-numeric:tabular-nums;font-size:12px}.panel .fld{color:#7c869a;flex-direction:column;gap:3px;font-size:11px;display:flex}.panel .fld select{color:#e7ecf5;background:#0b0e14;border:1px solid #2c3647;border-radius:5px;padding:5px 6px;font-size:12px}.panel .hint{color:#ffce4f;margin:0;font-size:11px}.legend{flex-wrap:wrap;gap:12px;padding-top:2px;display:flex}.legend-item{color:#9aa4b6;align-items:center;gap:5px;font-size:11px;display:flex}.legend-dot{border-radius:50%;width:9px;height:9px}.overlay-graphs{z-index:2;flex-direction:column;gap:8px;width:min(34vw,460px);max-height:calc(100vh - 32px);display:flex;position:absolute;top:16px;right:16px;overflow:auto}.overlay-rail{flex-direction:column;gap:6px;display:flex}.overlay-controls{z-index:4;flex-flow:wrap;align-items:flex-end;gap:12px;max-width:70vw;display:flex;position:absolute;bottom:58px;left:16px}.overlay-controls .panel{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0a0d14d1}.overlay-controls.wide{flex-wrap:nowrap;align-items:flex-start;max-width:none;left:16px;right:16px}.overlay-controls.wide .bp-measure{flex:none;max-width:60vw}.overlay-controls.wide .beatgrid{flex:none}.overlay-controls.wide .overlay-rail{flex-direction:row;flex:auto;gap:10px;min-width:0;display:flex}.overlay-controls.wide .overlay-rail .graph-wrap{flex:1 1 0;min-width:0}.player.swapped .stage.fs .overlay-graphs{gap:12px;width:auto;padding:3vh 3vw 12vh;inset:0}@media (width<=880px){.player{grid-template-columns:1fr;grid-template-areas:"main""side1""rail""side2""trans"}.player.swapped{grid-template-columns:1fr;grid-template-areas:"main""vid""rail""opts""trans"}.area-video.stage:not(.fs){border-radius:16px;width:100%;height:auto}.player.swapped .graphs{gap:10px}}@media (width<=560px){.app{padding:12px}.topbar{margin-bottom:12px}.transport{gap:8px;padding:8px}.transport .time{white-space:nowrap;flex-shrink:0;min-width:0;font-size:12px}.transport .scrub{flex:100%;order:-1}.btn{padding:6px 10px}.btn.play{min-width:44px}.maximize-btn,.gbtn{opacity:.85;width:30px;height:30px}.video-holder.pip{border-radius:14px}.stage.fs .transport{flex-wrap:wrap}.transport .btn-label,.transport .t-tot,.transport .loop-range{display:none}.player.swapped .stage.fs .overlay-graphs{padding:2vh 2vw 34vh}.overlay-controls.wide{flex-wrap:wrap;bottom:46px;left:8px;right:8px}.overlay-controls.wide .bp-measure{flex:100%;max-width:none}.overlay-controls.wide .beatgrid{max-height:26vh;overflow:auto}.stage.fs .video{object-fit:cover}.stage.fs .video-holder{bottom:26vh}.stage.fs .overlay-controls{max-width:none;bottom:84px;left:8px;right:8px}.stage.fs .overlay-controls .bp-measure{flex:100%}.stage.fs .overlay-controls .beatgrid{width:100%;max-height:16vh;overflow:auto}}.upload{max-width:640px;margin:40px auto}.dropzone{text-align:center;cursor:pointer;background:#11141c;border:2px dashed #2c3647;border-radius:14px;padding:56px 24px;transition:border-color .15s,background .15s}.dropzone:hover,.dropzone.over{background:#141a26;border-color:#4f9dff}.dropzone .big{color:#e7ecf5;margin:0 0 8px;font-size:18px}.dropzone .small{color:#7c869a;margin:0;font-size:13px}.processing h2{margin-bottom:18px;font-size:18px}.bar{background:#11141c;border:1px solid #2c3647;border-radius:999px;height:12px;overflow:hidden}.fill{background:linear-gradient(90deg,#4f9dff,#7ac6ff);height:100%;transition:width .4s}.stage{color:#9aa4b6;margin-top:12px;font-size:13px}.error{color:#ff6b6b;margin-top:10px;font-size:13px}.processing-view{grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:14px;width:100%;max-width:1280px;margin:0 auto;display:grid}.pv-stage{background:#000;border-radius:12px;max-height:70vh;overflow:hidden}.pv-video{object-fit:contain;background:#000;width:100%;max-height:70vh;display:block}.pv-rail{flex-direction:column;gap:14px;display:flex}.pv-graphs{flex-direction:column;gap:10px;display:flex}.pv-graph{color:#6b7488;background:#11141c;border:1px solid #1c2330;border-radius:8px;align-items:center;gap:8px;height:110px;padding:0 12px;font-size:13px;display:flex;position:relative}.pv-dot{opacity:.5;border-radius:50%;width:10px;height:10px}.pv-name{flex:1}.pv-graph .spinner{width:22px;height:22px}.pv-progress{background:#11141c;border:1px solid #1c2330;border-radius:10px;padding:12px}.pv-progress .bar{background:#0b0e14;border:1px solid #2c3647;border-radius:999px;height:10px;overflow:hidden}.pv-progress .fill{background:linear-gradient(90deg,#4f9dff,#7ac6ff);height:100%;transition:width .4s}.pv-label{color:#9aa4b6;margin:10px 0 4px;font-size:13px}.pv-hint{color:#6b7488;margin:0;font-size:12px}@media (width<=880px){.processing-view{grid-template-columns:1fr}}.app{box-sizing:border-box;min-height:100vh;padding:20px}.topbar{align-items:baseline;gap:12px;max-width:1280px;margin:0 auto 18px;display:flex}.topbar h1{letter-spacing:.5px;margin:0;font-size:20px}.tag{text-transform:uppercase;letter-spacing:1px;color:#7c869a;border:1px solid #2c3647;border-radius:999px;padding:2px 8px;font-size:11px}.link{color:#4f9dff;cursor:pointer;background:0 0;border:none;padding:0;font-size:13px}.status{text-align:center;color:#9aa4b6;margin-top:40px}.status.error{color:#ff6b6b}.rotate-overlay{display:none}@media (orientation:landscape) and (height<=560px){.rotate-overlay{z-index:9999;text-align:center;color:#cfd6e4;background:#0b0e14;flex-direction:column;justify-content:center;align-items:center;gap:14px;padding:24px;font-size:15px;display:flex;position:fixed;inset:0}.rotate-icon{font-size:44px}}
