/* Focused editing surface: tools, working panel, canvas, then the real cue track. */
.home-page { --home-header-height:52px; --canvas:#f1f3f3; --control-hover:#f5f5f5; overflow-anchor:none; }
.home-page .header { padding-inline:22px; }
.home-page .brand { font-size:18px; }
.home-page .main-nav,.home-page .header-cta { display:none; }
.home-first-screen { min-height:610px; }
.studio-heading { min-height:0; flex:1; padding:0; gap:16px; border:0; min-width:0; }
.studio-heading h1 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.studio-subtitle,.studio-top-note { display:none; }
.editor-project { min-width:0; padding-left:16px; border-left:1px solid var(--line); }
.editor-project .studio-document { margin:0; }
.editor-project .studio-document strong { max-width:280px; font-weight:600; }
.editor-project .studio-document span:not(.document-icon) { display:none; }
.editor-state-label { margin-left:auto; color:var(--muted); font-size:11px; white-space:nowrap; }
.editor-history { display:flex; align-items:center; }
.editor-history .toolbar-button { padding:6px 10px; border:1px solid var(--line); background:white; }
.editor-export .button { min-height:33px; font-size:12px; padding:7px 17px; }
.studio-body { grid-template-columns:68px 354px minmax(0,1fr); }
.editor-panel { background:white; min-width:0; min-height:0; display:flex; flex-direction:column; border-right:1px solid var(--line); overflow:hidden; }
.editor-panel-content { flex:1; min-height:0; display:flex; flex-direction:column; }
.editor-panel-content>section { flex:1; min-height:0; overflow-y:auto; }
.editor-panel .studio-setup { border:0; padding:23px 20px; overflow:visible; }
.setup-title .panel-label { display:none; }
.setup-title h2 { font-size:21px; }
.editor-panel .setup-title p { display:block; }
.studio .input-tabs { gap:10px; }
.studio .input-tabs button { font-size:11px; }
.studio .dropzone { min-height:164px; border-radius:12px; background:#f7faf9; border-color:#bdcfc9; transition:background .15s,border-color .15s; }
.studio .dropzone:hover,.studio .dropzone.dragover { background:var(--soft-blue); border-color:var(--blue); }
/* Keep the native picker transparent when the busy-state input rule applies. */
.studio .dropzone input[type="file"] { opacity:0; }
.studio .upload-symbol { width:42px; height:42px; border:1px solid #c6dfd7; background:var(--soft-blue); color:var(--blue); box-shadow:0 2px 3px #0f766e08; }
.studio .dropzone strong { font-weight:600; }
.studio .input-tabs [aria-selected=true] { font-weight:650; }
.studio.has-input .dropzone { min-height:92px; }
.studio.has-video #file-meta { display:none; }
.editor-action { padding:15px 20px 10px; border-top:1px solid var(--line); background:white; flex:none; }
.editor-action #start-primary { margin:0; min-height:40px; font-size:12px; }
.editor-action #setup-help { font-size:10px; margin:7px 0 0; line-height:1.5; }
.editor-language-context { display:flex; gap:6px; justify-content:space-between; align-items:center; margin-bottom:10px; }
#editor-language-summary { font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-language-context button { font-size:10px; color:var(--blue); background:transparent; }
.studio-toolbar,.mobile-review-tabs { display:none!important; }
.studio-output { background:var(--canvas); }
.studio-review { padding:0; gap:0; overflow:hidden; }
.review-preview { flex:1; min-height:0; display:flex; }
.studio.has-video .review-preview { display:flex; }
.studio .video-preview { height:100%; flex:1; min-height:0; }
.preview-workspace { height:100%; display:flex; min-height:0; }
.preview-monitor { border:0; border-radius:0; height:100%; display:flex; flex-direction:column; flex:1; background:transparent; }
.preview-monitor-heading { min-height:28px; padding:7px 20px; font-size:10px; }
.studio .video-stage { height:auto; flex:1; min-height:0; background:var(--canvas); }
.video-screen { padding:6px 18px 12px; }
.video-frame { box-shadow:0 3px 16px #18181818; }
.preview-playback { height:42px; padding:0 18px; gap:12px; background:#fafafa; border-top:1px solid #e3e3e3; flex-wrap:nowrap; }
.preview-playback input { flex-basis:auto; }
.preview-playback span { font-size:10px; }
.preview-playback button { min-height:30px; }
.studio .preview-monitor #video-source-label { display:none; }
.studio .video-preview #video-preview-help { display:none; }
.editor-canvas-tools { min-height:44px; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:8px 20px; border-top:1px solid #e5eae7; background:#fff; flex:none; }
.editor-caption-hint { min-width:0; flex:1; display:flex; align-items:center; gap:7px; }
.editor-caption-hint>.icon { flex:none; width:14px; height:14px; margin:0; color:#738078; }
.editor-canvas-actions { display:flex; align-items:center; gap:8px; flex:none; }
.editor-canvas-tools button { border:1px solid #e3e3e3; border-radius:7px; padding:5px 10px; background:white; font-size:11px; }
.editor-canvas-tools .icon { width:15px; height:15px; margin-right:4px; }
.editor-canvas-tools button:hover:not(:disabled) { border-color:var(--blue); color:var(--blue); }
.editor-empty-canvas { display:flex; flex:1; align-items:center; justify-content:center; flex-direction:column; text-align:center; padding:30px; gap:12px; min-height:0; }
.editor-empty-frame { position:relative; width:min(340px,75%); aspect-ratio:16/9; border:1px solid #ddd8e7; border-radius:10px; display:grid; place-items:center; background:#fff; box-shadow:0 6px 24px #342b4908; }
.editor-empty-frame .icon { width:52px; height:52px; padding:12px; color:#9b542b; background:var(--soft-peach); border-radius:13px; transform:translateY(-10px); }
.editor-empty-frame:before,.editor-empty-frame:after { content:''; position:absolute; height:7px; border-radius:3px; bottom:30px; width:47%; background:#d2e8e1; }
.editor-empty-frame:after { bottom:17px; width:32%; background:#ddd2ef; }
.editor-empty-canvas h2 { font-size:20px; letter-spacing:-.5px; }
.editor-empty-canvas p { color:var(--muted); font-size:12px; max-width:310px; margin:0; }
.editor-empty-canvas .button { min-height:36px; font-size:12px; margin-top:3px; }
.editor-text-preview { flex:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:15px; padding:20px; }
.editor-text-frame { width:min(650px,100%); aspect-ratio:16/9; max-height:100%; background:#181818; border-radius:4px; display:flex; align-items:flex-end; justify-content:center; padding:8%; color:white; box-shadow:0 4px 20px #18181818; }
#editor-text-caption { font-size:clamp(16px,2vw,27px); line-height:1.4; text-align:center; white-space:pre-line; }
#editor-text-time { font:11px var(--mono); color:var(--muted); }
.editor-caption-panel .caption-panel { height:100%; padding:22px 16px 0; }
.editor-caption-panel .review-heading { flex-wrap:wrap; gap:8px; }
.editor-caption-panel .review-heading h2 { font-size:20px; font-weight:600; width:100%; }
.editor-caption-panel .review-heading h2 span { font-size:10px; }
.editor-caption-panel .preview-toolbar { margin-bottom:10px; }
.studio .cue-texts { grid-template-columns:1fr; gap:8px; }
.studio .cue-row { padding:12px; border-radius:7px; margin-bottom:9px; }
.studio .cue-heading { gap:4px; align-items:center; }
.studio .cue-heading>div { gap:7px; }
.studio .cue-seek { font-size:9px; }
.studio .cue-textarea { min-height:48px; height:54px; font-size:12px; padding:7px 9px; margin-top:3px; }
.studio .cue-source { background:#f8f8f8; }
.studio .cue-label { font-size:9px; }
.studio .cue-row.active-cue { background:#f3f9f7; border-color:#bdd9cf; border-left-color:var(--blue); }
.studio .cue-row:focus-within { border-color:var(--blue); }
.studio .cue-textarea:focus { background:white; }
.studio .cue-textarea:focus-visible { outline:2px solid var(--blue); outline-offset:1px; }
.working-track-label { display:flex; flex-direction:column; gap:6px; font-size:11px; color:var(--muted); margin:10px 0 12px; }
.timing-tools { flex:none; margin-bottom:12px; border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:#fafafa; }
.timing-tools summary { cursor:pointer; font-size:12px; font-weight:600; }
.timing-tools .shift-controls { margin:10px 0 0; padding:0; border:0; }
.timing-tools .range-controls { margin:10px 0; }
.timing-tools #shift-feedback { margin-bottom:0; color:var(--blue); overflow-wrap:anywhere; }
.studio .cue-heading { flex-wrap:wrap; gap:8px; }
.studio .cue-heading>.cue-time-fields { flex:1 1 100%; flex-wrap:nowrap; gap:4px; }
.studio .cue-time-fields>.cue-time-fields { flex:1; display:flex; min-width:0; }
.studio .cue-time-fields input { flex:1; width:0; min-width:0; padding:4px; font-size:9px; }
.studio .cue-heading>[data-action] { margin-left:auto; }
.studio[data-track=original] .cue-texts>label,.studio[data-track=original] [data-action=retranslate],.studio[data-track=original] .bilingual-choice { display:none; }
.studio #preview-label { font-size:9px; }
.editor-caption-panel .caption-panel { overflow-y:auto; }
.editor-caption-panel #cue-list { flex-shrink:0; }
.editor-caption-panel .timing-tools[open]~#loaded-output #cue-list { max-height:380px; }
.studio .processing-empty { padding:25px 12px; min-height:240px; }
.studio .processing-empty h3 { font-size:19px; }
.studio .processing-empty p { font-size:12px; }
.editor-style-panel { padding:24px 20px; }
.editor-style-panel h2 { font-size:21px; margin-bottom:8px; }
.editor-style-panel>p { font-size:12px; line-height:1.7; color:var(--muted); margin-bottom:22px; }
.editor-style-language { margin-bottom:22px; }
.editor-style-language>label { display:flex; flex-direction:column; gap:8px; font-size:12px; }
.editor-style-language .select-trigger { min-height:39px; font-size:12px; }
.editor-style-panel .caption-layout { display:block; }
.editor-style-panel .caption-layout legend { display:none; }
.editor-style-panel .caption-layout label { font-size:12px; gap:7px; }
.editor-style-panel .caption-layout select { min-height:39px; font-size:12px; }
.editor-style-panel .caption-size-label { margin-top:20px; gap:10px; }
.editor-style-panel .caption-font-label { margin-top:20px; }
.editor-style-panel .caption-font-help { margin:7px 0 0; font-size:10px; color:var(--muted); line-height:1.5; }
.select-option.select-font-option { min-height:45px; gap:8px; }
#caption-font-options .select-font-option>span:first-child { flex:1; min-width:0; font-size:12px; white-space:nowrap; }
#caption-font-options .select-font-sample { flex:none; color:#0f766e; font-size:15px; white-space:nowrap; }
.caption-size-label>span:first-child { display:flex; justify-content:space-between; align-items:center; }
.caption-size-label output { color:var(--ink); font:11px var(--mono); }
.editor-style-panel #caption-size { appearance:none; height:28px; min-height:28px; margin:0; padding:0; border:0; border-radius:20px; background:linear-gradient(to right,var(--blue) var(--range-fill,33.333%),#e3e3e3 var(--range-fill,33.333%)) center/100% 5px no-repeat; cursor:ew-resize; touch-action:pan-y; }
#caption-size::-webkit-slider-thumb { appearance:none; width:17px; height:17px; border-radius:50%; background:white; border:2px solid var(--blue); box-shadow:0 1px 3px #00000020; }
#caption-size::-moz-range-thumb { width:13px; height:13px; border-radius:50%; background:white; border:2px solid var(--blue); box-shadow:0 1px 3px #00000020; }
.caption-size-label .caption-size-scale { display:flex; justify-content:space-between; align-items:center; font-size:11px; line-height:1; color:var(--muted); }
.caption-size-scale>span:last-child { font-size:19px; color:var(--ink); }
.editor-style-panel .caption-size-help { color:var(--muted); font-size:10px; line-height:1.5; margin:9px 0 0; }
.editor-style-panel .caption-layout-checks { flex-direction:column; gap:14px; margin-top:22px; }
.editor-style-panel .caption-layout-checks label { display:flex; font-size:12px; }
.editor-style-panel .caption-layout input[type=checkbox] { width:15px; height:15px; }
.editor-style-panel .caption-layout-footer { margin-top:25px; font-size:10px; }
.editor-style-panel .caption-layout-footer button { font-size:12px; }
.editor-style-tip { padding:15px; margin-top:24px; background:var(--soft-peach); border-radius:7px; font-size:11px; color:#805838; }
.editor-timeline { flex:none; background:#fafafa; border-top:1px solid #e3e3e3; height:134px; padding:9px 18px 12px; min-width:0; }
.editor-timeline-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:7px; }
.editor-timeline-toolbar strong { font-size:11px; font-weight:500; }
.editor-timeline-toolbar>span { font:10px var(--mono); color:var(--muted); }
.editor-timeline-toolbar label { display:flex; align-items:center; gap:6px; font-size:10px; margin-left:auto; color:var(--muted); }
.editor-timeline-toolbar input { width:80px; padding:0; min-height:20px; accent-color:var(--blue); }
.editor-timeline-toolbar button { padding:4px 9px; background:#f0f0f0; font-size:10px; }
.editor-track-scroll { overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
.editor-track-content { position:relative; min-width:100%; touch-action:pan-y; user-select:none; }
.editor-track-content.is-scrubbing,.editor-track-content.is-scrubbing * { cursor:ew-resize; }
.editor-track-content.is-panning,.editor-track-content.is-panning * { cursor:grabbing; }
.editor-cue-track { cursor:default; }
.editor-drag-hint { color:var(--muted); font-size:9px; margin-left:5px; }
.editor-ruler { display:flex; justify-content:space-between; height:22px; font:9px var(--mono); color:#6b6b6b; cursor:crosshair; border-bottom:1px solid #e3e3e3; }
.editor-ruler span { position:relative; padding-top:2px; }
.editor-ruler span:after { content:''; position:absolute; left:0; bottom:0; height:5px; border-left:1px solid #d4d4d4; }
.editor-cue-track { height:44px; position:relative; margin-top:7px; background:#f5f5f5; border-radius:5px; }
.editor-cue-track button { position:absolute; top:0; height:44px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:1px solid #d0c2e2; border-radius:4px; background:var(--soft-violet); color:#574075; padding:7px; text-align:left; font-size:10px; }
.editor-cue-track button.is-translated { background:#d8ece5; border-color:#a8cdc1; color:#17584e; }
.editor-cue-track button.is-current { border:2px solid var(--blue); background:var(--blue); color:white; box-shadow:inset 0 0 0 1px #ffffff60; }
.editor-cue-track button:hover { border-color:var(--violet); }
.studio .video-frame .video-caption { pointer-events:auto; cursor:grab; touch-action:none; user-select:none; border-radius:2px; }
.studio .video-frame .video-caption { outline:var(--caption-selection-outline,none); outline-offset:3px; background:var(--caption-selection-background,transparent); }
.studio .video-frame .video-caption.is-dragging { cursor:grabbing; }
.studio .caption-placement-status { min-width:0; max-width:none; font:11px/1.6 var(--body); text-align:left; color:#738078; margin:0; overflow-wrap:anywhere; }
.studio .video-screen { position:relative; }
.editor-timeline { position:relative; }
.editor-timeline-feedback:not(:empty) { position:absolute; right:18px; bottom:100%; max-width:calc(100% - 36px); padding:5px 9px; font:10px/1.5 var(--mono); color:#17584e; background:#e8f4f1; border:1px solid #a8cdc1; border-radius:5px 5px 0 0; z-index:3; }
.editor-cue-track button { cursor:pointer; touch-action:pan-y; padding:7px 12px; user-select:none; }
.cue-block-text { display:block; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
.cue-quick-editor { position:absolute; z-index:8; right:18px; bottom:calc(100% + 10px); width:min(560px,calc(100% - 36px)); padding:16px; background:#fff; border:1px solid #a8cdc1; border-radius:10px; box-shadow:0 8px 30px #18181820; }
.cue-quick-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.cue-quick-heading strong { font-size:13px; color:#181818; }
.cue-quick-heading span { font-size:10px; color:#626262; }
.cue-quick-texts { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cue-quick-editor label { display:flex; flex-direction:column; gap:5px; font-size:10px; color:#626262; min-width:0; }
.cue-quick-editor textarea { width:100%; min-height:80px; resize:vertical; max-height:140px; font:13px/1.6 var(--body); padding:8px; background:#f7faf8; }
.cue-quick-editor textarea:focus,.cue-quick-editor input:focus { outline:2px solid #0f766e; outline-offset:1px; }
.cue-quick-footer { display:flex; align-items:flex-end; gap:8px; margin-top:12px; }
.cue-quick-footer label { width:125px; }
.cue-quick-footer input { width:100%; font:10px var(--mono); padding:7px 5px; }
.cue-quick-footer>span { align-self:center; margin-top:14px; color:#626262; }
.cue-quick-footer button { min-height:32px; font-size:11px; padding:6px 10px; border-radius:5px; white-space:nowrap; }
#cue-quick-cancel { margin-left:auto; background:#f1f3f2; }
#cue-quick-save { background:#0f766e; color:#fff; }
#cue-quick-error { margin:8px 0 0; color:#a63232; font-size:11px; }
#cue-quick-error:empty { display:none; }
@media(max-width:760px) {
 .cue-quick-editor { right:8px; width:calc(100% - 16px); padding:12px; }
 .cue-quick-heading span { display:none; }
 .cue-quick-texts { gap:8px; }
 .cue-quick-editor textarea { min-height:68px; }
 .cue-quick-footer { flex-wrap:wrap; }
 .cue-quick-footer label { width:calc(50% - 16px); }
 .cue-quick-footer button { flex:1; }
 .editor-timeline-toolbar { gap:6px; }
 .editor-timeline-toolbar>strong { display:none; }
}
.editor-playhead { position:absolute; top:18px; bottom:0; width:1px; background:var(--violet); box-shadow:1px 0 0 white; cursor:ew-resize; touch-action:none; z-index:2; }
.editor-playhead:after { content:''; position:absolute; inset:-8px -8px 0; }
.editor-playhead:before { content:''; position:absolute; top:0; left:-4px; border:5px solid transparent; border-top-color:var(--violet); }
.editor-track-empty { position:absolute; top:38px; left:12px; font-size:11px; color:var(--muted); pointer-events:none; }
.studio .status { font-size:10px; max-height:40px; }
.editor-processing { display:none; }
.studio[data-stage=processing] .editor-processing { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.editor-processing .status { flex:1; min-width:0; margin:0; padding:0; background:transparent; overflow-wrap:anywhere; }
.editor-processing progress { width:100%; height:3px; accent-color:var(--blue); }
.editor-processing .button { min-height:30px; padding:4px 10px; font-size:11px; }
.studio .video-stage.is-expanded { height:100dvh; }
/* Quiet chrome; contrast is reserved for the next action and the selected cue. */
.home-page .button:hover:not(:disabled) { transform:none; }
.home-page .button.primary { box-shadow:0 1px 2px #00000012; }
.home-page .button.primary:disabled { background:#e8e8e8; border-color:#e3e3e3; color:#858585; box-shadow:none; opacity:1; }
.home-page .brand-mark { border-radius:9px; background:var(--ink); }
.home-page .brand-light { color:#6b6b6b; }
.home-page .editor-project .studio-document strong { color:#525252; }
.home-page .editor-state-label { padding:3px 9px; border:1px solid #ddd2ed; border-radius:20px; background:#f6f2fb; color:#7155a5; font-size:10px; }
.home-page .language-controls select { background-color:#fafafa; border-color:#d4d4d4; }
.home-page .language-controls select:hover { border-color:#a3a3a3; }
.editor-history .toolbar-button:hover:not(:disabled),.editor-canvas-tools button:hover:not(:disabled) { background:var(--control-hover); }
.editor-panel-content>section,.studio .cue-list { scrollbar-color:#c4c4c4 transparent; }
.editor-panel .setup-title h2,.editor-style-panel h2,.editor-caption-panel .review-heading h2 { letter-spacing:-.65px; font-weight:650; }
.editor-language-context button { font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.studio .cue-seek { color:#525252; }
.studio .cue-seek:hover:not(:disabled) { color:var(--ink); text-decoration:underline; }
#export-dialog .export-type [aria-pressed=true] { background:var(--soft-blue); color:#17584e; border-color:var(--blue); }
#export-dialog .export-type [aria-pressed=true] small { color:#42695f; }
#export-dialog .export-type button:not([aria-pressed=true]):hover { background:#f5f5f5; }
.caption-safe-area { border-color:#ffffffb3; box-shadow:0 0 0 1px #00000050; }
.caption-safe-area span { color:white; }
@media(min-width:1550px) { .studio-body { grid-template-columns:72px 390px minmax(0,1fr); } }
@media(max-width:1100px) and (min-width:761px) { .studio-body { grid-template-columns:60px 320px minmax(0,1fr); } .studio-heading { gap:10px; } .editor-state-label { display:none; } .editor-export { margin-left:auto; } .editor-project .studio-document strong { max-width:200px; } }
@media(max-height:740px) and (min-width:761px) { .editor-panel .studio-setup { padding:16px 18px; } .editor-panel .setup-title p { display:none; } .editor-timeline { height:119px; } .editor-action { padding:10px 18px 8px; } .editor-canvas-tools { min-height:38px; padding-block:5px; } }
@media(max-width:760px) {
 .home-page { --home-header-height:52px; }
 .home-page .header { height:52px; min-height:52px; padding:10px 16px; flex-wrap:nowrap; }
 .home-page .main-nav,.home-page .header-cta { display:none; }
 .home-first-screen { height:auto; min-height:calc(100svh - 52px); }
 .home-first-screen .studio { min-height:calc(100svh - 52px); }
 .studio-heading { min-height:0; padding:0; gap:10px; }
 .studio-heading h1 { font-size:12px; }
 .editor-project,.editor-state-label,.editor-history { display:none; }
 .editor-export { margin-left:auto; }
 .editor-export .button { min-height:31px; font-size:11px; padding:6px 12px; }
 .studio-body { display:flex; flex-direction:column; min-height:0; }
 .editor-panel { border-right:0; border-bottom:1px solid var(--line); overflow:visible; }
 .editor-panel-content { min-height:0; }
 .editor-panel .studio-setup { padding:18px; }
 .editor-caption-panel .caption-panel { height:370px; padding:18px 16px 0; }
 .editor-panel .cue-list { max-height:none; flex:1; }
 .editor-action { padding:10px 16px; }
 .editor-style-panel { padding:20px 18px; }
 .editor-action #setup-help { display:none; }
 .studio-output { min-height:0; display:none; }
 .studio-review { min-height:0; padding:0; }
 .studio.has-video .studio-output { min-height:0; }
 .studio.has-video .review-preview { min-height:0; height:365px; flex:none; }
 .studio:not(.has-input) .studio-output { display:none; }
 .editor-text-preview { padding:20px 16px; min-height:235px; }
 .editor-text-frame { min-height:160px; }
 #editor-text-caption { font-size:18px; }
 .editor-timeline { height:119px; padding-inline:12px; }
 .editor-timeline-toolbar { gap:7px; }
 .editor-timeline-toolbar label { font-size:0; }
 .editor-drag-hint { display:none; }
 .editor-timeline-toolbar input { width:55px; }
 .video-screen { min-height:260px; padding:10px; }
 .studio.has-video .video-screen { min-height:0; }
 .preview-monitor-heading { padding-inline:14px; }
 .preview-playback { height:40px; padding-inline:12px; gap:6px; }
 .preview-playback span { font-size:9px; }
 .studio .video-stage.is-expanded .video-screen { min-height:0; }
}

.editor-back-input { display:inline-flex; margin:0 0 16px; padding:0; background:transparent; color:var(--blue); font-size:11px; }
.editor-back-input:hover { text-decoration:underline; }
.editor-back-input:focus-visible { outline:2px solid var(--blue); outline-offset:4px; }

.studio .video-frame .video-caption[data-editing=true] { cursor:text; touch-action:auto; user-select:text; -webkit-user-select:text; caret-color:#fff; min-height:1.25em; max-height:none; overflow:visible; white-space:pre-line; }
.studio .video-frame .video-caption[data-editing=true]::selection { background:#0f766e99; color:#fff; }

/* Caption styles stay on the same editing surface, including while typing. */
.studio .video-frame .video-caption[data-single-line=true]:not([data-editing=true]) { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.studio .caption-presets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:0 0 9px; grid-column:1/-1; }
.studio .caption-preset { display:grid; gap:7px; min-width:0; padding:5px 5px 8px; border:1px solid #dedede; border-radius:9px; background:#fff; color:#626262; font:500 10px/1.2 var(--body); cursor:pointer; }
.studio .caption-preset:hover:not(:disabled) { border-color:#87bbae; }
.studio .caption-preset[aria-pressed=true] { border-color:#0f766e; color:#0f766e; background:#eef8f4; box-shadow:0 0 0 1px #0f766e; }
.studio .caption-preset:focus-visible { outline:2px solid #0f766e; outline-offset:3px; }
.studio .caption-preset:disabled { opacity:.5; cursor:default; }
.studio .caption-preset-swatch { display:flex; align-items:center; justify-content:center; gap:3px; min-height:52px; border-radius:5px; background:#303738; color:#fff; font:700 11px/1.2 Arial,sans-serif; white-space:nowrap; }
.studio .preset-spotlight>span { padding:4px 5px; background:#fff; color:#181818; border-radius:3px; }
.studio .preset-spotlight b { color:#4f46e5; }
.studio .preset-bold { font-weight:900; }
.studio .preset-bold b { color:#facc15; }
.studio .preset-pop { background:#513c40; color:#ffcfbf; }
.studio .preset-pop>span { display:inline-block; transform-origin:center bottom; }
.studio .preset-reveal { background:#35434a; }
.studio .preset-reveal b { opacity:.3; }
.studio .preset-karaoke { background:#234c43; color:#82e6c4; }
.studio .preset-karaoke b { color:#e2e8f0; }
.studio .caption-preset:is(:hover,:focus-visible) .preset-pop>span { animation:caption-card-pop .65s ease both; }
.studio .caption-preset:is(:hover,:focus-visible) .preset-reveal b { animation:caption-card-reveal .9s steps(1,end) both; }
.studio .caption-preset:is(:hover,:focus-visible) .preset-karaoke b { animation:caption-card-karaoke .9s steps(1,end) both; }
@keyframes caption-card-pop { 0% { transform:scale(.82); opacity:.35; } 40% { transform:scale(1); opacity:1; } 70% { transform:scale(.96); } 100% { transform:scale(1); } }
@keyframes caption-card-reveal { 0% { opacity:0; } 50%,100% { opacity:1; } }
@keyframes caption-card-karaoke { 0% { color:#e2e8f0; } 50%,100% { color:#82e6c4; } }
.studio .caption-motion-hint { grid-column:1/-1; margin:0 0 14px; color:#737373; font-size:10px; line-height:1.5; }
.studio .video-workflow { list-style:none; display:flex; gap:15px; padding:0; margin:4px 0 20px; color:#858585; font-size:11px; }
.studio .video-workflow li { display:flex; gap:6px; align-items:center; }
.studio .video-workflow li>span { display:grid; place-items:center; width:20px; height:20px; border:1px solid #dedede; border-radius:50%; font:500 10px/1 var(--body); }
.studio .video-workflow [aria-current=step] { color:#0f766e; font-weight:600; }
.studio .video-workflow [aria-current=step]>span { background:#0f766e; border-color:#0f766e; color:#fff; }
.studio .video-workflow .is-complete>span { background:#e2f5ed; border-color:#c2e5d8; color:#0f766e; }
.studio .auto-translate-field { grid-column:1 / -1; display:flex; flex-direction:row; align-items:flex-start; gap:9px; margin:0 0 6px; cursor:pointer; }
.studio .auto-translate-field input { width:16px; height:16px; min-height:0; margin:2px 0 0; accent-color:#0f766e; flex-shrink:0; cursor:pointer; }
.studio .auto-translate-field span { display:flex; flex-direction:column; gap:4px; font-size:12px; font-weight:600; line-height:1.5; }
.studio .auto-translate-field small { color:#777; font-size:11px; font-weight:400; }
.studio .auto-translate-field[hidden] { display:none; }
.studio .editor-style-language .auto-translate-field { margin-bottom:16px; flex-direction:row; }
.studio .editor-style-language #target-language-field { display:flex; flex-direction:column; gap:8px; font-size:12px; }
.studio #target-language-field:has(select:disabled) { color:#858585; }
.studio #target-language-field[hidden],.studio #language-direction[hidden],.studio #video-workflow[hidden] { display:none; }
.studio .video-frame .video-caption[data-preset=spotlight] { background:#fff; box-shadow:0 0 0 .12em #fff; border-radius:.18em; color:#181818; text-shadow:none; caret-color:#181818; }
.studio .video-frame .video-caption[data-preset=spotlight] .caption-active-word { color:#4f46e5; }
.studio .video-frame .video-caption[data-preset=bold] { font-weight:700; }
.studio .video-frame .video-caption[data-preset=bold] .caption-active-word { color:#facc15; }
.studio .video-frame .video-caption[data-preset=karaoke] { color:#e2e8f0; }
.studio .video-frame .video-caption[data-preset=karaoke] .caption-active-word { color:#82e6c4; }
.studio .video-frame .video-caption .caption-future-word { visibility:hidden; }
@media(prefers-reduced-motion:reduce) {
 .studio .caption-preset .caption-preset-swatch * { animation:none!important; }
 .studio .video-frame .video-caption[data-preset=pop] { scale:1!important; opacity:1!important; }
}
.studio .video-frame .video-caption[data-preset=spotlight][data-editing=true] { caret-color:#181818; }
.editor-history { gap:4px; }
/* Sibling handles stay outside the editable text and never appear in exports. */
.studio .video-frame .caption-resize-handle { position:absolute; z-index:4; width:24px; min-width:24px; height:32px; min-height:32px; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; transform:translate(-50%,-50%); cursor:ew-resize; touch-action:none; opacity:var(--caption-selection-opacity,0); pointer-events:var(--caption-selection-events,none); }
.studio .video-frame .caption-resize-handle::after { content:''; position:absolute; left:9px; top:7px; width:6px; height:18px; box-sizing:border-box; border:1px solid #0f766e; border-radius:3px; background:#fff; box-shadow:0 0 0 1px #80e2c4,0 1px 3px #0006; }
/* One selection state controls both the caption outline and its resize grips. */
.studio .video-frame:has(.video-caption:is(:hover,:focus-visible,.is-dragging,[data-editing=true]),.caption-resize-handle:is(:hover,:focus-visible)),.studio .video-frame.is-caption-resizing { --caption-selection-outline:1px solid #80e2c4; --caption-selection-background:#0f766e1a; --caption-selection-opacity:1; --caption-selection-events:auto; }
.studio .video-frame .caption-resize-handle:focus-visible::after { box-shadow:0 0 0 3px #80e2c4,0 1px 3px #0006; }

@media(max-width:1100px) {
 .editor-canvas-tools { flex-wrap:wrap; gap:7px 12px; padding:8px 16px; }
 .editor-caption-hint { flex-basis:100%; }
 .editor-canvas-actions { margin-left:auto; }
 .studio .caption-placement-status { font-size:10px; }
}

/* Subtitle review tools share the existing quiet controls and teal focus. */
.studio .studio-preferences,.studio .bilingual-style { margin:16px 0; border-top:1px solid #e7e7e7; padding-top:14px; }
.studio .studio-preferences summary,.studio .bilingual-style summary,.studio .subtitle-text-tools summary { cursor:pointer; font-size:12px; font-weight:600; color:#303434; }
.studio .studio-preferences>label,.studio .bilingual-style-fields>label { display:flex; flex-direction:column; gap:7px; margin-top:15px; font-size:12px; }
.studio .studio-preferences textarea { box-sizing:border-box; width:100%; resize:vertical; min-height:56px; padding:10px 11px; border:1px solid #d4d4d4; border-radius:7px; font:12px/1.6 var(--body); background:#fafafa; }
.studio .studio-preferences small,.studio .studio-preferences p,.studio .bilingual-style>p,.studio .video-subtitle-import p,.studio .subtitle-text-tools>p { color:#777; font-size:11px; line-height:1.65; margin:7px 0 0; }
.studio .studio-preferences .button { width:100%; margin-top:15px; }
.studio .studio-preferences .is-error { color:#b42318; }
.studio .video-subtitle-import { margin:12px 0 18px; }
.studio .video-subtitle-import .button { width:100%; min-height:36px; }
.studio .check-row { display:flex; flex-direction:row; align-items:center; gap:8px; font-size:12px; }
.studio .check-row input[type=checkbox] { width:15px; height:15px; min-height:0; margin:0; accent-color:#0f766e; flex-shrink:0; }
.studio .bilingual-style>.check-row { margin-top:16px; }
.studio #bilingual-style-fields>label { display:flex; flex-direction:column; gap:8px; margin:16px 0 0; font-size:12px; }
.studio .bilingual-track-settings { margin:18px 0 0; padding:12px; border:1px solid #e3e7e5; border-radius:8px; min-width:0; }
.studio .bilingual-track-settings legend { padding:0 5px; font-size:11px; font-weight:600; color:#0f766e; }
.studio .bilingual-track-settings label { display:flex; flex-direction:column; gap:8px; margin-bottom:13px; font-size:12px; }
.studio .bilingual-track-settings label:last-child { margin-bottom:0; }
.studio .bilingual-track-settings input[type=range] { width:100%; accent-color:#0f766e; }
.studio .bilingual-track-settings output { font:11px var(--mono); color:#737373; }
.studio .bilingual-track-settings .bilingual-color-label { flex-direction:row; align-items:center; justify-content:space-between; }
.studio .bilingual-color-label input { width:45px; height:32px; padding:3px; border:1px solid #d4d4d4; border-radius:6px; background:#fff; }
.studio .bilingual-sample { display:flex; flex-direction:column; gap:7px; text-align:center; padding:20px 12px; margin-top:16px; border-radius:8px; background:#252b2b; line-height:1.25; }
.studio .video-frame .video-caption[data-bilingual=true] { display:flex; flex-direction:column; align-items:center; justify-content:center; white-space:normal; }
.studio .bilingual-caption-line { display:block; white-space:nowrap; line-height:1.25; flex-shrink:0; }
.studio .subtitle-text-tools { margin:0 0 16px; padding:13px 15px; border:1px solid #e1e6e3; border-radius:8px; background:#fff; }
.studio .text-tools-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-top:14px; align-items:end; }
.studio .text-tools-grid label { display:flex; flex-direction:column; gap:7px; min-width:0; font-size:12px; }
.studio .text-tools-grid .check-row { flex-direction:row; align-self:center; }
.studio .text-tools-grid input:not([type=checkbox]) { box-sizing:border-box; width:100%; min-width:0; padding:9px 10px; border:1px solid #d4d4d4; border-radius:6px; font:12px var(--body); background:#fafafa; }
.studio .text-tools-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:12px; }
.studio .text-tools-actions>span { margin-right:auto; font-size:11px; color:#777; }
.studio .cue-heading { flex-wrap:wrap; gap:6px; }
.studio .cue-heading>[data-action=split],.studio .cue-heading>[data-action=merge] { color:#0f766e; }
.studio .cue-quick-footer { flex-wrap:wrap; }
.studio .studio-preferences textarea:focus-visible,.studio .text-tools-grid input:focus-visible { outline:2px solid #0f766e; outline-offset:2px; }
.studio #bilingual-style-fields[hidden],.studio #single-caption-controls[hidden],.studio .caption-presets[hidden],.studio #video-subtitle-import[hidden],.studio #subtitle-text-tools[hidden] { display:none; }
@media(max-width:600px) {
 .studio .text-tools-grid { grid-template-columns:minmax(0,1fr); }
 .studio .text-tools-actions>span { flex-basis:100%; }
 .studio .cue-heading .cue-time-fields { flex-wrap:wrap; }
}
.studio .editor-style-panel .bilingual-track-settings legend { display:block; margin:0; }
.studio #attach-video-preview { width:100%; margin:4px 0 15px; }
.studio #attach-video-preview[hidden] { display:none; }
.studio .editor-timeline-feedback:not(:empty) { position:static; max-width:150px; padding:3px 6px; border-radius:4px; font:10px/1.5 var(--mono); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
@media(max-width:1000px) { .studio .editor-timeline-feedback:not(:empty) { display:none; } }

.studio .video-frame .video-caption[data-multiline=true],.studio .video-caption[data-multiline=true] .bilingual-caption-line { white-space:pre-line; }
