/* YouTube Studio: local UI scope; Classic only receives the mode switch. */
.yt-mode-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1240px;margin:18px auto 0;padding:0 20px;box-sizing:border-box}
.yt-back{color:var(--fx-text-muted);text-decoration:none;font-size:13px}
.yt-mode-switch{display:flex;gap:4px;padding:4px;border:1px solid var(--fx-border);border-radius:var(--fx-radius-pill);background:var(--fx-bg-elevated)}
.yt-mode-switch a{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 15px;border-radius:var(--fx-radius-pill);text-decoration:none;color:var(--fx-text-muted);font-size:13px;font-weight:750}
.yt-mode-switch a[aria-current]{background:var(--fx-ac1-soft);color:var(--fx-text-main)}
.yt-mode-switch span{font-size:8px;letter-spacing:1px;color:var(--fx-ac2)}
.yt-mode-switch a:focus-visible,.yt-back:focus-visible{outline:2px solid var(--fx-ac2);outline-offset:3px}
.ys{max-width:1240px;margin:0 auto;padding:28px 20px 64px;color:var(--fx-text-main);box-sizing:border-box}
.ys *, .ys *::before,.ys *::after{box-sizing:border-box}
.ys [hidden]{display:none!important}
.ys-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:28px}
.ys-eyebrow{display:block;color:var(--fx-ac2);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:1.7px;margin-bottom:10px}
.ys-intro h2{font-size:clamp(28px,3vw,42px);font-weight:850;letter-spacing:-1.4px;line-height:1.1;margin:0 0 12px}
.ys-intro p{color:var(--fx-text-muted);font-size:14px;line-height:1.6;margin:0}
.ys-local{flex:0 0 auto;font-size:11px;color:var(--fx-text-muted);border:1px solid var(--fx-border);padding:9px 12px;border-radius:var(--fx-radius-pill)}
.ys-workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.ys-monitor{min-width:0;position:sticky;top:20px}
.ys-preview{position:relative;overflow:hidden;border:1px solid var(--fx-border-strong);border-radius:var(--fx-radius-md);background:var(--fx-bg-deep);box-shadow:var(--fx-shadow-md)}
.ys-preview canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:0}
.ys-monitor-label{position:absolute;left:12px;top:12px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.45);color:#fff;font-size:8px;font-weight:750;letter-spacing:1px;padding:5px 8px;border-radius:var(--fx-radius-pill);pointer-events:none}
.ys-transport{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 0}
.ys-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:10px 16px;border:1px solid var(--fx-border-strong);border-radius:var(--fx-radius-sm);background:var(--fx-bg-subtle);color:var(--fx-text-main);font:inherit;font-size:13px;font-weight:750;cursor:pointer;text-decoration:none;transition:background .18s ease,border-color .18s ease}
.ys-button:hover:not(:disabled){background:var(--fx-bg-hover);border-color:var(--fx-ac1)}
.ys-primary{background:var(--fx-ac2);border-color:var(--fx-ac2);color:var(--fx-text-inverse)}
.ys-primary:hover:not(:disabled){background:color-mix(in srgb,var(--fx-ac2) 88%,white);border-color:var(--fx-ac2)}
.ys button:disabled{cursor:default;opacity:.5}
.ys-transport output{color:var(--fx-text-muted);font-size:11px;font-variant-numeric:tabular-nums}
.ys .ys-volume{display:flex;align-items:center;gap:8px;margin:0 0 0 auto;font-size:10px;color:var(--fx-text-muted)}
.ys .ys-volume input[type=range]{width:80px;flex:0 0 80px;min-height:28px}
.ys .ys-mute,.ys-preview-start{display:none}
.ys-mute svg{display:block;width:21px;height:21px;flex-shrink:0}
.ys-mute .ys-sound-off,.ys-mute[aria-pressed=true] .ys-sound-on{display:none}
.ys-mute[aria-pressed=true] .ys-sound-off{display:block}
.ys-mute[aria-pressed=true]{color:var(--fx-text-muted)}
.ys-timeline{min-width:0;margin-top:16px}
.ys input[type=range]{display:block;width:100%;margin:4px 0;min-height:28px;padding:0;accent-color:var(--fx-ac2);cursor:pointer}
.ys-hint{color:var(--fx-text-muted);font-size:11px;line-height:1.55;margin:10px 0 0}
.ys-export{display:flex;align-items:flex-end;gap:12px;margin-top:20px;padding-top:20px;border-top:1px solid var(--fx-border);flex-wrap:wrap}
.ys-export>label{flex:1;min-width:130px}
.ys label{display:block;color:var(--fx-text-muted);font-size:12px;font-weight:600;margin:0 0 14px}
.ys label:last-child,.ys-export>label{margin-bottom:0}
.ys select,.ys input[type=text],.ys input[type=number]{display:block;min-width:0;width:100%;min-height:44px;margin-top:8px;padding:10px 12px;border:1px solid var(--fx-border);border-radius:var(--fx-radius-sm);background:var(--fx-bg-deep);color:var(--fx-text-main);font:inherit;font-size:16px;font-weight:450}
.ys :is(button,a,input,select,summary):focus-visible{outline:2px solid var(--fx-ac2);outline-offset:3px}
.ys progress{display:block;width:100%;height:6px;margin-top:18px;accent-color:var(--fx-ac2)}
.ys-status{color:var(--fx-text-muted);font-size:12px;line-height:1.5;margin:14px 0;min-height:18px}
.ys-error{padding:14px;border:1px solid var(--fx-error);background:color-mix(in srgb,var(--fx-error) 8%,transparent);border-radius:var(--fx-radius-sm);color:var(--fx-text-main);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.ys-result{padding:18px;border:1px solid var(--fx-border-strong);border-radius:var(--fx-radius-md);background:var(--fx-bg-elevated);margin-top:18px}
.ys-result h3{margin:0 0 8px;font-size:18px}.ys-result p{font-size:12px;color:var(--fx-text-muted)}
.ys-result video{display:block;width:100%;max-height:320px;margin:12px 0;border-radius:var(--fx-radius-sm);background:var(--fx-bg-deep)}
.ys-settings{display:grid;gap:14px;border:0;margin:0;padding:0;min-width:0}
.ys-panel{padding:20px;background:var(--fx-bg-elevated);border:1px solid var(--fx-border);border-radius:var(--fx-radius-md);min-width:0}
.ys-panel h3{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:750;margin:0 0 18px}
.ys-panel h3>span{color:var(--fx-ac2);font-size:10px;font-variant-numeric:tabular-nums}
.ys .ys-upload{position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:66px;padding:14px;margin:0;border:1px dashed var(--fx-border-strong);border-radius:var(--fx-radius-sm);background:var(--fx-bg-subtle);color:var(--fx-text-main);cursor:pointer}
.ys-upload small{display:block;font-size:9px;font-weight:400;color:var(--fx-text-muted);margin-top:6px}
.ys-upload b{font-size:18px;color:var(--fx-ac2);font-weight:400}
.ys .ys-upload:hover,.ys .ys-upload.is-dragging,.ys .ys-upload:focus-within{border-color:var(--fx-ac2);background:var(--fx-ac2-soft)}
.ys-file-name{font-size:10px;line-height:1.4;color:var(--fx-text-muted);margin:7px 0 14px;overflow-wrap:anywhere}
.ys-file-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ys .ys-upload-small{font-size:11px;padding:12px;min-height:48px}
.ys-text-button{display:inline-flex;align-items:center;color:var(--fx-text-muted);padding:4px 0;border:0;background:transparent;font:inherit;font-size:11px;cursor:pointer;min-height:30px;text-decoration:none}
.ys .ys-color{display:flex;align-items:center;justify-content:space-between;gap:14px}
.ys input[type=color]{width:58px;height:36px;padding:3px;border:1px solid var(--fx-border);border-radius:var(--fx-radius-sm);background:transparent;cursor:pointer}
.ys .ys-check{display:flex;align-items:center;flex-wrap:wrap;gap:8px;line-height:1.5;font-size:11px;min-height:32px}
.ys input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;accent-color:var(--fx-ac2)}
.ys-tier{font-size:9px;font-weight:750;color:var(--fx-ac2)}
.ys-upgrade{color:var(--fx-ac2);font-size:11px;text-decoration:none}
.ys-tuning summary{color:var(--fx-text-main);font-size:13px;cursor:pointer;font-weight:650;min-height:24px}.ys-tuning>div{margin-top:20px}
.ys-lyrics-panel summary{color:var(--fx-text-main);font-size:13px;cursor:pointer;font-weight:650;min-height:28px}.ys-lyrics-panel summary>span{margin-right:8px}.ys-lyrics-panel>div{margin-top:16px}.ys-lyrics-panel .ys-upload{margin-top:14px}.ys-lyric-info{color:var(--fx-text-muted);font-size:11px;line-height:1.6;margin:10px 0;overflow-wrap:anywhere}.ys-lyric-actions{display:flex;flex-wrap:wrap;gap:8px 20px;margin-bottom:12px}.ys-lyrics-panel small.ys-hint{display:block;font-weight:400}
.ys-material-lyrics{margin-top:18px;padding-top:18px;border-top:1px solid var(--fx-border);scroll-margin-top:20px}
.ys-preset-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}.ys-preset-filters button{padding:10px 15px;min-height:44px;font:inherit;font-size:12px;border:1px solid var(--fx-border);border-radius:var(--fx-radius-pill);background:var(--fx-bg-subtle);color:var(--fx-text-muted);cursor:pointer}.ys-preset-filters button[aria-pressed=true]{background:var(--fx-ac2-soft);border-color:var(--fx-ac2);color:var(--fx-ac2)}
.ys-presets-section{margin-top:36px}.ys-section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:18px}
.ys-section-heading h3{font-size:24px;letter-spacing:-.6px;margin:0}.ys-section-heading p{font-size:12px;color:var(--fx-text-muted);margin:0}
.ys-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ys-gallery-window{height:52vh;min-height:280px;max-height:560px;overflow:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--fx-ac2) transparent;scrollbar-gutter:stable;padding:2px 10px 10px 2px;border-radius:var(--fx-radius-sm)}
.ys-gallery-window:focus-visible{outline:2px solid var(--fx-ac2);outline-offset:3px}
.ys-gallery-window::-webkit-scrollbar{width:5px}.ys-gallery-window::-webkit-scrollbar-thumb{background:var(--fx-ac2);border-radius:99px}
.ys-gallery-window .ys-presets{align-items:start}
.ys-gallery-window .ys-preset canvas{background:linear-gradient(135deg,var(--fx-bg-subtle),var(--fx-bg-deep))}
.ys-gallery-window .ys-preset-copy small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.8em}
.ys-preset{position:relative;min-width:0;overflow:hidden;text-align:left;border:1px solid var(--fx-border);border-radius:var(--fx-radius-md);background:var(--fx-bg-elevated);color:var(--fx-text-main);padding:6px;font:inherit;cursor:pointer;transition:border-color .2s ease}
.ys-preset[aria-pressed=true]{border-color:var(--fx-ac2);box-shadow:0 0 0 1px var(--fx-ac2)}
.ys-preset:hover:not(:disabled){border-color:var(--fx-ac1)}
.ys-preset canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;border-radius:calc(var(--fx-radius-md) - 6px)}
.ys-preset-copy{display:block;padding:11px 10px 10px}.ys-preset-title{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:750}.ys-preset-copy small{display:block;margin-top:5px;color:var(--fx-text-muted);font-size:11px;line-height:1.4}
.ys-footnote{display:flex;align-items:center;gap:28px;justify-content:space-between;margin-top:28px;padding-top:22px;border-top:1px solid var(--fx-border);color:var(--fx-text-muted);font-size:12px;line-height:1.6}
.ys-footnote p{max-width:800px;margin:0}.ys-footnote a{flex-shrink:0;color:var(--fx-ac2);text-decoration:none}
.ys-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ys .ys-quick-audio{display:none}
.ys-appearance{min-width:0;grid-column:1/-1}
.ys-appearance>summary{display:none}
#ysAppearanceControls{margin-top:0}
@media(max-width:1160px){.ys-workspace{grid-template-columns:1fr}.ys-monitor{position:static}.ys-settings{grid-template-columns:1fr 1fr}.ys-tuning{grid-column:1/-1}.ys-intro{align-items:flex-start;flex-direction:column;gap:14px}.ys .ys-quick-audio{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:14px 16px;margin:0 0 16px;background:var(--fx-ac2-soft);border:1px dashed var(--fx-ac2);border-radius:var(--fx-radius-sm);color:var(--fx-text-main);cursor:pointer}.ys-quick-audio small{display:block;margin-top:5px;color:var(--fx-text-muted);font-size:10px;overflow-wrap:anywhere}.ys-quick-audio b{color:var(--fx-ac2);font-size:20px;font-weight:400}.ys:has(#ysSettings:disabled) .ys-quick-audio{opacity:.5;cursor:default}}
@media(max-width:620px){.yt-mode-bar{padding:0 12px;gap:8px}.yt-back{font-size:11px}.yt-mode-switch a{padding:7px 12px}.ys{padding:22px 12px 48px}.ys-settings{grid-template-columns:1fr}.ys-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ys-panel{padding:18px}.ys-transport{gap:8px}.ys .ys-volume{flex-basis:100%;margin:0;justify-content:flex-end}.ys-section-heading{align-items:flex-start;flex-direction:column}.ys-footnote{align-items:flex-start;flex-direction:column;gap:14px}.ys-export>.ys-button{flex:1}.ys-preset-copy{padding:9px 6px}.ys-preset-title{font-size:12px}.ys-preset-copy small{font-size:10px}.ys-monitor-label{font-size:7px;left:8px;top:8px}.ys-intro h2{letter-spacing:-.8px}}
@media(prefers-reduced-motion:reduce){.ys-button,.ys-preset{transition:none}}
/* Only the Studio mobile shell changes. The original capture canvas stays in
   its own node, at 16:9, and Classic/desktop layouts keep their existing grid. */
@media(max-width:760px){
    .ys[data-studio-view]{display:flex;flex-direction:column;gap:14px}
    .ys[data-studio-view] .ys-workspace,
    .ys[data-studio-view] .ys-settings,
    .ys[data-studio-view] .ys-monitor{display:contents}
    .ys[data-studio-view] .ys-intro{order:0;margin-bottom:4px;gap:12px}
    .ys[data-studio-view] .ys-intro h2{font-size:29px;letter-spacing:-.9px}
    .ys[data-studio-view] .ys-intro p{font-size:13px}
    .ys .ys-local{display:none}
    .ys[data-studio-view] .ys-quick-audio{display:none}
    .ys[data-studio-view] .ys-preview-start{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 0}
    .ys[data-studio-view] .ys-preview-start>span{min-width:0;color:var(--fx-text-muted);font-size:11px;line-height:1.5}
    .ys[data-studio-view] .ys-preview-start>.ys-button{flex:0 0 auto;font-size:12px;padding:10px 13px}
    .ys[data-studio-view] .ys-transport{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:8px;align-items:center;margin-top:8px}
    .ys[data-studio-view] .ys-transport>.ys-volume,
    .ys[data-studio-view] .ys-transport-templates{display:none}
    .ys[data-studio-view] #ysPlay{min-width:0;min-height:44px;padding:10px 8px;font-size:12px;white-space:nowrap}
    .ys[data-studio-view] #ysTime{font-size:10px;white-space:nowrap;letter-spacing:-.2px}
    .ys[data-studio-view] .ys-mute{display:inline-flex;width:44px;min-height:44px;padding:10px}
    .ys[data-studio-view] #ysHandoffStatus,
    .ys[data-studio-view] #ysStatus,
    .ys[data-studio-view] #ysError{order:1;margin:0}
    .ys[data-studio-view] #ysMaterials,
    .ys[data-studio-view] .ys-presets-section,
    .ys[data-studio-view] .ys-viewer{order:2}
    .ys[data-studio-view] #ysLabels,
    .ys[data-studio-view] .ys-export{order:3}
    .ys[data-studio-view] #ysLyricsPanel,
    .ys[data-studio-view] #ysQualityHint{order:4}
    .ys[data-studio-view] #ysAppearance{order:5}
    .ys[data-studio-view] .ys-result{order:6;margin-top:0}
    .ys[data-studio-view] .ys-footnote{order:7;margin-top:8px}
    .ys[data-studio-view] .lyric-related{order:8;margin:10px 0 0}
    .ys[data-studio-view] .ys-presets-section{margin-top:0;min-width:0}
    .ys[data-studio-view] .ys-section-heading{flex-direction:row;align-items:center;gap:10px;margin-bottom:14px}
    .ys[data-studio-view] .ys-section-heading h3{font-size:21px}
    .ys[data-studio-view] .ys-section-heading>.ys-text-button{flex-shrink:0;min-height:44px}
    .ys[data-studio-view] .ys-gallery-window{height:44vh;min-height:230px;max-height:420px;padding-right:5px}
    .ys[data-studio-view] .ys-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .ys[data-studio-view] .ys-preset-filters{gap:6px;margin-bottom:14px}
    .ys[data-studio-view] .ys-preset-filters button{padding:9px 12px;font-size:11px}
    .ys[data-studio-view] .ys-panel{padding:17px}
    .ys[data-studio-view] .ys-panel h3{margin-bottom:15px}
    .ys[data-studio-view] .ys-export{margin-top:0;padding-top:15px;gap:12px}
    .ys[data-studio-view] .ys-export>label{flex-basis:100%}
    .ys[data-studio-view] .ys-export>.ys-button{flex:1;min-height:48px}
    .ys[data-studio-view] #ysProgress{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    .ys[data-studio-view] select{padding-right:38px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
    .ys[data-studio-view] .ys-appearance{padding:17px;background:var(--fx-bg-elevated);border:1px solid var(--fx-border);border-radius:var(--fx-radius-md)}
    .ys[data-studio-view] .ys-appearance>summary{display:list-item;cursor:pointer;font-size:13px;font-weight:650;line-height:1.5;min-height:28px;padding:4px 0;color:var(--fx-text-main)}
    .ys[data-studio-view] .ys-appearance .ys-tuning{padding:0;border:0;background:none}
    .ys[data-studio-view] .ys-appearance .ys-tuning>summary{display:none}
    .ys[data-studio-view] #ysAppearanceControls{margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid var(--fx-border)}
    .ys[data-studio-view] .ys-primary{background:var(--fx-ac1);border-color:var(--fx-ac1);color:#fff}
    .ys[data-studio-view] .ys-primary:hover:not(:disabled){background:color-mix(in srgb,var(--fx-ac1) 88%,white);border-color:var(--fx-ac1)}
    .ys[data-studio-view] :is(.ys-eyebrow,.ys-upload b,.ys-panel h3>span,.ys-tier,.ys-upgrade,.ys-footnote a){color:var(--fx-ac1)}
    .ys[data-studio-view] input[type=checkbox]{accent-color:var(--fx-ac1)}
    .ys[data-studio-view] .ys-preset-filters button[aria-pressed=true]{background:var(--fx-ac1-soft);border-color:var(--fx-ac1);color:var(--fx-text-main)}
    .ys[data-studio-view] .ys-preset[aria-pressed=true]{border-color:var(--fx-ac1);box-shadow:0 0 0 1px var(--fx-ac1)}
    .ys[data-studio-view] :is(button,a,input,select,summary):focus-visible{outline-color:var(--fx-ac1)}
    .ys[data-studio-view] .ys-upload:is(:hover,.is-dragging,:focus-within){border-color:var(--fx-ac1);background:var(--fx-ac1-soft)}
    .ys[data-studio-view] .ys-gallery-window{scrollbar-color:var(--fx-ac1) transparent}
    .ys[data-studio-view] .ys-gallery-window::-webkit-scrollbar-thumb{background:var(--fx-ac1)}
}
