/* ARA family: Edit workspace: dark panels, ivory text, restrained ochre accents. */
:root{color-scheme:dark;--black:#151515;--charcoal:#2c2c2c;--ivory:#f2eee4;--sand:#ddd1bd;--ochre:#b97835;--bg:#151515;--panel:#232321;--field:#191b1a;--line:#41413b;--ink:#f2eee4;--muted:#b4afa5;--accent:#dfb27e;--teal:#b97835}
body{background:var(--bg);color:var(--ink);font-family:Inter,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.55}
header{padding:28px 34px 24px;background:var(--bg);border-bottom:1px solid var(--line);gap:20px}.eyebrow{color:#dfb27e;letter-spacing:.17em;font-size:11px;font-weight:800}h1{font-size:34px;line-height:1.15;letter-spacing:-.04em;font-weight:700;margin:7px 0 0}h1 span{color:var(--muted)}.save-info{font-size:12px;max-width:410px}.save-info strong{font-weight:600;color:#ddd1bd}.save-info small{font-size:11px;color:var(--muted)}
button{background:#232321;border:1px solid #4b4840;border-radius:8px;color:var(--ink);font-weight:600;min-height:36px;transition:background .12s,border-color .12s}button:hover{background:#38352e;border-color:#79644a}button:disabled{opacity:.45}.primary{background:#9b5e27;border-color:#9b5e27;color:#232321}.primary:hover{background:#844a1c;border-color:#844a1c}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--ochre);outline-offset:3px}a{color:#dfb27e;text-underline-offset:3px}.toolbar{padding:12px 34px;background:#232321;border-bottom:1px solid var(--line);gap:8px}.toolbar label,.toolbar a{font-size:12px}
.shared-bar{padding:9px 34px;background:#20221f;color:#c0b8aa;box-shadow:0 2px 8px #3425160b;border-bottom:1px solid #3e4039;font-size:11px;gap:16px}.reviewer-badge{background:#ffffff08;border-left-color:var(--reviewer-colour,#acd2ed);padding:3px 10px;border-radius:0 5px 5px 0}.reviewer-badge strong{color:var(--reviewer-colour,#acd2ed);font-size:11px}.reviewer-badge span{color:#b4afa5;font-size:10px}
main{padding:24px 34px;max-width:1720px}.workspace{border-radius:14px;overflow:hidden;background:#232321;border:1px solid var(--line);box-shadow:0 6px 24px #3c2d1b06}.waveform-strip{background:#20201e;border-color:#34322d;border-radius:12px;padding:10px 16px;margin-bottom:20px}.waveform-strip #wave{background:transparent;height:64px}
.controls{background:#232321;padding:18px 20px;gap:16px}.controls label,.language-bar label{color:#b4afa5;font-size:11px;font-weight:600}.controls .follow-control{min-width:90px}input[type=search],input:not([type]),select,textarea{background:#191b1a;color:#f2eee4;border:1px solid #44463e;border-radius:7px}select{min-height:36px;padding:7px 9px}input[type=search]{padding:9px 12px}input::placeholder,textarea::placeholder{color:#948f85}input[type=checkbox],input[type=range]{accent-color:#9b5e27}.language-bar{background:#292a26;border-color:var(--line);padding:14px 20px;gap:20px}.language-bar>span{color:#c3b29c;font-size:10px;letter-spacing:.08em}.language-bar small{font-weight:400;color:#b4afa5}
.cue{border-color:#383a33;padding:20px;background:#232321}.cue:nth-child(even){background:#20221f}.cue.added{background:#2d2921}.cue.active-cue{outline-color:#b97835;background:#383024}.cue[aria-current=true] .cue-id{color:#dfb27e}.cue-grid{gap:20px}.cue-meta{gap:7px}.cue-id{color:#e1c29d;font-weight:750}.time{color:#b4afa5;font-size:11px}.cell-title{color:#ccb89a;letter-spacing:.06em;font-size:10px;font-weight:700;margin-bottom:8px}.cue textarea{font-size:16px;line-height:1.6;padding:12px 14px;min-height:110px;box-shadow:inset 0 1px 2px #3c2d1b03}.cue textarea:read-only{background:#191b1a}.editing-indicator{color:#aaa59b!important;font-size:10px;margin:0 0 6px}.text-meta{color:#aaa59b;font-size:10px}.text-meta .warn,.warn{color:#dfb27e}.meta-button,.history-button,.cue-sound,.cue-play-mode,.language-help-button{font-size:11px}.note-field{border-color:#44463e;color:#bcb2a2}.note-field summary{font-size:11px}.note-field textarea{font-size:13px;min-height:65px}.pagination{background:#292a26;border-color:var(--line);color:#b4afa5;padding:14px 20px}
#help{color:#b4afa5;padding:14px 0 0}#help h2{color:#eee5d6;font-size:17px}#help h3{color:#d8c4a6;font-size:13px}#help p{font-size:12px}.help-grid{gap:28px}.studio-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:32px;padding:20px 0 4px;border-top:1px solid #41413b;color:#a79e90;font-size:11px}.studio-footer a{display:flex;align-items:center;gap:8px;text-decoration:none;color:#b4afa5}.studio-footer img{width:56px!important;height:36px!important;object-fit:contain;opacity:.8}
dialog{background:#232321;color:#f2eee4;border:1px solid #565044;border-radius:14px;box-shadow:0 20px 80px #15151544}dialog::backdrop{background:#15151570}.history-entry{border-color:#ddd1bd}.history-entry pre{background:#191b1a;color:#eee5d6;padding:10px;white-space:pre-wrap}#toast{background:#25231f;border-color:#b97835;color:#fff7e8;font-weight:500;border-radius:9px;box-shadow:0 4px 20px #0006}.danger{color:#efab8e}
#vimeo-area{color-scheme:dark;color:#f2eee4;border-color:#665847!important;background:#151515!important;box-shadow:0 14px 48px #15151544!important}#vimeo-area select,#vimeo-area button{background:#2c2c2c;color:#f2eee4;border-color:#5d5142}#vimeo-area #video-drag,#vimeo-area .floating-controls{background:#201d19f2}#vimeo-area .floating-controls label,#vimeo-area #video-cue-state{color:#ddd1bd}#video-captions{color:#232321}.video-caption:nth-child(2){color:#dfbd85}.player-dock{background:#2c2c2c;color:#f2eee4;border-color:#665847}.player-dock:hover{background:#37322b}.player-dock span{color:#dfbd85}#resize-player{color:#ddd1bd!important}#login-panel{background:#f2eee4;border:1px solid #41413b;border-radius:14px;color:#f2eee4}
@media(max-width:900px){header{padding:22px 18px}.toolbar,.shared-bar{padding-left:18px;padding-right:18px}main{padding:18px}.cue{padding:16px}.cue-grid{gap:14px}.controls{padding:14px}.studio-footer{flex-wrap:wrap}}

/* Match ARA Edit panel treatment; retain warm contrast on primary actions. */
header{background:#171918}.workspace{background:linear-gradient(180deg,#232321,#171918)}.primary{color:#fffaf0;background:#9b5e27}.primary:hover{color:#fffaf0;background:#b97835}.controls{background:#232321}.studio-footer img{opacity:.8;filter:grayscale(1) brightness(0) invert(.88)}#login-panel{background:#232321}#vimeo-area .video-caption:first-child{color:#fffaf0}
/* Shared viewer layout: one iframe remains mounted across all modes. */
.viewer-layout-bar{display:flex;align-items:center;gap:14px;margin-bottom:12px;color:#b4afa5;font-size:11px}.viewer-layout-bar>span:first-child{letter-spacing:.12em;font-weight:750}.view-buttons{display:flex;gap:4px;padding:3px;background:#232321;border:1px solid #41413b;border-radius:9px}.view-buttons button{min-height:29px;padding:4px 12px;border:0;background:transparent;font-size:11px}.view-buttons button[aria-pressed=true]{background:#b9783533;color:#ffd08a}#viewer-hint{margin-left:auto}
#review-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}#viewer-slot{min-width:0}#review-layout .waveform-strip,#review-layout .workspace{margin-bottom:0}#review-layout[data-view=floating] #viewer-slot{height:0}#viewer-slot.viewer-minimized{height:0}
#vimeo-area.docked-video{position:relative;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;width:100%!important;max-width:100%;max-height:none;margin:0 auto;overflow:hidden;border:1px solid #454138;border-radius:10px;background:#000!important;--video-ratio:1.7777778}#review-layout[data-view=single] #vimeo-area.docked-video{max-width:1000px}#vimeo-area .video-picture{position:relative;overflow:hidden}#vimeo-host{overflow:hidden}#zoom-pan{position:absolute;left:50%;top:0;transform:translateX(-50%);max-width:100%;cursor:grab;touch-action:none;z-index:1}#zoom-pan:active{cursor:grabbing}#zoom-pan[hidden]{display:none}#zoom-pan:focus-visible{outline:2px solid #b97835;outline-offset:-3px}
#video-captions{padding:8px 14px;line-height:1.4;gap:4px}#video-captions .video-caption{margin:0;padding:0}#video-captions .video-caption:nth-child(2){margin:0;padding-top:0;border:0}#video-captions.side-by-side{gap:14px}#video-captions.side-by-side .video-caption:nth-child(2){padding-left:0;border:0}#vimeo-area.captions-overlay #video-captions{position:absolute;bottom:12px;left:5%;width:90%;z-index:2;background:transparent;padding:4px 10px;pointer-events:auto;text-shadow:0 1px 3px #000,0 0 8px #000;overflow:auto}#vimeo-area.captions-overlay .video-caption{background:#0009;border-radius:3px;padding:2px 6px}#video-captions:empty{visibility:hidden}#vimeo-area .floating-controls{gap:7px;padding-bottom:9px;font-size:10px}.font-controls{display:inline-flex;align-items:center;gap:4px}.font-controls button{padding:2px 5px!important;min-height:24px!important}.font-controls output{min-width:35px;font-variant-numeric:tabular-nums}#vimeo-area .floating-controls select{font-size:10px;max-width:170px}#vimeo-area #video-drag{flex-wrap:wrap}#vimeo-area #video-drag strong{font-size:10px}#vimeo-area.docked-video #video-drag{cursor:default}#vimeo-area.docked-video #resize-player{display:none}#vimeo-area.docked-video:fullscreen,#vimeo-area.docked-video.theater{position:fixed;width:100vw!important;max-width:none;height:100vh!important}#vimeo-area.captions-overlay:fullscreen #video-captions,#vimeo-area.captions-overlay.theater #video-captions{bottom:5%;left:5%;max-width:none}#vimeo-area:has(select:focus) .floating-controls{opacity:1;pointer-events:auto}
.wave-seek-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#b4afa5;font-size:10px;margin-bottom:6px}#wave{cursor:crosshair;touch-action:none}.wave-seek-heading output{font-variant-numeric:tabular-nums;color:#dfb27e}
@media(max-width:1000px){#viewer-hint{display:none}}@media(hover:none){#vimeo-area #video-drag,#vimeo-area .floating-controls{opacity:1;pointer-events:auto}}

#vimeo-area[hidden],#show-player[hidden]{display:none!important}

/* Double compares the film with its live captions, with the editor below. */
#review-layout:not([data-view=floating]) #viewer-slot{position:sticky;top:var(--activity-height,60px);z-index:24;align-self:start;background:var(--bg)}
#vimeo-area[data-view=double]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center}
#vimeo-area[data-view=double] #video-captions{position:static;width:100%;left:auto;bottom:auto;background:#000;text-shadow:none;border:0;align-self:stretch;justify-content:safe center}
#vimeo-area[data-view=double] .video-caption{background:transparent;padding:0}
#vimeo-area[data-view=double] #caption-position{display:none}
#vimeo-area[data-view=double] label:has(#caption-position){display:none}
#vimeo-area .video-picture,#vimeo-area #vimeo-host,#vimeo-area iframe,#vimeo-area #video-captions{border:0!important;box-shadow:none!important;outline:none}
.font-controls{gap:0!important;white-space:nowrap}
#vimeo-area .font-controls button{width:25px;min-width:25px;height:25px;padding:0!important;border-radius:0;font-size:15px}
#vimeo-area .font-controls button::before{display:none}
#vimeo-area #caption-smaller{border-radius:5px 0 0 5px}
#vimeo-area #caption-larger{border-radius:0 5px 5px 0;margin-left:-1px}
#vimeo-area #caption-reset{width:auto;min-width:40px;margin-left:4px;border:0;background:transparent;font-size:10px}
.cue{scroll-margin-top:calc(var(--activity-height,60px) + var(--docked-height,0px) + 16px)}

#vimeo-area .font-controls button{display:inline-flex;align-items:center;justify-content:center;width:29px;min-width:29px;gap:3px}
.font-controls svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.font-controls output{margin:0 5px;min-width:30px;font-size:10px}
#vimeo-area #caption-reset{width:auto;min-width:0;margin:0;padding:0 4px!important;font-size:10px;border-radius:5px}
#caption-reset svg{width:14px;height:14px}
.precision-timeline{margin-bottom:12px;color:var(--ink)}.timeline-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 0;font-size:11px}.timeline-toolbar>span{color:var(--muted);margin-right:auto}.timeline-toolbar button,.timeline-toolbar select{font-size:11px;min-height:29px;padding:4px 7px}.timeline-toolbar label{display:flex;gap:5px;align-items:center}.timeline-toolbar input{width:90px;padding:4px;font-size:11px;min-height:28px;background:var(--field);color:var(--ink);border:1px solid var(--line);border-radius:4px}#timeline-scroll{height:140px;overflow:auto;background:#151515;border-radius:7px;border:1px solid var(--line)}#timeline-track{position:relative;height:120px}#timeline-ruler{height:25px;position:absolute;inset:0 0 auto;cursor:crosshair;color:var(--muted);font-size:9px}#timeline-ruler span{position:absolute;border-left:1px solid #666;height:22px;padding-left:4px;white-space:nowrap}#timeline-bubbles{position:absolute;inset:28px 0 0}.timeline-bubble{position:absolute;top:0;height:82px;background:#37332c;border:1px solid #716044;border-radius:8px;min-width:7px;touch-action:none;cursor:grab;overflow:hidden}.timeline-bubble.selected{background:#5c4228;border-color:#edbd78;z-index:2}.bubble-text{display:block;padding:8px 12px;font-size:11px;pointer-events:none}.bubble-text span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bubble-text span+span{color:#dfbd85;margin-top:6px}.trim-handle{position:absolute;top:0;bottom:0;width:9px;background:#dfb27e33;cursor:ew-resize}.trim-handle.start{left:0}.trim-handle.end{right:0}#timeline-head{position:absolute;top:0;bottom:0;width:1px;background:#f4d5a4;pointer-events:none;z-index:4}#timeline-message{font-size:11px;color:#ddd1bd;min-height:18px}

#timeline-scroll{height:193px}#timeline-track{height:174px}#timeline-wave{position:absolute;top:117px;height:48px;cursor:crosshair}#timeline-head{z-index:4}

.precision-timeline{padding:10px 16px;background:#20201e;border:1px solid #34322d;border-radius:12px;margin-bottom:0;min-width:0}
.precision-timeline.timing-locked .timeline-bubble{cursor:pointer}
.precision-timeline.timeline-pinned{position:sticky;top:calc(var(--activity-height,60px) + var(--docked-height,0px));z-index:23;max-height:calc(100vh - var(--activity-height,60px) - var(--docked-height,0px) - 60px);overflow:auto;box-shadow:0 6px 18px #0005}
#timeline-lock[aria-pressed=true],#timeline-pin[aria-pressed=true]{color:#ffd08a;border-color:#b97835}
.cue{scroll-margin-top:calc(var(--activity-height,60px) + var(--docked-height,0px) + var(--pinned-timeline-height,0px) + 16px)}

#timeline-scroll{height:233px}#timeline-track{height:214px}#timeline-wave{height:88px}#timeline-message:empty{display:none}.precision-timeline>.timeline-toolbar:first-child>label{margin-left:auto}

/* Bubble heights follow the chosen amount of text; retain the readable waveform. */
.precision-timeline{--bubble-height:48px;padding:6px 12px}
.precision-timeline[data-bubble-text=left],.precision-timeline[data-bubble-text=right]{--bubble-height:28px}
.precision-timeline[data-bubble-text=off]{--bubble-height:14px}
.precision-timeline .timeline-bubble{height:var(--bubble-height);border-radius:5px;display:flex;align-items:center}
.precision-timeline .bubble-text{padding:4px 11px;line-height:17px;width:100%;min-width:0;box-sizing:border-box}
.precision-timeline .bubble-text span+span{margin-top:2px}
.precision-timeline #timeline-bubbles{top:23px}
.precision-timeline #timeline-wave{top:calc(31px + var(--bubble-height))}
.precision-timeline #timeline-track{height:calc(124px + var(--bubble-height))}
.precision-timeline #timeline-scroll{height:calc(141px + var(--bubble-height))}
.precision-timeline .timeline-toolbar{padding:5px 0;gap:6px}
.precision-timeline>.timeline-toolbar:first-child>label{margin-left:0}
.precision-timeline>.timeline-toolbar:first-child>label:has(#timeline-text){margin-left:auto}

/* Waveform sits at the track bottom, directly beneath subtitle bars. */
.precision-timeline #timeline-wave{top:auto;bottom:0}
.precision-timeline #timeline-track{height:calc(113px + var(--bubble-height))}
.precision-timeline #timeline-scroll{height:calc(130px + var(--bubble-height))}

/* Single-sided waveform: full speech height in half the vertical space. */
.precision-timeline #timeline-wave{height:48px}
.precision-timeline #timeline-track{height:calc(73px + var(--bubble-height))}
.precision-timeline #timeline-scroll{height:calc(90px + var(--bubble-height))}

#timeline-hover{position:absolute;top:0;bottom:0;width:0;border-left:1px dashed #ddd1bd88;pointer-events:none;z-index:5}
#timeline-hover-time{position:absolute;top:0;left:0;padding:2px 5px;border-radius:3px;background:#20221ff2;color:#eee5d6;font:10px/16px ui-monospace,monospace;white-space:nowrap;box-shadow:0 1px 4px #0006}

.cue.timeline-selected-cue{border-left-color:#dfb27e;background:#383024}.cue.timeline-selected-cue .cue-id{color:#ffd08a}

.viewer-wave-overlay{position:absolute;bottom:0;left:50%;transform:translateX(-50%);max-width:100%;height:46px;background:linear-gradient(transparent,#000b);z-index:2}
#viewer-wave-canvas{display:block;width:100%;height:46px;cursor:crosshair;touch-action:none}
#viewer-wave-hover{position:absolute;top:-20px;transform:translateX(-50%);font:10px/18px ui-monospace,monospace;padding:0 4px;background:#171918ed;color:#fffaf0;border-radius:3px;pointer-events:none;white-space:nowrap}
#vimeo-area.has-viewer-wave.captions-overlay #video-captions{bottom:58px}
#vimeo-area.has-viewer-wave .floating-controls{top:32px;bottom:auto}

/* Use the device width; drag handles keep panel heights under the editor's control. */
main{width:100%;max-width:none;box-sizing:border-box;padding:12px clamp(8px,1.4vw,24px)}
#review-layout[data-view=single] #vimeo-area.docked-video{max-width:none}
#vimeo-area.captions-overlay .video-caption{background:transparent;border-radius:0;-webkit-text-stroke:.35px #000;paint-order:stroke fill;text-shadow:1px 1px 2px #000,-1px -1px 2px #000,1px -1px 2px #000,-1px 1px 2px #000}
.precision-timeline{position:relative}
.precision-timeline #timeline-scroll{height:var(--timeline-user-height,calc(90px + var(--bubble-height)))}
.precision-timeline #timeline-track{height:calc(var(--timeline-user-height,calc(90px + var(--bubble-height))) - 17px)}
.precision-timeline #timeline-bubbles{top:auto;bottom:50px;height:var(--bubble-height)}
.height-resizer{height:8px;min-height:8px;width:100%;cursor:ns-resize;touch-action:none;position:relative;z-index:8;grid-column:1/-1;flex:0 0 8px}
.height-resizer:after{content:'';display:block;position:absolute;left:calc(50% - 24px);top:3px;width:48px;height:2px;border-radius:2px;background:#bdb6a955}
.height-resizer:hover:after,.height-resizer:focus-visible:after{background:#ffd08a}
#vimeo-area:fullscreen>.height-resizer{display:none}
@media(max-height:650px){#review-layout:not([data-view=floating]) #viewer-slot,.precision-timeline.timeline-pinned{position:relative;top:auto;max-height:none}.cue{scroll-margin-top:var(--activity-height,60px)}}

/* One compact control scale across project actions, cues and pagination. */
body button{font-size:11px;line-height:16px;min-height:28px;padding:5px 8px;border-radius:5px}
body button[data-button-icon]::before{width:14px;height:14px;flex-basis:14px;vertical-align:-3px;margin-right:5px}
.toolbar{padding-top:8px;padding-bottom:8px;gap:6px}
.toolbar select{font-size:11px;min-height:28px;padding:5px 8px}
.pagination{padding:9px 14px;font-size:12px}
#video-drag .view-buttons{margin-left:auto;gap:2px;padding:0;border:0;border-radius:0;background:transparent}
#vimeo-area #video-drag .view-buttons button[aria-pressed=true]{background:#b9783533;color:#ffd08a}
#vimeo-area #video-drag{gap:5px}
#video-drag .view-buttons button{white-space:nowrap}
#shared-online[hidden]{display:none}
@media(pointer:coarse){body button{min-height:36px}}

/* Compact subtitle editing text without changing viewer captions. */
.cue textarea{font-size:14px;line-height:1.5}

/* Compact icon actions retain accessible names and a reversible text legend. */
body button.icon-only{font-size:0!important;width:30px!important;min-width:30px!important;height:28px;padding:5px!important;line-height:16px}
body button.icon-only::before{margin:0!important;width:16px!important;height:16px!important;vertical-align:middle!important}
#studio-view-lock[aria-pressed=true]{color:#ffd08a;border-color:#b97835}
.studio-tooltip{position:fixed;z-index:10000;padding:5px 8px;background:#24231f;color:#f2eee4;border:1px solid #756344;border-radius:4px;font-size:11px;pointer-events:none;max-width:260px}
.studio-guide{position:fixed;inset:auto 18px 18px auto;margin:0;width:min(390px,calc(100vw - 36px));padding:20px;box-sizing:border-box;z-index:10001}
.studio-guide::backdrop{background:#0003}.studio-guide h2{font-size:18px}.studio-guide p{font-size:13px}.studio-guide label{font-size:12px}.guide-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.guide-highlight{outline:2px solid #dfb27e!important;outline-offset:3px}
.precision-timeline #timeline-wave{height:calc(var(--timeline-user-height,calc(90px + var(--bubble-height))) - var(--bubble-height) - 42px)}
.precision-timeline #timeline-bubbles{top:23px;bottom:auto}
#timeline-hover-time{top:calc(27px + var(--bubble-height));font-size:10px}
@media(pointer:coarse){body button.icon-only{height:36px;width:36px!important}}

/* Guided spotlight: transparent target window with the rest of the page dimmed. */
.cue-id{font-size:24px;line-height:1.1;font-weight:700;font-variant-numeric:tabular-nums}
.studio-guide{overflow:visible;isolation:isolate}
.studio-guide::backdrop{background:transparent}
.guide-spotlight{position:fixed;border:2px solid #dfb27e;border-radius:8px;box-sizing:border-box;pointer-events:none;z-index:-1}
.guide-shade{position:fixed;background:#000b;pointer-events:none;z-index:-2}
.studio-guide{max-height:calc(100dvh - 36px)}
.studio-guide #guide-description{max-height:45vh;overflow:auto}
.guide-highlight{outline:none!important}
#vimeo-area.guide-highlight #video-drag,#vimeo-area.guide-highlight .floating-controls{opacity:1;pointer-events:auto}

.subtitle-tools{display:flex;align-items:center;gap:6px;margin-top:6px}
.icon-reviewer-note:not([open]){display:none}
.icon-reviewer-note>summary{display:none}
.reviewer-note-button.has-note{color:#ffd08a;border-color:#b97835}
.dictation-button[aria-disabled=true]{opacity:.45;cursor:help}
#subtitle-lock-slot{display:flex;align-items:center;gap:6px;flex-wrap:wrap}

.subtitle-tools>button{margin:0!important;align-self:center;display:inline-flex;align-items:center;justify-content:center}
.dictation-preview{width:100%;min-height:110px;box-sizing:border-box;margin:8px 0}
.dictation-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
#dictation-dialog{width:min(520px,calc(100vw - 32px))}

.dictation-input-monitor{display:flex;align-items:center;gap:12px;padding:10px 0;font-size:12px}
#dictation-level{flex:1;min-width:90px;height:16px;accent-color:#dfb27e}
#help-dictate{margin-top:6px}

.language-bar{position:relative;padding-right:54px}
#add-language{position:absolute;right:14px;top:50%;transform:translateY(-50%)}
#language-track-dialog{width:min(560px,calc(100vw - 32px));max-height:85vh;overflow:auto}
.track-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.track-fields label{display:flex;flex-direction:column;gap:5px;font-size:12px}
.track-fields input,.track-fields select{width:100%;box-sizing:border-box}
.track-fields [hidden]{display:none}
.track-sample{padding:8px 0;border-top:1px solid var(--line)}
.track-sample pre{white-space:pre-wrap;font:inherit}
#track-message{font-size:13px;color:var(--sand)}
@media(max-width:500px){.track-fields{grid-template-columns:1fr}}
#ai-dialog{width:min(640px,94vw);max-height:85vh;overflow:auto}#ai-dialog .track-fields input,#ai-dialog .track-fields select{width:100%}.ai-job{border-top:1px solid #514b40;margin-top:18px;padding-top:14px}.ai-job progress{display:block;width:100%;height:8px;margin-top:10px;accent-color:#b97835}.ai-job pre{white-space:pre-wrap;font:inherit;padding:8px;background:#181a18}.ai-job details{max-height:260px;overflow:auto;margin:12px 0}
.ai-warning{display:block;margin:4px 0;color:#e5bd80}#ai-glossary,.ai-job textarea{width:100%;font:inherit;min-height:70px}.ai-job label{display:block;margin:6px 0}

#project-chat{position:relative}#project-chat[data-unread]:not([data-unread=""])::after{content:attr(data-unread);position:absolute;right:-5px;top:-6px;background:#b6742e;color:#fff;font-size:10px;line-height:16px;min-width:16px;border-radius:9px;text-align:center;padding:0 3px}

.subtitle-tools{flex-wrap:wrap}
.subtitle-tools .subtitle-tag-button[aria-pressed="true"]{color:#ffd08a!important;border-color:#c58b45!important;background:#654923!important;box-shadow:inset 0 0 0 1px #c58b4566}
.subtitle-tools .subtitle-chat-button{margin-left:2px!important}

.subtitle-tools-right{display:flex;align-items:center;gap:6px;margin-left:auto}
.subtitle-tools-right>button{margin:0!important;align-self:center;display:inline-flex;align-items:center;justify-content:center}
.subtitle-tools-right .subtitle-chat-button{margin-left:0!important}

.chat-unread{border-left:3px solid #d2a45e;padding-left:12px}.chat-new{display:block;color:#e6b971;font-weight:600}.project-chat-dialog .history-entry button{margin:3px}
/* Keep source selection compact in workflow dialogs. */
#structures-sources, #workflow-recordings, #paper-blocks { max-height: 240px; overflow: auto; }
#structures-sources label, #workflow-recordings label { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; }
#structures-sources input, #workflow-recordings input { flex: 0 0 auto; }

/* Match the spacing of the language action icons. */
.subtitle-row-actions{display:flex;align-items:center;gap:6px}
.cue .subtitle-row-actions>button{margin:0;width:auto;align-self:center}

.subtitle-changing{opacity:.65;pointer-events:none}
.subtitle-change-status{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:10000;padding:10px 16px;border:1px solid var(--line);border-radius:8px;background:#24241f;color:#f7eddc;box-shadow:0 4px 20px #0006}
.subtitle-change-status::before{content:'';display:inline-block;width:12px;height:12px;margin-right:9px;border:2px solid #ffffff40;border-top-color:#efb877;border-radius:50%;animation:subtitle-saving .8s linear infinite}
@keyframes subtitle-saving{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.subtitle-change-status::before{animation:none}}

.subtitle-merge-toolbar{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.cue-id{display:flex;align-items:center;gap:10px}
.cue.merge-selected{box-shadow:inset 3px 0 #efb877}
.select-subtitle[aria-pressed="true"]{background:#654923;color:#ffd08a;border-color:#c58b45}

.subtitle-split-dialog{width:min(820px,94vw)}.split-text-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}.split-text-pair label{min-width:0}.split-text-pair textarea{width:100%;min-height:85px}.split-language h3{font-size:14px;margin-bottom:6px}@media(max-width:540px){.split-text-pair{grid-template-columns:1fr}}

.precision-timeline .subtitle-action-bar{gap:18px;row-gap:10px}
.subtitle-action-group{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.subtitle-action-group:not(:has(> :not([hidden]))){display:none}
.subtitle-action-bar>.subtitle-merge-toolbar{margin-right:0;color:var(--ink);gap:8px}
.subtitle-action-bar>[hidden]{display:none}
.story-order-strip{display:flex;gap:8px;overflow-x:auto;padding:10px 4px;margin:12px 0;border-block:1px solid var(--line)}
.story-sequence-chip{flex:0 0 150px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:grab}
.story-order-hint{font-size:12px;color:var(--muted)}
[data-story-index].story-dragging{outline:2px solid #78cbd5;background:#224950;opacity:.8}
#paper-blocks>.story-drop-before{box-shadow:0 -3px #78cbd5}#paper-blocks>.story-drop-after{box-shadow:0 3px #78cbd5}
.story-sequence-chip.story-drop-before{box-shadow:-3px 0 #78cbd5}.story-sequence-chip.story-drop-after{box-shadow:3px 0 #78cbd5}

.subtitle-reorder-mode #rows .cue,.subtitle-reorder-mode .timeline-bubble{cursor:grab}
.subtitle-reorder-mode .timeline-bubble .trim-handle{display:none}
.reorder-moving{outline:2px solid #78cbd5!important;background:#224950!important;opacity:.8;cursor:grabbing!important}
#rows .reorder-before{box-shadow:0 -3px #78cbd5}#rows .reorder-after{box-shadow:0 3px #78cbd5}
.timeline-bubble.reorder-before{box-shadow:-4px 0 #78cbd5}.timeline-bubble.reorder-after{box-shadow:4px 0 #78cbd5}
#subtitle-reorder[aria-pressed="true"]{color:#b7f6ff;border-color:#78cbd5;background:#224950}

/* Structural history count, independent of the decorative icon. */
#deleted-subtitles{position:relative;overflow:visible}
#deleted-subtitles.has-history{color:#ffd08a;border-color:#c58b45;background:#654923}
#deleted-subtitles[data-history-count]::after{content:attr(data-history-count);position:absolute;right:-7px;bottom:-7px;min-width:16px;height:16px;box-sizing:border-box;padding:0 3px;display:flex;align-items:center;justify-content:center;border-radius:999px;background:#ffd08a;color:#241b10;border:1px solid #20201e;font:700 10px/1 Arial,sans-serif;pointer-events:none}

/* Clear magnetic insertion feedback, without changing row layout. */
#rows .cue.reorder-moving {transform:scale(.975);opacity:.55;outline:3px solid #78cbd5!important;box-shadow:0 12px 28px #0008;}
.subtitle-reorder-mode #rows .cue {transition:transform .12s ease,opacity .12s ease;}
.subtitle-drop-marker {position:fixed;z-index:9999;pointer-events:none;background:#a8f3ff;box-shadow:0 0 12px #78cbd5;font-size:12px;line-height:22px;color:#102a30;text-indent:12px;white-space:nowrap;}
.subtitle-drop-marker:not([hidden])::before {content:"▶";position:absolute;left:0;top:-9px;text-indent:0;color:#a8f3ff;}
.subtitle-drop-marker:not([hidden])::after {content:"◀";position:absolute;right:0;top:-9px;color:#a8f3ff;}
.subtitle-drop-marker {text-shadow:0 0 3px #fff;background-color:#a8f3ff;}
.subtitle-drop-marker.vertical {writing-mode:vertical-rl;text-indent:4px;}
.reorder-landed {outline:3px solid #a8f3ff!important;outline-offset:-3px;background:#224950!important;}

.subtitle-drop-label {position:absolute;left:16px;top:-25px;padding:1px 8px;border-radius:4px;background:#a8f3ff;color:#102a30;text-indent:0;text-shadow:none;font-weight:600;}
.subtitle-drop-marker.vertical .subtitle-drop-label {writing-mode:horizontal-tb;left:8px;top:-25px;}
@media(prefers-reduced-motion:reduce){.subtitle-reorder-mode #rows .cue{transition:none;}}
/* Density changes presentation, never subtitle content. */
#subtitle-density {width:auto;min-width:90px;margin-left:12px;}
.compact-expand{display:none;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)){padding:10px 16px;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) textarea{height:3.4em;min-height:3.4em;padding:5px 8px;resize:none;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .text-meta,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .subtitle-tools,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-play-mode,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-sound,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .subtitle-row-actions,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .note-field{display:none;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-id{font-size:18px;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .time{font-size:11px;}
.compact-subtitles .compact-expand{display:inline-flex;font-size:11px;padding:3px 6px;}
.subtitle-move-dialog{width:min(520px,90vw);}
.subtitle-move-dialog>select,.subtitle-move-dialog>input{display:block;width:100%;margin:10px 0;}
.subtitle-move-dialog>select[hidden]{display:none;}
.subtitle-move-dialog>button{margin-right:8px;}
#subtitle-text-mode[aria-pressed=true]{color:#b7f6ff;border-color:#78cbd5;background:#224950;}

.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .editing-indicator{display:none;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-meta{display:grid;grid-template-columns:auto auto;gap:3px 8px;align-content:start;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .time{grid-column:1 / -1;white-space:normal;}
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cell-title{margin-bottom:4px;}
/* Compact row controls retain a stable left edge. */
#rows .cue{position:relative;}
#rows .compact-expand{position:absolute;right:10px;top:8px;z-index:2;}
#rows .cue-quick-actions{display:flex;align-items:center;gap:8px;grid-column:1 / -1;}
#rows .cue-quick-actions button{margin:0;}
.compact-subtitles #rows .cue{padding-right:48px;}
#timeline-start,#timeline-end{width:132px;font-variant-numeric:tabular-nums;}
.timeline-bubble .trim-handle:hover,.timeline-bubble .trim-active{background:#8ee9ff!important;box-shadow:0 0 0 2px #173f49,0 0 10px #8ee9ff;opacity:1!important;}
.timeline-bubble .trim-active.end{background:#ffc575!important;box-shadow:0 0 0 2px #573714,0 0 10px #ffc575;}
.history-review-controls{display:flex;gap:10px;align-items:center;}
.history-unreviewed{border-left:3px solid #dfb27e;padding-left:12px;}
.history-entry>small{display:block;color:#c9c5bb;margin:6px 0;}
.history-entry>button{margin:8px 8px 0 0;}
.history-entry pre{white-space:pre-wrap;overflow-wrap:anywhere;}
.history-review-hint{font-size:12px;color:#c9c5bb;}

/* Quiet editing controls and compact utility windows. */
.cell-title { text-transform:none !important; letter-spacing:normal !important; }
#rows .cue { padding-right:52px; }
#rows .cue .compact-expand { right:12px; top:10px; }
#rows .cue-quick-actions .subtitle-blade { display:inline-flex; }
[hidden] { display:none !important; }
dialog { padding-top:38px; }
.window-chrome { position:absolute; top:8px; right:10px; display:flex; gap:4px; opacity:0; transition:opacity .12s; }
dialog:hover > .window-chrome,dialog:focus-within > .window-chrome { opacity:1; }
.window-control { width:24px; height:24px; padding:0; border:0; border-radius:50%; font-size:18px; }
.window-dock { position:fixed; bottom:12px; left:12px; z-index:10000; display:flex; gap:6px; }
.window-dock:empty { display:none; }
.workspace-float { position:fixed; inset:auto 18px 18px auto; margin:0; width:460px; max-width:calc(100vw - 36px); max-height:55vh; overflow:auto; z-index:1000; padding:34px 16px 12px; }
.workspace-float h2 { font-size:16px; margin:0 0 10px; }
.workspace-float .split-text-pair { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.workspace-float textarea { min-height:72px; height:90px; }
.workspace-float .split-language { margin:8px 0; padding:0; }
.split-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.split-controls input[type=text] { width:130px; }
.split-controls label { display:flex; align-items:center; gap:5px; }
.split-language > input[type=range] { width:65%; }
.history-icon { width:28px; height:28px; padding:4px; }
.compact-history .history-entry { padding:8px; margin:4px 0; font-size:12px; }
.compact-history h3 { font-size:13px; margin:0; }
.compact-history p { margin:4px 0; }
@media (hover:none) { .window-chrome { opacity:1; } }
.compact-history .history-entry { display:grid; grid-template-columns:1fr auto auto auto; align-items:center; gap:4px 8px; }
.compact-history .history-entry > strong { grid-column:1; }
.compact-history .history-entry > small { grid-column:1; grid-row:2; margin:0; font-size:11px; }
.compact-history .history-entry > details { grid-column:1 / -1; grid-row:3; }
.compact-history .history-entry > button { grid-row:1 / 3; margin:0; }
#shared-dialog:has(.history-review-controls) { width:520px; max-width:calc(100vw - 36px); }
#shared-dialog:has(.history-review-controls) > button { display:none; }
.compact-subtitles #rows .cue,
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) { padding-right:52px; }
/* Compact cards use their available height for text. */
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-grid > div:not(.cue-meta) { display:flex; flex-direction:column; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) textarea { flex:1; height:100%; min-height:4.3em; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-meta { grid-template-columns:auto 1fr; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .time { grid-column:2; grid-row:1; font-size:10px; line-height:1.35; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .cue-quick-actions { grid-column:1 / -1; }
.split-mini { margin:10px 0; }
.split-mini canvas { width:100%; height:88px; background:#191b1a; border-radius:5px; cursor:crosshair; }
.split-mini-caption { font-size:11px; color:#d5c5ad; margin:5px 0; }
.split-mini-controls { display:flex; gap:5px; margin-top:5px; }
.workspace-float { max-height:80vh; }
.window-dock { bottom:auto; top:12px; left:50%; transform:translateX(-50%); }
#show-player { min-width:180px; gap:24px; }
.language-cut-marker { font-size:10px; padding:1px 5px; margin-left:6px; }
#show-player::before { display:none; }
.split-hint { font-size:12px; color:#c9c5bb; line-height:1.4; margin:4px 0 10px; }
.split-word-breaks { display:flex; flex-wrap:wrap; gap:3px; margin:8px 0; }
.split-word-breaks .split-word { padding:3px 5px; border:1px solid transparent; background:transparent; color:#b8b5ac; font-size:12px; }
.split-word-breaks .split-word.before-cut { color:#f5e2bf; background:#b978351c; }
.split-word-breaks .split-word.cut-after { border-right:3px solid #ffc77d; }
.split-language > button[aria-pressed=true] { background:#694922; border-color:#c89351; }
.split-language .split-word-range { width:100%; appearance:none; height:3px; border:0; padding:0; margin:8px 0 12px; background:linear-gradient(to right,#dbad70 var(--word-progress,50%),#4c4b43 var(--word-progress,50%)); }
.split-word-range::-webkit-slider-thumb { appearance:none; height:12px; width:12px; border-radius:50%; background:#f0c68b; border:2px solid #242520; }
.split-word-range::-moz-range-thumb { height:10px; width:10px; border-radius:50%; background:#f0c68b; border:2px solid #242520; }
.split-estimate { font-size:11px; margin-top:7px; }
.split-word-breaks .split-word::before,
.split-language .split-auto::before,
.split-language .split-estimate::before { display:none; }
.split-language .split-auto::after { content:'Off'; margin-left:8px; font-size:10px; color:#c8c5ba; }
.split-language .split-auto[aria-pressed=true]::after { content:'On'; color:#ffe0a8; }
.split-language > input.split-word-range[type=range] { width:100%; }
.split-drag-edge { position:absolute; top:1px; left:1px; right:1px; height:34px; cursor:move; border-radius:12px 12px 0 0; }
.workspace-float > .window-chrome { z-index:2; }
.split-language-heading { display:block; width:100%; text-align:left; font-size:12px; padding:5px 0; border:0; background:none; color:#d5c5ad; }
.split-language-heading::before { display:none; }
.split-language-heading::after { content:'⌄'; float:right; }
.split-language-folded > :not(.split-language-heading) { display:none !important; }
.split-language-folded > .split-language-heading::after { content:'›'; }
.split-language > .split-mini-caption { display:none; }
.has-language-parts > textarea,.has-language-parts > .text-meta,.has-language-parts > .subtitle-tools,.has-language-parts > .editing-indicator,.has-language-parts .language-cut-marker { display:none !important; }
.segment-cards { display:grid; gap:7px; }
.segment-card { border:1px solid #625442; border-radius:5px; padding:8px; background:#191b1a; }
.segment-heading { display:flex; gap:10px; align-items:center; font-size:10px; color:#c9c5bb; }
.segment-actions { display:flex; gap:4px; margin:6px 0; }
.segment-card .segment-text { width:100%; min-height:65px; height:75px; }
.part-selected { outline:1px solid #ffc77d; }
.part-dragging { opacity:.55; transform:scale(.97); }
.part-drop { border-top:3px solid #91dbea !important; }
.part-drop.part-drop-after { border-top:1px solid #625442 !important; border-bottom:3px solid #91dbea !important; }
.segment-dialog { width:460px; }
.segment-dialog > input,.segment-dialog > select { display:block; width:100%; margin:8px 0; }
.language-part-timeline #timeline-scroll { height:175px; }
.language-part-timeline #timeline-track { height:155px; }
.language-part-timeline #timeline-wave { top:87px; }
.language-part-timeline .segment-bubble { height:24px; overflow:hidden; }
/* Parts share the normal subtitle surface and selection colour. */
.segment-card { background:transparent; }
.segment-card .segment-text { background:#191b1a; }
.segment-select[aria-pressed="true"] { background:#795323; border-color:#edb66c; color:#fff3dd; }
.segment-summary { display:none; }
.segment-combined { white-space:pre-wrap; background:#191c19; border:1px solid #44473d; border-radius:6px; padding:6px 8px; flex:1; min-height:4.3em; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .segment-cards { display:none; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .segment-summary { display:flex; flex-direction:column; gap:4px; flex:1; }
.segment-summary button { align-self:flex-start; }
.segments-badge { position:relative; margin:0 8px 5px 0; overflow:visible!important; }
.segments-badge::after { content:attr(data-count); position:absolute; right:-7px; bottom:-6px; min-width:16px; height:16px; border-radius:50%; background:#ffc77d; color:#252018; font-size:10px; line-height:16px; text-align:center; font-weight:700; }
.part-review-meta { display:flex; justify-content:space-between; gap:8px; font-size:10px; color:#aaa59b; margin-top:8px; }
.part-review-meta label { white-space:nowrap; }
.part-review-tools { display:flex; gap:5px; margin-top:6px; }
.part-review-tools button:nth-child(3) { margin-left:auto; }
.part-review-tools button[aria-pressed="true"] { background:#795323; color:#fff3dd; border-color:#edb66c; }
.segment-card.segment-active { border-color:#ffc77d; box-shadow:inset 3px 0 #ffc77d; background:#ffffff05; }
.cue-time-interval,.cue-duration { display:block; white-space:nowrap; }
#rows .cue .cue-meta .time { font-size:9px; letter-spacing:-.25px; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .time { grid-column:1 / -1; grid-row:auto; }
.segment-combined[role=button] { cursor:pointer; }
.single-language-part > textarea { display:block!important; }
.single-language-part > .editing-indicator { display:block!important; }
.single-language-part .segment-card { border:0; padding:0; box-shadow:none; background:transparent; }
.single-language-part .segment-heading,.single-language-part .segment-actions,.single-language-part .segment-text,.single-language-part .segment-card > button { display:none!important; }
.single-language-part .segment-summary { display:none!important; }
.compact-subtitles #rows .cue:not(.compact-expanded):not(:has(textarea:focus)) .single-language-part > .editing-indicator { display:none!important; }
#vimeo-area:fullscreen .video-hover-info,#vimeo-area.theater .video-hover-info { top:0; padding:6px 12px; align-items:center; min-height:0; }
/* Selection is local to the text; the full card lights up only during a move. */
.segment-card.segment-active { border-color:#625442; box-shadow:none; background:transparent; }
.segment-card.segment-active > .segment-text { border-color:#b78a50; }

.segment-card.part-dragging { background:#224950!important; outline:3px solid #78cbd5!important; transform:scale(.975); opacity:.55; box-shadow:0 12px 28px #0008; max-height:85px; overflow:hidden; }
#vimeo-area .floating-controls { top:32px; bottom:auto; }

#rows textarea:focus { outline:2px solid #69aaff; outline-offset:0; box-shadow:none; }

/* Playback identifies the parent row and the exact text currently on screen. */
.segment-card.segment-playing > .segment-text { background:#493b29; border-color:#dfb27e; }
.segment-card.segment-playing .segment-heading strong { color:#ffd08a; }
.segment-dialog.segment-merge-dialog { width:300px; padding:20px; border-radius:12px; }
.segment-merge-dialog h2 { font-size:16px; margin:0 0 4px; }
.segment-merge-dialog p { color:#b4afa5; font-size:12px; margin:0 0 16px; }
.segment-merge-dialog > button { display:block; width:100%; text-align:left; margin-top:8px; padding:10px 12px; }
.segment-merge-dialog > button:last-of-type { text-align:center; background:transparent; border-color:transparent; color:#b4afa5; }
.segment-merge-dialog .window-chrome { display:none; }

.segment-joint { position:absolute;width:12px;height:24px;transform:translateX(-50%);z-index:6;cursor:ew-resize;border-radius:3px;background:transparent;touch-action:none; }
.segment-joint:hover,.segment-joint:focus,.segment-joint.joint-active { background:#73d7db55;outline:1px solid #73d7db; }
.segment-bubble.joint-left { border-right:3px solid #73d7db!important; }
.segment-bubble.joint-right { border-left:3px solid #73d7db!important; }

.language-part-timeline #timeline-scroll { height:var(--timeline-user-height,175px); }
.language-part-timeline #timeline-track { height:calc(var(--timeline-user-height,175px) - 17px); }
.language-part-timeline .segment-bubble,.language-part-timeline .segment-joint { height:var(--timeline-lane-height,24px); }
.language-part-timeline #timeline-wave { top:calc(59px + 2 * var(--timeline-lane-height,24px)); height:calc(var(--timeline-user-height,175px) - 76px - 2 * var(--timeline-lane-height,24px)); }
/* Fixed bubble dimensions determine how much text fits, never the reverse. */
.precision-timeline .timeline-bubble { container-type:size; container-name:subtitle-bubble; }
.precision-timeline .segment-bubble .bubble-text {
  padding:0; margin:5px 10px; width:calc(100% - 20px);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  line-height:14px; max-height:14px;
}
@container subtitle-bubble (min-width:160px) and (min-height:42px) {
  .precision-timeline .segment-bubble .bubble-text {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    white-space:normal; overflow-wrap:anywhere; max-height:28px;
  }
}

/* Match the two comparison-language caption colors in separate timeline lanes. */
.precision-timeline .segment-bubble .bubble-text { color:var(--ink); }
.precision-timeline .segment-bubble.translation-lane .bubble-text { color:#dfbd85; }

/* Compact desktop review preview, September 2026. */
.shared-bar{padding:4px 18px;gap:10px;min-height:36px}.reviewer-badge{padding:2px 7px}.reviewer-badge:has(.sender-unread){padding-right:25px}
.reviewer-badge .sender-unread{box-sizing:border-box;width:17px;min-width:17px;max-width:17px;height:17px;min-height:17px;padding:0;display:flex;align-items:center;justify-content:center;line-height:1;font:700 9px/1 Arial,sans-serif!important;border-radius:50%;background:#ffd08a;color:#241b10;border:1px solid #20201e}
.height-resizer{height:14px;min-height:14px;flex-basis:14px;cursor:ns-resize!important;pointer-events:auto;z-index:9;background:transparent}.height-resizer:after{top:5px;height:3px;width:48px;background:#bdb6a988}.height-resizer:hover,.height-resizer:focus-visible{background:#dfb27e15;outline:none}.resizing-panel,.resizing-panel *{cursor:ns-resize!important;user-select:none!important}
#review-layout:has(.timeline-pinned) #viewer-slot{position:relative;top:auto}.precision-timeline.timeline-pinned{position:sticky;top:var(--activity-height,44px);max-height:calc(100dvh - var(--activity-height,44px) - 12px);overflow:auto;z-index:25}
.guide-active .precision-timeline.timeline-pinned{position:relative;top:auto}
.timeline-shelf{border-top:1px solid var(--line);margin-top:4px;padding-top:5px;display:grid;gap:5px}.timeline-shelf .controls,.timeline-shelf .language-bar{display:flex;align-items:center;flex-wrap:wrap;padding:0;border:0;background:transparent;gap:8px}
.timeline-shelf label{display:flex;align-items:center;gap:6px;font-size:10px;min-width:0}.timeline-shelf .controls .grow{flex:1;min-width:180px}.timeline-shelf #search{width:100%;min-width:100px}.timeline-shelf select,.timeline-shelf input[type=search]{min-height:28px;height:28px;padding:3px 7px;font-size:11px}.timeline-shelf .follow-control{min-width:0}.timeline-shelf .follow-control span{font-size:10px}.timeline-shelf .language-bar>label{flex:1;min-width:190px;font-size:0}.timeline-shelf .language-bar>label select{flex:1;min-width:110px}.timeline-shelf .language-bar small{font-size:9px;white-space:nowrap}.timeline-shelf #subtitle-lock-slot{display:flex;align-items:center;gap:5px}.timeline-shelf .language-bar>button{flex:none}.timeline-shelf #left-progress,.timeline-shelf #right-progress{max-width:130px;overflow:hidden;text-overflow:ellipsis}
#vimeo-area #video-drag{flex-wrap:nowrap!important;min-height:30px;padding:3px 8px!important}#vimeo-area .viewer-header-clock{font:11px/1.2 ui-monospace,monospace;color:#ffd08a;white-space:nowrap;margin-left:8px;flex:none}#vimeo-area .video-hover-info{display:none}#vimeo-area .floating-controls{top:36px;bottom:auto}#video-drag .view-buttons{margin-left:auto}
.project-chat-dialog{width:min(440px,calc(100vw - 24px))!important}.chat-window-header{padding:8px 10px!important;gap:6px}.chat-window-header h2{font-size:13px!important;margin-right:auto}.chat-window-body{padding:10px;display:flex;flex-direction:column;gap:6px}.chat-window-body[hidden]{display:none}.chat-window-body #chat-messages{max-height:45vh!important;min-height:180px;display:flex;flex-direction:column;gap:12px;padding:6px 2px 10px}.chat-bubble{position:relative;max-width:87%;min-width:120px;padding:9px 11px;border:1px solid #4e493e;border-radius:12px;background:#292c28;overflow-wrap:anywhere}.chat-mine{align-self:flex-start;border-bottom-left-radius:3px;background:#393024;border-color:#66533b}.chat-theirs{align-self:flex-end;border-bottom-right-radius:3px}.chat-bubble p{margin:5px 0;font-size:13px;line-height:1.5}.chat-author{font-size:11px}.chat-time{float:right;margin-left:10px;color:var(--muted);font-size:9px}.chat-new{font-size:9px;display:inline-block;margin-right:6px}.chat-bubble.chat-unread{border-color:#ac824c}.chat-message-actions{display:flex;justify-content:flex-end;gap:4px;margin-top:4px}.chat-message-actions:empty{display:none}.chat-message-actions .chat-icon{width:23px!important;min-width:23px!important;height:23px!important;min-height:23px!important;background:transparent;border-color:transparent}.chat-message-actions .chat-icon:hover{background:#ffffff0a;border-color:var(--line)}.chat-message-actions .chat-icon:before{width:14px;height:14px}.chat-bubble blockquote{margin:6px 0;padding:4px 8px;border-left:2px solid var(--accent);font-size:11px}.chat-bubble>button{padding:2px 5px;min-height:24px;font-size:10px}
.chat-composer{display:flex;gap:6px;align-items:flex-end;order:5}.chat-input-label{flex:1;font-size:0}.chat-window-body .chat-composer textarea{font-size:13px;min-height:64px;max-height:130px;margin:0}.chat-composer #chat-send{flex:none}.chat-window-body #chat-status{font-size:11px;order:6;margin:0}.chat-window-body #chat-typing{min-height:14px;margin:0}.chat-window-body #chat-connection{margin:0;color:var(--muted);font-size:10px}.chat-window-body details{margin:0}.chat-window-body>details:not(.chat-options){font-size:11px}.chat-options>summary{cursor:pointer;font-size:11px}.chat-options[open]{padding-bottom:5px;border-bottom:1px solid var(--line)}.chat-options button{margin:4px 4px 2px 0}.chat-window-body .chat-icon{font-size:0}.chat-minimized .chat-window-body{display:none}
.preview-label{font-size:10px;color:#dfb27e;white-space:nowrap}.timeline-shelf .controls>label{flex-direction:row}.timeline-shelf .controls .grow{align-items:center}.timeline-shelf .language-bar small{display:inline;margin:0}.timeline-shelf .language-bar label{flex-direction:row}

.chat-delete-confirm{max-width:340px;padding:18px}.chat-delete-confirm h2{font-size:17px;margin:0 0 8px}.chat-delete-confirm p{font-size:13px;color:var(--muted)}.chat-confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
/* Independent review panel and compact chat refinements. */
#review-layout>.timeline-shelf{position:relative;background:var(--panel,#23251f);border:1px solid var(--line);border-radius:12px;padding:12px 42px 12px 12px;margin:10px 0;gap:10px}
#review-layout>.timeline-shelf.workspace-pinned{position:sticky;top:calc(var(--activity-height,44px) + var(--timeline-offset,0px));z-index:24}
#workspace-pin{position:absolute;right:8px;top:8px;width:28px;padding:0}#workspace-pin[aria-pressed=true]{color:#ffd08a;border-color:#b78a50}
.review-dock{position:fixed;right:20px;bottom:0;z-index:110;display:flex;gap:8px;align-items:flex-end}.review-dock .player-dock,.review-dock #chat-dock{position:static;width:auto;min-width:130px;max-width:260px;border-radius:8px 8px 0 0;padding:10px 14px}.review-dock [hidden]{display:none!important}
.chat-window-body #chat-messages{height:300px;max-height:36vh!important;min-height:100px;flex:none;gap:7px;overflow:auto;overscroll-behavior:contain}.chat-bubble{flex:none;width:fit-content;min-width:0;max-width:85%;padding:6px 9px;border-radius:9px}.chat-bubble p{margin:3px 0;font-size:12px;line-height:1.35}.chat-message-actions{margin-top:0}.chat-message-actions .chat-icon{height:18px!important;min-height:18px!important;width:20px!important;min-width:20px!important}
.chat-options[open]{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:4px 0 8px}.chat-options>summary{width:100%}.chat-options>label{display:flex;align-items:center;gap:6px;font-size:0;margin:0;flex:none}.chat-options #chat-filter{width:150px;max-width:150px;min-height:28px;padding:3px 8px;font-size:11px;margin:0}.chat-options button{margin:0!important}.chat-composer{position:relative}.chat-composer #chat-emoji{width:28px;min-width:28px;padding:0;font-size:20px}.emoji-tray{position:absolute;bottom:100%;left:0;display:grid;grid-template-columns:repeat(6,32px);gap:4px;padding:8px;background:#292c28;border:1px solid var(--line);border-radius:9px;z-index:5}.emoji-tray[hidden]{display:none}.emoji-tray button{padding:0;font-size:20px;width:32px;height:32px}.chat-window-body .chat-composer textarea{min-height:48px;height:48px}.chat-window-body #chat-status:empty{display:none}
.quality-dialog{width:min(500px,90vw)}.quality-dialog h2{font-size:18px}.quality-dialog>label{display:inline-flex;flex-direction:column;margin:0 12px 10px 0;font-size:11px;gap:4px}.quality-dialog #quality-summary{color:var(--muted);font-size:12px}.quality-dialog #quality-findings p{display:flex;gap:10px;align-items:center;font-size:12px;padding:6px 0;margin:0;border-top:1px solid var(--line)}.quality-dialog #quality-findings button{flex:none;min-width:44px;padding:4px 8px}.visually-quiet-status{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)}#video-notice{color:#dfbd85;font-size:15px}#video-notice.show-notice:after{content:attr(title);position:absolute;right:8px;top:38px;max-width:300px;background:#252820;padding:8px;border:1px solid var(--line);font-size:12px;z-index:30}
#workspace-pin:before,#chat-emoji:before,#chat-sounds:before,.emoji-tray button:before,#quality-refresh:before,#video-notice:before{display:none!important}#workspace-pin svg{width:16px;height:16px;display:block;margin:auto}#workspace-pin{height:28px;min-height:28px}#chat-sounds[aria-pressed=false]{opacity:.5;text-decoration:line-through}
.subtitle-action-bar{gap:20px!important;flex-wrap:wrap}.subtitle-action-group{gap:6px!important}.subtitle-action-group+.subtitle-action-group{border-left:1px solid var(--line);padding-left:18px}.subtitle-action-bar #subtitle-density{height:28px;min-height:28px;padding:3px 8px;width:90px;font-size:11px}#subtitle-autoscroll:before{display:none!important}#subtitle-autoscroll svg{width:17px;height:17px;display:block}#subtitle-autoscroll{padding:5px;width:29px;height:29px}#subtitle-autoscroll[aria-pressed=true]{color:#ffd08a;border-color:#b78a50}.follow-control[hidden]{display:none!important}#subtitle-lock-slot:empty{display:none}
.quality-dialog{padding:12px!important;width:min(540px,90vw);max-height:85vh;overflow:auto}.quality-dialog button:not(.chat-icon):before{display:none!important}.quality-header{display:flex;align-items:center;gap:6px;margin-bottom:12px}.quality-header h2{margin:0 auto 0 0;font-size:16px}.quality-header button.chat-icon{padding:0;width:30px;min-width:30px;height:28px;min-height:28px;font-size:0!important}.quality-filters{display:flex;gap:10px;align-items:flex-end}.quality-filters label{display:flex;flex-direction:column;gap:3px;flex:1;font-size:10px}.quality-filters select{min-height:28px;padding:4px 7px;font-size:12px}.quality-filters button{width:28px;height:28px;padding:0}.quality-dialog #quality-summary{margin:10px 0 5px}.quality-dialog #quality-findings{max-height:44vh;overflow:auto}.quality-item{display:flex;gap:8px;align-items:center;padding:7px 0;border-top:1px solid var(--line)}.quality-item.comments{border-left:3px solid;padding-left:6px}.quality-item-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.quality-item-body small{font-size:9px;color:var(--muted)}.quality-item-body strong{font-size:10px}.quality-item .quality-jump{padding:3px 5px;font-size:11px;min-width:40px}.quality-tick{width:27px;padding:0;min-height:27px}.quality-actions{display:flex;gap:7px;align-items:center;border-top:1px solid var(--line);padding-top:10px;margin-top:5px}.quality-actions button{font-size:11px;min-height:27px;padding:4px 7px}.quality-actions #quality-approve-all{margin-left:auto}#quality-error:empty{display:none}#quality-error{font-size:12px;color:#ffc5aa}.review-dock>button{border-radius:8px 8px 0 0;padding:10px 14px}
.quality-dialog .quality-header{padding:0 0 10px!important;min-height:28px;background:transparent;border:0;margin:0}.quality-dialog .quality-header h2{font-size:16px;margin:0 auto 0 0}.quality-dialog #quality-findings{max-height:min(360px,40vh)}.quality-dialog #quality-findings .quality-tick{min-width:27px;width:27px;padding:0}.quality-dialog .quality-actions{background:transparent}
.studio-glyph:before{display:none!important}.studio-glyph{display:inline-flex!important;align-items:center;justify-content:center;gap:7px}.studio-glyph[hidden]{display:none!important}.studio-glyph svg{width:17px!important;height:17px!important;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.studio-glyph:not(.player-dock){min-height:28px}.quality-dialog .studio-glyph{font-size:0}#subtitle-quality{position:relative;width:29px;height:29px;padding:5px}#subtitle-quality:after{content:attr(data-count);position:absolute;right:-6px;top:-7px;min-width:16px;height:16px;border-radius:50%;background:#ffd08a;color:#241b10;font:700 9px/16px Arial;text-align:center}#subtitle-quality:not([data-count]):after,#subtitle-quality[data-count="0"]:after{display:none}
#timeline-lock{position:relative}.clock-locked:after{content:'🔒';position:absolute;right:-6px;top:-7px;font-size:10px;background:#ffd08a;width:15px;height:15px;border-radius:50%;line-height:15px}
#review-layout>.timeline-shelf{padding:12px 12px 12px 48px}#workspace-pin{left:12px;right:auto}.timeline-shelf #left-progress,.timeline-shelf #right-progress{max-width:90px;font-size:9px}.language-part-timeline #timeline-wave{top:calc(39px + 2 * var(--timeline-lane-height,24px));height:calc(var(--timeline-user-height,116px) - 56px - 2 * var(--timeline-lane-height,24px))}
.chat-options[open]{display:flex;flex-wrap:nowrap;gap:9px;align-items:center}.chat-options>summary{width:28px;min-width:28px;cursor:pointer;list-style:none}.chat-options>summary::-webkit-details-marker{display:none}.chat-options #chat-filter{width:110px;max-width:110px;font-size:10px}.chat-options>button{width:24px!important;min-width:24px!important;padding:2px}.chat-options label{font-size:0}.project-chat-dialog{width:min(480px,calc(100vw - 24px))!important}.chat-window-body .chat-composer textarea{height:76px;min-height:76px}.chat-window-body>details>summary.studio-glyph{position:relative;width:28px;list-style:none;cursor:pointer}.chat-window-body>details>summary.studio-glyph::-webkit-details-marker{display:none}.small-count{position:absolute;right:-7px;top:-3px;border-radius:50%;width:16px;height:16px;background:#ffd08a;color:#241b10;font:700 9px/16px Arial;text-align:center}.chat-window-body>details:not(.chat-options)>div:first-of-type{display:flex;gap:9px;padding:7px 0}.chat-window-body>details:not(.chat-options)>div:first-of-type button{width:28px;padding:4px}.chat-window-body>details:not(.chat-options)>label{display:flex;gap:8px;align-items:center;width:100%;font-size:11px}#chat-find{flex:1;width:100%;height:28px;min-height:28px;padding:4px 8px}#chat-picker label{display:flex;align-items:flex-start;gap:7px;font-size:12px;line-height:19px;padding:3px 0}#chat-picker input{flex:none;width:14px;height:14px;margin:2px 0 0}#chat-picker{max-height:150px!important}
.chat-reply-quote{display:block;text-align:left;border:0;border-left:2px solid #dfbd85;background:#ffffff08;font-size:10px!important;color:var(--muted);max-width:100%;white-space:normal}.chat-reply-quote:before{display:none!important}.chat-is-reply{border-left:2px solid #dfbd85}.chat-reply-draft{order:4;display:flex;gap:6px;align-items:center;font-size:11px;padding:5px;border-left:2px solid #dfbd85}.chat-reply-draft[hidden]{display:none}.chat-reply-draft span{flex:1}.reply-target{outline:2px solid #dfbd85}.review-dock{z-index:10000}.has-review-dock .project-chat-dialog{bottom:52px!important;max-height:calc(100dvh - 70px);overflow:auto}.has-review-dock #vimeo-area.floating{bottom:52px!important}.quality-dialog{max-height:calc(100dvh - 90px)}.review-dock .player-dock:after{display:none!important}.chat-message-actions .studio-glyph:first-child{margin-right:auto}
#chat-picker label{display:flex!important}.has-review-dock #vimeo-area.floating-video{bottom:52px!important;max-height:calc(100dvh - 70px)}.has-review-dock .project-chat-dialog[open]{top:auto!important}.chat-options:not([open])>*:not(summary){display:none!important}.chat-window-body details>summary.studio-glyph:after{display:none}
.quality-dialog[open]{position:fixed;top:50%;left:50%;bottom:auto;right:auto;transform:translate(-50%,-50%);margin:0;z-index:9000}.has-review-dock .quality-dialog[open]{top:calc(50% - 26px)}.timeline-shelf .language-bar>label{flex:1 1 0;min-width:0;width:0}.timeline-shelf .language-bar>label select{width:0;min-width:100px;flex:1}.timeline-shelf .language-bar>label small{flex:none}.timeline-shelf .language-bar>button{position:static!important;margin-left:4px}.clock-locked:after{content:'';background:#e8a44b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241b10' stroke-width='2'%3E%3Cpath d='M5 10h14v11H5zM8 10V6a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/11px no-repeat}
.chat-options[open]{display:block!important}.chat-options>summary{float:left}.chat-settings-row{display:flex;align-items:center;gap:9px;margin-left:36px;min-height:28px}.chat-settings-row>label{font-size:0;display:flex;margin:0;flex:none}.chat-settings-row>button{width:25px!important;min-width:25px!important;height:28px!important;min-height:28px!important;margin:0!important;padding:3px!important}.chat-settings-row #chat-filter{height:28px;min-height:28px}.chat-options:after{content:'';display:block;clear:both}.timeline-shelf .language-bar #add-language{align-self:center;transform:none!important;top:auto!important;bottom:auto!important;margin:0!important}
.comparison-controls select{height:28px;min-height:28px;max-width:210px;padding:3px 7px;font-size:11px}.comparison-controls{flex-wrap:wrap}.language-bar[hidden]{display:none!important}.chat-options>summary{float:right}.chat-settings-row{margin:0 36px 0 0;justify-content:flex-end;flex-wrap:wrap;gap:7px}.project-chat-dialog{width:var(--chat-width,min(390px,calc(100vw - 24px)))!important;padding-bottom:10px}.chat-size-handle{position:absolute;right:0;bottom:0;cursor:nwse-resize;padding:0;width:16px;height:16px;min-height:16px;border:0;background:transparent;font-size:13px}.chat-size-handle:before{display:none!important}.project-chat-dialog.chat-user-sized[open]{height:var(--chat-height)!important;top:var(--chat-top)!important;bottom:auto!important;display:flex;flex-direction:column;max-height:calc(100dvh - 70px)}.chat-user-sized .chat-window-body{flex:1;min-height:0;overflow:auto}.chat-user-sized .chat-window-body #chat-messages{flex:1;min-height:80px;max-height:none!important}.chat-window-body .studio-glyph[aria-pressed=true]{color:#ffd08a;background:#614728;border-color:#c89758}.chat-options[open]>summary{color:#ffd08a}
.script-view #rows{max-width:1150px;margin:auto}.script-view #rows .cue{position:relative;border:0;border-radius:0;background:transparent!important;padding:10px 18px 36px!important;box-shadow:none;outline:none}.script-view #rows .cue-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px}.script-view #rows .cue-meta{position:absolute;bottom:4px;left:18px;display:flex;align-items:center;gap:8px;max-width:calc(100% - 36px);font-size:10px}.script-view #rows .cue-meta .cue-id{font-size:11px}.script-view #rows .cue-meta .time{font-size:9px}.script-view #rows .cue-meta select{max-width:110px;font-size:10px;min-height:24px;padding:2px}.script-view #rows .cue-meta button{width:25px;height:25px;min-height:25px}.script-view #rows .cue-grid>div:not(.cue-meta){min-width:0}.script-view #rows textarea{background:transparent!important;border:1px solid transparent!important;box-shadow:none;resize:none;min-height:30px;padding:2px 0;font:16px/1.65 Georgia,serif;color:var(--ink);overflow:hidden}.script-view #rows textarea:focus{outline:1px solid #b78a50!important;outline-offset:4px}.script-view #rows .cell-title,.script-view #rows .text-meta,.script-view #rows .editing-indicator{display:none!important}.script-view #rows .subtitle-tools{position:absolute;opacity:0;pointer-events:none;z-index:2;background:#23251f;padding:3px;border-radius:5px}.script-view #rows .cue-meta{opacity:0;pointer-events:none}.script-view #rows .cue:hover .cue-meta,.script-view #rows .cue:focus-within .cue-meta,.script-view #rows .cue:hover .subtitle-tools,.script-view #rows .cue:focus-within .subtitle-tools{opacity:1;pointer-events:auto}.script-view #rows .segment-card{border:0;padding:0;background:transparent}.script-view #rows .segment-heading,.script-view #rows .segment-actions{display:none}.script-view #rows .segment-card:hover .segment-actions,.script-view #rows .segment-card:focus-within .segment-actions{display:flex}.script-view #rows .segment-cards{gap:5px}.script-view #rows .cue-expand-toggle{opacity:0}.script-view #rows .cue:hover .cue-expand-toggle{opacity:1}
.comparison-controls #add-language{position:static!important;transform:none!important;margin:0!important;align-self:center;flex:none}.comparison-controls{flex:none}.script-view #rows .cue{padding-bottom:28px!important}.script-view.single-language #rows .cue-grid{grid-template-columns:1fr}
#project-chat,#chat-dock{position:relative}#project-chat[data-unread]:not([data-unread=""]):after,#chat-dock[data-unread]:not([data-unread=""]):after{content:attr(data-unread);position:absolute;right:-6px;top:-6px;display:flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 2px;box-sizing:border-box;border-radius:50%;background:#ffd08a;color:#241b10;font:700 9px/1 Arial;border:1px solid #23251f;z-index:2}
/* Text-only mode uses a single bottom context bar, never controls over the script. */
#workspace-pin{top:12px}
.script-view #rows .cue-meta,.script-view #rows .subtitle-tools,.script-view #rows .text-meta,.script-view #rows .segment-heading,.script-view #rows .segment-actions,.script-view #rows .part-review-meta,.script-view #rows .part-review-tools,.script-view #rows .segment-card>button,.script-view #rows .cue-expand-toggle,.script-view #rows .segment-summary{display:none!important}
.script-view #rows .segment-card .segment-text{display:block!important}
/* Single-part cues already use the main text field; only multipart cues need part editors. */
.script-view #rows .single-language-part > .segment-cards{display:none!important}
.script-view #rows .cue{padding:12px 18px!important}
.script-view #rows textarea.script-selected{color:#fff1d9}
.script-toolbar{position:fixed;inset:auto 0 0;z-index:10001;display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 20px;background:#24251f;border-top:1px solid #766347;box-shadow:0 -5px 20px #0005;font:12px/1.4 Inter,Helvetica,sans-serif}
.script-toolbar[hidden]{display:none}
.script-toolbar-context{display:flex;flex-direction:column;gap:3px;min-width:160px}.script-toolbar-context strong{color:#ffd08a}.script-toolbar-context span{font-size:10px;white-space:pre-wrap;color:#c6c2b8}
.script-toolbar-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border-left:1px solid #555044;padding-left:10px}.script-toolbar-group button{margin:0!important;min-height:28px}.script-toolbar-group select{width:auto;max-width:145px;padding:4px;min-height:28px}.script-toolbar-check{display:flex;align-items:center;gap:5px;white-space:nowrap}.script-toolbar-check input{width:auto}.script-toolbar-status{color:#aaa69c;font-size:11px}.script-toolbar [aria-pressed=true]{color:#ffd08a;border-color:#b78a50}
.script-view #rows{max-width:none;width:100%;margin:0}
.script-view #rows .cue{padding:5px 18px!important;min-height:0;border-bottom:1px solid #ffffff08}
.script-view #rows .cue-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:28px;align-items:start}
.script-view #rows .cue-grid>div{margin:0!important;padding:0!important;width:auto!important}
.script-view #rows textarea,.script-index-text{font:14px/1.4 Inter,Helvetica,sans-serif!important;white-space:pre-wrap;padding:2px 0!important;min-height:24px!important}
.script-index-text{cursor:text;color:var(--ink);border:1px solid transparent;outline-offset:2px}
.script-index-text:focus-visible{outline:1px solid #b78a50}
.script-view.single-language #rows .cue-grid{grid-template-columns:minmax(0,1fr)!important}
.script-view #rows .cue-expand-toggle,.script-view #rows .compact-expand,.script-view #rows .note-field{display:none!important}
.chat-size-handle{width:22px;height:22px;min-height:22px;touch-action:none;color:#ddd1bd!important}.chat-size-handle svg{width:16px;height:16px}

/* The text-only action shelf shares the search panel's surface and pin behavior. */
#script-toolbar{position:relative;inset:auto;z-index:23;background:var(--panel,#23251f);border:1px solid var(--line);border-radius:12px;padding:12px 12px 12px 48px;margin:10px 0;min-height:54px;box-shadow:none}
#script-toolbar.script-controls-pinned{position:sticky;top:calc(var(--activity-height,44px) + var(--script-controls-offset,0px))}
#script-controls-pin{position:absolute;left:12px;top:12px;width:28px;height:28px;min-height:28px;padding:0}
#script-controls-pin:before{display:none!important}#script-controls-pin svg{width:16px;height:16px;display:block;margin:auto}
#script-controls-pin[aria-pressed=true]{color:#ffd08a;border-color:#b78a50}
.script-toolbar-context{min-width:0}.script-toolbar-context strong{white-space:nowrap}
.project-chat-dialog{padding-bottom:30px!important}.chat-size-handle{bottom:3px;right:3px}
/* Match the 14px viewer/timeline gap without stacking shelf margins. */
#review-layout>.timeline-shelf,#review-layout>#script-toolbar{margin:0}
#review-layout>.precision-timeline{margin-bottom:0}
.script-toolbar-context .script-context-label{font-weight:400;font-size:12px;color:var(--ink)}
.script-view #rows .cue{padding-left:48px!important}
.script-row-number{position:absolute;left:12px;top:8px;font-size:11px;line-height:20px;color:var(--muted);font-variant-numeric:tabular-nums}
.script-view #rows .cue.merge-selected{background:#61472866!important;box-shadow:inset 3px 0 #d3a15e}
.script-view #rows .cue.merge-selected .script-row-number{color:#ffd08a}
#script-toolbar .select-subtitle{position:relative;overflow:visible}
#script-toolbar .select-subtitle[data-selection-count]:after{content:attr(data-selection-count);position:absolute;right:-5px;top:-8px;min-width:15px;height:15px;padding:0 3px;border-radius:20px;background:#ffd08a;color:#211b13;font:10px/15px Inter,Helvetica,sans-serif;text-align:center}
#script-toolbar .select-subtitle[aria-pressed=true]{background:#614728;color:#ffd08a;border-color:#c89758}
.script-view #rows .cue{padding-top:9px!important;padding-bottom:9px!important}
.script-view #rows textarea{display:block;margin:0!important;box-sizing:border-box}
.script-row-number{top:50%;transform:translateY(-50%)}
#vimeo-area .floating-controls{top:var(--viewer-bar-height,30px)!important;margin-top:0}
.script-toolbar-check{position:relative;width:28px;height:28px;border:1px solid var(--line);border-radius:5px;justify-content:center;background:var(--panel);cursor:pointer}
.script-toolbar-check input{position:absolute;inset:0;opacity:0;width:100%!important;height:100%;margin:0;cursor:pointer}
.script-toolbar-check svg{width:17px;height:17px;pointer-events:none}.approval-tick{visibility:hidden}
.script-toolbar-check:has(input:checked){color:#ffd08a;border-color:#c89758;background:#614728}.script-toolbar-check input:checked+svg .approval-tick{visibility:visible}.script-toolbar-check:has(input:focus-visible){outline:2px solid #ffd08a;outline-offset:2px}.script-toolbar-check:has(input:disabled){opacity:.45}
.script-export-group{margin-left:auto}
.waveform-only #timeline-bubbles,.waveform-only #timeline-ruler,.waveform-only [aria-label="Timing"],.waveform-only .timeline-toolbar label:has(#timeline-bubble-text){display:none!important}
.precision-timeline.waveform-only #timeline-scroll,.precision-timeline.waveform-only #timeline-track{height:72px!important;min-height:72px}
.precision-timeline.waveform-only #timeline-wave{top:0!important;bottom:auto!important;height:72px!important}
#studio-layout{width:auto;min-height:28px;padding:3px 7px;margin-left:auto;font-size:11px}
html[data-studio-layout=split] #review-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
.layout-media,.layout-script{display:grid;gap:14px;min-width:0}.layout-media{position:sticky;top:calc(var(--activity-height,44px) + 6px)}
.layout-media .precision-timeline.timeline-pinned{position:relative;top:auto;max-height:none}.layout-media #viewer-slot{position:relative!important;top:auto!important}
.layout-script>.timeline-shelf{position:relative;background:var(--panel,#23251f);border:1px solid var(--line);border-radius:12px;padding:12px 12px 12px 48px;margin:0}
.layout-script>.timeline-shelf.workspace-pinned{position:sticky;top:var(--activity-height,44px);z-index:24}
.layout-script>#script-toolbar{margin:0}.layout-media .precision-timeline{margin:0}.layout-script .controls>label{min-width:0}
@media(max-width:850px){html[data-studio-layout=split] #review-layout{grid-template-columns:1fr}.layout-media{position:relative;top:auto}}
.waveform-only .timeline-toolbar label:has(#timeline-text){display:none!important}
#script-export{font-size:0!important;width:28px;height:28px;padding:0!important;min-width:28px}
#script-export:before{margin:0!important}
.script-view #rows .cue-grid>.script-index-text{padding:2px 0!important}
.precision-timeline.timeline-pinned{top:calc(var(--activity-height,44px) + 6px)}
#review-layout>.timeline-shelf.workspace-pinned{top:calc(var(--activity-height,44px) + 6px + var(--timeline-offset,0px))}
#script-toolbar.script-controls-pinned{top:calc(var(--activity-height,44px) + 6px + var(--script-controls-offset,0px))}
.layout-script>.timeline-shelf.workspace-pinned{top:calc(var(--activity-height,44px) + 6px)}
.layout-media .precision-timeline.timeline-pinned{top:auto}
#script-export{display:inline-flex;align-items:center;justify-content:center}#script-export svg{width:18px;height:18px;stroke-width:1.7}
html[data-studio-layout=split] #review-layout{grid-template-columns:minmax(0,calc(var(--split-ratio,50%) - 7px)) 14px minmax(0,1fr);column-gap:0}
.split-divider{grid-column:2;grid-row:1;position:sticky;top:calc(var(--activity-height,44px) + 6px);height:calc(100dvh - var(--activity-height,44px) - 20px);cursor:col-resize;touch-action:none;outline-offset:-3px}
.split-divider:before{content:'';position:absolute;left:5px;top:35%;height:48px;width:4px;border-radius:4px;background:#77766c}.split-divider:hover:before,.split-divider:focus-visible:before,.split-divider.resizing:before{background:#d3a15e}
.layout-media>.timeline-shelf{position:relative;background:var(--panel,#23251f);border:1px solid var(--line);border-radius:12px;padding:12px 12px 12px 48px;margin:0}
html[data-studio-layout=split]:not(.script-view) .subtitle-tools-right{margin-left:0;flex-basis:100%;justify-content:flex-start}
.script-view #rows .cue.active-cue{background:#61472866!important;box-shadow:inset 3px 0 #d3a15e}
@media(max-width:850px){html[data-studio-layout=split] #review-layout{grid-template-columns:1fr}.split-divider{display:none}}
.split-language-bar{position:sticky;top:calc(var(--activity-height,44px) + 6px);z-index:24;border:1px solid var(--line);border-radius:12px;background:var(--panel,#23251f);padding:12px;min-width:0}
.split-language-bar .comparison-controls{display:flex;gap:6px;border:0;padding:0;margin:0;flex-wrap:wrap}
html[data-studio-layout=split] #script-controls-pin{display:none}
html[data-studio-layout=split] #script-toolbar{padding:12px;gap:6px}
html[data-studio-layout=split] #script-toolbar .script-toolbar-group{padding-left:6px;gap:5px}
.subtitle-column-hidden{display:none!important}
.script-view.one-subtitle-language #rows .cue-grid{grid-template-columns:minmax(0,1fr)!important}
.one-subtitle-language:not(.script-view) #rows .cue-grid{grid-template-columns:180px minmax(0,1fr)}
#subtitle-language-swap[hidden]{display:none!important}

/* Review: centred hover clock and language/view shelf. */
#vimeo-area .viewer-header-clock{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;z-index:5;opacity:0;pointer-events:none;padding:5px 8px;border-radius:4px;background:#000b}
#vimeo-area:hover .viewer-header-clock,#vimeo-area:focus-within .viewer-header-clock{opacity:1}
.split-language-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.split-language-bar .subtitle-action-group{display:flex;align-items:center;gap:6px;margin-left:auto}
html[data-studio-layout=split] .script-export-group{margin-left:0}
html[data-studio-layout=split] #vimeo-area.docked-video{max-width:none}
.split-language-bar .comparison-controls{margin-left:0;flex-wrap:nowrap}
.split-language-bar .comparison-controls select{width:140px;max-width:140px;min-width:0}
.split-language-bar .subtitle-action-group:not(.comparison-controls){flex-wrap:nowrap;padding-left:10px}

/* Shared language shelf retains compact toolbar sizing in every layout. */
.split-language-bar{top:calc(var(--activity-height,44px) + 6px + var(--language-bar-offset,0px));margin:0}
.split-language-bar button,.split-language-bar select{font-size:11px;min-height:28px;height:28px;padding:4px 7px}
.split-language-bar button{width:29px;min-width:29px;display:inline-flex;align-items:center;justify-content:center}
.split-language-bar button:before{width:16px;height:16px;margin:0;flex:none}
.split-language-bar .subtitle-action-group{align-items:center}
.subtitle-approval-group{display:flex;align-items:center;border-left:1px solid var(--line);padding-left:8px;margin-left:2px}
.subtitle-approval-group .script-toolbar-check{margin:0;flex:none}
.subtitle-tools-right{flex-wrap:wrap}

#vimeo-area #video-drag .viewer-header-clock{left:50%;top:50%;transform:translate(-50%,-50%);padding:0;background:transparent}

.timeline-secondary-controls{display:flex;align-items:center;gap:20px;flex-wrap:nowrap}
.timeline-secondary-controls>.subtitle-action-group{flex-wrap:nowrap}
/* Opaque gutters prevent subtitle text showing between pinned panels. */
.split-language-bar,#script-toolbar.script-controls-pinned,.timeline-shelf.workspace-pinned{box-shadow:0 -6px 0 6px var(--bg),0 6px 0 6px var(--bg)}
html[data-studio-layout=split]:not(.script-view) .subtitle-tools-right{flex-wrap:nowrap;gap:3px}
html[data-studio-layout=split]:not(.script-view) .subtitle-tools-right>button{width:28px;min-width:28px;padding:4px;flex:none}
html[data-studio-layout=split]:not(.script-view) .subtitle-approval-group{padding-left:5px;margin-left:2px;flex:none}
html[data-studio-layout=split]:not(.script-view) .subtitle-tools{column-gap:6px;row-gap:6px}

html:not([data-studio-layout=split]) .split-language-bar[data-unpinned=true]{position:relative;top:auto;box-shadow:none}
html[data-studio-layout=split] #language-controls-pin,html[data-studio-layout=split] #timeline-pin,html[data-studio-layout=split] #workspace-pin{display:none!important}
html[data-studio-layout=split] .layout-media>.timeline-shelf{padding-left:12px}
#language-controls-pin[aria-pressed=true]{color:#ffd08a;border-color:#b78a50}
.split-language-bar{justify-content:flex-start}
/* Language pin uses the same inline pushpin as the Search and text toolbar pins. */
#language-controls-pin:before{display:none!important}
#language-controls-pin{width:28px;height:28px;min-width:28px;min-height:28px;padding:0}
#language-controls-pin svg{width:16px;height:16px;display:block;margin:auto;flex:none}

/* Center window controls independently of text baselines and button padding. */
body .quality-header button.chat-icon,body .chat-window-header button.chat-icon{display:inline-flex;align-items:center;justify-content:center;padding:0!important;line-height:0}
body .quality-header button.chat-icon::before,body .chat-window-header button.chat-icon::before{display:block;flex:none}

/* Keep the legend opaque above its viewport dimming panels. */
dialog.studio-guide{padding:0;background:transparent;border:0;box-shadow:none}
.guide-card{position:relative;z-index:0;padding:20px;background:#232321;border:1px solid #565044;border-radius:14px;box-sizing:border-box;overflow:auto;box-shadow:0 12px 40px #0006}
.guide-card{display:flex;flex-direction:column}.guide-card>*{flex-shrink:0}.guide-card #guide-description{flex:1 1 auto;min-height:0;overflow:auto}.guide-card .guide-actions{margin-top:12px}

/* Conversation direction and attachment controls. */
.chat-mine{align-self:flex-end;border-bottom-left-radius:12px;border-bottom-right-radius:3px}.chat-theirs{align-self:flex-start;border-bottom-left-radius:3px;border-bottom-right-radius:12px}
.chat-attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-attachment-heading summary{list-style:none;cursor:default}.chat-attachment-heading summary::-webkit-details-marker{display:none}
.chat-files{display:flex;flex-direction:column;gap:5px}.chat-file-draft{display:flex;align-items:center;gap:6px;font-size:11px}.chat-file-draft span{flex:1}
.chat-link-preview{display:flex;flex-direction:column;gap:4px;margin-top:6px;border:1px solid var(--line);border-radius:6px;padding:7px;text-decoration:none;color:inherit;overflow:hidden}.chat-link-preview img{width:100%;height:110px;object-fit:cover}.chat-link-preview small{color:var(--muted)}
.chat-bubble .chat-file-download{display:block;margin-top:6px;max-width:100%;overflow-wrap:anywhere;font-size:12px}
.chat-window-body .chat-attachment-heading{display:flex!important;width:100%!important;max-width:none!important;box-sizing:border-box;cursor:default}.chat-attachment-heading #chat-attachments-toggle{margin-left:auto}.chat-attachment-heading .small-count{position:static;margin-left:5px}.chat-window-body #chat-picker{max-height:120px!important}.project-chat-dialog[open]{max-height:calc(100dvh - 24px);display:flex;flex-direction:column}.chat-window-header{flex:none}.chat-window-body{min-height:0;overflow:auto}.chat-window-body #chat-messages{flex-shrink:1;min-height:100px}

/* Collapsed timelines keep every control below the waveform. */
.precision-timeline.waveform-only>.timeline-toolbar:first-child{display:none}
.timeline-bottom-controls{display:flex;align-items:center;gap:6px;margin-left:auto;flex-wrap:nowrap}
.timeline-bottom-controls>.subtitle-action-group{border:0;padding:0;margin:0}
html[data-studio-layout=floating] .controls-only #timeline-scroll,
html[data-studio-layout=floating] .precision-timeline>.height-resizer{display:none!important}
html[data-studio-layout=floating] .split-language-bar .subtitle-action-group{margin-left:0}
html[data-studio-layout=floating] .script-export-group,
html[data-studio-layout=theater] .script-export-group{margin-left:0}
/* Paired bars share a pin in Theater and Clean text-only layouts. */
html:not([data-studio-layout=split]) .split-language-bar .subtitle-action-group{margin-left:0}
html.joined-subtitle-bars #review-layout{grid-template-columns:max-content minmax(0,1fr)}
html.joined-subtitle-bars #review-layout>*{grid-column:1 / -1}
html.joined-subtitle-bars #split-language-bar{grid-column:1;align-self:start;gap:6px}
html.joined-subtitle-bars #script-toolbar{grid-column:2;align-self:start;gap:5px;padding-left:12px}
html.joined-subtitle-bars #script-toolbar .script-toolbar-group{gap:4px;padding-left:5px}
html.joined-subtitle-bars #script-controls-pin{display:none!important}
.precision-timeline>.height-resizer,.precision-timeline>.height-resizer::before,.precision-timeline>.height-resizer::after{cursor:ns-resize!important}

/* Notifications float within the activity strip without adding another row. */
.shared-bar .message-notifications{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,38vw);z-index:5;flex-basis:auto}
.shared-bar .message-notifications button{display:block;position:relative;width:100%;min-height:30px;padding:6px 12px;border:1px solid #c89758;border-radius:12px 12px 12px 3px;background:#473822;color:#fff2db;box-shadow:0 2px 8px #0005;text-align:left;line-height:18px}

/* Match language-menu sizing for the audio selector. */
.cue-sound,#script-toolbar .cue-sound{width:140px;min-width:140px;max-width:140px;height:28px;min-height:28px;font-size:11px;padding:4px 7px;border-radius:6px}
/* Cover the complete 14px gutter, including the timeline's lower edge. */
html:not([data-studio-layout=split]) .precision-timeline.timeline-pinned,
html:not([data-studio-layout=split]) .timeline-shelf.workspace-pinned,
html:not([data-studio-layout=split]) .split-language-bar:not([data-unpinned=true]),
html:not([data-studio-layout=split]) #script-toolbar.script-controls-pinned{box-shadow:0 0 0 7px var(--bg)}
/* Square masks bridge gutters even beside rounded panel corners. */
html:not([data-studio-layout=split]) :is(.precision-timeline.timeline-pinned,.timeline-shelf.workspace-pinned,.split-language-bar:not([data-unpinned=true]),#script-toolbar.script-controls-pinned)::before{content:'';position:absolute;left:-7px;right:-7px;top:-14px;height:14px;background:var(--bg);pointer-events:none}

.reviewer-badge .sender-unread{background:var(--reviewer-colour,#acd2ed)}

/* Playback follows the subtitle list, never the document or embedded player. */
#rows{overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;max-height:48dvh;scroll-behavior:auto;padding-bottom:0}
html[data-studio-layout=split] #review-layout{grid-template-rows:auto 1fr}
html[data-studio-layout=split] #review-layout>#viewer-slot{grid-column:1;grid-row:1;position:relative!important;top:auto!important}
html[data-studio-layout=split] .layout-media{grid-column:1;grid-row:2;position:relative;top:auto}
html[data-studio-layout=split] .layout-script{grid-column:3;grid-row:1 / span 2;align-self:start}
html[data-studio-layout=split] .split-divider{grid-row:1 / span 2}
html[data-studio-layout=split] #rows,html[data-studio-layout=floating] #rows{max-height:calc(100dvh - 240px);min-height:200px}
@media(max-width:850px){html[data-studio-layout=split] .layout-script{grid-column:1;grid-row:3}html[data-studio-layout=split] #rows{max-height:48dvh}}

#rows::after{content:none}
/* Fixed viewport size is independent of subtitle density. No empty trailing scroll area. */
#rows{height:48dvh;min-height:0}
html[data-studio-layout=split] #rows,html[data-studio-layout=floating] #rows{height:calc(100dvh - 240px)}
.pagination{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.page-scroll-options{display:flex;align-items:center;gap:10px}.page-scroll-options label{display:flex;align-items:center;gap:5px}
#chat-attachments-toggle[hidden]{display:none!important}
@media(max-width:850px){html[data-studio-layout=split] #rows{height:48dvh}}

/* Shared character tools keep insertion bound to the selected editor. */
.character-tools{display:flex;flex-wrap:wrap;gap:6px;position:relative;align-items:center}
.character-tools button.studio-glyph{width:34px;height:34px;padding:7px}
.character-tools svg,.v3-format-toolbar svg,.v3-writing-tools svg{width:18px;height:18px;display:block}
.character-palette{width:min(480px,100%);padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--panel,var(--bg));box-sizing:border-box;flex-basis:100%;max-height:40vh;overflow:auto}
.character-palette[hidden]{display:none!important}
.character-palette-heading,.character-key-row,.character-alternatives{display:flex;gap:4px;flex-wrap:wrap;align-items:center;margin-bottom:4px}
.character-palette-heading{justify-content:space-between}
.character-palette button{min-width:32px;min-height:36px;font-size:16px;padding:5px}
.character-palette button:focus-visible{outline:2px solid var(--accent,#c58a41);outline-offset:2px}
#subtitle-formatting-bar{padding:8px;margin-bottom:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel,var(--bg))}
@media(pointer:coarse){.character-palette button,.character-tools button.studio-glyph{min-width:44px;min-height:44px}}
/* A docked film must not float across the pinned subtitle controls. */
html[data-studio-layout=theater] #review-layout #viewer-slot{position:relative;top:auto;z-index:auto}
/* Fullscreen owns viewport geometry, independently of the Reader sidebar. */
#vimeo-area:fullscreen{display:flex!important;flex-direction:column!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:100dvh!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden!important}
#vimeo-area:fullscreen .video-picture{flex:1 1 auto!important;min-height:0!important;height:auto!important;width:100%!important;margin:0!important}
#vimeo-area:fullscreen #vimeo-host{height:100%!important;width:100%!important;aspect-ratio:auto!important}
#vimeo-area:fullscreen #vimeo-host :is(video,iframe,canvas){width:100%!important;height:100%!important;object-fit:contain!important}
#vimeo-area:fullscreen :is(#video-drag,.floating-controls){display:flex!important;position:relative!important;inset:auto!important;opacity:1!important;flex:0 0 auto!important;transform:none!important}
#vimeo-area:fullscreen #video-drag{z-index:5}
button[aria-busy=true]{cursor:progress;opacity:.65}
.subtitle-display-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#subtitle-formatting-bar select{max-width:160px}
#subtitle-formatting-bar [aria-pressed=true]{color:var(--accent,#e5ac64);border-color:currentColor}
body.v3-open #subtitle-formatting-bar{display:none!important}

/* Stage113: one resizable character window, shared window dock and key popover. */
.character-window{position:fixed;z-index:550;left:auto;right:20px;top:auto;bottom:20px;width:min(620px,calc(100vw - 24px));height:430px;min-width:min(320px,calc(100vw - 24px));min-height:220px;max-height:calc(100vh - 64px);max-width:calc(100vw - 24px);resize:both;overflow:auto;background:#232321;color:#f2eee4;box-shadow:0 12px 40px #0009}
.character-window .character-palette-heading{position:sticky;top:0;background:#232321;z-index:2;touch-action:none;font-size:12px}
.character-window-actions,.character-tabs{display:flex;gap:5px}.character-tabs{margin:6px 0}.character-tabs [aria-selected=true]{border-color:#b97835;color:#ffd08a}
.character-window-content{width:100%}.character-category h3{font:11px sans-serif;color:#c8c1b5;margin:12px 0 5px}.character-window .character-key-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(34px,1fr));gap:4px}.character-window .character-key-row button{font-family:'Ubuntu',sans-serif;min-width:0;width:100%;height:36px;padding:3px;font-size:18px}
.character-alternatives{position:fixed;z-index:600;display:flex;max-width:calc(100vw - 16px);flex-wrap:wrap;padding:6px;border:1px solid #b97835;border-radius:8px;background:#232321;box-shadow:0 6px 24px #0008}.character-alternatives[hidden]{display:none}.character-alternatives button{min-width:36px;height:36px;font-size:18px}
.window-dock{max-width:calc(100vw - 24px);flex-wrap:wrap;justify-content:center}
@media(pointer:coarse){.character-window .character-key-row{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}.character-window .character-key-row button,.character-alternatives button{min-height:44px}}
/* Matched to existing player control:30×28px,5px padding/radius. */
.character-tools>.studio-glyph,.character-window-actions>.studio-glyph,.subtitle-display-controls>.studio-glyph{width:30px;height:28px;min-height:28px;padding:5px;border-radius:5px;font-size:0}
.character-tools select{min-height:28px;height:28px;font-size:11px}
.character-tools .studio-glyph svg,.character-window-actions svg{width:16px;height:16px;stroke-width:1.8;fill:none}
select{padding-inline-end:26px!important;background-position:right 8px center}select:dir(rtl){background-position:left 8px center;padding-inline-start:8px}
@media(forced-colors:active){select{appearance:auto;background-image:none}}
@media(pointer:coarse){.character-tools>.studio-glyph,.character-window-actions>.studio-glyph,.subtitle-display-controls>.studio-glyph{min-width:44px;min-height:44px}}
@font-face{font-family:Inter;src:url('/fonts/Inter-Variable.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Source Sans 3';src:url('/fonts/SourceSans3-Variable.ttf') format('truetype');font-weight:200 900;font-style:normal;font-display:swap}
.subtitle-style-preview{white-space:pre-wrap;font:inherit;padding:6px 8px;border-inline-start:2px solid #b97835;margin:4px 0;font-size:16px}
.character-window button::before,.character-alternatives button::before{display:none!important}.character-window .character-tabs button{font-size:12px;white-space:nowrap;min-height:28px;padding:4px 10px}.character-window .character-key-row button{display:flex;align-items:center;justify-content:center;line-height:1}
body .player-dock.unified-dock-owned{display:none!important}body .project-chat-dialog.chat-minimized.unified-dock-owned{display:none!important}
body #subtitle-formatting-bar .studio-glyph,body .v3-inline-editor .character-tools .studio-glyph,body .character-window-actions>.studio-glyph{width:30px!important;height:28px!important;min-height:28px!important;padding:5px!important;border-radius:5px}
#left-language,#right-language{min-width:110px!important;max-width:180px!important}#subtitle-formatting-bar select{min-width:105px}
@media(pointer:coarse){body #subtitle-formatting-bar .studio-glyph,body .v3-inline-editor .character-tools .studio-glyph,body .character-window-actions>.studio-glyph{min-width:44px!important;min-height:44px!important}}
body .window-dock{top:auto!important;bottom:12px!important;left:auto!important;right:12px!important;transform:none!important;max-width:calc(100vw - 24px);z-index:10000!important}
body .window-dock>button{font-size:12px!important;width:auto!important;min-width:80px!important;height:30px;padding:5px 10px!important;color:#f2eee4!important;background:#232321!important}.window-dock>button::before{display:none!important}
#show-player.unified-dock-owned{display:none!important}

#chat-dock.unified-dock-owned{display:none!important}

body:has(.window-dock>button) .character-window{bottom:54px}

/* Stage115: one regular-weight character grid, paging when a resized window cannot fit. */
.character-window{width:min(1120px,calc(100vw - 24px));height:620px;min-height:min(300px,calc(100dvh - 76px));max-height:calc(100dvh - 76px);overflow:hidden;}
.character-window-content{display:grid;gap:12px;align-items:start;}
.character-category{break-inside:avoid;}.character-category h3{margin:8px 0 5px;}
.character-window .character-key-row{display:grid;grid-template-columns:repeat(auto-fill,36px);gap:4px;justify-content:start;}
.character-window .character-key-row button{width:36px;height:36px;min-width:36px;min-height:36px;font-family:Inter,'Source Sans 3',Ubuntu,sans-serif;font-weight:400;}
.character-window .character-command-row{display:flex;flex-wrap:wrap;}
.character-window .character-command-row button{width:auto;min-width:56px;font-size:12px;padding:4px 8px;}
.character-group-picker{width:100%;margin:0 0 8px;min-height:32px;}
.character-group-picker[hidden]{display:none;}
@media(pointer:coarse){.character-window .character-key-row{grid-template-columns:repeat(auto-fill,44px)}.character-window .character-key-row button{width:44px;height:44px;min-width:44px;min-height:44px}}
/* Original Studio teal, isolated from the Reader/ara ochre accent. */
:root{--help-accent:var(--accent);}
.language-help-button,body .v3-writing-tools .language-help-button{color:var(--help-accent);}
.character-window .character-tabs button,.character-window .character-palette-heading strong,.character-window .character-category h3{font-weight:400;}

@font-face{font-family:'Doulos SIL';src:url('/fonts/DoulosSIL-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
.character-window[data-mode=ipa] .character-key-row button{font-family:'Doulos SIL',serif;font-size:20px;}

/* Styled read view occupies the textarea's exact bounds; editable source appears on focus. */
.subtitle-style-host{position:relative;}
#rows .subtitle-style-preview{position:absolute;z-index:1;pointer-events:none;white-space:pre-wrap;overflow:hidden;margin:0;border:1px solid transparent;padding:12px 14px;box-sizing:border-box;background:var(--field);font:inherit;font-size:16px;line-height:1.6;}
#rows textarea.subtitle-styled-input:not(:focus){color:transparent!important;}
.subtitle-style-preview[hidden]{display:none!important;}

/* Stage116 character search and neutral subtitle colour chooser. */
.character-search{box-sizing:border-box;width:100%;min-height:32px;flex:none;}
.character-description{margin:2px 0;min-height:20px;max-height:40px;overflow:hidden;font:12px/20px Arial,sans-serif;color:var(--muted);}
.subtitle-color-control{display:inline-flex;align-items:center;gap:7px;}
.subtitle-color-dot{width:9px;height:9px;flex:none;border-radius:50%;}
.subtitle-color-control select{background-color:var(--field);color:var(--ink);}
body select{padding-inline-end:28px;background-position:right 10px center;}
.character-window{border:1px solid var(--line);}

.character-window{border-color:#b97835;}

/* Shared inset chevron: native arrows ignore background-position. */
body select:not([multiple]):not([size]){appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%238c887f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:12px 8px;background-position:right 10px center;padding-inline-end:30px!important;}
body select:dir(rtl):not([multiple]):not([size]){background-position:left 10px center;padding-inline-start:30px!important;padding-inline-end:8px!important;}
@media(forced-colors:active){body select:not([multiple]):not([size]){appearance:auto;-webkit-appearance:auto;background-image:none;}}

/* Category-first character browsing; search remains optional. */
.character-browse{display:flex;gap:6px;margin:6px 0;flex-wrap:wrap}.character-browse select{flex:1;min-width:120px;max-width:100%;font-weight:400}.character-browse[hidden]{display:none}

/* Stage119: browse the complete palette within the window, not one hidden page. */
.character-window:not([hidden]){display:flex;flex-direction:column;}
.character-window>.character-palette-heading,.character-window>.character-browse,.character-window>.character-search,.character-window>.character-tabs{flex:none;}
.character-window-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 4px 6px 0;scrollbar-gutter:stable;}
.character-window .character-qwerty{align-content:start;gap:8px;}
.character-window .character-keyboard-row button{width:100%;min-width:0;height:var(--keyboard-key-height,44px);font-size:clamp(12px,2vw,22px);}
.character-window .character-command-row{display:flex;width:100%;gap:4px;}
.character-window .character-command-row button{flex:1;min-width:0;min-height:36px;height:var(--keyboard-key-height,44px);font-size:clamp(10px,1.4vw,14px);padding:4px;}
.character-window .character-command-row .character-space{flex:4;}
.v3-editor-action-bar .v3-writing-tools{align-items:center;}
.v3-editor-action-bar .v3-writing-tools>button,.v3-editor-action-bar .v3-writing-tools>select{box-sizing:border-box;height:34px;min-height:34px;margin-block:0;align-self:center;}
#v3-website-area:has(.afrophonie-reader)>#v3-status[data-evidence-notice=true]:not(:empty){position:static;max-width:none;margin:8px 0;box-shadow:none;}
.character-window .character-qwerty .character-key-row{margin-bottom:0;}

/* Stage120: compact parent overview; all subcategories remain in explicit filters. */
.character-controls{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px;}
.character-controls .character-browse{flex:2 1 380px;margin:0;}
.character-controls .character-search{flex:1 1 200px;min-width:0;width:auto;margin:0;}
.character-controls .character-tabs{flex:none;margin:0;}
.character-controls .character-search[hidden],.character-controls .character-browse[hidden]{display:none;}
.character-controls select,.character-controls .character-search{height:32px;min-height:32px;box-sizing:border-box;padding-block:4px;}
.character-overview .character-category h3{margin:5px 0 4px;font-size:11px;}
.character-overview .character-key-row{margin-bottom:6px;}

/* Stage121: explicit mode row and compact labelled subgroup runs. */
.character-window>.character-tabs{justify-content:flex-start;align-self:stretch;margin:0 0 6px;}
.character-overview .character-key-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px 8px;}
.character-subgroup{display:flex;flex-wrap:wrap;align-items:center;gap:4px;max-width:100%;}
.character-subgroup-label{font:11px/1.15 Inter,Arial,sans-serif;color:var(--muted);margin-right:2px;}

/* Stage122: stable subgroup label/key columns; narrow panes stack labels. */
.character-overview .character-key-row{display:flex;flex-direction:column;align-items:stretch;gap:6px;}
.character-subgroup{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:start;gap:6px;width:100%;}
.character-subgroup-label{padding-top:10px;overflow-wrap:anywhere;}
.character-subgroup-keys{display:grid;grid-template-columns:repeat(auto-fill,36px);gap:4px;min-width:0;}
.character-overview .character-category{border-top:1px solid var(--line);padding-top:5px;margin-top:8px;}
.character-overview .character-category h3{font-size:14px;font-weight:600;color:var(--ink);margin:0 0 8px;}
.character-window{container-type:inline-size;}
@container (max-width:500px){.character-subgroup{grid-template-columns:minmax(0,1fr);gap:3px;}.character-subgroup-label{padding-top:0;}}
@media(pointer:coarse){.character-subgroup-keys{grid-template-columns:repeat(auto-fill,44px);}}

.writing-window-paired{resize:none!important;}
.writing-window-divider{position:fixed;z-index:11000;touch-action:none;outline:none;}
.writing-window-divider::after{content:'';position:absolute;background:var(--line);border-radius:2px;}
.writing-window-divider[data-orientation="vertical"]{cursor:col-resize;}
.writing-window-divider[data-orientation="vertical"]::after{width:2px;left:7px;top:8px;bottom:8px;}
.writing-window-divider[data-orientation="horizontal"]{cursor:row-resize;}
.writing-window-divider[data-orientation="horizontal"]::after{height:2px;top:7px;left:8px;right:8px;}
.writing-window-divider:hover::after,.writing-window-divider:focus-visible::after{background:var(--accent);box-shadow:0 0 0 2px var(--accent);}
body.resizing-writing-windows,body.resizing-writing-windows *{user-select:none!important;}

/* Sidebar edit controls match the information button; title remains a playback link. */
.v3-preview.afrophonie-reader .discovery-reader-card .explore-thumbnail-edit{background:#171b19d9!important;color:#fff!important;border:1px solid #ffffff52!important;border-radius:50%!important;}
.v3-preview.afrophonie-reader .discovery-reader-card .explore-thumbnail-edit svg{stroke:currentColor;}
.v3-preview.afrophonie-reader .sidebar-clip-edit-menu{position:absolute;top:47px;left:10px;z-index:9;padding:5px;display:flex;flex-direction:column;gap:2px;min-width:160px;background:#232321;color:#f3f0e8;border:1px solid #ffffff35;border-radius:8px;box-shadow:0 5px 18px #0005;}
.v3-preview.afrophonie-reader .sidebar-clip-edit-menu[hidden]{display:none!important;}
.v3-preview.afrophonie-reader .sidebar-clip-edit-menu button{background:transparent!important;color:inherit!important;border:0!important;text-align:left;padding:8px!important;font:13px Arial,sans-serif!important;}
.v3-preview.afrophonie-reader .sidebar-clip-edit-menu button:hover,.v3-preview.afrophonie-reader .sidebar-clip-edit-menu button:focus-visible{background:#ffffff18!important;outline:1px solid #dfb27e;}
#vimeo-area.website-fullscreen-captions.captions-overlay #video-captions{position:absolute!important;left:5%!important;right:5%!important;width:90%!important;bottom:5%!important;max-width:none!important;height:auto!important;min-height:0!important;box-sizing:border-box;align-self:auto;justify-content:center;text-align:center;background:transparent!important;}
#vimeo-area.website-fullscreen-captions.captions-overlay .video-caption{text-align:center;}
#vimeo-area.website-fullscreen-captions .video-picture{display:block!important;width:100%!important;}
#vimeo-area.website-fullscreen-captions #vimeo-host{width:100%!important;}
