:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#f4f2fa;background:#111116;--lime:#ae82f4;--muted:#aaa6b7;--line:#35333f;--orange:#bd98f7;--mint:#bd98f7;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,label.button{touch-action:manipulation}button,label.button{cursor:pointer}button{color:inherit;border:1px solid var(--line);background:#1c1c24;border-radius:8px;padding:9px 12px}button:hover{background:#292733}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid var(--lime);outline-offset:3px}button:disabled{opacity:.4;cursor:default}a{color:inherit}input,select,textarea{border:1px solid var(--line);background:#19191f;color:#f4f2fa;border-radius:8px;padding:10px;min-width:0}input[type=range]{padding:0;accent-color:var(--lime);width:100%;cursor:pointer}input[type=checkbox]{accent-color:var(--lime)}[hidden]{display:none!important}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.button{display:inline-flex;justify-content:center;align-items:center;gap:6px;text-decoration:none;font-weight:700;min-height:40px;padding:10px 14px;border-radius:8px;border:1px solid var(--line)}.primary,.light{background:var(--lime);border-color:var(--lime);color:#191023}.primary:hover,.light:hover{background:#c7a9fa}.hint{font-size:12px;color:var(--muted);line-height:1.5}header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:26px;font-weight:800}.brand-icon{width:44px;height:44px;border-radius:12px}.tag,.eyebrow{font-size:11px;letter-spacing:2px;color:var(--muted)}main{margin:auto;max-width:1100px;padding:0 24px}h1{font-size:clamp(34px,6vw,58px);letter-spacing:-1.5px}h2{font-size:24px;margin:0 0 14px}p{line-height:1.5}.welcome-mode{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.welcome-mode main{flex:1;min-height:0;width:100%;display:flex;flex-direction:column}.intro{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:12px 0}.intro h1{margin:16px 0}.intro>p{color:var(--muted);font-size:18px;margin:0}.welcome-copy{max-width:580px;margin:12px 0;font-size:15px}.welcome-copy p{margin:10px 0}footer{display:flex;justify-content:space-between;gap:16px;font-size:10px;color:var(--muted);padding:12px 0}#install{align-self:flex-start}.welcome-mode .workspace,.welcome-mode #appNav,.welcome-mode #status{display:none}.app-mode{height:100dvh;overflow:hidden}.app-mode header,.app-mode .intro,.app-mode footer,.app-mode #install{display:none}.app-mode main{height:100%;width:100%;max-width:none;padding:0;display:flex;flex-direction:column}#appNav{height:52px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:4px 12px;border-bottom:1px solid #292731;gap:8px}#appNav a{display:flex;align-items:center;gap:7px;font-size:20px;font-weight:800;text-decoration:none;white-space:nowrap}#appNav img{width:34px;height:34px;border-radius:8px}#appNav>div{display:flex;gap:6px}#appNav button{font-size:12px;padding:8px 10px;white-space:nowrap;min-height:36px}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(330px,1fr);gap:18px}.view{min-width:0;min-height:0;display:flex;flex-direction:column}.stage{flex:1;position:relative;background:#09090d;min-height:0;overflow:hidden;display:grid;place-items:center}.stage video,.stage #youtube{position:absolute;inset:0;width:100%;height:calc(100% - 60px);object-fit:contain;min-width:0;min-height:0}.stage #youtube iframe{width:100%;height:100%;border:0}#videoToolbar{position:absolute;bottom:0;left:0;right:0;height:60px;display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding:5px 10px;background:#15151c;z-index:2}#videoToolbar button{border:0;border-right:1px solid #35333f;background:transparent;border-radius:0;padding:6px 2px;font-size:13px;font-weight:600;white-space:nowrap}#videoToolbar button:last-of-type{border-right:0}#previewPlay{color:var(--lime)}.under-video{height:20px;color:var(--muted);padding:2px 12px;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.controls{padding:18px 20px 18px 0;min-height:0;align-self:center;width:100%;max-width:600px}fieldset{border:0;padding:0;margin:0;min-width:0}fieldset:disabled{opacity:.4}.time-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;font-variant-numeric:tabular-nums;color:var(--muted)}#clock{color:#fff}.scrub{margin-bottom:12px}.scrub input{height:22px;margin:3px 0 0}#counter{font-size:10px;white-space:nowrap}.loop-head{display:flex;align-items:center;gap:12px;font-size:14px;margin-bottom:12px}.loop-head strong{padding-right:12px;border-right:1px solid var(--line)}#duration{font-size:12px;color:var(--muted)}.loop-timeline{--a:0%;--b:100%;height:68px;position:relative;border:1px solid var(--line);border-radius:9px;margin:0 8px 12px;background:repeating-linear-gradient(90deg,#123e30 0,#123e30 15%,#1d4c3b 15%,#1d4c3b 16%);touch-action:none}.timeline-hint{position:absolute;inset:0;display:grid;place-items:center;font-size:10px;color:#aaa6b7;pointer-events:none}#loopSelection{position:absolute;left:var(--a);right:calc(100% - var(--b));top:0;bottom:0;background:linear-gradient(90deg,#bd98f733,#bd98f733);border-left:3px solid var(--orange);border-right:3px solid var(--mint);pointer-events:none}.handle{position:absolute;top:-7px;bottom:-7px;width:28px;margin-left:-14px;display:flex;justify-content:center;align-items:flex-start;font-size:13px;font-weight:800;color:#191023;z-index:2;border-radius:6px;padding-top:1px}.handle-a{left:var(--a);background:linear-gradient(var(--orange) 0 25px,transparent 25px)}.handle-b{left:var(--b);background:linear-gradient(var(--mint) 0 25px,transparent 25px)}.handle input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:ew-resize}.step-label{font-size:12px;margin:3px 0 6px}.frame-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:12px}.frame-steps button{font-size:21px;font-weight:750;min-height:44px;padding:6px}.marks{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}.marks>div{border:1px solid var(--line);border-radius:10px;padding:9px 10px;min-width:0}.marks label{display:inline-block;font-size:10px;color:#191023;padding:4px 7px;border-radius:5px;font-weight:800;background:var(--orange)}.mark-b label{background:var(--mint)}.marks input{display:block;width:100%;border:0;padding:6px 0;background:transparent;font-size:25px;line-height:1.2;font-weight:750;font-variant-numeric:tabular-nums}.marks button{width:100%;background:transparent;color:#f4f2fa;border-color:var(--orange);font-size:12px;min-height:36px;padding:6px}.mark-b button{border-color:var(--mint)}.speed-row{display:flex;align-items:center;gap:12px;margin-bottom:12px;font-size:12px}.speeds{flex:1;display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:30px;overflow:hidden}.speeds button{border:0;border-radius:30px;background:transparent;padding:9px 2px;font-size:12px}.speeds button.active{background:var(--lime);color:#191023;font-weight:750}.options{display:flex;align-items:center;gap:10px;font-size:12px}.options select{flex:1;min-width:0;padding:8px 5px;min-height:42px}.options .primary{margin-left:auto;white-space:nowrap;font-size:14px;min-height:42px}#status{flex:none;font-size:12px;line-height:1.3;margin:0;padding:4px 12px;background:#211e2a;color:#ece5fa;max-height:44px;overflow:auto}#status:empty{display:none}.app-mode:not(.practicing) .workspace{grid-template-columns:1fr}.app-mode:not(.practicing) .controls,.app-mode:not(.practicing) .under-video{display:none}#empty{max-width:620px;width:100%;text-align:center;padding:24px}#empty>p{color:var(--muted);font-size:14px}#empty small{display:block;font-size:11px;color:var(--muted);margin:16px}.sources summary{display:none}.source-card{display:flex;flex-wrap:wrap;gap:12px}.source-card>label{width:100%}.source-card form{display:flex;gap:8px;width:100%}.source-card form input{flex:1;width:100%;min-width:0}.source-card .hint{width:100%;margin:0}.sources{margin-top:22px}dialog{color:#f4f2fa;background:#18181f;border:1px solid #494353;border-radius:18px;padding:22px;width:calc(100% - 28px);max-width:480px;max-height:90dvh;overflow:auto;box-shadow:0 15px 80px #0009}dialog::backdrop{background:#09090dbf;backdrop-filter:blur(3px)}.dialog-close{float:right;border:0;background:transparent}#sourceDock .sources{margin-top:0}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head button{font-size:24px;padding:0 8px;border:0;background:transparent}.dialog-head h2{margin:0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.dialog-actions button{flex:1;min-height:44px}#saveForm{display:grid;gap:9px}#saveForm>label{font-size:13px;font-weight:650}#saveForm>label span{font-weight:400;color:var(--muted)}#saveSummary{color:var(--muted);font-size:13px;margin:5px 0 8px}.favorite-field{display:flex;align-items:center;gap:10px;padding:6px 0}.favorite-field input{width:20px;height:20px}#saveProgress{margin:0;font-size:13px;color:var(--lime)}.danger{color:#ffc097;border-color:#b87856}#archiveView{flex:1;min-height:0;max-width:850px;width:100%;margin:auto;padding:20px;display:flex;flex-direction:column}body.archive-mode .workspace{display:none}.archive-top{position:relative;flex:none}.archive-top h1{font-size:28px;margin:12px 0 3px}.archive-top p{font-size:12px;color:var(--muted);margin:0 0 14px}#backPlayer{padding:6px 10px;font-size:12px}#moveSearch{width:100%;flex:none}.filters{display:flex;gap:6px;margin:12px 0;flex:none;flex-wrap:wrap}.filters button{font-size:11px;padding:8px 10px;border-radius:20px}.filters button.active{background:var(--lime);color:#191023;border-color:var(--lime)}#moveList{overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:1px 0 8px}.move-card{position:relative;border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;grid-template-columns:68px 1fr auto;gap:12px;align-items:center;flex:none;background:#1b1b23}.move-thumb{width:68px;height:68px;object-fit:cover;border-radius:6px;background:#272331;display:grid;place-items:center;font-size:25px}.move-info{min-width:0}.move-info h3{margin:0 0 5px;font-size:17px;overflow-wrap:anywhere}.move-info p{margin:3px 0;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.move-tag{display:inline-block;font-size:10px;color:var(--mint);border:1px solid #51465f;border-radius:20px;padding:3px 7px}.move-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.move-actions button{padding:6px 9px;font-size:18px;min-height:36px}.move-actions .open-move{grid-column:1/-1;font-size:12px;background:var(--lime);color:#191023;border-color:var(--lime)}.starred{color:var(--lime)}.move-menu{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,1fr);gap:6px;padding-top:8px;border-top:1px solid var(--line)}.move-menu button{font-size:12px}.backup-bar{display:flex;gap:8px;flex-wrap:wrap;flex:none;padding-top:10px}.backup-bar button,.backup-bar label{font-size:11px;padding:9px 10px;min-height:36px}.empty-archive{text-align:center;padding:32px 14px;color:var(--muted);font-size:14px}.stage:fullscreen,.stage.fullscreen-fallback{width:100vw!important;height:100dvh!important;max-height:none!important;background:#09090d}.stage:fullscreen #videoToolbar,.stage.fullscreen-fallback #videoToolbar{top:0;bottom:auto;padding-top:max(5px,env(safe-area-inset-top));height:60px}.stage:fullscreen video,.stage:fullscreen #youtube,.stage.fullscreen-fallback video,.stage.fullscreen-fallback #youtube{top:60px;height:calc(100% - 60px)}.stage.fullscreen-fallback{position:fixed;inset:0;z-index:1000}
@media(max-width:850px){.workspace{grid-template-columns:1fr;grid-template-rows:minmax(80px,1fr) auto;gap:0}.controls{padding:8px 14px max(8px,env(safe-area-inset-bottom));align-self:auto;max-width:none}.under-video{display:none}.scrub{margin-bottom:5px}.time-row{font-size:10px}.scrub input{height:18px;margin:0}.loop-head{margin-bottom:10px}.loop-timeline{height:46px;margin-bottom:8px}.step-label{margin:2px 0 4px;font-size:11px}.frame-steps{margin-bottom:8px;gap:6px}.frame-steps button{min-height:38px;font-size:21px;padding:4px}.marks{margin-bottom:8px;gap:8px}.marks>div{padding:6px 8px}.marks input{font-size:22px;padding:5px 0}.marks button{min-height:32px;padding:5px;font-size:11px}.speed-row{gap:9px;margin-bottom:8px}.speeds button{padding:8px 0;min-height:34px}.options{gap:7px}.options select,.options .primary{min-height:38px}.options .primary{font-size:13px;padding:8px 10px}.stage video,.stage #youtube{height:calc(100% - 48px)}#videoToolbar{height:48px;padding:3px 8px}#videoToolbar button{font-size:12px}.app-mode:not(.practicing) .workspace{grid-template-rows:1fr}#archiveView{padding:14px}.tag{display:none}}
@media(max-width:390px){#appNav{padding:4px 8px;height:46px}#appNav a{font-size:17px;gap:4px}#appNav img{width:28px;height:28px}#appNav button{font-size:11px;padding:7px 8px}.options{font-size:11px}.options .primary{font-size:12px;padding:8px}.controls{padding-left:10px;padding-right:10px}.move-card{grid-template-columns:52px 1fr auto;padding:9px;gap:8px}.move-thumb{width:52px;height:62px}}
@media(max-height:700px) and (max-width:850px){#appNav{height:44px}.controls{padding-top:4px;padding-bottom:4px}.loop-timeline{height:30px;margin-bottom:6px}.loop-head{font-size:12px;margin-bottom:9px}.marks input{padding:3px 0;font-size:20px}.marks button{min-height:28px}.frame-steps button{min-height:32px}.marks,.frame-steps,.speed-row{margin-bottom:6px}.options .primary,.options select{min-height:34px}.speeds button{min-height:30px;padding:6px 0}.timeline-hint{font-size:9px}}
@media(orientation:landscape) and (max-width:950px){.workspace{grid-template-columns:minmax(0,1fr) minmax(310px,.9fr);grid-template-rows:1fr;gap:0}.controls{padding:5px 12px;align-self:center}.loop-timeline{height:28px}.loop-head{margin-bottom:8px}.step-label{display:none}.frame-steps button{min-height:28px;font-size:17px}.marks input{font-size:18px;padding:3px 0}.marks button{min-height:28px}.marks>div{padding:4px 6px}.marks label{padding:2px 5px}.marks,.frame-steps,.speed-row{margin-bottom:5px}.speeds button{padding:5px 0;min-height:28px}.options .primary,.options select{min-height:30px}#appNav{height:40px}}
@media(max-height:500px){.welcome-mode header{padding:8px 20px}.welcome-mode .brand-icon{width:32px;height:32px}.welcome-mode h1{font-size:28px;margin:8px 0}.welcome-copy{margin:3px 0;font-size:12px}.intro>p{font-size:13px}.welcome-copy p{margin:5px 0}footer{padding:6px 0}.welcome-mode #install{padding:6px 12px;min-height:30px}}
@media(orientation:landscape) and (max-height:600px) and (min-width:951px){.controls{padding:8px 18px 8px 0}.loop-timeline{height:35px}.frame-steps button{min-height:32px}.marks input{font-size:20px;padding:3px 0}.marks button{min-height:30px}.marks,.frame-steps,.speed-row{margin-bottom:6px}.scrub{margin-bottom:6px}.loop-head{margin-bottom:9px}.speeds button{min-height:30px;padding:6px 0}.options select,.options .primary{min-height:36px}}

/* Archive cards reserve width for text; actions have a separate row on narrow screens. */
.move-card{grid-template-columns:68px minmax(0,1fr) 110px;min-width:0}
.move-actions{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
.move-actions button{min-width:0;white-space:nowrap}
.move-actions .open-move{grid-column:1/-1;min-height:40px}
.move-menu{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
.move-menu button{min-width:0;white-space:normal;overflow-wrap:break-word;min-height:40px}
.move-info h3,.move-info p{overflow-wrap:break-word;word-break:normal}
.backup-bar{padding-bottom:env(safe-area-inset-bottom);background:#111116}
/* Composited handles contain no native range control that can compete with the drag. */
.handle{left:0;touch-action:none;user-select:none;-webkit-user-select:none;border:0;padding:1px 0 0;cursor:ew-resize;will-change:transform;transition:none;contain:layout style}
.handle-a,.handle-a:hover{left:0;transform:translate3d(var(--handle-a,0px),0,0);background:linear-gradient(var(--orange) 0 25px,transparent 25px)}
.handle-b,.handle-b:hover{left:0;transform:translate3d(var(--handle-b,0px),0,0);background:linear-gradient(var(--mint) 0 25px,transparent 25px)}
@media(max-width:600px){
 .move-card{grid-template-columns:60px minmax(0,1fr);padding:12px;gap:10px 12px;align-items:start}
 .move-thumb{grid-column:1;width:60px;height:72px}
 .move-info{grid-column:2}
 .move-info h3{font-size:17px;line-height:1.25}
 .move-actions{grid-column:1/-1;grid-template-columns:minmax(0,1fr) 44px 44px;gap:8px}
 .move-actions .open-move{grid-column:auto}
 .move-actions button{min-height:40px}
 .move-menu{grid-column:1/-1;grid-template-columns:1fr}
 .filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:3px;margin:10px 0}
 .filters button{flex:none;min-height:36px}
 .archive-top h1{margin-top:10px}
 .archive-top p{margin-bottom:10px}
 .backup-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
 .backup-bar button,.backup-bar label{font-size:10px;min-width:0;text-align:center;line-height:1.35;padding:8px}
}

.handle.selected::before{content:'';position:absolute;top:0;left:-2px;right:-2px;height:27px;border:2px solid #fff;border-radius:7px;box-shadow:0 0 0 3px #ae82f455;pointer-events:none}
.mark-a.selected{border-color:var(--orange);box-shadow:inset 0 0 0 1px var(--orange)}
.mark-b.selected{border-color:var(--mint);box-shadow:inset 0 0 0 1px var(--mint)}
#stepLabel{color:var(--lime);font-weight:650}

/* All archive filters fit on one row on phones. */
#moveFilters{flex-wrap:nowrap;overflow:visible;gap:6px}
#moveFilters button{white-space:nowrap;min-height:44px}
#appNav .help-nav{display:flex;justify-content:center;align-items:center;min-width:36px;min-height:36px;border:1px solid var(--line);border-radius:50%;font-size:17px;font-weight:700}
.welcome-help{font-size:13px;color:var(--muted);white-space:nowrap}
@media(max-width:600px){
 #moveFilters{gap:4px;padding-bottom:0}
 #moveFilters button{flex:1 1 auto;min-width:0;font-size:12px;padding:8px 6px}
 #moveFilters .filter-long{display:none}
 #moveFilters [data-filter="favorite"]{flex:0 0 40px;font-size:19px}
 #moveFilters [data-filter="want"]{text-transform:capitalize}
 #appNav{padding:4px 8px;gap:4px}
 #appNav>a{font-size:17px;gap:4px}
 #appNav img{width:28px;height:28px}
 #appNav>div{gap:4px}
 #appNav button{font-size:11px;padding:8px 6px}
 #appNav .help-nav{min-width:32px;min-height:36px}
}

.source-card #pasteLink{width:100%;min-height:44px}

/* Keep the film chooser reachable when the mobile keyboard is open. */
.app-mode:not(.practicing) .stage{display:flex;overflow-y:auto;overscroll-behavior-y:contain}
.app-mode:not(.practicing) #empty{flex-shrink:0;margin:auto}
#sourceDock{position:fixed;inset:auto;top:calc(var(--viewport-top,0px) + 12px);left:0;right:0;margin:0 auto;max-height:calc(var(--app-height,100dvh) - 24px);overscroll-behavior-y:contain;scroll-padding:12px}
#sourceDock h2{clear:both;padding-top:8px}
@media(max-width:600px){
 #sourceDock{padding:16px}
 #sourceDock h2{font-size:22px}
 .source-card form{flex-direction:column}
 .source-card form input{font-size:16px;min-height:44px}
 .source-card form button{width:100%;min-height:44px}
 .source-card>label{min-height:48px}
}

/* Reserve a reachable controls area within the actual mobile viewport. */
.app-mode{height:var(--app-height,100dvh)}
.app-mode main{min-height:0}
.app-mode .workspace{overflow:auto;overscroll-behavior-y:contain}
@media(max-width:850px) and (orientation:portrait){
 .app-mode.practicing .workspace{grid-template-rows:minmax(100px,1fr) minmax(0,auto)}
 .app-mode.practicing .controls{
  max-height:calc(var(--app-height,100dvh) - 160px);
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  padding-bottom:max(12px,env(safe-area-inset-bottom));
 }
 .app-mode.practicing .controls .options{
  position:sticky;
  bottom:0;
  z-index:3;
  background:#111116;
  padding:6px 0 4px;
  box-shadow:0 -6px 8px #111116;
 }
 .app-mode.practicing .loop-timeline{height:38px}
 .app-mode.practicing .marks input{padding:3px 0}
}
@media(orientation:landscape) and (max-height:600px){
 .app-mode.practicing .controls{max-height:100%;overflow-y:auto;overscroll-behavior-y:contain}
}

/* Large marker actions, with secondary read-only timestamps. */
.marks>div{padding:0;border:0;background:transparent}
.marks button{display:flex;flex-direction:column;gap:12px;justify-content:center;text-align:left;min-height:86px;padding:12px;border-radius:10px;background:#bd98f710;font-weight:750}
.marks .mark-b button{background:#bd98f710}
.marks button:hover{background:#bd98f720}
.marks .mark-b button:hover{background:#bd98f720}
.mark-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%}
.mark-badge{font-size:10px;color:#191023;padding:4px 6px;border-radius:5px;background:var(--orange);white-space:nowrap}
.mark-b .mark-badge{background:var(--mint)}
.marks output{font-size:11px;font-weight:400;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap}
.source-card{display:block;text-align:left}
.source-card #linkForm{display:block}
.source-card #link{display:block;width:100%;font-size:16px;min-height:48px}
.source-platforms{font-size:12px;color:var(--muted);margin:9px 0 22px}
.source-split{display:flex;overflow:hidden;border-radius:12px;background:var(--lime)}
.source-card .source-split #openFilm{flex:1;min-width:0;width:auto;border:0;border-radius:0;min-height:56px;font-size:16px}
.source-card .source-split #sourceMore{flex:0 0 52px;width:52px;border:0;border-left:1px solid #19102333;border-radius:0;color:#191023;background:var(--lime);font-size:24px;min-height:56px}
.source-split:focus-within{outline:3px solid var(--lime);outline-offset:3px}
#sourceMenu{margin-top:8px;padding:6px;border:1px solid var(--line);border-radius:12px;background:#20202a}
#chooseFile{width:100%;min-height:48px;text-align:left;border:0;background:transparent}
.source-foot{font-size:12px;color:var(--muted);text-align:center;margin:14px 0 0}
.source-foot a{margin-left:8px}
#sourceFeedback{font-size:14px;color:var(--lime);margin:16px 0 0;overflow-wrap:anywhere}
.source-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}
#sourceDock .source-head h2{margin:0;padding:0;clear:none;font-size:24px}
.source-head .dialog-close{float:none;flex:none;min-width:44px;min-height:44px;font-size:24px}

/* Keep welcome content inside tablet and embedded browser bounds. */
.welcome-mode{width:100%;min-width:0;height:auto;min-height:var(--app-height,100dvh);overflow-x:hidden;overflow-y:auto}
.welcome-mode header{width:100%;max-width:1100px;min-width:0;margin:0 auto;flex-shrink:0;padding: max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 16px max(24px,env(safe-area-inset-left))}
.welcome-mode main{min-width:0;max-width:1100px;margin:0 auto;padding:0 max(24px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}
.welcome-mode .intro{min-width:0;width:100%;padding:32px 0;flex:1}
.welcome-mode .intro h1,.welcome-mode .intro p{max-width:100%;overflow-wrap:break-word}
.welcome-mode footer{flex-wrap:wrap;min-width:0;flex-shrink:0}
.welcome-mode footer a{overflow-wrap:anywhere}
@media(min-width:700px){
 .welcome-mode header{padding-left:max(40px,env(safe-area-inset-left));padding-right:max(40px,env(safe-area-inset-right));padding-top:max(48px,env(safe-area-inset-top))}
 .welcome-mode main{padding-left:max(40px,env(safe-area-inset-left));padding-right:max(40px,env(safe-area-inset-right));padding-bottom:max(32px,env(safe-area-inset-bottom))}
 .welcome-mode .intro{padding-top:40px;padding-bottom:40px}
}
.mark-action{font-size:15px;line-height:1.3}
@media(max-width:360px){.marks button{padding:10px 8px}.mark-badge{font-size:9px}.marks output{font-size:10px}.mark-action{font-size:14px}}

/* Filmstudio: one playback row and direct loop handles. */
:root{color-scheme:dark;--lime:#ae82f4;--orange:#bd98f7;--mint:#bd98f7;--muted:#aaa6b7;--line:#35333f;background:#111116}
#appNav{background:#111116;border-color:var(--line)}
#appNav>a,.brand{color:#c6a3fa;letter-spacing:-.6px}
#appNav button{background:transparent;border-color:var(--line);border-radius:12px}
.workspace{gap:24px;padding:16px 20px 20px}
.stage{border-radius:18px;background:#09090d}
.controls{padding:20px 8px;align-self:center}
.scrub{margin-bottom:16px}.scrub input{accent-color:var(--lime)}
.loop-head{margin:0 0 12px;font-size:13px}.loop-head strong{border:0;font-weight:550}
.loop-timeline,.app-mode.practicing .loop-timeline{height:48px;margin:0 24px 0;border:0;border-radius:0;background:none!important;overflow:visible}
.loop-timeline::before{content:'';position:absolute;left:0;right:0;top:25px;height:4px;border-radius:4px;background:#393541;pointer-events:none}
#loopSelection{top:25px;bottom:auto;height:4px;background:#ae82f4;border:0;border-radius:4px}
.handle,.handle-a,.handle-a:hover,.handle-b,.handle-b:hover{top:0;bottom:auto;width:44px;height:48px;margin-left:-22px;padding:0;align-items:center;color:#e8dcfb;background:transparent;border:0;touch-action:none;font-size:14px;isolation:isolate}
.handle::after{content:'';position:absolute;z-index:-1;top:3px;left:7px;width:30px;height:38px;border:1px solid #68517e;border-radius:10px;background:#292131}
.handle.selected{z-index:4;color:#1d112c}
.handle.selected::after{background:#bd98f7;border-color:#e5d1ff}
.handle.selected::before{top:0;left:4px;right:4px;height:44px;border:1px solid #d9baff;border-radius:12px;box-shadow:none}
.marker-times{display:flex;justify-content:space-between;margin:4px 6px 0;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.marker-times output{margin-left:6px}
.loop-help{font-size:11px;text-align:center;color:var(--muted);margin:10px 0 16px;line-height:1.4}
#stepLabel{display:block;text-align:center;font-size:11px;font-weight:450;color:#c6b1df;min-height:16px;margin:0 0 10px}
.frame-steps{grid-template-columns:1fr 1fr 1.3fr 1fr 1fr;align-items:center;gap:6px;margin:0 0 22px}
.frame-steps button{min-height:54px;border:0;background:transparent;font-size:19px;font-weight:450;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px 0}
.frame-steps button:hover{background:#25212e}.frame-steps small{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.frame-steps #play{width:58px;height:58px;min-height:58px;justify-self:center;border-radius:50%;background:#ae82f4;color:#fff;font-size:23px;box-shadow:0 3px 14px #0003}
.frame-steps #play:hover{background:#bd98f7}
.speed-row{margin-bottom:16px}.speeds{background:#19191f;border-color:var(--line)}.speeds button{min-height:42px}.speeds button.active{background:#ae82f4;color:#1d112c}
.options .primary{background:transparent;border-color:#51445f;color:#d2b8f3;font-weight:550;width:100%;min-height:44px;border-radius:12px}
.app-mode.practicing .controls .options{background:#111116;box-shadow:none;position:static;padding:0}
#videoToolbar{background:#15151c;grid-template-columns:repeat(3,1fr)}
#videoToolbar #previewPlay{display:none}
.stage:fullscreen #videoToolbar,.stage.fullscreen-fallback #videoToolbar{grid-template-columns:repeat(4,1fr)}
.stage:fullscreen #previewPlay,.stage.fullscreen-fallback #previewPlay{display:block}
#sourceMenu,.move-card{background:#1b1b23}.source-split{background:var(--lime)}
@media(max-width:850px) and (orientation:portrait){
 .workspace{padding:10px 10px 0;gap:0;grid-template-columns:1fr}
 .app-mode.practicing .workspace{grid-template-rows:minmax(100px,1fr) auto}
 .controls{padding:14px 12px max(12px,env(safe-area-inset-bottom));max-width:none}
 .app-mode.practicing .controls{max-height:calc(var(--app-height,100dvh) - 160px)}
 .loop-help{margin:8px 0 12px}.frame-steps{margin-bottom:14px}.scrub{margin-bottom:10px}
 .speed-row{margin-bottom:12px}
}
@media(orientation:landscape) and (max-height:600px){
 .workspace{padding:8px;gap:14px;grid-template-columns:minmax(0,1fr) minmax(310px,.9fr)}
 .controls{padding:8px}.loop-help{margin:4px 0 8px}.frame-steps{margin-bottom:10px}.speed-row{margin-bottom:10px}
}
@media(max-width:360px){.workspace{padding-left:6px;padding-right:6px}.controls{padding-left:8px;padding-right:8px}.frame-steps{gap:2px}}

/* Quiet studio controls: playback position above a separate loop window. */
.ui-icon{width:22px;height:22px;flex:none;display:block}
#appNav{height:58px;padding:6px max(18px,env(safe-area-inset-right)) 6px max(18px,env(safe-area-inset-left));border:0}
#appNav>a{gap:0;font-size:24px;color:#f2eff8;letter-spacing:-.9px}
#appNav>a span{color:#b58af4}
#appNav #myMoves{border:0;width:44px;height:44px;padding:10px;color:#c3bccf}
#appNav .help-nav{font-size:14px;color:var(--muted);font-weight:400}
.controls{padding:18px 12px}
.clip-title{font-size:clamp(18px,2.5vw,24px);font-weight:600;letter-spacing:-.45px;margin:0 0 14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scrub{margin:0 22px 16px;height:30px;display:flex;align-items:center}
.scrub input[type=range]{--progress:0%;-webkit-appearance:none;appearance:none;height:30px;margin:0;width:100%;background:transparent;accent-color:#fff;touch-action:pan-y}
#seek::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(to right,#f1edf9 0 var(--progress),#393541 var(--progress) 100%)}
#seek::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:17px;height:17px;margin-top:-6.5px;background:#f6f2fc;border:1px solid #fff;border-radius:50%;box-shadow:0 1px 7px #0005;transition:box-shadow .18s ease}
#seek:active::-webkit-slider-thumb{box-shadow:0 0 0 5px #ffffff12,0 1px 7px #0005}
#seek::-moz-range-track{height:4px;border-radius:4px;background:#393541}
#seek::-moz-range-progress{height:4px;border-radius:4px;background:#f1edf9}
#seek::-moz-range-thumb{width:17px;height:17px;border:1px solid #fff;background:#f6f2fc;border-radius:50%;box-shadow:0 1px 7px #0005}
.loop-timeline,.app-mode.practicing .loop-timeline{height:42px;margin:0 22px 25px;border:1px solid #4b455b;border-radius:10px;background:#202029!important;isolation:isolate}
.loop-timeline::before{display:none}
#loopSelection{top:-1px;bottom:-1px;height:auto;background:linear-gradient(180deg,#ae82f426,#ae82f418);border:1px solid #b48aea;border-radius:2px;transition:background .18s ease,border-color .18s ease}
.loop-timeline.editing #loopSelection{border-color:#c9a4ff;background:linear-gradient(180deg,#ae82f437,#ae82f420)}
.handle,.handle-a,.handle-a:hover,.handle-b,.handle-b:hover{top:-4px;bottom:auto;height:48px;width:44px;margin-left:-22px;display:flex;align-items:center;justify-content:center;background:transparent;color:#f4ecff;contain:none;overflow:visible;border:0;padding:0;isolation:auto;outline-offset:1px}
.handle::before,.handle::after,.handle.selected::before,.handle.selected::after{display:none}
.handle-face{display:flex;position:relative;flex-direction:column;gap:1px;align-items:center;justify-content:center;width:24px;height:42px;border:1px solid #bf94f2;border-radius:7px;background:#7753a8;box-shadow:0 1px 4px #0004;transition:transform .2s cubic-bezier(.2,.8,.2,1),background .18s ease,box-shadow .18s ease,border-color .18s ease}
.handle-face>span{font-size:13px;font-weight:600;line-height:16px}
.handle .grip{width:16px;height:16px;opacity:.65;stroke-width:1.3}
.handle.selected{color:#fff}
.handle.selected .handle-face{background:#a578dc;border-color:#d4b5ff;box-shadow:0 0 0 2px #ae82f418,0 2px 9px #0004}
.handle.dragging .handle-face{transform:scale(1.07);background:#b086e4;box-shadow:0 0 0 4px #ae82f416,0 3px 10px #0004}
#stepLabel.sr,.loop-help.sr{position:absolute!important;display:block!important;width:1px!important;height:1px!important;min-height:0;margin:0;overflow:hidden;clip:rect(0,0,0,0)}
.frame-steps{margin:0 0 20px;grid-template-columns:1fr 1fr 1.3fr 1fr 1fr;gap:6px}
.frame-steps button{min-height:58px;gap:6px;color:#d6cede;transition:transform .16s ease,background .18s ease,color .18s ease}
.frame-steps .frame-icon{width:24px;height:24px;stroke-width:1.5}
.frame-icon path:not(:first-child){fill:currentColor;stroke-width:1}
.frame-steps button small{font-size:11px;line-height:14px;color:#aaa3b6}
.frame-steps button:active{transform:scale(.94);background:#ae82f418}
.frame-steps #play{position:relative;width:62px;height:62px;min-height:62px;padding:0;color:#fff;background:linear-gradient(145deg,#b48af5,#9360de);box-shadow:inset 0 1px 0 #e5cfff40,0 4px 15px #0003}
#play svg{position:absolute;top:50%;left:50%;width:28px;height:28px;fill:currentColor;transform:translate(-50%,-50%);transition:opacity .16s ease,transform .2s cubic-bezier(.2,.8,.2,1);pointer-events:none}
#play .play-glyph{opacity:1;transform:translate(calc(-50% - .5px),-50%) scale(1)}
#play .pause-glyph{opacity:0;transform:translate(-50%,-50%) scale(.8)}
#play.is-playing .play-glyph{opacity:0;transform:translate(calc(-50% - .5px),-50%) scale(.8)}
#play.is-playing .pause-glyph{opacity:1;transform:translate(-50%,-50%) scale(1)}
#play:active{transform:scale(.95);box-shadow:inset 0 1px 0 #e5cfff20,0 2px 5px #0003}
.speed-row{justify-content:center;margin:0 0 20px;gap:0}
#speedSelect{min-height:44px;min-width:116px;width:auto;padding:10px 30px 10px 24px;text-align:center;font-size:15px;border-radius:30px;border-color:#3f394c;background-color:#17171e;cursor:pointer;transition:border-color .18s ease,background-color .18s ease}
#speedSelect:hover,#speedSelect:focus{border-color:#8362a9;background-color:#1f1b28}
.options,.app-mode.practicing .controls .options{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:12px 0 0;border-top:1px solid #2a2633;background:transparent}
.options #changeFilm,.options #saveMove{width:100%;display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;border:0;border-radius:10px;background:transparent;color:#c8c0d6;font-size:13px;font-weight:450;transition:background .18s ease,color .18s ease,transform .16s ease}
.options #changeFilm{border-right:1px solid #302b3a;border-radius:10px 0 0 10px}
.options #saveMove{border-radius:0 10px 10px 0}
.options button:hover{background:#ae82f40b;color:#e7d6fa}.options button:active{transform:scale(.97)}
.save-check{stroke-dasharray:24;stroke-dashoffset:24;opacity:0;transition:stroke-dashoffset .35s ease,opacity .18s ease}
.save-bookmark{transition:opacity .18s ease}
.just-saved{color:#c6a2f5!important}.just-saved .save-check{opacity:1;stroke-dashoffset:0}.just-saved .save-bookmark{opacity:0}
#videoToolbar{height:42px;padding:0 10px;background:#111116}
#videoToolbar button{display:flex;align-items:center;justify-content:center;border:0;min-height:42px;color:#b9b1c7}
#videoToolbar .ui-icon{width:19px;height:19px}
#mute.is-muted .sound-waves{opacity:.15}
.stage video,.stage #youtube{height:calc(100% - 42px)}
.stage:fullscreen #videoToolbar,.stage.fullscreen-fallback #videoToolbar{height:60px}
.stage:fullscreen video,.stage:fullscreen #youtube,.stage.fullscreen-fallback video,.stage.fullscreen-fallback #youtube{top:60px;height:calc(100% - 60px)}
#appNav button,dialog button,.source-split button{transition:background .18s ease,transform .16s ease,border-color .18s ease}
#appNav button:active,dialog button:active,.source-split button:active{transform:scale(.97)}
dialog[open]{animation:studio-dialog .22s cubic-bezier(.2,.8,.2,1)}
@keyframes studio-dialog{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:1000px) and (orientation:portrait){
 .workspace{grid-template-columns:1fr;gap:0;padding:8px 12px 0}
 .app-mode.practicing .workspace{grid-template-rows:minmax(100px,1fr) auto}
 .controls{padding:14px 12px max(12px,env(safe-area-inset-bottom));align-self:auto;max-width:none}
 .clip-title{font-size:20px;margin-bottom:10px}
 .frame-steps{margin-bottom:15px}.speed-row{margin-bottom:16px}
 .app-mode.practicing .controls{max-height:calc(var(--app-height,100dvh) - 150px);overflow-y:auto}
}
@media(max-height:700px) and (orientation:portrait){
 #appNav{height:48px}.controls{padding-top:10px}.clip-title{font-size:18px;margin-bottom:6px}
 .scrub{margin-bottom:10px}.loop-timeline,.app-mode.practicing .loop-timeline{margin-bottom:16px}
 .frame-steps{margin-bottom:10px}.speed-row{margin-bottom:10px}.options,.app-mode.practicing .controls .options{padding-top:8px}
}
@media(orientation:landscape) and (max-height:600px){
 #appNav{height:44px}.controls{padding:8px 12px;overflow:auto;max-height:100%}.clip-title{font-size:17px;margin-bottom:4px}
 .scrub{margin-bottom:8px}.loop-timeline,.app-mode.practicing .loop-timeline{margin-bottom:10px}
 .frame-steps{margin-bottom:8px}.frame-steps #play{width:52px;height:52px;min-height:52px}.speed-row{margin-bottom:8px}
 .options,.app-mode.practicing .controls .options{padding-top:6px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* A single soft timeline holds the loop and the white playback position. */
.controls{padding-top:24px}
.loop-timeline,.app-mode.practicing .loop-timeline{height:46px;margin:4px 22px 30px;border:1px solid #ffffff12;border-radius:14px;background:linear-gradient(180deg,#25232c,#1e1d26)!important;box-shadow:inset 0 1px 0 #ffffff04}
#loopSelection{top:-1px;bottom:-1px;border-color:#ba9adc6b;border-radius:10px;background:linear-gradient(180deg,#ac89d51a,#ac89d52e);transition:background .35s ease,border-color .35s ease}
.loop-timeline.editing #loopSelection{border-color:#c4a4eaaa;background:linear-gradient(180deg,#b995e626,#b995e638)}
#loopProgress{position:absolute;left:var(--a);width:var(--played,0%);top:0;bottom:0;border-radius:9px;background:linear-gradient(90deg,#ae82f403,#ae82f420);pointer-events:none;opacity:.35;transition:opacity .4s ease}
.playing #loopProgress{opacity:1}
#positionGlow{position:absolute;left:var(--position,0%);top:6px;bottom:6px;width:24px;border-radius:50%;background:#e6d8ff;filter:blur(10px);opacity:0;transform:translateX(-50%);pointer-events:none;transition:opacity .4s ease}
.playing #positionGlow{opacity:.12}
#loopTimeline #seek{position:absolute;left:-8.5px;top:0;width:calc(100% + 17px);height:44px;margin:0;padding:0;-webkit-appearance:none;appearance:none;background:transparent;z-index:2;border:0;cursor:ew-resize;touch-action:pan-y;overflow:visible}
#loopTimeline #seek::-webkit-slider-runnable-track{height:4px;background:transparent;border:0}
#loopTimeline #seek::-webkit-slider-thumb{width:17px;height:17px;margin-top:-6.5px;border:1px solid #fff;background:radial-gradient(circle at 35% 30%,#fff,#e4ddec);box-shadow:0 1px 6px #0005,0 0 0 3px #ffffff08;transition:box-shadow .25s ease,transform .25s cubic-bezier(.2,.8,.2,1)}
#loopTimeline #seek:active::-webkit-slider-thumb{transform:scale(1.12);box-shadow:0 1px 7px #0004,0 0 0 6px #ffffff0c}
#loopTimeline #seek::-moz-range-track,#loopTimeline #seek::-moz-range-progress{background:transparent;border:0}
#loopTimeline #seek::-moz-range-thumb{width:17px;height:17px;border:1px solid #fff;background:#f5f0fa;box-shadow:0 1px 6px #0005,0 0 0 3px #ffffff08;transition:box-shadow .25s ease,transform .25s ease}
#loopTimeline #seek:active::-moz-range-thumb{transform:scale(1.12);box-shadow:0 0 0 6px #ffffff0c}
.handle,.handle-a,.handle-a:hover,.handle-b,.handle-b:hover{top:-1px;height:46px;z-index:4}
.handle-face{height:38px;width:25px;border-radius:9px;border-color:#c2a3e45c;background:linear-gradient(150deg,#8e72ad,#71568f);box-shadow:inset 0 1px 0 #ffffff15,0 2px 6px #0003;transition:transform .3s cubic-bezier(.2,.8,.2,1),background .3s ease,box-shadow .3s ease,border-color .3s ease}
.handle .grip{opacity:.45;width:13px;height:13px}
.handle.selected .handle-face{background:linear-gradient(150deg,#ad8bce,#9874bb);border-color:#d9b7f2aa;box-shadow:inset 0 1px 0 #ffffff20,0 0 0 3px #b995e60a,0 2px 10px #0003}
.handle.dragging .handle-face{transform:translateY(-2px) scale(1.06);background:linear-gradient(150deg,#ba9bd7,#a07cbd);box-shadow:inset 0 1px 0 #ffffff25,0 0 0 5px #b995e60e,0 5px 12px #0004}
.frame-steps{margin-bottom:24px}
.frame-steps #play{background:linear-gradient(145deg,#b596d9,#956bbc);box-shadow:inset 0 1px 0 #ead7ff35,0 4px 18px #0003;transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .35s ease,filter .35s ease}
.frame-steps #play:hover{background:linear-gradient(145deg,#c0a0e3,#a27aca);filter:brightness(1.04)}
#play::before{content:'';position:absolute;inset:-6px;border-radius:50%;border:1px solid #c6a4ed00;opacity:0;pointer-events:none;transition:opacity .45s ease,border-color .45s ease}
#play.is-playing::before{border-color:#c6a4ed25;opacity:1;animation:studio-breathe 3.6s ease-in-out infinite}
#play svg{transition:opacity .24s ease,transform .35s cubic-bezier(.2,.8,.2,1)}
.frame-steps button .frame-icon{transition:transform .25s cubic-bezier(.2,.8,.2,1),opacity .25s ease}
.frame-steps button[data-frames^='-']:active .frame-icon{transform:translateX(-2px)}
.frame-steps button[data-frames]:not([data-frames^='-']):active .frame-icon{transform:translateX(2px)}
#speedSelect{border-color:#ffffff15;background-color:#1c1a23;transition:border-color .3s ease,background-color .3s ease,box-shadow .3s ease}
#speedSelect:focus{box-shadow:0 0 0 4px #ae82f40a}
.app-mode.practicing .controls{animation:studio-enter .45s cubic-bezier(.2,.8,.2,1)}
@keyframes studio-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes studio-breathe{0%,100%{transform:scale(1);opacity:.55}50%{transform:scale(1.055);opacity:1}}
@media(max-width:1000px) and (orientation:portrait){.controls{padding-top:20px}.loop-timeline,.app-mode.practicing .loop-timeline{margin-top:2px;margin-bottom:24px}}
@media(max-height:700px) and (orientation:portrait){.controls{padding-top:14px}.loop-timeline,.app-mode.practicing .loop-timeline{margin-bottom:18px}.frame-steps{margin-bottom:16px}}
@media(orientation:landscape) and (max-height:600px){.controls{padding-top:12px}.loop-timeline,.app-mode.practicing .loop-timeline{margin-bottom:16px}.frame-steps{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Small soft playhead; the native range keeps its larger interaction area. */
#positionMarker{position:absolute;left:var(--position,0%);top:22px;width:0;height:0;z-index:3;pointer-events:none}
.position-dot{position:absolute;left:-5px;top:-5px;width:10px;height:10px;border-radius:50%;background:#faf8ff;box-shadow:0 0 5px 1px #ffffff28;transition:box-shadow .25s ease,transform .25s cubic-bezier(.2,.8,.2,1)}
.position-stem{position:absolute;left:-.5px;top:4px;width:1px;height:15px;background:linear-gradient(180deg,#f8f5fff0 0%,#f8f5ff95 55%,#f8f5ff00 100%);transition:opacity .25s ease}
#loopTimeline #seek::-webkit-slider-thumb{background:transparent;border:0;box-shadow:none;transform:none}
#loopTimeline #seek:active::-webkit-slider-thumb{box-shadow:none;transform:none}
#loopTimeline #seek::-moz-range-thumb{background:transparent;border:0;box-shadow:none;transform:none}
#loopTimeline #seek:active::-moz-range-thumb{box-shadow:none;transform:none}
#loopTimeline:has(#seek:active) .position-dot{transform:scale(1.12);box-shadow:0 0 7px 2px #ffffff38}
#loopTimeline:has(#seek:focus-visible) .position-dot{box-shadow:0 0 0 3px #bfa3e94d,0 0 5px #ffffff30}
@media(prefers-reduced-motion:reduce){.position-dot,.position-stem{transition:none!important}}

/* An inline speed chooser uses the same materials as the player. */
#speedPicker{display:flex;flex-direction:column;align-items:center;gap:0}
#speedToggle{display:flex;align-items:center;justify-content:center;gap:18px;min-width:118px;min-height:44px;padding:10px 18px 10px 24px;border-radius:24px;border:1px solid #ffffff16;background:linear-gradient(155deg,#211d2a,#19171f);color:#e1d8eb;font-size:15px;box-shadow:inset 0 1px 0 #ffffff05;transition:background .25s ease,border-color .25s ease,box-shadow .25s ease}
#speedToggle:hover,#speedPicker.open #speedToggle{border-color:#ba9cdc55;background:linear-gradient(155deg,#2b2336,#211b2a);box-shadow:inset 0 1px 0 #ffffff07,0 0 0 3px #b99bd607}
#speedValue{display:inline-block;min-width:39px;font-variant-numeric:tabular-nums}
.speed-chevron{width:16px;height:16px;color:#b9a4d1;transition:transform .28s cubic-bezier(.2,.8,.2,1)}
#speedPicker.open .speed-chevron{transform:rotate(180deg)}
#speedPanel{display:grid;grid-template-rows:0fr;width:min(280px,100%);opacity:0;visibility:hidden;transition:grid-template-rows .28s cubic-bezier(.2,.8,.2,1),opacity .2s ease,visibility .28s;transform-origin:top center}
#speedPicker.open #speedPanel{grid-template-rows:1fr;opacity:1;visibility:visible}
.speed-panel-inner{min-height:0;overflow:hidden}
#speeds.speed-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:10px 0 0;padding:5px;border:1px solid #ffffff10;border-radius:18px;background:linear-gradient(145deg,#25212d,#1b1822);box-shadow:inset 0 1px 0 #ffffff04,0 5px 14px #0002}
#speeds.speed-choices button{min-width:0;min-height:44px;border:1px solid transparent;border-radius:13px;background:transparent;color:#bfb4cc;font-size:12px;padding:8px 4px;transition:color .2s ease,background .25s ease,border-color .25s ease,box-shadow .25s ease}
#speeds.speed-choices button:hover{color:#eee4f7;background:#cba0f410}
#speeds.speed-choices button.active{background:linear-gradient(145deg,#b495d4,#9272b6);color:#fff;border-color:#e3c6ff25;box-shadow:inset 0 1px 0 #ffffff15,0 2px 6px #0002;font-weight:550}
#speeds.speed-choices button:disabled{opacity:.3;cursor:default}
.has-tap-feedback{position:relative}
.tap-flash{position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at var(--tap-x,50%) var(--tap-y,50%),#eee1ff35,transparent 75%);animation:studio-tap .45s ease-out forwards}
@keyframes studio-tap{0%{opacity:0;transform:scale(.84)}20%{opacity:.85}100%{opacity:0;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){#speedPanel,.speed-chevron,#speedToggle,#speeds.speed-choices button{transition:none!important}.tap-flash{display:none}}

/* Speed expands sideways without adding a row. */
#speedPicker{position:relative;display:block;height:54px;min-height:54px;width:100%;margin-bottom:20px}
#speedToggle{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:2;transition:opacity .16s ease,visibility .16s,border-color .25s ease}
#speedPicker.open #speedToggle{opacity:0;visibility:hidden;pointer-events:none}
#speedPanel{position:absolute;top:0;left:50%;width:min(280px,100%);display:block;grid-template-rows:none;transform:translateX(-50%) scaleX(.43);opacity:0;visibility:hidden;transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .16s ease,visibility .3s;transform-origin:center}
#speedPicker.open #speedPanel{grid-template-rows:none;transform:translateX(-50%) scaleX(1);opacity:1;visibility:visible}
.speed-panel-inner{overflow:visible}
#speeds.speed-choices{margin:0;border-radius:24px;padding:4px}
#speeds.speed-choices button{border-radius:18px;min-height:44px}
#speedPicker.open #speeds{animation:studio-speeds .26s ease-out}
@keyframes studio-speeds{from{filter:brightness(.92)}to{filter:brightness(1)}}
/* Raised loop tabs leave the white playback dot unobstructed below. */
.loop-timeline,.app-mode.practicing .loop-timeline{margin-top:32px}
.handle,.handle-a,.handle-a:hover,.handle-b,.handle-b:hover{top:-36px;height:44px;width:44px;z-index:4}
.handle-face{height:28px;width:28px;border-radius:9px;gap:0}
.handle-face>span{font-size:12px;line-height:16px}
.handle .grip{display:none}
.handle::after,.handle.selected::after{content:'';display:block;position:absolute;left:21.5px;top:35px;width:1px;height:44px;background:linear-gradient(180deg,#c1a0e890,#c1a0e830);border:0;border-radius:0;z-index:-1;pointer-events:none}
.handle.selected::after{background:linear-gradient(180deg,#ddc1ffaa,#c1a0e844)}
#positionMarker{z-index:5}
.position-dot{box-shadow:0 0 0 2px #201b2c,0 0 6px 1px #ffffff25}
@media(max-height:700px) and (orientation:portrait){.loop-timeline,.app-mode.practicing .loop-timeline{margin-top:30px}#speedPicker{margin-bottom:12px}}
@media(orientation:landscape) and (max-height:600px){.loop-timeline,.app-mode.practicing .loop-timeline{margin-top:30px}#speedPicker{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){#speedPanel,#speedToggle{transition:none!important}#speedPicker.open #speeds{animation:none!important}}

/* Prepare the loop, then give the whole viewport to the film. */
#speeds.speed-choices{grid-template-columns:repeat(5,minmax(0,1fr))}
#speedPanel{width:min(320px,100%)}
.app-mode.practicing .controls{padding:10px 12px max(10px,env(safe-area-inset-bottom))}
.app-mode.practicing .loop-timeline{margin-top:30px;margin-bottom:14px;height:40px}
.app-mode.practicing .frame-steps{margin-bottom:12px}
.app-mode.practicing #speedPicker{margin-bottom:10px}
.app-mode.practicing .options{padding-top:6px}
#practiceDock{position:absolute;z-index:8;bottom:max(16px,env(safe-area-inset-bottom));left:50%;width:min(340px,calc(100% - 24px));transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none}
#practiceToggle{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;min-width:90px;padding:10px 16px;border-radius:30px;border:1px solid #ffffff24;background:#17131ed9;color:#f3eafa;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 4px 20px #0003;pointer-events:auto;font-size:13px;font-variant-numeric:tabular-nums;transition:background .25s ease,box-shadow .25s ease}
#practiceToggle .ui-icon{width:18px;height:18px}
#practiceToggle .practice-pause{display:none}
#practiceToggle.is-playing .practice-pause{display:block}
#practiceToggle.is-playing .practice-play{display:none}
#practiceToggle:hover{background:#211a2bea;box-shadow:0 4px 24px #0004}
#practicePanel{pointer-events:auto;width:100%;padding:10px;border:1px solid #ffffff1a;border-radius:22px;background:#18141fe8;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 6px 28px #0004;animation:studio-dialog .24s ease-out}
.practice-speeds{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
.practice-speeds button{min-height:44px;padding:8px 2px;border-radius:14px;border:1px solid transparent;background:transparent;font-size:12px;color:#d5c8e4}
.practice-speeds button.active{background:linear-gradient(145deg,#ad8bcd,#8761a9);border-color:#e0c0ff25;color:#fff}
#adjustLoop{width:100%;min-height:44px;margin-top:7px;border:0;border-top:1px solid #ffffff12;border-radius:0 0 12px 12px;background:transparent;color:#c8b9d8;font-size:12px}
.app-mode.training-mode #appNav{display:none}
.app-mode.training-mode .workspace{display:flex;flex-direction:column;padding:0;gap:0;overflow:hidden}
.app-mode.training-mode .view{flex:1;min-height:0;width:100%}
.app-mode.training-mode .controls{display:none}
.app-mode.training-mode .stage{border-radius:0;background:#08080b}
.app-mode.training-mode #videoToolbar{display:none}
.app-mode.training-mode .stage video,.app-mode.training-mode .stage #youtube{inset:0;width:100%;height:100%;object-fit:contain}
.app-mode.training-mode #status:not(:empty){position:fixed;top:0;left:0;right:0;z-index:10}
@media(max-width:1000px) and (orientation:portrait){
 .app-mode.practicing:not(.training-mode) .workspace{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto}
 .app-mode.practicing:not(.training-mode) .stage{border-radius:12px}
 .app-mode.practicing:not(.training-mode) .controls{max-height:calc(var(--app-height,100dvh) - 150px)}
}
@media(orientation:landscape) and (max-height:600px){
 #practiceDock{bottom:max(12px,env(safe-area-inset-bottom))}
 .app-mode.practicing .controls{padding-top:6px}
}
@media(prefers-reduced-motion:reduce){#practicePanel{animation:none!important}#practiceToggle{transition:none!important}}

/* The image keeps the same geometry while a glass panel opens over it. */
.app-mode.practicing #appNav{display:none}
.app-mode.practicing .workspace{display:flex;flex-direction:column;position:relative;padding:0;gap:0;overflow:hidden}
.app-mode.practicing .view{flex:1;min-height:0;width:100%}
.app-mode.practicing .stage{border-radius:0;background:#08080b}
.app-mode.practicing #videoToolbar{display:none}
.app-mode.practicing .stage video,.app-mode.practicing .stage #youtube{inset:0;width:100%;height:100%;object-fit:contain}
.app-mode.practicing .overlay-controls{position:absolute;z-index:7;left:50%;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 58px);width:min(360px,calc(100% - 24px));max-width:none;max-height:calc(var(--app-height,100dvh) - 100px);transform:translateX(-50%);display:block;align-self:auto;padding:34px 12px 10px;border:1px solid #ffffff22;border-radius:24px;background:linear-gradient(155deg,#211b2aac,#15121daa);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 6px 26px #0003;overflow-y:auto;overscroll-behavior:contain;animation:studio-overlay .23s ease-out}
.app-mode.training-mode .overlay-controls{display:none}
#closeControls{position:absolute;top:3px;right:5px;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:#eee4fa;font-size:24px;line-height:1}
.app-mode.practicing .overlay-controls .loop-timeline{margin:26px 22px 12px;height:34px;background:#24212b60!important;border-color:#ffffff20}
.app-mode.practicing .overlay-controls #seek{height:32px}
.app-mode.practicing .overlay-controls #positionMarker{top:16px}
.app-mode.practicing .overlay-controls .handle::after{height:34px}
.app-mode.practicing .overlay-controls .frame-steps{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:8px}
.overlay-controls .frame-steps #play{display:none}
.overlay-controls .frame-steps button{min-height:44px;padding:4px 0;gap:3px}
.overlay-controls .frame-steps .frame-icon{width:20px;height:20px}
.overlay-controls .frame-steps small{font-size:10px}
.app-mode.practicing .overlay-controls #speedPicker{height:46px;min-height:46px;margin-bottom:6px}
.overlay-controls #speedToggle{background:#1e192766;border-color:#ffffff24;min-height:44px}
.overlay-controls #speeds.speed-choices{background:#21192c55;box-shadow:none}
.overlay-controls #speeds.speed-choices button.active{background:linear-gradient(145deg,#b696d6b3,#926eb4b3)}
.app-mode.practicing .overlay-controls .options{background:transparent;border-color:#ffffff16;padding-top:4px}
.overlay-controls .options #changeFilm,.overlay-controls .options #saveMove{min-height:40px;font-size:12px;gap:7px}
#practiceDock{display:block;width:100%;height:44px;left:0;transform:none;bottom:max(16px,env(safe-area-inset-bottom));pointer-events:none}
#practiceToggle{position:absolute;top:0;left:50%;transform:translateX(-50%);width:96px;min-width:96px;height:44px;min-height:44px;padding:8px 12px;background:#17131e99;border-color:#ffffff2a;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 3px 16px #0003}
#practiceToggle:hover{background:#211a2bb3}
#adjustLoop{position:absolute;right:max(14px,env(safe-area-inset-right));top:0;width:44px;height:44px;min-height:44px;margin:0;padding:11px;border:1px solid #ffffff25;border-radius:50%;background:#17131e80;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:#eadff5;pointer-events:auto;display:flex;align-items:center;justify-content:center}
.app-mode.practicing #status:not(:empty){position:fixed;top:0;left:0;right:0;z-index:10}
@keyframes studio-overlay{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
@media(orientation:landscape) and (max-height:600px){
 .app-mode.practicing .overlay-controls{left:auto;right:12px;transform:none;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 58px);width:min(340px,calc(100% - 24px));max-height:calc(var(--app-height,100dvh) - 94px);animation:studio-dialog .23s ease-out}
}
@media(prefers-reduced-motion:reduce){.app-mode.practicing .overlay-controls{animation:none!important}}
#overlayArchive{position:absolute;top:3px;left:5px;width:40px;height:40px;min-height:40px;padding:9px;border:0;border-radius:50%;background:transparent;color:#ddd1ed}
.app-mode.archive-mode .workspace{display:none}
.app-mode.archive-mode #appNav{display:flex}

/* A transparent timeline and four step controls surround the fixed pill. */
.app-mode.practicing .overlay-controls{left:50%;right:auto;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 54px);width:min(400px,calc(100% - 20px));height:76px;max-height:none;padding:0;transform:translateX(-50%);background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;overflow:visible;animation:studio-overlay .23s ease-out}
.app-mode.training-mode .overlay-controls{display:none}
.app-mode.practicing .overlay-controls .loop-timeline{height:10px;margin:40px 42px 0 22px;background:transparent!important;border:0;border-radius:0;box-shadow:none}
.overlay-controls .loop-timeline::before{content:'';display:block;position:absolute;top:4px;left:0;right:0;height:1px;background:#f0e8f5a0;box-shadow:0 1px 3px #0008;pointer-events:none}
.overlay-controls #loopSelection{top:3px;bottom:auto;height:3px;border:0;border-radius:3px;background:#b998e9c0;box-shadow:0 1px 4px #0003}
.overlay-controls #loopProgress{top:3px;bottom:auto;height:3px}
.app-mode.practicing .overlay-controls #seek{top:-17px;height:44px}
.app-mode.practicing .overlay-controls #positionMarker{top:5px}
.app-mode.practicing .overlay-controls .handle{top:-40px}
.app-mode.practicing .overlay-controls .handle::after{top:35px;height:14px;background:#e7d4ff70}
.overlay-controls .handle-face{height:24px;width:24px;border-radius:50%;background:#b295d2c0;border-color:#e3c9fa70;box-shadow:0 1px 5px #0004}
.overlay-controls .handle.selected .handle-face{background:#c8acebe0;box-shadow:0 0 0 2px #ddc3ff20,0 1px 6px #0005}
#closeControls{top:12px;right:0;width:36px;height:40px;min-height:40px;font-size:22px;color:#f1e6fa;text-shadow:0 1px 4px #000}
#practicePill{position:absolute;top:0;left:50%;transform:translateX(-50%);width:120px;height:44px;display:flex;align-items:center;border:1px solid #ffffff55;border-radius:28px;background:#17131e80;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 3px 14px #0003;pointer-events:auto;overflow:hidden}
#practicePill #practiceToggle{position:relative;top:auto;left:auto;transform:none;width:50px;min-width:50px;height:44px;min-height:44px;padding:10px 14px;border:0;border-radius:28px 0 0 28px;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
#practicePill #practiceSpeed{position:relative;flex:1;display:flex;align-items:center;justify-content:center;gap:3px;height:44px;min-height:44px;min-width:0;padding:8px 4px;border:0;border-left:1px solid #ffffff25;border-radius:0 28px 28px 0;background:transparent;color:#f6edff;font-size:12px;font-variant-numeric:tabular-nums}
#practiceSpeed .ui-icon{width:12px;height:12px}
#practicePill button:hover{background:#ffffff0b}
#practiceDock .frame-steps{position:absolute;top:0;left:50%;transform:translateX(-50%);width:min(344px,calc(100% - 16px));height:44px;margin:0;display:grid;grid-template-columns:repeat(2,minmax(36px,1fr)) 120px repeat(2,minmax(36px,1fr));gap:4px;pointer-events:none}
#practiceDock .frame-steps #play{display:none}
#practiceDock .frame-steps [data-frames='-10']{grid-column:1}
#practiceDock .frame-steps [data-frames='-1']{grid-column:2}
#practiceDock .frame-steps [data-frames='1']{grid-column:4}
#practiceDock .frame-steps [data-frames='10']{grid-column:5}
#practiceDock .frame-steps button{pointer-events:auto;min-height:44px;height:44px;width:100%;padding:0;border:1px solid #ffffff40;border-radius:50%;background:#17131e50;box-shadow:0 1px 5px #0002;color:#f1e5fa}
#practiceDock .frame-steps .frame-icon{display:none}
#practiceDock .frame-steps small{font-size:12px;color:#f1e5fa;text-shadow:0 1px 3px #000}
.training-mode #practiceDock .frame-steps{display:none}
#practicePopup{position:absolute;bottom:54px;left:50%;transform:translateX(-50%);width:min(330px,calc(100% - 24px));padding:10px;border:1px solid #ffffff25;border-radius:22px;background:#1b1623ac;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 5px 20px #0003;pointer-events:auto;animation:studio-overlay .22s ease-out}
#practicePopup #speedPanel{position:static;top:auto;left:auto;width:100%;display:block;transform:none;opacity:1;visibility:visible;transition:none}
#practicePopup #speeds.speed-choices{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
#practicePopup #speeds button{min-height:44px;font-size:11px}
#practicePopup #adjustLoop{position:static;width:100%;height:44px;margin:7px 0 0;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px;border:0;border-top:1px solid #ffffff18;border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;font-size:12px}
#practicePopup #adjustLoop .ui-icon{width:17px;height:17px}
#practicePopup .options{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #ffffff12;padding-top:4px;background:transparent}
#practicePopup .options button{font-size:11px!important;min-height:36px!important;gap:5px!important}
#practicePopup .options .ui-icon{width:17px;height:17px}
.popup-library{display:flex;justify-content:center}
#practicePopup #overlayArchive{position:static;width:36px;height:36px;min-height:36px;padding:8px;border:0;background:transparent}
@media(prefers-reduced-motion:reduce){#practicePopup,.app-mode.practicing .overlay-controls{animation:none!important}}

/* Speed opens upward; loop settings stay beside the fixed playback pill. */
#practicePopup{width:min(214px,calc(100% - 24px));max-height:calc(var(--app-height,100dvh) - 84px);overflow-y:auto;overscroll-behavior:contain;padding:8px;bottom:54px;border-radius:20px;background:linear-gradient(155deg,#211b2bd9,#17131fd4);transform-origin:bottom center;animation:studio-up-menu .2s cubic-bezier(.2,.8,.2,1)}
#practicePopup #speeds.speed-choices{display:flex;flex-direction:column;gap:2px}
#practicePopup #speeds.speed-choices button{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:10px 24px;border-radius:12px;font-size:14px;background:transparent;color:#d8cde6;font-weight:450}
#practicePopup #speeds.speed-choices button:hover{background:#c6a2ef12}
#practicePopup #speeds.speed-choices button.active{background:linear-gradient(145deg,#af8bd1b0,#8863ad9e);border-color:#dfc0fa30;color:#fff}
#practicePopup #speeds.speed-choices button.active::after{content:'✓';position:absolute;right:14px;font-size:13px;color:#f3e5ff}
#practiceDock #adjustLoop{position:absolute;top:0;left:calc(50% + 70px);right:auto;width:44px;min-height:44px;height:44px;margin:0;padding:12px;border:1px solid #ffffff35;border-radius:50%;background:#17131e88;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#eee1f8;pointer-events:auto;display:flex;align-items:center;justify-content:center;animation:studio-adjust-icon .22s ease-out}
#adjustLoop .ui-icon{width:19px;height:19px}
#practiceDock.speed-menu-open .frame-steps{visibility:hidden;pointer-events:none}
#practicePopup .options{margin-top:6px;border-top:1px solid #ffffff1b;padding-top:5px}
#practicePopup .options #changeFilm,#practicePopup .options #saveMove{display:flex;flex-direction:column;gap:3px!important;min-height:48px!important;padding:6px 2px;font-size:10px!important}
#practicePopup .popup-library{padding-top:2px}
#practicePopup #overlayArchive{width:100%;display:flex;align-items:center;justify-content:center;gap:7px}
#practicePopup #overlayArchive::after{content:'Mina turer';font-size:10px}
@keyframes studio-up-menu{from{opacity:0;transform:translate(-50%,5px) scale(.97)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes studio-adjust-icon{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){#practicePopup,#practiceDock #adjustLoop{animation:none!important}}

/* The timeline remains visible; the picture is aligned to the top. */
.app-mode.practicing .stage video{object-position:center top}
.app-mode.training-mode .overlay-controls{display:block}
.training-mode #closeControls{display:none}
#practiceDock .frame-steps #setACursor{grid-column:1}
#practiceDock .frame-steps #setBCursor{grid-column:5}
#practiceDock .frame-steps #setACursor,#practiceDock .frame-steps #setBCursor{border-color:#d3b7f866;color:#e8ceff;background:#50366355}
#practiceDock .frame-steps #setACursor small,#practiceDock .frame-steps #setBCursor small{font-size:10px;color:#e8ceff;white-space:nowrap}
#filmGestures{position:absolute;inset:0;z-index:3;background:transparent;touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
#filmGestures:focus-visible{outline:1px solid #c8a2f560;outline-offset:-2px}
#gestureFeedback{position:absolute;z-index:6;left:50%;top:35%;transform:translate(-50%,-50%);min-width:64px;text-align:center;padding:12px 18px;border:1px solid #ffffff18;border-radius:22px;background:#17131e60;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);color:#f5edff;font-size:22px;pointer-events:none;box-shadow:0 3px 15px #0002}
@media(prefers-reduced-motion:reduce){#gestureFeedback{animation:none!important}}

/* Editing tools remain until save; saved loops have only speed and more. */
.app-mode:not(.saved-loop-mode) #practiceDock .frame-steps{display:grid}
.app-mode.saved-loop-mode .overlay-controls,.app-mode.saved-loop-mode #practiceDock .frame-steps{display:none}
.saved-loop-mode #practicePill{width:72px}
.saved-loop-mode #practicePill #practiceToggle{display:none}
.saved-loop-mode #practicePill #practiceSpeed{border-left:0;border-radius:28px;font-size:13px;padding:8px 9px}
.saved-loop-mode #practiceDock #adjustLoop{left:calc(50% + 46px)}
#editSavedLoop{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;margin:6px 0 0;padding:9px;border:0;border-top:1px solid #ffffff1b;border-radius:0;background:transparent;color:#decee9;font-size:12px}
#editSavedLoop:hover{background:#c6a2ef0c}
.app-mode.practicing #closeControls{display:none}

/* Pinch zoom moves only the media; all controls keep their geometry. */
.app-mode.practicing .stage video,.app-mode.practicing .stage #youtube{object-position:center;will-change:transform}
#filmGestures{touch-action:none}
#viewTools{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:flex;align-items:center;gap:7px;z-index:10;pointer-events:none}
#viewTools button{min-height:44px;height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;border:1px solid #ffffff25;border-radius:50%;background:#17131e66;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);color:#f0e4fa;pointer-events:auto;box-shadow:0 2px 10px #0002}
#viewTools button:hover{background:#211a2b99}
#viewTools .ui-icon{width:19px;height:19px}
#viewTools #resetZoom{border-radius:24px;padding:10px 13px;font-size:11px}
#fullscreenView[aria-pressed='true']{border-color:#c8a4ee70;background:#39244f88}

/* Local video is a first-class source, with the link action underneath. */
.source-card #chooseFile{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;border:1px solid #c1a0e94d;border-radius:13px;background:linear-gradient(145deg,#b492d5,#9471b9);color:#fff;font-size:16px;font-weight:550;text-align:center}
.source-card #chooseFile:hover{background:linear-gradient(145deg,#c1a0df,#a27fc6)}
.source-file-help{margin:9px 0 18px;font-size:12px;line-height:1.5;color:var(--muted);text-align:center}
.source-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:#a49bae;font-size:11px;white-space:nowrap}
.source-divider::before,.source-divider::after{content:'';height:1px;background:#ffffff12;flex:1}
.source-card .source-platforms{margin:8px 0 12px;font-size:11px}
.source-card .source-split{border:1px solid #ffffff20;background:transparent;border-radius:12px}
.source-card .source-split #openFilm{width:100%;min-height:48px;background:#211a2a;color:#d9c5ef;font-size:14px;font-weight:450}
.source-card .source-split #openFilm:hover{background:#2d223a}
.source-card .source-foot{margin-top:16px}
.source-card .source-foot a{margin-left:0}

/* The browser always offers installation, even before a native install prompt is ready. */
#install{flex:none;min-height:44px;margin:12px 0;align-self:flex-start}
.source-card #install{width:100%;min-height:44px;margin:10px 0 0;border:1px solid #b795de45;background:#b795de13;color:#dbc7f2;font-weight:500;font-size:14px}
/* Installation has its own visible row, outside source menus and hidden player headers. */
#installBanner{position:relative;z-index:20;flex:none;width:100%;height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px max(14px,env(safe-area-inset-right)) 5px max(14px,env(safe-area-inset-left));background:#201928;border-bottom:1px solid #b795de28}
#installBanner>span{font-size:12px;color:#d0c0df}
#installBanner #install{display:block;align-self:center;flex:none;margin:0;min-height:40px;padding:9px 14px;background:#b795de;color:#1c1227;border:0;border-radius:12px;font-size:13px;font-weight:600;white-space:nowrap}
.app-mode.install-available main{height:calc(100% - 54px)}
@media(max-width:340px){#installBanner>span{font-size:10px}#installBanner #install{padding:9px 10px;font-size:12px}}

/* A single centered tool button replaces the playback/speed pill. */
#practicePill{display:none!important}
#practiceDock #adjustLoop,.saved-loop-mode #practiceDock #adjustLoop{left:50%;transform:translateX(-50%);width:44px;height:44px;background:#17131e66;border-color:#ffffff30;animation:none}
#practiceDock #adjustLoop[aria-expanded='true']{background:#43304eaa;border-color:#c4a4df70}
#practiceDock .frame-steps{width:min(270px,calc(100% - 24px));grid-template-columns:repeat(2,minmax(36px,1fr)) 52px repeat(2,minmax(36px,1fr));gap:7px}
#practicePopup{bottom:56px}

/* One functional entry view: the film chooser is visible from the first paint. */
.stage:has(#empty:not([hidden])){overflow-y:auto;align-items:safe center;background:#111116}
.home-logo{display:block;width:64px;height:64px;object-fit:contain;margin:0 auto 16px;filter:contrast(2);mix-blend-mode:screen}
#empty .creator-credit{display:block;margin:8px auto 0;color:#a99caf;font-size:10px;text-decoration:none}
#empty .creator-credit:hover{color:#ddc9f0}
#appNav #myMoves{display:flex;align-items:center;gap:7px;width:auto;padding:9px 10px;font-size:12px;white-space:nowrap}
#appNav #myMoves .ui-icon{width:20px;height:20px}
@media(max-height:580px){.home-logo{width:44px;height:44px;margin-bottom:8px}}

/* A compact film chooser; explanations appear only during the first two visits. */
#empty{max-width:410px;padding:24px}
#empty .home-logo{width:56px;height:56px;margin-bottom:18px}
#empty h2{margin:0 0 22px;font-size:25px;font-weight:550;letter-spacing:-.7px}
#empty .sources{margin-top:0}
.source-card .source-intro{margin:0 0 20px;color:#aaa1b5;font-size:12px;line-height:1.6;text-align:center}
.source-card #chooseFile{min-height:52px;font-size:15px;font-weight:500;border-radius:14px;background:linear-gradient(145deg,#b693d7,#9874bc);box-shadow:inset 0 1px 0 #ffffff20}
.source-card .source-divider{margin:13px 0;font-size:10px;color:#756b82}
.source-card .source-divider::before,.source-card .source-divider::after{background:#ffffff0b}
.source-card #link{min-height:48px;margin-bottom:10px;border-radius:13px;background:#19151f}
.source-card .source-split{border-radius:14px;border-color:#b899d438}
.source-card .source-split #openFilm{min-height:50px;font-size:14px;border-radius:13px;background:#211a2b;color:#deccf0;font-weight:500}
#empty .creator-credit{margin-top:28px;font-size:9px;color:#85798f}
@media(max-height:580px){#empty{padding:16px 24px}#empty .home-logo{width:40px;height:40px;margin-bottom:10px}#empty h2{margin-bottom:16px;font-size:22px}#empty .creator-credit{margin-top:18px}}

/* Link replacement is one tap; service shortcuts stay behind a compact disclosure. */
#sourceLinkField{position:relative;margin-bottom:10px}
.source-card #sourceLinkField #link{padding-right:46px;margin:0}
#sourceLinkField #clearSourceLink{position:absolute;top:3px;right:3px;width:42px;height:42px;min-height:42px;margin:0;border:0;background:transparent;color:#c7b5d5;font-size:23px;padding:6px}
.source-card .source-split #sourceMore{display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-height:50px;width:44px;padding:10px;border:0;border-left:1px solid #ffffff12;background:#211a2b;color:#b8a2ca;font-size:16px}
.source-services{margin-top:18px;text-align:center}
.source-card .source-services summary{display:list-item;list-style-position:inside;cursor:pointer;color:#9e8fab;font-size:11px;padding:8px}
.source-services>div{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin:8px 0}
.source-services a{padding:9px 10px;border:1px solid #b795de25;border-radius:10px;color:#d5c1e5;text-decoration:none;font-size:11px}
.source-services p{font-size:11px;color:#a394b0;margin:10px 0 0;line-height:1.5}
#sourceFeedback{margin:16px 0 0;font-size:12px;line-height:1.5;text-align:center;color:#dcc5ee}

/* Compact entry follows the visible viewport when the mobile keyboard is open. */
body.app-mode.link-entry-active{position:fixed;top:var(--viewport-top,0px);left:0;width:100%;height:var(--app-height,100dvh)}
.link-entry-active #installBanner,.link-entry-active #appNav{display:none!important}
.app-mode.link-entry-active main{height:100%!important}
.app-mode.link-entry-active:not(.practicing) .stage{align-items:flex-start;scroll-padding:12px;overflow-y:auto}
.app-mode.link-entry-active:not(.practicing) #empty{margin:0 auto!important;padding:14px 20px 24px}
.link-entry-active #empty>.home-logo,.link-entry-active #empty>h2,.link-entry-active #empty>.creator-credit,.link-entry-active .source-intro,.link-entry-active .source-services{display:none}
.link-entry-active #sourceDock .source-head{margin-bottom:10px}
.link-entry-active #sourceDock{scroll-padding:12px;padding-bottom:20px}
.source-card #sourceLinkField #link{outline:none;border:1px solid #776084;box-shadow:0 0 0 3px #b18bd715;transition:border-color .2s ease,box-shadow .2s ease}
.source-card #sourceLinkField #link:focus{border-color:#b38bdb;box-shadow:0 0 0 3px #b18bd71c}
.source-card #sourceLinkField #link:focus-visible{outline:1px solid #c4a5e2;outline-offset:2px}
.source-card #chooseFile,.source-card .source-split,.source-services a{transition:background .2s ease,border-color .2s ease,box-shadow .2s ease}
.source-card #chooseFile:hover{box-shadow:inset 0 1px 0 #ffffff30,0 6px 22px #8c61b01c}
.source-card #openFilm:disabled::after{content:'';display:inline-block;width:12px;height:12px;margin-left:8px;border:1.5px solid #c6a5e333;border-top-color:#dfcaf1;border-radius:50%;animation:source-reading .8s linear infinite}
@keyframes source-reading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.source-card button,.source-card input,.source-card .source-split,.source-services a{transition:none!important}.source-card #openFilm:disabled::after{animation:none!important}}

/* Expressive, finite entrance: light orbit, staggered type, and one satin sweep. */
.home-mark{position:relative;isolation:isolate;display:grid;place-items:center;width:112px;height:112px;margin:0 auto 20px;background:#111116}
#empty .home-mark .home-logo{position:relative;z-index:1;width:76px;height:76px;margin:0}
.home-mark::before{content:'';position:absolute;inset:-35px;border-radius:50%;background:radial-gradient(circle,#ad7be42c,transparent 68%);opacity:0;pointer-events:none}
.brand-orbit{position:absolute;inset:0;width:112px;height:112px;overflow:visible;opacity:0;pointer-events:none}
.orbit-track{fill:none;stroke:#b795de22;stroke-width:.7}
.orbit-stroke{fill:none;stroke-width:1.8;stroke-linecap:round;stroke-dasharray:315;stroke-dashoffset:315;filter:drop-shadow(0 0 4px #b58bed80)}
.title-word{display:inline-block}
.studio-entrance .home-mark::before{animation:studio-aura 2.1s ease-out both}
.studio-entrance .brand-orbit{animation:studio-orbit-turn 1.8s cubic-bezier(.2,.75,.2,1) both}
.studio-entrance .orbit-stroke{animation:studio-orbit-draw 1.8s cubic-bezier(.4,0,.2,1) both}
.studio-entrance #empty .home-logo{animation:studio-mark-arrive .9s cubic-bezier(.16,1,.3,1) both}
.studio-entrance .title-word{animation:studio-word-arrive .65s cubic-bezier(.16,1,.3,1) both}
.studio-entrance .title-word:nth-child(1){animation-delay:.1s}.studio-entrance .title-word:nth-child(2){animation-delay:.17s}.studio-entrance .title-word:nth-child(3){animation-delay:.24s}
.source-card #chooseFile{position:relative;overflow:hidden}
.source-card #chooseFile::after{content:'';position:absolute;inset:-60% -30%;background:linear-gradient(105deg,transparent 35%,#ffffff09 43%,#ffffff55 50%,#ffffff09 57%,transparent 65%);transform:translateX(-115%) rotate(-8deg);pointer-events:none;opacity:0}
.studio-entrance #chooseFile::after{animation:studio-satin 1.1s .35s cubic-bezier(.2,.7,.3,1) both}
.studio-entrance #chooseFile,.studio-entrance #linkForm{animation:studio-choice-arrive .65s .28s cubic-bezier(.16,1,.3,1) both}
.studio-entrance #linkForm{animation-delay:.38s}
@media(hover:hover){.source-card #chooseFile:hover::after{animation:studio-satin .85s ease-out}}
#practiceDock #adjustLoop .ui-icon{transition:transform .45s cubic-bezier(.2,.9,.2,1),color .3s ease}
#practiceDock #adjustLoop[aria-expanded='true'] .ui-icon{transform:rotate(90deg);color:#e0c5ff}
#practicePopup{animation:studio-tools-reveal .4s cubic-bezier(.16,1,.3,1);transform-origin:50% 100%}
@keyframes studio-aura{0%{opacity:0;transform:scale(.6)}35%{opacity:1}100%{opacity:0;transform:scale(1.15)}}
@keyframes studio-orbit-turn{0%{opacity:0;transform:rotate(-110deg) scale(.88)}18%{opacity:1}72%{opacity:1}100%{opacity:0;transform:rotate(90deg) scale(1.08)}}
@keyframes studio-orbit-draw{0%{stroke-dashoffset:315}65%{stroke-dashoffset:0}100%{stroke-dashoffset:-315}}
@keyframes studio-mark-arrive{0%{opacity:0;transform:scale(.7) rotate(-12deg);filter:contrast(2) blur(5px)}100%{opacity:1;transform:scale(1) rotate(0);filter:contrast(2) blur(0)}}
@keyframes studio-word-arrive{0%{opacity:0;transform:translateY(18px);filter:blur(4px)}100%{opacity:1;transform:translateY(0);filter:blur(0)}}
@keyframes studio-choice-arrive{0%{opacity:0;transform:translateY(14px) scale(.98)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes studio-satin{0%{opacity:0;transform:translateX(-115%) rotate(-8deg)}20%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateX(115%) rotate(-8deg)}}
@keyframes studio-tools-reveal{0%{opacity:0;transform:translate(-50%,14px) scale(.88);filter:blur(4px)}80%{opacity:1;transform:translate(-50%,-1px) scale(1.012);filter:blur(0)}100%{opacity:1;transform:translate(-50%,0) scale(1);filter:blur(0)}}
.link-entry-active #empty>.home-mark{display:none}
@media(max-height:580px){.home-mark{width:84px;height:84px;margin-bottom:12px}.brand-orbit{width:84px;height:84px}#empty .home-mark .home-logo{width:56px;height:56px}}
@media(prefers-reduced-motion:reduce){.home-mark::before,.brand-orbit,.orbit-stroke,.studio-entrance #empty .home-logo,.title-word,.studio-entrance #chooseFile,.studio-entrance #linkForm,.source-card #chooseFile::after,#practicePopup{animation:none!important}#practiceDock #adjustLoop .ui-icon{transition:none!important;transform:none!important}}

/* Existing entry and player styling, with direct access to saved moves. */
#empty #homeMoves{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;margin:0 0 18px;padding:12px 16px;border:1px solid #b899d455;border-radius:14px;background:#241d30;color:#e5d6f3;font-size:15px;font-weight:600;text-align:left}
#homeMoves .ui-icon{width:23px;height:23px;flex:none}#homeMoves>span:last-child{margin-left:auto;font-size:24px;font-weight:400;color:#bca4d1}
#empty #homeMoves:hover{background:#30263e}
#backToMoves{position:absolute;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));z-index:11;display:flex;align-items:center;gap:4px;min-height:44px;padding:8px 12px 8px 8px;border:1px solid #ffffff25;border-radius:24px;background:#17131e66;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);color:#f0e4fa;font-size:12px}
#backToMoves .ui-icon{width:18px;height:18px}
.link-entry-active #empty>#homeMoves{display:none}

/* Compact library rows keep names, search and filters visible. */
body.archive-mode #appNav #myMoves{display:none}
#archiveView{padding:8px 14px max(8px,env(safe-area-inset-bottom))}
.archive-top{display:flex;align-items:center;gap:8px;margin:0 0 8px}
.archive-top h1{margin:0;font-size:21px;letter-spacing:-.5px;font-weight:600}
.archive-top #backPlayer{display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:8px;border:0;background:transparent;border-radius:50%}
#backPlayer .ui-icon{width:20px;height:20px}
#moveSearch{min-height:38px;height:38px;padding:8px 12px;border-radius:12px;font-size:13px;background:#1b1921;border-color:#ffffff12}
#moveFilters{margin:8px 0 10px;gap:5px;flex-wrap:nowrap}
#moveFilters button{flex:1 1 auto;min-width:0;min-height:34px;padding:6px 7px;font-size:11px;border-color:#ffffff14;background:transparent}
#moveFilters button.active{background:#ae82f424;color:#d7befb;border-color:#ae82f457}
#moveFilters .filter-long{display:none}
#moveFilters [data-filter='favorite']{flex:0 0 36px;font-size:16px}
#moveList{gap:5px;padding:1px 0 8px;scrollbar-width:thin}
#moveList .move-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;min-height:66px;padding:6px 7px;border:1px solid #ffffff09;border-radius:12px;background:#1b1a22}
#moveList .move-open{display:flex;align-items:center;gap:10px;min-width:0;width:100%;padding:0;border:0;background:transparent;text-align:left;border-radius:7px}
#moveList .move-open:hover{background:#ffffff04}
#moveList .move-thumb{position:relative;flex:0 0 48px;grid-column:auto;width:48px;height:52px;border-radius:7px;object-fit:cover;font-size:21px;background:#292431}
#moveList .move-info{display:block;grid-column:auto;min-width:0;flex:1}
#moveList .move-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:550;line-height:1.45;color:#f1edf6}
#moveList .move-meta{display:flex;align-items:center;gap:7px;min-width:0;margin-top:4px;color:#9f98ad;font-size:10px;line-height:1.4;white-space:nowrap}
#moveList .move-tag{padding:0;border:0;border-radius:0;font-size:10px;color:#c0a5df;flex:none}
#moveList .move-tag[data-state='known']{color:#a8c6ba}
#moveList .move-tag::after{content:'·';margin-left:7px;color:#6c6579}
#moveList .move-actions{display:flex;grid-column:auto;align-items:center;gap:0}
#moveList .move-actions button{display:grid;place-items:center;min-height:36px;width:32px;padding:3px;border:0;border-radius:9px;background:transparent;font-size:20px;color:#82798e}
#moveList .move-actions button.starred{color:#c3a2f4}
#moveList .move-actions button:hover{background:#ffffff08;color:#deccf3}
#moveList .move-menu{grid-column:1/-1;padding-top:6px;gap:5px;border-color:#ffffff0d}
#moveList .move-menu button{min-height:36px;font-size:11px;background:#24212c;border-color:#ffffff0d}
.archive-storage{flex:none;margin-top:3px;border-top:1px solid #ffffff0b}
.archive-storage>summary{padding:8px 2px;min-height:32px;cursor:pointer;color:#9e94ab;font-size:11px;list-style-position:inside}
.archive-storage>p{margin:4px 0 8px;color:#9e94ab;font-size:11px}
.archive-storage .backup-bar{padding:0 0 6px;display:flex;gap:6px}
.archive-storage .backup-bar button,.archive-storage .backup-bar label{min-height:34px;padding:7px 10px;border-color:#ffffff15;font-size:11px;font-weight:400}
@media(min-width:700px){#archiveView{padding:12px 24px}.archive-top{margin-bottom:10px}#moveList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:7px}#moveList .move-card{align-self:start}#moveSearch{max-width:none}.empty-archive{grid-column:1/-1}#moveFilters{justify-content:flex-start}#moveFilters button{flex:0 0 auto;padding:6px 13px}}
@media(max-width:350px){#archiveView{padding-left:10px;padding-right:10px}#moveList .move-open{gap:7px}#moveList .move-thumb{width:42px;flex-basis:42px;height:48px}#moveList .move-actions button{width:30px}}

/* In-app guidance stays out of the way of the real controls. */
#introCoach{position:fixed;z-index:3002;top:12px;left:12px;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px;border:1px solid #c8a9ed40;border-radius:20px;background:linear-gradient(145deg,#292333f7,#19161ff7);box-shadow:0 16px 56px #0008,0 1px 0 #ffffff0b inset;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);color:#f4effa;animation:intro-arrive .28s cubic-bezier(.2,.8,.2,1);scrollbar-width:thin;text-align:left}
#introCoach .intro-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
#introCoach .intro-top>span{font-size:9px;font-weight:650;letter-spacing:1.8px;color:#ba9bd7}
#introCoach #introClose{min-height:32px;padding:5px 6px;border:0;background:transparent;font-size:11px;color:#bbb0c7;border-radius:8px}
#introCoach .intro-topics{display:flex;gap:5px;margin:0 0 12px}
#introCoach .intro-topics button{min-height:30px;padding:5px 9px;background:transparent;border:1px solid #ffffff12;border-radius:20px;font-size:10px;color:#b7a9c5}
#introCoach .intro-topics button[aria-pressed=true]{background:#be96e51a;border-color:#be96e53d;color:#e0c8f9}
#introCoach h2{margin:0 0 8px;font-size:21px;font-weight:600;letter-spacing:-.5px;line-height:1.2}
#introCoach #introText{margin:0;color:#dfd5e9;font-size:13px;line-height:1.6}
#introCoach #introNote{margin:9px 0 0;color:#ab9ab9;font-size:11px;line-height:1.5}
#introArt{height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d4b7f2;margin:0 0 12px;background:#b38add08;border-radius:12px;overflow:hidden;pointer-events:none}
#introArt>svg{width:32px;height:32px}
#introArt small{font-size:9px;color:#ab96bd;margin-top:6px}
#introCoach .intro-progress{display:flex;align-items:center;gap:10px;margin:16px 0 12px;font-size:10px;color:#aa99ba;font-variant-numeric:tabular-nums}
#introDots{display:flex;gap:4px;flex:1}
#introDots i{width:12px;height:3px;border-radius:3px;background:#ffffff18;transition:background .2s,width .2s}
#introDots i.active{width:22px;background:#bd95e3}
#introTried{color:#b5d7c2;font-size:10px}
#introCoach .intro-actions{display:flex;align-items:center;gap:10px}
#introCoach #introPrev{width:36px;min-height:40px;padding:6px;border:1px solid #ffffff15;background:transparent;border-radius:12px;font-size:17px}
#introCoach #introGuides{font-size:11px;color:#b7a5c6;text-decoration:none;padding:10px 0}
#introCoach #introNext{min-height:40px;min-width:88px;margin-left:auto;padding:9px 16px;border:1px solid #ccb0e8;border-radius:12px;background:#c4a0e5;color:#21152c;font-size:12px;font-weight:650}
#introCoach #introNext:hover{background:#d4b6ef}
#introFocus{position:fixed;z-index:3001;pointer-events:none;border:1.5px solid #d3a8f2;border-radius:12px;box-shadow:0 0 0 4px #b58ad91a,0 0 18px #b58ad91c;transition:top .2s ease,left .2s ease,width .2s ease,height .2s ease}
#practicePopup #introReplay{width:100%;padding:8px;border:0;background:transparent;border-radius:10px;min-height:34px;color:#b4a2c4;font-size:11px}
.intro-swipe{display:flex;align-items:center;gap:15px;font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
.intro-swipe-track{width:110px;height:2px;background:#bb97e038;position:relative}
.intro-swipe-track i{position:absolute;top:-5px;left:0;width:12px;height:12px;background:#eee1ff;border-radius:50%;box-shadow:0 0 12px #d0affc50;animation:intro-swipe 2.1s ease-in-out 3}
.intro-loop{display:flex;align-items:center;gap:8px;width:210px;font-size:11px}
.intro-loop b{display:grid;place-items:center;border:1px solid #caa9e66b;background:#b792dc20;width:25px;height:25px;border-radius:8px;font-weight:550}
.intro-loop>div{flex:1;position:relative;height:2px;background:#b493d778}
.intro-loop i{position:absolute;top:-4px;left:0;width:10px;height:10px;border-radius:50%;background:white;box-shadow:0 0 10px #ffffff50;animation:intro-loop 2.6s ease-in-out 3}
.intro-play-demo{display:flex;align-items:center;gap:20px;font-size:17px}
.intro-play-demo span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;border:1px solid #d1aff14d}
.intro-play-demo i{width:7px;height:7px;background:#c4a3df;border-radius:50%;animation:intro-tap 1.4s ease-in-out 3}
.intro-frames{display:flex;align-items:center;gap:14px;font-size:12px}
.intro-frames span{padding:6px 12px;border:1px solid #d1aff130;border-radius:9px}
.intro-frames i{width:25px;height:30px;border:1px solid #e9d6f18c;border-radius:5px;background:#c8a8ec15;animation:intro-tap 1.5s ease-in-out 3}
@keyframes intro-arrive{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes intro-swipe{0%,100%{transform:translateX(49px)}30%{transform:translateX(0)}70%{transform:translateX(98px)}}
@keyframes intro-loop{0%,10%{left:0}85%,100%{left:calc(100% - 10px)}}
@keyframes intro-tap{0%,100%{opacity:.5;transform:scale(.9)}50%{opacity:1;transform:scale(1.05)}}
@media(max-height:540px){#introCoach{padding:12px 14px;border-radius:16px}#introArt{display:none}#introCoach .intro-topics{margin-bottom:10px}#introCoach h2{font-size:18px}#introCoach #introText{font-size:12px;line-height:1.5}#introCoach .intro-progress{margin:10px 0 8px}}
@media(prefers-reduced-motion:reduce){#introCoach,#introArt i{animation:none!important}#introFocus,#introDots i{transition:none!important}}

/* Let the tablet workspace fill Safari in either orientation. */
.app-mode:not(.practicing) .workspace{display:flex;flex-direction:column;padding:0;gap:0;overflow:hidden}
.app-mode:not(.practicing) .view{flex:1;width:100%;min-height:0}
.ipad-device #installBanner{display:none!important}
.ipad-device.app-mode main{height:100%}
@media(min-width:700px){
 .ipad-device #empty{max-width:560px;padding:32px 40px}
 .ipad-device #empty h2{font-size:32px}
 .ipad-device #sourceDock{width:min(600px,calc(100% - 48px));max-width:600px;padding:28px;top:calc(var(--viewport-top,0px) + 24px)}
}

#playerBack{position:absolute;z-index:12;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));display:flex;align-items:center;gap:5px;min-height:44px;padding:9px 12px 9px 8px;border:1px solid #ffffff30;border-radius:24px;background:#17131eb3;color:#f0e4fa;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-size:13px}
#playerBack .ui-icon{width:20px;height:20px}
#stage #backToMoves{top:64px}

/* The playhead owns its touch gesture instead of scrolling Safari. */
#loopTimeline #seek{touch-action:none;-webkit-user-select:none;user-select:none}
#loopTimeline:has(#seek.dragging) .position-dot{transform:scale(1.2);box-shadow:0 0 0 6px #ffffff12}
