Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(preview): re-arm the retry budget on progress, not on a reload
EtienneLescot7e9321016dc2
diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.cssindex bebed2d50..19928dbe0 100644--- a/src/components/ai-edition/NewEditorShell.module.css+++ b/src/components/ai-edition/NewEditorShell.module.css@@ -1,2272 +1,2280 @@-/* Editor shell — 4-row grid: titlebar · workbench · handle · bottombar.- * Mirrors design/openscreen-editor.html. Tokens come from- * src/styles/design-tokens.css (light + dark via :root[data-theme="dark"]). */--.app {- display: grid;- grid-template-rows: var(--titlebar-h) 1fr var(--handle-h) var(--bottom-h);- height: 100vh;- min-width: 1024px;- background: var(--bg);- color: var(--fg);- font-family: var(--font-body);- font-size: var(--fs-app);- line-height: 1.5;- overflow: hidden;- user-select: none;-}--.app[data-collapse~="left"] {- --panel-w-left: 0px;-}-.app[data-collapse~="left"] .leftRail,-.app[data-collapse~="left"] .leftPanel,-.app[data-collapse~="left"] .handleLeft {- display: none;-}--.app[data-collapse~="right"] {- --panel-w-right: 0px;-}-.app[data-collapse~="right"] .rightStack,-.app[data-collapse~="right"] .rightRail,-.app[data-collapse~="right"] .handleRight {- display: none;-}--.app[data-collapse~="bottom"] {- --bottom-h: 0px;-}-.app[data-collapse~="bottom"] .bottombar {- display: none;-}-.app[data-collapse~="bottom"] .handleBottom {- display: none;-}--/* ─── titlebar ──────────────────────────────────────────────────── */-.titlebar {- display: flex;- align-items: center;- gap: var(--sp-3);- padding-inline: var(--sp-4);- background: var(--bg);- border-bottom: 1px solid var(--border-soft);- min-width: 0;- /* ponytail: make the titlebar the drag region in Electron. The buttons- * opt out via inline -webkit-app-region: no-drag (see Titlebar.tsx). */- -webkit-app-region: drag;- app-region: drag;-}-.titlebar button,-.titlebar input,-.titlebar select,-.titlebar textarea,-.titlebar .langSel,-.titlebar .recorderBtn {- -webkit-app-region: no-drag;- app-region: no-drag;-}-.titlebar .lights {- display: inline-flex;- gap: 6px;- margin-right: var(--sp-3);-}-.titlebar .lights span {- width: 11px;- height: 11px;- border-radius: 50%;- border: 1px solid var(--overlay-border);-}-.titlebar .lights .r { background: var(--light-red); }-.titlebar .lights .y { background: var(--light-yellow); }-.titlebar .lights .g { background: var(--light-green); }--.titlebar .brand {- display: inline-flex;- align-items: center;- gap: 8px;- font-family: var(--font-display);- font-size: var(--fs-title);- font-weight: 500;- letter-spacing: -0.005em;- color: var(--fg);-}-.titlebar .brandMark {- width: 18px;- height: 18px;- border-radius: 5px;- background: var(--accent);- display: grid;- place-items: center;- color: var(--accent-on);- font: 600 11px/1 var(--font-display);-}-.titlebar .sep {- width: 1px;- height: 16px;- background: var(--border);-}-.titlebar .project {- display: inline-flex;- align-items: center;- gap: var(--sp-2);- font-size: var(--fs-app);- color: var(--muted);- min-width: 0;-}-.titlebar .projectName {- color: var(--fg-2);- font-weight: 500;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- max-width: 280px;- background: transparent;- border: 0;- padding: 2px 6px;- border-radius: var(--r-sm);- cursor: text;- font: inherit;- -webkit-app-region: no-drag;- app-region: no-drag;-}-.titlebar .projectName:hover:not(:disabled) {- background: var(--surface-3);-}-.titlebar .projectInput {- background: var(--surface);- color: var(--fg);- border: 1px solid var(--accent);- border-radius: var(--r-sm);- padding: 2px 6px;- font: 500 13px var(--font-body);- outline: none;- min-width: 200px;- max-width: 360px;- -webkit-app-region: no-drag;- app-region: no-drag;-}-.titlebar .saved {- display: inline-flex;- align-items: center;- gap: 6px;- font-family: var(--font-mono);- font-size: var(--fs-app-sm);- color: var(--muted);-}-.titlebar .saved .dot {- width: 6px;- height: 6px;- border-radius: 50%;- background: var(--success);-}-.titlebar .projActions {- display: inline-flex;- align-items: center;- gap: var(--sp-1);- margin-right: var(--sp-1);-}-.titlebar .right {- margin-left: auto;- display: inline-flex;- align-items: center;- gap: var(--sp-1);-}-.titlebar .iconBtn {- width: 28px;- height: 28px;- display: grid;- place-items: center;- border-radius: var(--r-sm);- color: var(--muted);- background: transparent;- border: 0;- cursor: pointer;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.titlebar .iconBtn:hover {- background: var(--surface-3);- color: var(--fg);-}-.titlebar .iconBtn[aria-pressed="true"] {- background: var(--accent-soft);- color: var(--accent);-}-.titlebar .langSel {- display: inline-flex;- align-items: center;- gap: 6px;- height: 26px;- padding: 0 6px;- background: transparent;- border: 1px solid var(--border-soft);- border-radius: var(--r-md);- color: var(--fg-2);- font: 500 var(--fs-app)/1 var(--font-display);- cursor: pointer;- transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.titlebar .langSel:hover {- background: var(--surface-3);- border-color: var(--border);- color: var(--fg);-}-.titlebar .recorderBtn {- display: inline-flex;- align-items: center;- gap: 6px;- height: 26px;- padding: 0 10px 0 8px;- border-radius: var(--r-md);- background: var(--accent-soft);- color: var(--accent);- border: 1px solid color-mix(in oklch, var(--accent) 22%, transparent);- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);- font: 500 var(--fs-app-sm)/1 var(--font-display);- letter-spacing: 0.01em;- cursor: pointer;-}-.titlebar .recorderBtn:hover {- background: color-mix(in oklch, var(--accent) 18%, var(--surface-3));-}--/* ─── workbench — 7 columns: rail · panel · handle · preview · handle · stack · rail */-.workbench {- display: grid;- grid-template-columns:- var(--rail-w)- var(--panel-w-left)- var(--handle-w)- 1fr- var(--handle-w)- var(--panel-w-right)- var(--rail-w);- min-height: 0;- background: var(--bg);- overflow: hidden;-}-.workbench > * {- min-height: 0;-}-.workbench > * + * {- border-left: 1px solid var(--border-soft);-}--.leftPanel {- display: flex;- flex-direction: column;- overflow: hidden;- min-height: 0;-}--/* ─── rails — vertical icon strips ─────────────────────────────── */-.rail {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--sp-1);- padding: var(--sp-2) 0;- background: var(--bg);- min-width: 0;-}-.rail button {- width: 36px;- height: 36px;- display: grid;- place-items: center;- border-radius: var(--r-md);- color: var(--muted);- background: transparent;- border: 0;- cursor: pointer;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);- position: relative;-}-.rail button:hover {- background: var(--surface-3);- color: var(--fg);-}-.rail button[aria-pressed="true"] {- color: var(--accent);- background: var(--accent-soft);-}-.rail button[aria-pressed="true"]::before {- content: "";- position: absolute;- left: -8px;- top: 8px;- bottom: 8px;- width: 3px;- border-radius: 2px;- background: var(--accent);-}-.rail .sepH {- width: 24px;- height: 1px;- background: var(--border);- margin: var(--sp-1) 0;-}--/* ─── panels (chat, transcript, etc.) ──────────────────────────── */-.panel {- display: flex;- flex-direction: column;- flex: 1 1 0;- min-width: 0;- min-height: 0;- background: var(--bg);- overflow: hidden;-}--/* Direct children of .panel: panelHeader (auto), panelBody (1fr), chatInput (auto). */-.panel > .panelHeader,-.panel > .chatInput {- flex: 0 0 auto;-}-.panel > .panelBody {- flex: 1 1 0;-}-.panelHead {- display: flex;- align-items: center;- gap: var(--sp-2);- padding: var(--sp-3) var(--sp-4);- border-bottom: 1px solid var(--border-soft);- min-height: 44px;-}-.panelHead h2 {- margin: 0;- font-family: var(--font-display);- font-size: 14px;- font-weight: 500;- letter-spacing: -0.005em;- color: var(--fg);-}-.panelHead .right {- margin-left: auto;- display: inline-flex;- gap: var(--sp-1);-}-.panelHead .iconBtn {- width: 24px;- height: 24px;- display: grid;- place-items: center;- border-radius: var(--r-sm);- color: var(--meta);- background: transparent;- border: 0;- cursor: pointer;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.panelHead .iconBtn:hover {- background: var(--surface-3);- color: var(--fg-2);-}-.panelBody {- overflow-y: auto;- padding: var(--sp-3) var(--sp-4);- scrollbar-width: thin;- scrollbar-color: var(--border) transparent;- min-height: 0;-}-.panelBody::-webkit-scrollbar {- width: 8px;- height: 8px;-}-.panelBody::-webkit-scrollbar-thumb {- background: var(--border);- border-radius: 4px;-}-.panelBody::-webkit-scrollbar-thumb:hover {- background: var(--border-hi);-}--/* ─── resize handles ───────────────────────────────────────────── */-.handle {- background: transparent;- position: relative;- z-index: 2;- transition: background var(--motion-fast) var(--ease);- cursor: col-resize;-}-.handleRow {- cursor: row-resize;- grid-column: 1 / -1;- border-bottom: 1px solid var(--border);-}-.handle:hover,-.handle.isDragging {- background: var(--surface-2);-}-.handle::before,-.handle::after {- content: "";- position: absolute;- background: var(--dim);- border-radius: 1px;- opacity: 0.45;- transition: opacity var(--motion-fast) var(--ease);- pointer-events: none;-}-.handleCol::before,-.handleCol::after {- left: 50%;- width: 1px;- height: 14px;- transform: translateX(-50%);-}-.handleCol::before { top: calc(50% - 16px); }-.handleCol::after { top: calc(50% + 2px); }-.handleRow::before,-.handleRow::after {- top: 50%;- height: 1px;- width: 14px;- transform: translateY(-50%);-}-.handleRow::before { left: calc(50% - 16px); }-.handleRow::after { left: calc(50% + 2px); }-.handle:hover::before,-.handle:hover::after,-.handle.isDragging::before,-.handle.isDragging::after {- opacity: 1;-}-.handle.isDragging {- background: var(--accent-soft);-}--/* ─── preview area ─────────────────────────────────────────────── */-/* ponytail: the stage wrapper (in NewEditorShell.tsx) already provides the- padding that reserves room for the floating inspector, and .stage paints the- scene gradient. previewWrap is a single transparent, zero-padding centering- layer so the wallpaper card floats on that gradient — matching the design's- stage-wrap (one framed card, no surface slab, no double padding). It is also- the positioned ancestor for the timecode/badge overlays and the box the- frame measures for its contain-fit. */-.previewWrap {- position: relative;- display: grid;- place-items: center;- width: 100%;- height: 100%;- min-width: 0;- min-height: 0;-}-.previewFrame {- position: relative;- aspect-ratio: 16 / 9;- max-width: 100%;- max-height: 100%;- width: 100%;- min-width: 0;- min-height: 0;- background:- radial-gradient(ellipse at 50% 35%,- var(--scene-sky-hi) 0%,- var(--scene-sky-mid) 35%,- var(--scene-foliage) 70%,- var(--scene-foliage-d) 100%);- /* ponytail: the wallpaper card is a floating, rounded surface (per the v4- design's preview frame) — rounded corners + a layered drop shadow lift it- off the scene gradient. The custom background (buildFrameStyle) fills this- card; the video sits on top with its own padding so the wallpaper shows- around it. */- border-radius: 16px;- box-shadow:- 0 40px 90px -30px rgba(0, 0, 0, 0.75),- 0 12px 28px -12px rgba(0, 0, 0, 0.5),- inset 0 0 0 1px rgba(255, 255, 255, 0.09);- overflow: hidden;- display: grid;- place-items: center;-}-.videoStage {- position: relative;- display: grid;- place-items: center;- min-width: 0;- min-height: 0;- overflow: visible;- z-index: 1;-}-.screenStage {- position: absolute;- overflow: hidden;- z-index: 1;- display: flex;-}-.screenStage > .container,-.screenStage > div > .container {- width: 100%;- height: 100%;-}-.previewEmpty {- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 8px;- color: var(--muted);- font-size: var(--fs-app);-}-.previewEmpty strong { color: var(--fg-2); }--/* ─── preview empty state (no project / no asset) ───────────────── */-.previewEmptyDrop {- position: relative;- width: 100%;- height: 100%;- display: flex;- align-items: center;- justify-content: center;-}-.previewEmptyDropOverlay {- position: absolute;- inset: 0;- z-index: 10;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: var(--sp-2);- border: 2px dashed var(--primary, #34B27B);- background: color-mix(in srgb, var(--primary, #34B27B) 10%, transparent);- border-radius: var(--r-sm);- pointer-events: none;-}-.previewEmptyDropIcon {- width: 40px;- height: 40px;- color: var(--primary, #34B27B);-}-.previewEmptyDropLabel {- font-size: var(--fs-app);- font-weight: 600;- color: var(--primary, #34B27B);-}-.previewEmptyInner {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--sp-4);- padding: var(--sp-5);- text-align: center;- max-width: 28rem;-}-.previewEmptyLogo {- width: 64px;- height: 64px;- border-radius: var(--r-md);- opacity: 0.9;-}-.previewEmptyHeading {- display: flex;- flex-direction: column;- gap: var(--sp-1);-}-.previewEmptyTitle {- margin: 0;- font-size: 1.25rem;- font-weight: 600;- color: var(--fg-2);-}-.previewEmptyDescription {- margin: 0;- font-size: 0.875rem;- color: var(--muted);- line-height: 1.5;-}-.previewEmptyActions {- display: flex;- flex-direction: column;- gap: var(--sp-2);- width: 100%;- max-width: 18rem;-}-.previewEmptyPrimaryButton {- display: flex;- align-items: center;- justify-content: center;- gap: var(--sp-2);- padding: var(--sp-3) var(--sp-4);- border-radius: var(--r-sm);- background: var(--primary, #34B27B);- color: #fff;- border: none;- font-weight: 500;- font-size: 0.875rem;- cursor: pointer;- transition: background-color 120ms ease;-}-.previewEmptyPrimaryButton:hover {- filter: brightness(0.95);-}-.previewEmptySecondaryButton {- display: flex;- align-items: center;- justify-content: center;- gap: var(--sp-2);- padding: var(--sp-3) var(--sp-4);- border-radius: var(--r-sm);- background: var(--card);- color: var(--fg-2);- border: 1px solid var(--border);- font-weight: 500;- font-size: 0.875rem;- cursor: pointer;- transition: background-color 120ms ease;-}-.previewEmptySecondaryButton:hover {- background: var(--accent, rgba(255, 255, 255, 0.06));-}-.previewEmptyButtonIcon {- width: 16px;- height: 16px;-}-.previewEmptyHint {- margin: 0;- font-size: 0.75rem;- color: var(--muted-foreground, rgba(255, 255, 255, 0.5));-}-.previewEmptyDragHint {- display: flex;- align-items: center;- gap: var(--sp-1);- margin: 0;- font-size: 0.75rem;- color: var(--muted-foreground, rgba(255, 255, 255, 0.4));-}-.previewEmptyDragHintIcon {- width: 12px;- height: 12px;-}--/* ─── preview media failure (PreviewErrorCard) ──────────────────── */-/* Overlays the stage instead of replacing it: the native compositor is still- painting the last composed frame underneath, and leaving that frame visible is- what tells the user their project is fine (issue #395). Translucent, not- opaque, for the same reason. */-.previewFailure {- position: absolute;- inset: 0;- z-index: 3;- display: grid;- place-items: center;- padding: var(--sp-4);- background: rgba(9, 9, 11, 0.72);- backdrop-filter: blur(2px);-}-.previewFailureCard {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--sp-3);- max-width: min(38ch, 100%);- text-align: center;-}-.previewFailureIconRing {- display: flex;- align-items: center;- justify-content: center;- width: 40px;- height: 40px;- border-radius: 999px;- background: rgba(255, 255, 255, 0.05);- box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);-}-.previewFailureIcon {- width: 20px;- height: 20px;- color: var(--muted-foreground, rgba(255, 255, 255, 0.6));-}-.previewFailureTitle {- margin: 0;- font-size: 1.05rem;- font-weight: 600;- color: var(--fg-2);-}-.previewFailureDescription {- margin: 0;- font-size: 0.875rem;- line-height: 1.5;- color: var(--muted-foreground, rgba(255, 255, 255, 0.55));-}-/* Selectable: it exists to be copied into a bug report. */-.previewFailureDetail {- margin: 0;- font-size: 0.6875rem;- font-family: var(--font-mono, ui-monospace, monospace);- color: var(--muted-foreground, rgba(255, 255, 255, 0.35));- user-select: text;- word-break: break-word;-}-.previewEmptyDialog {- max-width: 24rem;- padding: var(--sp-5);- background: var(--bg);- border: 1px solid var(--border);-}-.previewEmptyDialogHeader {- margin-bottom: var(--sp-3);-}-.previewEmptyDialogHeaderInner {- display: flex;- align-items: center;- gap: var(--sp-2);-}-.previewEmptyDialogLogo {- width: 36px;- height: 36px;- border-radius: var(--r-sm);- flex-shrink: 0;-}-.previewEmptyDialogTitle {- font-size: 1rem;- font-weight: 600;- color: var(--fg-2);- line-height: 1.2;-}-.previewEmptyDialogBody {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--sp-2);- margin-bottom: var(--sp-4);- text-align: center;-}-.previewEmptyDialogIcon {- display: flex;- align-items: center;- justify-content: center;- width: 40px;- height: 40px;- border-radius: 9999px;- background: var(--card);- border: 1px solid var(--border);-}-.previewEmptyDialogAlertIcon {- width: 20px;- height: 20px;- color: var(--muted);-}-.previewEmptyDialogMessage {- margin: 0;- font-size: 0.875rem;- color: var(--muted);- line-height: 1.5;-}-.previewEmptyDialogClose {- display: flex;- align-items: center;- justify-content: center;- gap: var(--sp-1);- width: 100%;- padding: var(--sp-2) var(--sp-3);- border-radius: var(--r-sm);- background: var(--card);- color: var(--fg-2);- border: 1px solid var(--border);- font-size: 0.875rem;- font-weight: 500;- cursor: pointer;-}-.previewEmptyDialogCloseIcon {- width: 14px;- height: 14px;-}-.previewPip {- position: absolute;- right: var(--sp-3);- bottom: var(--sp-3);- width: 120px;- aspect-ratio: 16 / 9;- border-radius: var(--r-sm);- background: linear-gradient(135deg, var(--pip-bg-1) 0%, var(--pip-bg-2) 50%, var(--pip-bg-3) 100%);- border: 2px solid var(--bg);- box-shadow: var(--elev-card);- overflow: hidden;- display: grid;- place-items: center;- color: var(--overlay-text);- font-family: var(--font-mono);- font-size: 9px;- letter-spacing: 0.06em;- text-transform: uppercase;-}-.previewFrame > .screenStage video {- position: relative;- z-index: 1;- /* Pixels come from the native canvas now; this <video> stays mounted (and- playing) purely as the decode/playback-clock/metadata source. A plain- descendant selector (not a fixed child-depth chain) is required here:- VirtualPreview nests the actual <video> THREE levels down- (.screenStage > .container > .videoFrame > video), not one or two —- the previous `>` chain silently never matched, leaving this video- fully visible (and on top of the native canvas) the whole time. */- visibility: hidden;-}-.pipCircle {- border-radius: 9999px !important;-}-.pipSquare {- border-radius: 0 !important;-}-.pipRounded {- border-radius: 18px !important;-}--/* Webcam overlay: real <video> driven by the cameraTrack. The slot is- transparent so clip-path / border-radius carve the camera without leaving- a rectangular placeholder peeking through. */-.webcamSlot {- background: transparent;- overflow: hidden;- z-index: 2;- display: flex;-}-.webcamSlot .webcamVideo {- width: 100%;- height: 100%;- object-fit: cover;- /* Native canvas already draws the composited webcam PiP; this <video> stays- mounted (playing) only to drive the camera's own decode/sync clock. The- slot div itself stays visible/clickable for the drag-to-reposition hitbox. */- visibility: hidden;- display: block;-}-/* ─── transport bar (lives inside .timelineHead, next to the tool icons) ─ */-.transport {- display: flex;- align-items: center;- gap: 6px;- flex: 1;- min-width: 0;-}-.transport .tbtn {- width: 28px;- height: 28px;- display: grid;- place-items: center;- border-radius: var(--r-sm);- color: var(--fg-2);- background: transparent;- border: 0;- cursor: pointer;- flex-shrink: 0;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.transport .tbtn:hover {- background: var(--surface-3);- color: var(--fg);-}-.transport .tbtn.play {- width: 28px;- height: 28px;- background: var(--fg);- color: var(--bg);- border-radius: 50%;-}-.transport .tbtn.play:hover {- background: var(--fg-2);-}-.transport .time {- font-family: var(--font-mono);- font-size: var(--fs-app-sm);- color: var(--fg);- letter-spacing: 0.02em;- min-width: 96px;- text-align: center;- flex-shrink: 0;-}-.transport .time .sep { color: var(--meta); margin-inline: 4px; }-.transport .time .total { color: var(--muted); }-.transport .spacer { flex: 1; }--/* ─── right panel-stack (one pane visible at a time) ──────────── */-.rightStack {- grid-column: 6;- display: grid;- min-width: 0;- min-height: 0;- background: var(--bg);-}-.pane {- display: none;- grid-template-rows: auto 1fr;- min-height: 0;-}-.pane.isActive {- display: grid;-}-.paneHead {- display: flex;- align-items: center;- gap: var(--sp-2);- padding: 12px var(--sp-4);- /* Every pane wearing this header is rendered inside FloatingInspector, which- floats its "Collapse inspector" button (right: 12, 26px wide) over the- header's right edge — landing squarely on whatever sits there and- swallowing its clicks. The Help button was the casualty: visible on every- facet, and unclickable. Reserve the floated button its own lane instead. */- padding-right: 46px;- border-bottom: 1px solid var(--border-soft);- min-height: 44px;-}-.paneHead h2 {- margin: 0;- font-family: var(--font-display);- font-size: 14px;- font-weight: 500;- letter-spacing: -0.005em;- color: var(--fg);-}-.paneBody {- overflow-y: auto;- overflow-x: hidden;- padding: 12px var(--sp-4);- scrollbar-width: thin;- scrollbar-color: var(--border) transparent;- min-height: 0;-}--/* ─── pane tabs (sub-nav inside a pane) ───────────────────────── */-.paneTabs {- display: flex;- gap: 2px;- padding: 3px;- margin: 12px var(--sp-4);- background: var(--surface-warm);- border-radius: 10px;-}-.paneTabs button {- flex: 1;- padding: 7px 10px;- border: 0;- background: transparent;- border-radius: 7px;- font: 500 var(--fs-app-sm)/1 var(--font-body);- color: var(--muted);- cursor: pointer;- transition: background 150ms ease, color 150ms ease;-}-.paneTabs button.isActive {- background: var(--brand);- color: var(--accent-on);- box-shadow: 0 1px 2px rgba(22, 23, 29, 0.12);-}-.paneSection { display: none; }-.paneSection.isActive { display: block; }--/* ─── pane rows (label + control) ─────────────────────────────── */-.paneRow {- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- padding: 12px 14px;- margin: 8px var(--sp-4);- border: 1px solid var(--border);- border-radius: 10px;- background: var(--bg);-}-.paneRow .label { font: 500 var(--fs-app) var(--font-body); color: var(--fg-2); }-.paneRow .info { color: var(--meta); font-size: var(--fs-app-sm); margin-left: 4px; }-.sectionLabel {- font: 500 var(--fs-app-sm) var(--font-body);- color: var(--fg-2);- margin: 4px var(--sp-4) 8px;-}-.uploadBtn {- display: flex;- align-items: center;- justify-content: center;- gap: 8px;- margin: 0 var(--sp-4) 12px;- padding: 12px;- border: 1px dashed var(--border);- border-radius: 10px;- background: var(--bg);- color: var(--muted);- font: 500 var(--fs-app-sm) var(--font-body);- cursor: pointer;-}-.uploadBtn:hover { border-color: var(--success); color: var(--success); }-.field {- display: grid;- grid-template-columns: 80px 1fr;- align-items: center;- gap: 8px;- padding: 4px var(--sp-4);-}-.field label {- font: 500 var(--fs-app-sm) var(--font-body);- color: var(--muted);-}-.field select,-.field input {- width: 100%;- padding: 6px 8px;- font: 400 var(--fs-app-sm) var(--font-body);- color: var(--fg-2);- background: var(--surface);- border: 1px solid var(--border);- border-radius: 6px;- outline: none;-}-.field select:focus,-.field input:focus { border-color: var(--brand); }-.field select:disabled,-.field input:disabled { opacity: 0.5; cursor: not-allowed; }--/* ─── bg thumb grid ────────────────────────────────────────────── */-.bgGrid {- display: grid;- grid-template-columns: repeat(4, 1fr);- gap: 8px;- padding: 0 var(--sp-4) var(--sp-4);-}-.bgThumb {- aspect-ratio: 1/1;- border-radius: 10px;- border: 1px solid transparent;- cursor: pointer;- transition: transform 150ms ease, border-color 150ms ease;- background: var(--surface-2);-}-.bgThumb:hover { transform: translateY(-1px); }-.bgThumb.isActive {- border-color: var(--brand);- box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), transparent 70%);-}--/* ─── toggle (switch) ──────────────────────────────────────────── */-.toggle {- width: 36px;- height: 20px;- border: 0;- padding: 0;- background: var(--border-hi);- border-radius: 9999px;- position: relative;- cursor: pointer;- transition: background 150ms ease;- flex-shrink: 0;-}-.toggle::after {- content: "";- position: absolute;- top: 2px;- left: 2px;- width: 16px;- height: 16px;- background: var(--accent-on);- border-radius: 50%;- box-shadow: 0 1px 3px rgba(22, 23, 29, 0.2);- transition: transform 150ms ease;-}-.toggle.isOn { background: var(--brand); }-.toggle.isOn::after { transform: translateX(16px); }-.toggle:disabled { opacity: 0.5; cursor: not-allowed; }--/* ─── slider cell (effect) ─────────────────────────────────────── */-.sliderGrid {- display: grid;- grid-template-columns: 1fr;- gap: 8px;- padding: 0 var(--sp-4) var(--sp-4);-}-.sliderCell {- border: 1px solid var(--border);- border-radius: 10px;- background: var(--bg);- padding: 10px 12px;- display: grid;- grid-template-rows: auto auto;- gap: 8px;-}-.sliderCell .head { display: flex; align-items: center; gap: 6px; }-.sliderCell .label { font: 500 11px var(--font-body); color: var(--fg-2); }-.sliderCell .val { font: 500 11px var(--font-mono); color: var(--brand); margin-left: auto; }-.sliderCell input[type=range] {- width: 100%;- height: 4px;- background: var(--border-hi);- border-radius: 2px;- outline: none;- -webkit-appearance: none;- cursor: pointer;-}-.sliderCell input[type=range]::-webkit-slider-thumb {- -webkit-appearance: none;- width: 14px;- height: 14px;- border-radius: 50%;- background: var(--brand);- box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand), transparent 80%);- cursor: pointer;-}-.sliderCell input[type=range]::-moz-range-thumb {- width: 14px;- height: 14px;- border-radius: 50%;- background: var(--brand);- border: 0;- box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand), transparent 80%);- cursor: pointer;-}-.sliderCell.full { grid-column: 1 / -1; }-.sliderCell input[type=range]:disabled { opacity: 0.5; cursor: not-allowed; }--/* ─── cursor style grid ────────────────────────────────────────── */-.cursorGrid {- display: grid;- grid-template-columns: repeat(5, 1fr);- gap: 6px;- padding: 0 var(--sp-4) var(--sp-4);-}-.cursorCell {- aspect-ratio: 1/1;- border: 1px solid var(--border);- border-radius: 8px;- background: var(--bg);- display: grid;- place-items: center;- cursor: pointer;- transition: border-color 150ms ease, box-shadow 150ms ease;- color: var(--muted);-}-.cursorCell:hover { border-color: var(--border-hi); color: var(--fg-2); }-.cursorCell:disabled { opacity: 0.5; cursor: not-allowed; }-.cursorCell:disabled:hover { border-color: var(--border); color: var(--muted); }-.cursorCell.isActive {- border-color: var(--brand);- box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), transparent 75%);-}--/* ─── chat strip + input ───────────────────────────────────────── */-.chatStrip {- padding: var(--sp-3) var(--sp-4) var(--sp-2);- border-bottom: 1px solid var(--border-soft);- background: var(--bg);-}-.chatStripRow {- display: flex;- align-items: center;- gap: var(--sp-2);- margin-bottom: 6px;-}-.ctxPill {- display: inline-flex;- align-items: center;- gap: 5px;- padding: 3px 9px 3px 7px;- border-radius: var(--r-pill);- background: var(--success-soft);- color: var(--success);- font-family: var(--font-mono);- font-size: 10.5px;- font-weight: 500;- letter-spacing: 0.02em;-}-.ctxPill .d {- width: 5px;- height: 5px;- border-radius: 50%;- background: var(--success);-}-.stripActions {- margin-left: auto;- display: inline-flex;- gap: 2px;-}-.stripActions button {- width: 24px;- height: 24px;- display: grid;- place-items: center;- border-radius: var(--r-sm);- color: var(--meta);- background: transparent;- border: 0;- cursor: pointer;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.stripActions button:hover {- background: var(--surface-3);- color: var(--fg-2);-}-.stripActions button:disabled {- opacity: 0.4;- cursor: not-allowed;-}-.chatHint {- font-size: var(--fs-app-sm);- color: var(--muted);- letter-spacing: 0.005em;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;-}--.msg { margin-bottom: var(--sp-3); }-.msgHead {- display: flex;- align-items: center;- gap: var(--sp-2);- padding: 0 var(--sp-1);- margin-bottom: var(--sp-1);-}-.msgAuthor {- font-family: var(--font-mono);- font-size: 10px;- letter-spacing: 0.08em;- color: var(--meta);- text-transform: uppercase;-}-.msgHead .right {- margin-left: auto;- display: inline-flex;- gap: 2px;-}-.msgHead .right button {- width: 22px;- height: 22px;- display: grid;- place-items: center;- border-radius: var(--r-xs);- color: var(--meta);- background: transparent;- border: 0;- cursor: pointer;- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);-}-.msgHead .right button:hover {- background: var(--surface-3);- color: var(--fg-2);-}-.msgBubble {- padding: var(--sp-3) var(--sp-4);- border-radius: var(--r-md);- background: var(--bg);- border: 1px solid var(--border);- font-size: var(--fs-app);- color: var(--fg-2);- line-height: 1.5;-}-.msgBubble .msgAuthor { color: var(--accent); }--.chatInput {- padding: var(--sp-2) var(--sp-4) var(--sp-3);- border-top: 1px solid var(--border-soft);- background: var(--bg);-}-.chatInput textarea {- width: 100%;- min-height: 36px;- max-height: 120px;- resize: none;- padding: 8px var(--sp-3);- border-radius: var(--r-md);- border: 1px solid var(--border);- background: var(--bg);- font-family: var(--font-body);- font-size: var(--fs-app);- line-height: 1.4;- color: var(--fg);- outline: none;- transition: border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);-}-.chatInput textarea::placeholder { color: var(--meta); }-.chatInput textarea:focus {- border-color: var(--accent);- box-shadow: var(--focus-ring);-}-.chatInput .actions {- display: flex;- align-items: center;- gap: var(--sp-2);- margin-top: 6px;-}-.modelPicker {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 5px 4px 5px 10px;- border-radius: var(--r-pill);- background: var(--surface-2);- font-family: var(--font-mono);- font-size: 11px;- color: var(--fg-2);- letter-spacing: 0.01em;- cursor: pointer;- transition: background var(--motion-fast) var(--ease);- border: 0;-}-.modelPicker:hover { background: var(--surface-3); }-.reasoningBtn {- display: inline-flex;- align-items: center;- background: transparent;- border: 0;- padding: 0;- cursor: pointer;-}-.chip {- padding: 5px 10px;- border-radius: var(--r-pill);- background: var(--success-soft);- color: var(--success);- font-size: 10.5px;- font-weight: 500;- letter-spacing: 0.01em;- display: inline-flex;- align-items: center;- gap: 4px;- transition: background var(--motion-fast) var(--ease);-}-.reasoningBtn:hover .chip { background: var(--success-soft); filter: brightness(1.1); }-.chip .d {- width: 5px;- height: 5px;- border-radius: 50%;- background: var(--success);-}-.sendBtn {- margin-left: auto;- width: 32px;- height: 32px;- display: grid;- place-items: center;- border-radius: 50%;- background: transparent;- color: var(--fg);- border: 0;- cursor: pointer;- transition: color var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);-}-.sendBtn:hover { color: var(--accent); transform: scale(1.05); }-.sendBtn:disabled { opacity: 0.4; cursor: not-allowed; }--/* ─── transcript pane content ─────────────────────────────────── */-.transcriptClipHead {- display: flex;- align-items: center;- gap: 10px;- padding: 0 4px 4px;- border-bottom: 1px solid var(--border-soft);- margin-bottom: 8px;-}-.transcriptClipHead .badge {- width: 22px;- height: 22px;- display: inline-flex;- align-items: center;- justify-content: center;- background: var(--brand-soft);- color: var(--brand);- border-radius: var(--r-sm);- font: 700 12px/1 var(--font-mono);- flex-shrink: 0;-}-.transcriptClipHead .title {- font: 600 var(--fs-app)/1.2 var(--font-body);- color: var(--fg);- margin: 0;- padding: 0;-}-.transcriptClipHead .sub {- font: 400 11px/1.3 var(--font-mono);- color: var(--muted);- margin-top: 2px;-}-.transcriptFlow {- margin: 0;- padding: 0 4px;- font: 400 var(--fs-app-lg)/1.65 var(--font-body);- color: var(--fg);- text-wrap: pretty;-}-.transcriptFlow .tc {- display: inline-block;- margin: 0 4px;- padding: 1px 6px;- background: transparent;- color: var(--brand);- border-radius: var(--r-sm);- font: 500 11px/1.4 var(--font-mono);- vertical-align: middle;- white-space: nowrap;-}---/* ─── bottombar / timeline ─────────────────────────────────────── */-.bottombar {- display: grid;- grid-template-columns: 1fr;- min-height: 0;- background: var(--bg);- overflow: hidden;-}--/* Region lanes (annotations / speed / zoom) inside the timeline body. */-/* Lanes: fixed-width label column + one shared dnd-timeline surface column.- Both columns lay out 3 rows independently but with identical height (22px)- + gap (2px), so they line up without needing CSS grid row-spanning. */-.lanes {- display: flex;- gap: 8px;- padding: 4px var(--sp-4) 2px;- flex-shrink: 0;- border-bottom: 1px solid var(--border-soft);-}-.laneLabelCol {- width: 64px;- flex-shrink: 0;- display: flex;- flex-direction: column;- gap: 2px;-}-.laneLabelCell {- height: 22px;- display: flex;- align-items: center;- justify-content: space-between;- gap: 4px;-}-.laneLabel {- font: 600 10px/1 var(--font-mono);- color: var(--meta);- letter-spacing: 0.04em;- text-transform: uppercase;-}-.laneMeta {- font: 500 10.5px/1 var(--font-mono);- color: var(--muted);- min-width: 12px;- text-align: right;-}-.laneDelete {- width: 18px;- height: 18px;- display: inline-flex;- align-items: center;- justify-content: center;- border: 0;- border-radius: var(--r-xs);- background: var(--danger-soft);- color: var(--danger);- font-size: 13px;- line-height: 1;- cursor: pointer;-}-.laneDelete:hover {- filter: brightness(0.95);-}-.laneSurface {- flex: 1;- min-width: 0;- position: relative;- display: flex;- flex-direction: column;- gap: 2px;-}-/* F2.6 — vertical snap-guide lines at both edges of the region being- dragged/resized. Spans the full lane stack (parity with T24 on the- clip timeline). */-.laneSnapGuide {- position: absolute;- top: 0;- bottom: 0;- width: 2px;- background: var(--danger);- box-shadow: 0 0 6px color-mix(in oklch, var(--danger) 60%, transparent);- pointer-events: none;- z-index: 14;-}-/* F2.6 — floating tooltip with the live start – end range (parity with- T25 on the clip timeline). */-.laneDragTooltip {- position: absolute;- top: -20px;- height: 18px;- padding: 0 8px;- background: var(--surface);- border: 1px solid var(--border-soft);- border-radius: 9px;- color: var(--fg-2);- font: 500 10.5px/18px var(--font-mono);- letter-spacing: 0.02em;- white-space: nowrap;- pointer-events: none;- z-index: 15;- box-shadow: var(--elev-card-soft);-}-.laneTrackRow {- position: relative;- height: 24px;- background: var(--surface-1);- border: 1px solid var(--border-soft);- border-radius: var(--r-sm);- overflow: hidden;-}-.laneEmpty {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- font: 500 11px/1 var(--font-body);- color: var(--muted);- opacity: 0.6;- pointer-events: none;-}--/* Lane pills: zoom / speed / annotation / skip. Flat wash fill + 1.5px frame- * per the v4 design (design/OpenScreen Editor v4.dc.html pillStyle) — no- * gradient, no tab caps. Selected pills gain an accent ring. */-.zoomPill,-.speedPill,-.annotationPill,-.skipPill {- --_pill: var(--accent);- --_wash: var(--accent-soft);- position: absolute;- top: 50%;- transform: translateY(-50%);- height: 22px;- display: inline-flex;- align-items: center;- gap: 5px;- padding: 0 8px 0 7px;- background: var(--_wash);- border: 1.5px solid var(--_pill);- border-radius: var(--r-sm);- color: var(--fg);- font: 600 11px/1 var(--font-display);- letter-spacing: 0.01em;- font-variant-numeric: tabular-nums;- white-space: nowrap;- overflow: hidden;- box-sizing: border-box;- pointer-events: auto;- cursor: pointer;- z-index: 2;-}-.zoomPill {- --_pill: var(--accent);- --_wash: var(--accent-soft);-}-.speedPill {- --_pill: var(--speed);- --_wash: var(--speed-wash);-}-.annotationPill {- --_pill: var(--annotation);- --_wash: var(--annotation-wash);-}-.skipPill {- --_pill: var(--danger);- --_wash: var(--danger-soft);-}-.lanePillSelected {- box-shadow: 0 0 0 3px color-mix(in oklch, var(--_pill) 35%, transparent);-}-.pillIcon {- width: 11px;- height: 11px;- flex-shrink: 0;- color: color-mix(in oklch, var(--_pill) 70%, var(--fg));-}-.pillValue {- color: var(--fg);- font-variant-numeric: tabular-nums;-}--.timelineHead {- display: flex;- align-items: center;- gap: var(--sp-2);- padding: var(--sp-2) var(--sp-4);- border-bottom: 1px solid var(--border-soft);- min-height: 40px;-}-.timelineHead .viewTools {- display: flex;- align-items: center;- gap: 4px;- padding: 3px;- background: var(--surface-2);- border: 1px solid var(--border-soft);- border-radius: var(--r-sm);-}-.timelineHead .vtBtn {- display: inline-flex;- align-items: center;- justify-content: center;- width: 30px;- height: 30px;- padding: 0;- border: 0;- background: transparent;- color: var(--muted);- border-radius: var(--r-xs);- cursor: pointer;- transition: color 0.12s ease, background 0.12s ease;-}-.timelineHead .vtBtn:hover { color: var(--fg); background: var(--surface); }-.timelineHead .vtBtn.isOn { color: var(--accent); background: var(--accent-wash); }-.timelineHead .ratio {- display: inline-flex;- align-items: center;- gap: 5px;- height: 30px;- padding: 0 10px;- font-family: var(--font-mono);- font-size: var(--fs-app-sm);- color: var(--muted);- letter-spacing: 0.02em;- background: transparent;- border: 0;- border-left: 1px solid var(--border-soft);- margin-left: 4px;- cursor: pointer;- border-radius: 0 var(--r-sm) var(--r-sm) 0;-}-.timelineHead .ratio:hover { color: var(--fg); }-.timelineHead .hintRow {- margin-left: auto;- display: flex;- align-items: center;- gap: var(--sp-4);-}-.timelineHead .hint {- display: inline-flex;- align-items: center;- gap: 6px;- font-family: var(--font-display);- font-size: 11.5px;- color: var(--muted);- letter-spacing: 0.005em;-}-.timelineHead .hint .kbd {- display: inline-flex;- align-items: center;- justify-content: center;- height: 20px;- padding: 0 7px;- font-family: var(--font-mono);- font-size: 10.5px;- font-weight: 500;- color: var(--accent);- background: var(--accent-soft);- border: 1px solid color-mix(in oklch, var(--accent) 24%, transparent);- border-radius: var(--r-xs);- letter-spacing: 0.02em;- white-space: nowrap;-}-.timelineBody {- display: flex;- flex-direction: column;- min-height: 0;- flex: 1;- overflow: hidden;-}-.timelineBody :global(.timelinePaneWrap) {- flex: 1;- min-height: 0;- overflow: hidden;-}-.zoombar {- padding: 4px var(--sp-4) 8px;- background: var(--bg);- flex-shrink: 0;- border-top: 1px solid var(--border-soft);-}--/* T11 — Navigator strip. Moved to TimelinePane.module.css so the- className (applied via TimelinePane's own styles import) actually- matches the CSS. CSS modules' class hashes don't match across- files. The shape and the elements are unchanged from axcut's- .timeline-navigator / .timeline-navigator-window. */-.zoombar .zoomTrack {- position: relative;- height: 18px;- width: 100%;-}-.zoombar .zoomFill {- position: absolute;- top: 50%;- transform: translateY(-50%);- left: 0;- width: 100%;- height: 6px;- background: var(--accent);- border-radius: 3px;- pointer-events: none;-}--/* Radix Slider — visible two-handle range, design-aligned. */-.sliderRoot {- position: relative;- display: flex;- align-items: center;- height: 18px;- width: 100%;- touch-action: none;- user-select: none;-}-.sliderTrack {- position: relative;- height: 6px;- width: 100%;- background: var(--surface-2);- border-radius: 3px;- overflow: hidden;-}-.sliderRange {- position: absolute;- height: 100%;- background: var(--accent);- border-radius: 3px;-}-.sliderThumb {- display: block;- width: 14px;- height: 14px;- background: var(--accent);- border: 1px solid var(--bg);- border-radius: 3px;- cursor: ew-resize;- transition: box-shadow var(--motion-fast) var(--ease);-}-.sliderThumb:hover,-.sliderThumb:focus-visible {- outline: none;- box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent);-}--/* ─── modals ───────────────────────────────────────────────────── */-.modal {- position: fixed;- inset: 0;- display: none;- z-index: 100;-}-.modal.isOpen { display: block; }-.modalBackdrop {- position: absolute;- inset: 0;- background: var(--overlay-dark);- backdrop-filter: blur(4px);- -webkit-backdrop-filter: blur(4px);-}-.modalCard {- position: relative;- width: min(960px, 92vw);- max-height: 88vh;- margin: 6vh auto 0;- background: var(--bg);- border: 1px solid var(--border);- border-radius: var(--r-lg);- box-shadow: 0 24px 60px rgba(22, 23, 29, 0.5);- display: flex;- flex-direction: column;- overflow: hidden;- color: var(--fg);-}-.modalCard.wide { width: min(720px, 92vw); }-.modalHead {- display: flex;- align-items: flex-start;- justify-content: space-between;- padding: 20px 24px 12px;- gap: 16px;-}-.modalHead h2 {- margin: 0;- font: 600 20px/1.3 var(--font-display);- color: var(--fg);-}-.modalHead p {- margin: 4px 0 0;- font: 400 var(--fs-app)/1.5 var(--font-body);- color: var(--muted);-}-.modalHead .closeBtn {- width: 28px;- height: 28px;- display: grid;- place-items: center;- border-radius: var(--r-sm);- color: var(--muted);- background: transparent;- border: 0;- cursor: pointer;-}-.modalHead .closeBtn:hover { background: var(--surface-3); color: var(--fg); }-.modalBody {- padding: 8px 24px 24px;- display: flex;- flex-direction: column;- gap: 20px;- overflow: auto;-}--.btn {- height: 32px;- padding: 0 14px;- border-radius: var(--r-md);- font: 500 var(--fs-app)/1 var(--font-body);- cursor: pointer;- display: inline-flex;- align-items: center;- gap: 6px;- transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);-}-.btnSecondary {- background: var(--surface);- color: var(--fg);- border: 1px solid var(--border);-}-.btnSecondary:hover { background: var(--surface-warm); border-color: var(--border-hi); }-.btnPrimary {- background: var(--accent);- color: var(--accent-on);- border: 1px solid var(--accent);-}-.btnPrimary:hover { background: var(--brand-lo); }-.btnPrimary:disabled {- background: var(--surface-2);- border-color: var(--border);- color: var(--muted);- cursor: not-allowed;-}--/* ─── Edit Clip modal — draggable source-range track ────────────── */-.editClipRangeDragging {- box-shadow: 0 0 0 2px var(--accent-soft);-}--/* ─── media card (left panel media list) ───────────────────────── */-.mediaList {- list-style: none;- padding: 0;- margin: 0;- display: flex;- flex-direction: column;- gap: 10px;-}-.mediaCard {- display: flex;- flex-direction: column;- border-radius: var(--r-md);- overflow: hidden;- border: 1px solid var(--border-soft);- background: var(--bg);- cursor: pointer;- transition: border-color var(--motion-fast) var(--ease);-}-.mediaCard:hover { border-color: var(--brand); }-.mediaCard .thumb {- aspect-ratio: 16 / 9;- display: flex;- align-items: center;- justify-content: center;- color: rgba(255, 255, 255, 0.95);-}-.thumbRed { background: var(--danger); }-.thumbGreen { background: var(--success); }-.thumbAmber { background: var(--warn); }-.thumbCyan { background: var(--accent); }-.mediaMeta {- padding: 8px 10px 10px;- background: var(--surface-2);- display: flex;- flex-direction: column;- gap: 2px;-}-.mediaMeta .name {- font: var(--fs-app) var(--font-body);- color: var(--fg);- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;-}-.mediaMeta .row {- display: flex;- align-items: center;- justify-content: space-between;- gap: 8px;-}-.mediaMeta .timecode { font: 11px var(--font-mono); color: var(--muted); }-.mediaMeta .size { font: 11px var(--font-body); color: var(--muted); }--.importBtn {- margin: 8px var(--sp-3) 12px;- padding: 10px 12px;- display: inline-flex;- align-items: center;- justify-content: center;- gap: var(--sp-2);- border: 1px dashed var(--border-hi);- border-radius: var(--r-md);- background: transparent;- color: var(--muted);- font: var(--fs-app) var(--font-body);- font-weight: 500;- cursor: pointer;-}-.importBtn:hover { background: var(--surface-warm); color: var(--fg); border-color: var(--accent); }--/* Custom range slider / progress bar */-.scrubBar {- flex: 1;- min-width: 0;- position: relative;- height: 24px;- display: flex;- align-items: center;- cursor: pointer;-}-.scrubTrack {- position: absolute;- left: 0;- right: 0;- height: 4px;- background: var(--border-hi);- border-radius: 9999px;- overflow: hidden;-}-.scrubProgress {- height: 100%;- background: var(--accent);- border-radius: 9999px;-}-.scrubInput {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- opacity: 0;- cursor: pointer;- z-index: 10;- margin: 0;-}-.scrubThumb {- position: absolute;- width: 10px;- height: 10px;- background: #ffffff;- border-radius: 50%;- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);- pointer-events: none;- transform: translate(-50%, -50%);- top: 50%;- opacity: 1;- transition: transform 100ms ease;-}-.scrubBar:hover .scrubThumb {- transform: translate(-50%, -50%) scale(1.2);-}--/* ─── AI provider settings (axcut parity) ────────────────────────── */--.providerGrid {- display: grid;- grid-template-columns: repeat(2, minmax(0, 1fr));- gap: 10px;-}-.providerCard {- display: flex;- flex-direction: column;- gap: 6px;- padding: 12px 14px;- border: 1px solid var(--border);- border-radius: var(--r-md);- background: var(--surface);- color: var(--fg-2);- cursor: pointer;- font: 500 13px/1.2 var(--font-body);- text-align: left;- transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);-}-.providerCard:hover { border-color: var(--border-hi); }-.providerCard.active {- border-color: var(--accent);- background: var(--accent-soft);- color: var(--fg);-}-.providerCard .head {- display: flex;- align-items: center;- justify-content: space-between;- gap: 8px;-}-.providerCard .label {- font-weight: 600;- font-size: 14px;- color: var(--fg);-}-.providerCard .model {- font: 500 11px var(--font-mono);- color: var(--muted);- letter-spacing: 0.02em;- text-transform: lowercase;-}-.statusPill {- display: inline-flex;- align-items: center;- gap: 4px;- padding: 2px 8px;- border-radius: 9999px;- font: 600 10px/1 var(--font-mono);- letter-spacing: 0.06em;- text-transform: uppercase;- border: 1px solid transparent;-}-.statusPill.ready {- background: var(--success-soft, rgba(68, 175, 105, 0.18));- color: var(--success, #44af69);- border-color: color-mix(in srgb, var(--success, #44af69) 30%, transparent);-}-.statusPill.idle {- background: var(--surface-2);- color: var(--muted);- border-color: var(--border);-}-.statusPill.auth {- background: color-mix(in srgb, var(--accent) 18%, transparent);- color: var(--accent);- border-color: color-mix(in srgb, var(--accent) 35%, transparent);-}-.statusPill.pat {- background: color-mix(in srgb, var(--warn) 18%, transparent);- color: var(--warn);- border-color: color-mix(in srgb, var(--warn) 35%, transparent);-}--.providerForm {- display: flex;- flex-direction: column;- gap: 16px;-}-.providerForm .title {- display: flex;- align-items: center;- justify-content: space-between;- gap: 8px;-}-.providerForm .title h3 {- margin: 0;- font: 600 16px var(--font-display);- color: var(--fg);-}-.providerForm .actions {- display: flex;- justify-content: flex-end;- gap: 8px;- padding-top: 8px;- border-top: 1px solid var(--border-soft);- margin-top: 4px;-}-.providerForm .actionsLeft {- display: flex;- gap: 8px;-}-.dangerBtn {- background: color-mix(in srgb, var(--danger) 14%, transparent);- color: var(--danger);- border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);-}-.dangerBtn:hover {- background: color-mix(in srgb, var(--danger) 22%, transparent);- color: var(--danger);-}--.authPanel {- padding: 14px 16px;- border: 1px solid var(--brand);- background: color-mix(in srgb, var(--accent) 8%, var(--surface));- border-radius: var(--r-md);- display: flex;- flex-direction: column;- gap: 10px;-}-.authPanel strong {- display: block;- font: 600 13px var(--font-body);- color: var(--fg);-}-.authPanel p {- margin: 4px 0 0;- font: 400 12px/1.45 var(--font-body);- color: var(--muted);-}-.authCodeRow {- display: flex;- align-items: center;- gap: 10px;-}-.authCodeRow code {- flex: 1;- font: 600 18px/1 var(--font-mono);- letter-spacing: 0.18em;- padding: 10px 14px;- background: var(--bg);- border: 1px solid var(--border);- border-radius: var(--r-md);- color: var(--fg);- user-select: all;-}-.linkBtn {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 0 12px;- height: 32px;- border-radius: var(--r-md);- background: var(--surface);- border: 1px solid var(--border);- color: var(--fg);- font: 500 var(--fs-app) var(--font-body);- cursor: pointer;- text-decoration: none;-}-.linkBtn:hover { background: var(--surface-warm); border-color: var(--border-hi); }--.errorRow {- margin: 0;- padding: 10px 12px;- border-radius: var(--r-md);- border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);- background: color-mix(in srgb, var(--danger) 8%, var(--surface));- color: var(--danger);- font: 500 12px var(--font-body);-}--.iconBtn {- width: 28px;- height: 28px;- display: inline-grid;- place-items: center;- border-radius: var(--r-sm);- background: transparent;- border: 1px solid transparent;- color: var(--muted);- cursor: pointer;-}-.iconBtn:hover { background: var(--surface-3); color: var(--fg); }-.iconBtn:disabled { opacity: 0.5; cursor: not-allowed; }--.backBtn {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 0 10px;- height: 28px;- border-radius: var(--r-sm);- background: transparent;- color: var(--fg);- border: 1px solid var(--border);- cursor: pointer;- font: 500 12px var(--font-body);-}-.backBtn:hover { background: var(--surface-3); }-.backBtn:disabled { opacity: 0.5; cursor: not-allowed; }--/* ─── chat welcome (no provider connected) ──────────────────────── */-/* .panelBody supplies the horizontal inset (var(--sp-3) var(--sp-4)); only the- top breathing room is ours, or the card sits twice as far in as the messages. */-.chatWelcome {- display: flex;- flex-direction: column;- align-items: stretch;- gap: var(--sp-3);- padding: var(--sp-2) 0 0;- text-align: left;-}--.chatWelcomeHero {- display: flex;- flex-direction: column;- align-items: center;- text-align: center;- gap: 6px;- padding: 4px 0 0;-}--.chatWelcomeIcon {- color: var(--accent);- margin-bottom: 4px;-}--.chatWelcomeTitle {- margin: 0;- font: 600 14px/1.3 var(--font-body);- color: var(--fg);- letter-spacing: -0.01em;-}--.chatWelcomeSubtitle {- margin: 0;- font: 400 12px/1.5 var(--font-body);- color: var(--muted);- max-width: 32ch;-}--/* Native list markers — no flex on the ul/li, or the items stop being- list-items and the markers vanish. padding-inline-start keeps them inside- the card in both writing directions. */-.chatWelcomeFeatures {- /* explicit: the global reset sets list-style: none on every ul */- list-style: disc;- margin: 0;- padding: 10px 12px;- padding-inline-start: 26px;- background: var(--surface);- border: 1px solid var(--border-soft);- border-radius: var(--r-md);- font: 400 12px/1.45 var(--font-body);- color: var(--fg-2);-}-.chatWelcomeFeatures li + li { margin-top: 6px; }-.chatWelcomeFeatures li::marker { color: var(--accent); }--.chatWelcomeCta {- display: inline-flex;- align-items: center;- justify-content: center;- gap: 6px;- width: 100%;- height: 34px;- border-radius: var(--r-md);- background: var(--accent);- color: var(--accent-on);- border: 1px solid var(--accent);- font: 600 12.5px var(--font-body);- cursor: pointer;- transition: filter 120ms ease;-}-.chatWelcomeCta:hover { filter: brightness(0.95); }-.chatWelcomeCta:focus-visible {- outline: none;- box-shadow: var(--focus-ring);-}--.chatWelcomeDisclaimer {- margin: 0;- display: flex;- align-items: flex-start;- gap: 6px;- font: 400 10.5px/1.45 var(--font-body);- color: var(--muted);-}--.chatWelcomeDisclaimerIcon {- flex: 0 0 auto;- margin-top: 2px;- opacity: 0.8;-}+/* Editor shell — 4-row grid: titlebar · workbench · handle · bottombar.+ * Mirrors design/openscreen-editor.html. Tokens come from+ * src/styles/design-tokens.css (light + dark via :root[data-theme="dark"]). */++.app {+ display: grid;+ grid-template-rows: var(--titlebar-h) 1fr var(--handle-h) var(--bottom-h);+ height: 100vh;+ min-width: 1024px;+ background: var(--bg);+ color: var(--fg);+ font-family: var(--font-body);+ font-size: var(--fs-app);+ line-height: 1.5;+ overflow: hidden;+ user-select: none;+}++.app[data-collapse~="left"] {+ --panel-w-left: 0px;+}+.app[data-collapse~="left"] .leftRail,+.app[data-collapse~="left"] .leftPanel,+.app[data-collapse~="left"] .handleLeft {+ display: none;+}++.app[data-collapse~="right"] {+ --panel-w-right: 0px;+}+.app[data-collapse~="right"] .rightStack,+.app[data-collapse~="right"] .rightRail,+.app[data-collapse~="right"] .handleRight {+ display: none;+}++.app[data-collapse~="bottom"] {+ --bottom-h: 0px;+}+.app[data-collapse~="bottom"] .bottombar {+ display: none;+}+.app[data-collapse~="bottom"] .handleBottom {+ display: none;+}++/* ─── titlebar ──────────────────────────────────────────────────── */+.titlebar {+ display: flex;+ align-items: center;+ gap: var(--sp-3);+ padding-inline: var(--sp-4);+ background: var(--bg);+ border-bottom: 1px solid var(--border-soft);+ min-width: 0;+ /* ponytail: make the titlebar the drag region in Electron. The buttons+ * opt out via inline -webkit-app-region: no-drag (see Titlebar.tsx). */+ -webkit-app-region: drag;+ app-region: drag;+}+.titlebar button,+.titlebar input,+.titlebar select,+.titlebar textarea,+.titlebar .langSel,+.titlebar .recorderBtn {+ -webkit-app-region: no-drag;+ app-region: no-drag;+}+.titlebar .lights {+ display: inline-flex;+ gap: 6px;+ margin-right: var(--sp-3);+}+.titlebar .lights span {+ width: 11px;+ height: 11px;+ border-radius: 50%;+ border: 1px solid var(--overlay-border);+}+.titlebar .lights .r { background: var(--light-red); }+.titlebar .lights .y { background: var(--light-yellow); }+.titlebar .lights .g { background: var(--light-green); }++.titlebar .brand {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ font-family: var(--font-display);+ font-size: var(--fs-title);+ font-weight: 500;+ letter-spacing: -0.005em;+ color: var(--fg);+}+.titlebar .brandMark {+ width: 18px;+ height: 18px;+ border-radius: 5px;+ background: var(--accent);+ display: grid;+ place-items: center;+ color: var(--accent-on);+ font: 600 11px/1 var(--font-display);+}+.titlebar .sep {+ width: 1px;+ height: 16px;+ background: var(--border);+}+.titlebar .project {+ display: inline-flex;+ align-items: center;+ gap: var(--sp-2);+ font-size: var(--fs-app);+ color: var(--muted);+ min-width: 0;+}+.titlebar .projectName {+ color: var(--fg-2);+ font-weight: 500;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ max-width: 280px;+ background: transparent;+ border: 0;+ padding: 2px 6px;+ border-radius: var(--r-sm);+ cursor: text;+ font: inherit;+ -webkit-app-region: no-drag;+ app-region: no-drag;+}+.titlebar .projectName:hover:not(:disabled) {+ background: var(--surface-3);+}+.titlebar .projectInput {+ background: var(--surface);+ color: var(--fg);+ border: 1px solid var(--accent);+ border-radius: var(--r-sm);+ padding: 2px 6px;+ font: 500 13px var(--font-body);+ outline: none;+ min-width: 200px;+ max-width: 360px;+ -webkit-app-region: no-drag;+ app-region: no-drag;+}+.titlebar .saved {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ font-family: var(--font-mono);+ font-size: var(--fs-app-sm);+ color: var(--muted);+}+.titlebar .saved .dot {+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: var(--success);+}+.titlebar .projActions {+ display: inline-flex;+ align-items: center;+ gap: var(--sp-1);+ margin-right: var(--sp-1);+}+.titlebar .right {+ margin-left: auto;+ display: inline-flex;+ align-items: center;+ gap: var(--sp-1);+}+.titlebar .iconBtn {+ width: 28px;+ height: 28px;+ display: grid;+ place-items: center;+ border-radius: var(--r-sm);+ color: var(--muted);+ background: transparent;+ border: 0;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.titlebar .iconBtn:hover {+ background: var(--surface-3);+ color: var(--fg);+}+.titlebar .iconBtn[aria-pressed="true"] {+ background: var(--accent-soft);+ color: var(--accent);+}+.titlebar .langSel {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ height: 26px;+ padding: 0 6px;+ background: transparent;+ border: 1px solid var(--border-soft);+ border-radius: var(--r-md);+ color: var(--fg-2);+ font: 500 var(--fs-app)/1 var(--font-display);+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.titlebar .langSel:hover {+ background: var(--surface-3);+ border-color: var(--border);+ color: var(--fg);+}+.titlebar .recorderBtn {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ height: 26px;+ padding: 0 10px 0 8px;+ border-radius: var(--r-md);+ background: var(--accent-soft);+ color: var(--accent);+ border: 1px solid color-mix(in oklch, var(--accent) 22%, transparent);+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+ font: 500 var(--fs-app-sm)/1 var(--font-display);+ letter-spacing: 0.01em;+ cursor: pointer;+}+.titlebar .recorderBtn:hover {+ background: color-mix(in oklch, var(--accent) 18%, var(--surface-3));+}++/* ─── workbench — 7 columns: rail · panel · handle · preview · handle · stack · rail */+.workbench {+ display: grid;+ grid-template-columns:+ var(--rail-w)+ var(--panel-w-left)+ var(--handle-w)+ 1fr+ var(--handle-w)+ var(--panel-w-right)+ var(--rail-w);+ min-height: 0;+ background: var(--bg);+ overflow: hidden;+}+.workbench > * {+ min-height: 0;+}+.workbench > * + * {+ border-left: 1px solid var(--border-soft);+}++.leftPanel {+ display: flex;+ flex-direction: column;+ overflow: hidden;+ min-height: 0;+}++/* ─── rails — vertical icon strips ─────────────────────────────── */+.rail {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: var(--sp-1);+ padding: var(--sp-2) 0;+ background: var(--bg);+ min-width: 0;+}+.rail button {+ width: 36px;+ height: 36px;+ display: grid;+ place-items: center;+ border-radius: var(--r-md);+ color: var(--muted);+ background: transparent;+ border: 0;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+ position: relative;+}+.rail button:hover {+ background: var(--surface-3);+ color: var(--fg);+}+.rail button[aria-pressed="true"] {+ color: var(--accent);+ background: var(--accent-soft);+}+.rail button[aria-pressed="true"]::before {+ content: "";+ position: absolute;+ left: -8px;+ top: 8px;+ bottom: 8px;+ width: 3px;+ border-radius: 2px;+ background: var(--accent);+}+.rail .sepH {+ width: 24px;+ height: 1px;+ background: var(--border);+ margin: var(--sp-1) 0;+}++/* ─── panels (chat, transcript, etc.) ──────────────────────────── */+.panel {+ display: flex;+ flex-direction: column;+ flex: 1 1 0;+ min-width: 0;+ min-height: 0;+ background: var(--bg);+ overflow: hidden;+}++/* Direct children of .panel: panelHeader (auto), panelBody (1fr), chatInput (auto). */+.panel > .panelHeader,+.panel > .chatInput {+ flex: 0 0 auto;+}+.panel > .panelBody {+ flex: 1 1 0;+}+.panelHead {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ padding: var(--sp-3) var(--sp-4);+ border-bottom: 1px solid var(--border-soft);+ min-height: 44px;+}+.panelHead h2 {+ margin: 0;+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 500;+ letter-spacing: -0.005em;+ color: var(--fg);+}+.panelHead .right {+ margin-left: auto;+ display: inline-flex;+ gap: var(--sp-1);+}+.panelHead .iconBtn {+ width: 24px;+ height: 24px;+ display: grid;+ place-items: center;+ border-radius: var(--r-sm);+ color: var(--meta);+ background: transparent;+ border: 0;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.panelHead .iconBtn:hover {+ background: var(--surface-3);+ color: var(--fg-2);+}+.panelBody {+ overflow-y: auto;+ padding: var(--sp-3) var(--sp-4);+ scrollbar-width: thin;+ scrollbar-color: var(--border) transparent;+ min-height: 0;+}+.panelBody::-webkit-scrollbar {+ width: 8px;+ height: 8px;+}+.panelBody::-webkit-scrollbar-thumb {+ background: var(--border);+ border-radius: 4px;+}+.panelBody::-webkit-scrollbar-thumb:hover {+ background: var(--border-hi);+}++/* ─── resize handles ───────────────────────────────────────────── */+.handle {+ background: transparent;+ position: relative;+ z-index: 2;+ transition: background var(--motion-fast) var(--ease);+ cursor: col-resize;+}+.handleRow {+ cursor: row-resize;+ grid-column: 1 / -1;+ border-bottom: 1px solid var(--border);+}+.handle:hover,+.handle.isDragging {+ background: var(--surface-2);+}+.handle::before,+.handle::after {+ content: "";+ position: absolute;+ background: var(--dim);+ border-radius: 1px;+ opacity: 0.45;+ transition: opacity var(--motion-fast) var(--ease);+ pointer-events: none;+}+.handleCol::before,+.handleCol::after {+ left: 50%;+ width: 1px;+ height: 14px;+ transform: translateX(-50%);+}+.handleCol::before { top: calc(50% - 16px); }+.handleCol::after { top: calc(50% + 2px); }+.handleRow::before,+.handleRow::after {+ top: 50%;+ height: 1px;+ width: 14px;+ transform: translateY(-50%);+}+.handleRow::before { left: calc(50% - 16px); }+.handleRow::after { left: calc(50% + 2px); }+.handle:hover::before,+.handle:hover::after,+.handle.isDragging::before,+.handle.isDragging::after {+ opacity: 1;+}+.handle.isDragging {+ background: var(--accent-soft);+}++/* ─── preview area ─────────────────────────────────────────────── */+/* ponytail: the stage wrapper (in NewEditorShell.tsx) already provides the+ padding that reserves room for the floating inspector, and .stage paints the+ scene gradient. previewWrap is a single transparent, zero-padding centering+ layer so the wallpaper card floats on that gradient — matching the design's+ stage-wrap (one framed card, no surface slab, no double padding). It is also+ the positioned ancestor for the timecode/badge overlays and the box the+ frame measures for its contain-fit. */+.previewWrap {+ position: relative;+ display: grid;+ place-items: center;+ width: 100%;+ height: 100%;+ min-width: 0;+ min-height: 0;+}+.previewFrame {+ position: relative;+ aspect-ratio: 16 / 9;+ max-width: 100%;+ max-height: 100%;+ width: 100%;+ min-width: 0;+ min-height: 0;+ background:+ radial-gradient(ellipse at 50% 35%,+ var(--scene-sky-hi) 0%,+ var(--scene-sky-mid) 35%,+ var(--scene-foliage) 70%,+ var(--scene-foliage-d) 100%);+ /* ponytail: the wallpaper card is a floating, rounded surface (per the v4+ design's preview frame) — rounded corners + a layered drop shadow lift it+ off the scene gradient. The custom background (buildFrameStyle) fills this+ card; the video sits on top with its own padding so the wallpaper shows+ around it. */+ border-radius: 16px;+ box-shadow:+ 0 40px 90px -30px rgba(0, 0, 0, 0.75),+ 0 12px 28px -12px rgba(0, 0, 0, 0.5),+ inset 0 0 0 1px rgba(255, 255, 255, 0.09);+ overflow: hidden;+ display: grid;+ place-items: center;+}+.videoStage {+ position: relative;+ display: grid;+ place-items: center;+ min-width: 0;+ min-height: 0;+ overflow: visible;+ z-index: 1;+}+.screenStage {+ position: absolute;+ overflow: hidden;+ z-index: 1;+ display: flex;+}+.screenStage > .container,+.screenStage > div > .container {+ width: 100%;+ height: 100%;+}+.previewEmpty {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 8px;+ color: var(--muted);+ font-size: var(--fs-app);+}+.previewEmpty strong { color: var(--fg-2); }++/* ─── preview empty state (no project / no asset) ───────────────── */+.previewEmptyDrop {+ position: relative;+ width: 100%;+ height: 100%;+ display: flex;+ align-items: center;+ justify-content: center;+}+.previewEmptyDropOverlay {+ position: absolute;+ inset: 0;+ z-index: 10;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: var(--sp-2);+ border: 2px dashed var(--primary, #34B27B);+ background: color-mix(in srgb, var(--primary, #34B27B) 10%, transparent);+ border-radius: var(--r-sm);+ pointer-events: none;+}+.previewEmptyDropIcon {+ width: 40px;+ height: 40px;+ color: var(--primary, #34B27B);+}+.previewEmptyDropLabel {+ font-size: var(--fs-app);+ font-weight: 600;+ color: var(--primary, #34B27B);+}+.previewEmptyInner {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: var(--sp-4);+ padding: var(--sp-5);+ text-align: center;+ max-width: 28rem;+}+.previewEmptyLogo {+ width: 64px;+ height: 64px;+ border-radius: var(--r-md);+ opacity: 0.9;+}+.previewEmptyHeading {+ display: flex;+ flex-direction: column;+ gap: var(--sp-1);+}+.previewEmptyTitle {+ margin: 0;+ font-size: 1.25rem;+ font-weight: 600;+ color: var(--fg-2);+}+.previewEmptyDescription {+ margin: 0;+ font-size: 0.875rem;+ color: var(--muted);+ line-height: 1.5;+}+.previewEmptyActions {+ display: flex;+ flex-direction: column;+ gap: var(--sp-2);+ width: 100%;+ max-width: 18rem;+}+.previewEmptyPrimaryButton {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: var(--sp-2);+ padding: var(--sp-3) var(--sp-4);+ border-radius: var(--r-sm);+ background: var(--primary, #34B27B);+ color: #fff;+ border: none;+ font-weight: 500;+ font-size: 0.875rem;+ cursor: pointer;+ transition: background-color 120ms ease;+}+.previewEmptyPrimaryButton:hover {+ filter: brightness(0.95);+}+.previewEmptySecondaryButton {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: var(--sp-2);+ padding: var(--sp-3) var(--sp-4);+ border-radius: var(--r-sm);+ background: var(--card);+ color: var(--fg-2);+ border: 1px solid var(--border);+ font-weight: 500;+ font-size: 0.875rem;+ cursor: pointer;+ transition: background-color 120ms ease;+}+.previewEmptySecondaryButton:hover {+ background: var(--accent, rgba(255, 255, 255, 0.06));+}+.previewEmptyButtonIcon {+ width: 16px;+ height: 16px;+}+.previewEmptyHint {+ margin: 0;+ font-size: 0.75rem;+ color: var(--muted-foreground, rgba(255, 255, 255, 0.5));+}+.previewEmptyDragHint {+ display: flex;+ align-items: center;+ gap: var(--sp-1);+ margin: 0;+ font-size: 0.75rem;+ color: var(--muted-foreground, rgba(255, 255, 255, 0.4));+}+.previewEmptyDragHintIcon {+ width: 12px;+ height: 12px;+}++/* ─── preview media failure (PreviewErrorCard) ──────────────────── */+/* Overlays the stage instead of replacing it: the native compositor is still+ painting the last composed frame underneath, and leaving that frame visible is+ what tells the user their project is fine (issue #395). Translucent, not+ opaque, for the same reason. */+.previewFailure {+ position: absolute;+ inset: 0;+ z-index: 3;+ display: grid;+ place-items: center;+ padding: var(--sp-4);+ background: rgba(9, 9, 11, 0.72);+ backdrop-filter: blur(2px);+ /* The scrim is a fixed dark surface in BOTH themes, so the text on it must+ not follow the document theme. Light is the default (useTheme.ts), and+ there --fg-2 is #334155 — near-black on near-black. Pinned here rather+ than as a var() fallback per rule: --muted-foreground is always defined+ (design-tokens.css), so a fallback would never have fired. */+ --fg-2: #f3f5f8;+ --muted-foreground: rgba(255, 255, 255, 0.78);+}+.previewFailureCard {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: var(--sp-3);+ max-width: min(38ch, 100%);+ text-align: center;+}+.previewFailureIconRing {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 40px;+ height: 40px;+ border-radius: 999px;+ background: rgba(255, 255, 255, 0.05);+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);+}+.previewFailureIcon {+ width: 20px;+ height: 20px;+ color: var(--muted-foreground);+}+.previewFailureTitle {+ margin: 0;+ font-size: 1.05rem;+ font-weight: 600;+ color: var(--fg-2);+}+.previewFailureDescription {+ margin: 0;+ font-size: 0.875rem;+ line-height: 1.5;+ color: var(--muted-foreground);+}+/* Selectable: it exists to be copied into a bug report, so it stays legible+ rather than fading to decoration. */+.previewFailureDetail {+ margin: 0;+ font-size: 0.6875rem;+ font-family: var(--font-mono, ui-monospace, monospace);+ color: rgba(255, 255, 255, 0.6);+ user-select: text;+ word-break: break-word;+}+.previewEmptyDialog {+ max-width: 24rem;+ padding: var(--sp-5);+ background: var(--bg);+ border: 1px solid var(--border);+}+.previewEmptyDialogHeader {+ margin-bottom: var(--sp-3);+}+.previewEmptyDialogHeaderInner {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+}+.previewEmptyDialogLogo {+ width: 36px;+ height: 36px;+ border-radius: var(--r-sm);+ flex-shrink: 0;+}+.previewEmptyDialogTitle {+ font-size: 1rem;+ font-weight: 600;+ color: var(--fg-2);+ line-height: 1.2;+}+.previewEmptyDialogBody {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: var(--sp-2);+ margin-bottom: var(--sp-4);+ text-align: center;+}+.previewEmptyDialogIcon {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 40px;+ height: 40px;+ border-radius: 9999px;+ background: var(--card);+ border: 1px solid var(--border);+}+.previewEmptyDialogAlertIcon {+ width: 20px;+ height: 20px;+ color: var(--muted);+}+.previewEmptyDialogMessage {+ margin: 0;+ font-size: 0.875rem;+ color: var(--muted);+ line-height: 1.5;+}+.previewEmptyDialogClose {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: var(--sp-1);+ width: 100%;+ padding: var(--sp-2) var(--sp-3);+ border-radius: var(--r-sm);+ background: var(--card);+ color: var(--fg-2);+ border: 1px solid var(--border);+ font-size: 0.875rem;+ font-weight: 500;+ cursor: pointer;+}+.previewEmptyDialogCloseIcon {+ width: 14px;+ height: 14px;+}+.previewPip {+ position: absolute;+ right: var(--sp-3);+ bottom: var(--sp-3);+ width: 120px;+ aspect-ratio: 16 / 9;+ border-radius: var(--r-sm);+ background: linear-gradient(135deg, var(--pip-bg-1) 0%, var(--pip-bg-2) 50%, var(--pip-bg-3) 100%);+ border: 2px solid var(--bg);+ box-shadow: var(--elev-card);+ overflow: hidden;+ display: grid;+ place-items: center;+ color: var(--overlay-text);+ font-family: var(--font-mono);+ font-size: 9px;+ letter-spacing: 0.06em;+ text-transform: uppercase;+}+.previewFrame > .screenStage video {+ position: relative;+ z-index: 1;+ /* Pixels come from the native canvas now; this <video> stays mounted (and+ playing) purely as the decode/playback-clock/metadata source. A plain+ descendant selector (not a fixed child-depth chain) is required here:+ VirtualPreview nests the actual <video> THREE levels down+ (.screenStage > .container > .videoFrame > video), not one or two —+ the previous `>` chain silently never matched, leaving this video+ fully visible (and on top of the native canvas) the whole time. */+ visibility: hidden;+}+.pipCircle {+ border-radius: 9999px !important;+}+.pipSquare {+ border-radius: 0 !important;+}+.pipRounded {+ border-radius: 18px !important;+}++/* Webcam overlay: real <video> driven by the cameraTrack. The slot is+ transparent so clip-path / border-radius carve the camera without leaving+ a rectangular placeholder peeking through. */+.webcamSlot {+ background: transparent;+ overflow: hidden;+ z-index: 2;+ display: flex;+}+.webcamSlot .webcamVideo {+ width: 100%;+ height: 100%;+ object-fit: cover;+ /* Native canvas already draws the composited webcam PiP; this <video> stays+ mounted (playing) only to drive the camera's own decode/sync clock. The+ slot div itself stays visible/clickable for the drag-to-reposition hitbox. */+ visibility: hidden;+ display: block;+}+/* ─── transport bar (lives inside .timelineHead, next to the tool icons) ─ */+.transport {+ display: flex;+ align-items: center;+ gap: 6px;+ flex: 1;+ min-width: 0;+}+.transport .tbtn {+ width: 28px;+ height: 28px;+ display: grid;+ place-items: center;+ border-radius: var(--r-sm);+ color: var(--fg-2);+ background: transparent;+ border: 0;+ cursor: pointer;+ flex-shrink: 0;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.transport .tbtn:hover {+ background: var(--surface-3);+ color: var(--fg);+}+.transport .tbtn.play {+ width: 28px;+ height: 28px;+ background: var(--fg);+ color: var(--bg);+ border-radius: 50%;+}+.transport .tbtn.play:hover {+ background: var(--fg-2);+}+.transport .time {+ font-family: var(--font-mono);+ font-size: var(--fs-app-sm);+ color: var(--fg);+ letter-spacing: 0.02em;+ min-width: 96px;+ text-align: center;+ flex-shrink: 0;+}+.transport .time .sep { color: var(--meta); margin-inline: 4px; }+.transport .time .total { color: var(--muted); }+.transport .spacer { flex: 1; }++/* ─── right panel-stack (one pane visible at a time) ──────────── */+.rightStack {+ grid-column: 6;+ display: grid;+ min-width: 0;+ min-height: 0;+ background: var(--bg);+}+.pane {+ display: none;+ grid-template-rows: auto 1fr;+ min-height: 0;+}+.pane.isActive {+ display: grid;+}+.paneHead {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ padding: 12px var(--sp-4);+ /* Every pane wearing this header is rendered inside FloatingInspector, which+ floats its "Collapse inspector" button (right: 12, 26px wide) over the+ header's right edge — landing squarely on whatever sits there and+ swallowing its clicks. The Help button was the casualty: visible on every+ facet, and unclickable. Reserve the floated button its own lane instead. */+ padding-right: 46px;+ border-bottom: 1px solid var(--border-soft);+ min-height: 44px;+}+.paneHead h2 {+ margin: 0;+ font-family: var(--font-display);+ font-size: 14px;+ font-weight: 500;+ letter-spacing: -0.005em;+ color: var(--fg);+}+.paneBody {+ overflow-y: auto;+ overflow-x: hidden;+ padding: 12px var(--sp-4);+ scrollbar-width: thin;+ scrollbar-color: var(--border) transparent;+ min-height: 0;+}++/* ─── pane tabs (sub-nav inside a pane) ───────────────────────── */+.paneTabs {+ display: flex;+ gap: 2px;+ padding: 3px;+ margin: 12px var(--sp-4);+ background: var(--surface-warm);+ border-radius: 10px;+}+.paneTabs button {+ flex: 1;+ padding: 7px 10px;+ border: 0;+ background: transparent;+ border-radius: 7px;+ font: 500 var(--fs-app-sm)/1 var(--font-body);+ color: var(--muted);+ cursor: pointer;+ transition: background 150ms ease, color 150ms ease;+}+.paneTabs button.isActive {+ background: var(--brand);+ color: var(--accent-on);+ box-shadow: 0 1px 2px rgba(22, 23, 29, 0.12);+}+.paneSection { display: none; }+.paneSection.isActive { display: block; }++/* ─── pane rows (label + control) ─────────────────────────────── */+.paneRow {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 12px;+ padding: 12px 14px;+ margin: 8px var(--sp-4);+ border: 1px solid var(--border);+ border-radius: 10px;+ background: var(--bg);+}+.paneRow .label { font: 500 var(--fs-app) var(--font-body); color: var(--fg-2); }+.paneRow .info { color: var(--meta); font-size: var(--fs-app-sm); margin-left: 4px; }+.sectionLabel {+ font: 500 var(--fs-app-sm) var(--font-body);+ color: var(--fg-2);+ margin: 4px var(--sp-4) 8px;+}+.uploadBtn {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 8px;+ margin: 0 var(--sp-4) 12px;+ padding: 12px;+ border: 1px dashed var(--border);+ border-radius: 10px;+ background: var(--bg);+ color: var(--muted);+ font: 500 var(--fs-app-sm) var(--font-body);+ cursor: pointer;+}+.uploadBtn:hover { border-color: var(--success); color: var(--success); }+.field {+ display: grid;+ grid-template-columns: 80px 1fr;+ align-items: center;+ gap: 8px;+ padding: 4px var(--sp-4);+}+.field label {+ font: 500 var(--fs-app-sm) var(--font-body);+ color: var(--muted);+}+.field select,+.field input {+ width: 100%;+ padding: 6px 8px;+ font: 400 var(--fs-app-sm) var(--font-body);+ color: var(--fg-2);+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: 6px;+ outline: none;+}+.field select:focus,+.field input:focus { border-color: var(--brand); }+.field select:disabled,+.field input:disabled { opacity: 0.5; cursor: not-allowed; }++/* ─── bg thumb grid ────────────────────────────────────────────── */+.bgGrid {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ gap: 8px;+ padding: 0 var(--sp-4) var(--sp-4);+}+.bgThumb {+ aspect-ratio: 1/1;+ border-radius: 10px;+ border: 1px solid transparent;+ cursor: pointer;+ transition: transform 150ms ease, border-color 150ms ease;+ background: var(--surface-2);+}+.bgThumb:hover { transform: translateY(-1px); }+.bgThumb.isActive {+ border-color: var(--brand);+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), transparent 70%);+}++/* ─── toggle (switch) ──────────────────────────────────────────── */+.toggle {+ width: 36px;+ height: 20px;+ border: 0;+ padding: 0;+ background: var(--border-hi);+ border-radius: 9999px;+ position: relative;+ cursor: pointer;+ transition: background 150ms ease;+ flex-shrink: 0;+}+.toggle::after {+ content: "";+ position: absolute;+ top: 2px;+ left: 2px;+ width: 16px;+ height: 16px;+ background: var(--accent-on);+ border-radius: 50%;+ box-shadow: 0 1px 3px rgba(22, 23, 29, 0.2);+ transition: transform 150ms ease;+}+.toggle.isOn { background: var(--brand); }+.toggle.isOn::after { transform: translateX(16px); }+.toggle:disabled { opacity: 0.5; cursor: not-allowed; }++/* ─── slider cell (effect) ─────────────────────────────────────── */+.sliderGrid {+ display: grid;+ grid-template-columns: 1fr;+ gap: 8px;+ padding: 0 var(--sp-4) var(--sp-4);+}+.sliderCell {+ border: 1px solid var(--border);+ border-radius: 10px;+ background: var(--bg);+ padding: 10px 12px;+ display: grid;+ grid-template-rows: auto auto;+ gap: 8px;+}+.sliderCell .head { display: flex; align-items: center; gap: 6px; }+.sliderCell .label { font: 500 11px var(--font-body); color: var(--fg-2); }+.sliderCell .val { font: 500 11px var(--font-mono); color: var(--brand); margin-left: auto; }+.sliderCell input[type=range] {+ width: 100%;+ height: 4px;+ background: var(--border-hi);+ border-radius: 2px;+ outline: none;+ -webkit-appearance: none;+ cursor: pointer;+}+.sliderCell input[type=range]::-webkit-slider-thumb {+ -webkit-appearance: none;+ width: 14px;+ height: 14px;+ border-radius: 50%;+ background: var(--brand);+ box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand), transparent 80%);+ cursor: pointer;+}+.sliderCell input[type=range]::-moz-range-thumb {+ width: 14px;+ height: 14px;+ border-radius: 50%;+ background: var(--brand);+ border: 0;+ box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand), transparent 80%);+ cursor: pointer;+}+.sliderCell.full { grid-column: 1 / -1; }+.sliderCell input[type=range]:disabled { opacity: 0.5; cursor: not-allowed; }++/* ─── cursor style grid ────────────────────────────────────────── */+.cursorGrid {+ display: grid;+ grid-template-columns: repeat(5, 1fr);+ gap: 6px;+ padding: 0 var(--sp-4) var(--sp-4);+}+.cursorCell {+ aspect-ratio: 1/1;+ border: 1px solid var(--border);+ border-radius: 8px;+ background: var(--bg);+ display: grid;+ place-items: center;+ cursor: pointer;+ transition: border-color 150ms ease, box-shadow 150ms ease;+ color: var(--muted);+}+.cursorCell:hover { border-color: var(--border-hi); color: var(--fg-2); }+.cursorCell:disabled { opacity: 0.5; cursor: not-allowed; }+.cursorCell:disabled:hover { border-color: var(--border); color: var(--muted); }+.cursorCell.isActive {+ border-color: var(--brand);+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), transparent 75%);+}++/* ─── chat strip + input ───────────────────────────────────────── */+.chatStrip {+ padding: var(--sp-3) var(--sp-4) var(--sp-2);+ border-bottom: 1px solid var(--border-soft);+ background: var(--bg);+}+.chatStripRow {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ margin-bottom: 6px;+}+.ctxPill {+ display: inline-flex;+ align-items: center;+ gap: 5px;+ padding: 3px 9px 3px 7px;+ border-radius: var(--r-pill);+ background: var(--success-soft);+ color: var(--success);+ font-family: var(--font-mono);+ font-size: 10.5px;+ font-weight: 500;+ letter-spacing: 0.02em;+}+.ctxPill .d {+ width: 5px;+ height: 5px;+ border-radius: 50%;+ background: var(--success);+}+.stripActions {+ margin-left: auto;+ display: inline-flex;+ gap: 2px;+}+.stripActions button {+ width: 24px;+ height: 24px;+ display: grid;+ place-items: center;+ border-radius: var(--r-sm);+ color: var(--meta);+ background: transparent;+ border: 0;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.stripActions button:hover {+ background: var(--surface-3);+ color: var(--fg-2);+}+.stripActions button:disabled {+ opacity: 0.4;+ cursor: not-allowed;+}+.chatHint {+ font-size: var(--fs-app-sm);+ color: var(--muted);+ letter-spacing: 0.005em;+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}++.msg { margin-bottom: var(--sp-3); }+.msgHead {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ padding: 0 var(--sp-1);+ margin-bottom: var(--sp-1);+}+.msgAuthor {+ font-family: var(--font-mono);+ font-size: 10px;+ letter-spacing: 0.08em;+ color: var(--meta);+ text-transform: uppercase;+}+.msgHead .right {+ margin-left: auto;+ display: inline-flex;+ gap: 2px;+}+.msgHead .right button {+ width: 22px;+ height: 22px;+ display: grid;+ place-items: center;+ border-radius: var(--r-xs);+ color: var(--meta);+ background: transparent;+ border: 0;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);+}+.msgHead .right button:hover {+ background: var(--surface-3);+ color: var(--fg-2);+}+.msgBubble {+ padding: var(--sp-3) var(--sp-4);+ border-radius: var(--r-md);+ background: var(--bg);+ border: 1px solid var(--border);+ font-size: var(--fs-app);+ color: var(--fg-2);+ line-height: 1.5;+}+.msgBubble .msgAuthor { color: var(--accent); }++.chatInput {+ padding: var(--sp-2) var(--sp-4) var(--sp-3);+ border-top: 1px solid var(--border-soft);+ background: var(--bg);+}+.chatInput textarea {+ width: 100%;+ min-height: 36px;+ max-height: 120px;+ resize: none;+ padding: 8px var(--sp-3);+ border-radius: var(--r-md);+ border: 1px solid var(--border);+ background: var(--bg);+ font-family: var(--font-body);+ font-size: var(--fs-app);+ line-height: 1.4;+ color: var(--fg);+ outline: none;+ transition: border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);+}+.chatInput textarea::placeholder { color: var(--meta); }+.chatInput textarea:focus {+ border-color: var(--accent);+ box-shadow: var(--focus-ring);+}+.chatInput .actions {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ margin-top: 6px;+}+.modelPicker {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 5px 4px 5px 10px;+ border-radius: var(--r-pill);+ background: var(--surface-2);+ font-family: var(--font-mono);+ font-size: 11px;+ color: var(--fg-2);+ letter-spacing: 0.01em;+ cursor: pointer;+ transition: background var(--motion-fast) var(--ease);+ border: 0;+}+.modelPicker:hover { background: var(--surface-3); }+.reasoningBtn {+ display: inline-flex;+ align-items: center;+ background: transparent;+ border: 0;+ padding: 0;+ cursor: pointer;+}+.chip {+ padding: 5px 10px;+ border-radius: var(--r-pill);+ background: var(--success-soft);+ color: var(--success);+ font-size: 10.5px;+ font-weight: 500;+ letter-spacing: 0.01em;+ display: inline-flex;+ align-items: center;+ gap: 4px;+ transition: background var(--motion-fast) var(--ease);+}+.reasoningBtn:hover .chip { background: var(--success-soft); filter: brightness(1.1); }+.chip .d {+ width: 5px;+ height: 5px;+ border-radius: 50%;+ background: var(--success);+}+.sendBtn {+ margin-left: auto;+ width: 32px;+ height: 32px;+ display: grid;+ place-items: center;+ border-radius: 50%;+ background: transparent;+ color: var(--fg);+ border: 0;+ cursor: pointer;+ transition: color var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);+}+.sendBtn:hover { color: var(--accent); transform: scale(1.05); }+.sendBtn:disabled { opacity: 0.4; cursor: not-allowed; }++/* ─── transcript pane content ─────────────────────────────────── */+.transcriptClipHead {+ display: flex;+ align-items: center;+ gap: 10px;+ padding: 0 4px 4px;+ border-bottom: 1px solid var(--border-soft);+ margin-bottom: 8px;+}+.transcriptClipHead .badge {+ width: 22px;+ height: 22px;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ background: var(--brand-soft);+ color: var(--brand);+ border-radius: var(--r-sm);+ font: 700 12px/1 var(--font-mono);+ flex-shrink: 0;+}+.transcriptClipHead .title {+ font: 600 var(--fs-app)/1.2 var(--font-body);+ color: var(--fg);+ margin: 0;+ padding: 0;+}+.transcriptClipHead .sub {+ font: 400 11px/1.3 var(--font-mono);+ color: var(--muted);+ margin-top: 2px;+}+.transcriptFlow {+ margin: 0;+ padding: 0 4px;+ font: 400 var(--fs-app-lg)/1.65 var(--font-body);+ color: var(--fg);+ text-wrap: pretty;+}+.transcriptFlow .tc {+ display: inline-block;+ margin: 0 4px;+ padding: 1px 6px;+ background: transparent;+ color: var(--brand);+ border-radius: var(--r-sm);+ font: 500 11px/1.4 var(--font-mono);+ vertical-align: middle;+ white-space: nowrap;+}+++/* ─── bottombar / timeline ─────────────────────────────────────── */+.bottombar {+ display: grid;+ grid-template-columns: 1fr;+ min-height: 0;+ background: var(--bg);+ overflow: hidden;+}++/* Region lanes (annotations / speed / zoom) inside the timeline body. */+/* Lanes: fixed-width label column + one shared dnd-timeline surface column.+ Both columns lay out 3 rows independently but with identical height (22px)+ + gap (2px), so they line up without needing CSS grid row-spanning. */+.lanes {+ display: flex;+ gap: 8px;+ padding: 4px var(--sp-4) 2px;+ flex-shrink: 0;+ border-bottom: 1px solid var(--border-soft);+}+.laneLabelCol {+ width: 64px;+ flex-shrink: 0;+ display: flex;+ flex-direction: column;+ gap: 2px;+}+.laneLabelCell {+ height: 22px;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 4px;+}+.laneLabel {+ font: 600 10px/1 var(--font-mono);+ color: var(--meta);+ letter-spacing: 0.04em;+ text-transform: uppercase;+}+.laneMeta {+ font: 500 10.5px/1 var(--font-mono);+ color: var(--muted);+ min-width: 12px;+ text-align: right;+}+.laneDelete {+ width: 18px;+ height: 18px;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ border: 0;+ border-radius: var(--r-xs);+ background: var(--danger-soft);+ color: var(--danger);+ font-size: 13px;+ line-height: 1;+ cursor: pointer;+}+.laneDelete:hover {+ filter: brightness(0.95);+}+.laneSurface {+ flex: 1;+ min-width: 0;+ position: relative;+ display: flex;+ flex-direction: column;+ gap: 2px;+}+/* F2.6 — vertical snap-guide lines at both edges of the region being+ dragged/resized. Spans the full lane stack (parity with T24 on the+ clip timeline). */+.laneSnapGuide {+ position: absolute;+ top: 0;+ bottom: 0;+ width: 2px;+ background: var(--danger);+ box-shadow: 0 0 6px color-mix(in oklch, var(--danger) 60%, transparent);+ pointer-events: none;+ z-index: 14;+}+/* F2.6 — floating tooltip with the live start – end range (parity with+ T25 on the clip timeline). */+.laneDragTooltip {+ position: absolute;+ top: -20px;+ height: 18px;+ padding: 0 8px;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: 9px;+ color: var(--fg-2);+ font: 500 10.5px/18px var(--font-mono);+ letter-spacing: 0.02em;+ white-space: nowrap;+ pointer-events: none;+ z-index: 15;+ box-shadow: var(--elev-card-soft);+}+.laneTrackRow {+ position: relative;+ height: 24px;+ background: var(--surface-1);+ border: 1px solid var(--border-soft);+ border-radius: var(--r-sm);+ overflow: hidden;+}+.laneEmpty {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font: 500 11px/1 var(--font-body);+ color: var(--muted);+ opacity: 0.6;+ pointer-events: none;+}++/* Lane pills: zoom / speed / annotation / skip. Flat wash fill + 1.5px frame+ * per the v4 design (design/OpenScreen Editor v4.dc.html pillStyle) — no+ * gradient, no tab caps. Selected pills gain an accent ring. */+.zoomPill,+.speedPill,+.annotationPill,+.skipPill {+ --_pill: var(--accent);+ --_wash: var(--accent-soft);+ position: absolute;+ top: 50%;+ transform: translateY(-50%);+ height: 22px;+ display: inline-flex;+ align-items: center;+ gap: 5px;+ padding: 0 8px 0 7px;+ background: var(--_wash);+ border: 1.5px solid var(--_pill);+ border-radius: var(--r-sm);+ color: var(--fg);+ font: 600 11px/1 var(--font-display);+ letter-spacing: 0.01em;+ font-variant-numeric: tabular-nums;+ white-space: nowrap;+ overflow: hidden;+ box-sizing: border-box;+ pointer-events: auto;+ cursor: pointer;+ z-index: 2;+}+.zoomPill {+ --_pill: var(--accent);+ --_wash: var(--accent-soft);+}+.speedPill {+ --_pill: var(--speed);+ --_wash: var(--speed-wash);+}+.annotationPill {+ --_pill: var(--annotation);+ --_wash: var(--annotation-wash);+}+.skipPill {+ --_pill: var(--danger);+ --_wash: var(--danger-soft);+}+.lanePillSelected {+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--_pill) 35%, transparent);+}+.pillIcon {+ width: 11px;+ height: 11px;+ flex-shrink: 0;+ color: color-mix(in oklch, var(--_pill) 70%, var(--fg));+}+.pillValue {+ color: var(--fg);+ font-variant-numeric: tabular-nums;+}++.timelineHead {+ display: flex;+ align-items: center;+ gap: var(--sp-2);+ padding: var(--sp-2) var(--sp-4);+ border-bottom: 1px solid var(--border-soft);+ min-height: 40px;+}+.timelineHead .viewTools {+ display: flex;+ align-items: center;+ gap: 4px;+ padding: 3px;+ background: var(--surface-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--r-sm);+}+.timelineHead .vtBtn {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 30px;+ height: 30px;+ padding: 0;+ border: 0;+ background: transparent;+ color: var(--muted);+ border-radius: var(--r-xs);+ cursor: pointer;+ transition: color 0.12s ease, background 0.12s ease;+}+.timelineHead .vtBtn:hover { color: var(--fg); background: var(--surface); }+.timelineHead .vtBtn.isOn { color: var(--accent); background: var(--accent-wash); }+.timelineHead .ratio {+ display: inline-flex;+ align-items: center;+ gap: 5px;+ height: 30px;+ padding: 0 10px;+ font-family: var(--font-mono);+ font-size: var(--fs-app-sm);+ color: var(--muted);+ letter-spacing: 0.02em;+ background: transparent;+ border: 0;+ border-left: 1px solid var(--border-soft);+ margin-left: 4px;+ cursor: pointer;+ border-radius: 0 var(--r-sm) var(--r-sm) 0;+}+.timelineHead .ratio:hover { color: var(--fg); }+.timelineHead .hintRow {+ margin-left: auto;+ display: flex;+ align-items: center;+ gap: var(--sp-4);+}+.timelineHead .hint {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ font-family: var(--font-display);+ font-size: 11.5px;+ color: var(--muted);+ letter-spacing: 0.005em;+}+.timelineHead .hint .kbd {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ height: 20px;+ padding: 0 7px;+ font-family: var(--font-mono);+ font-size: 10.5px;+ font-weight: 500;+ color: var(--accent);+ background: var(--accent-soft);+ border: 1px solid color-mix(in oklch, var(--accent) 24%, transparent);+ border-radius: var(--r-xs);+ letter-spacing: 0.02em;+ white-space: nowrap;+}+.timelineBody {+ display: flex;+ flex-direction: column;+ min-height: 0;+ flex: 1;+ overflow: hidden;+}+.timelineBody :global(.timelinePaneWrap) {+ flex: 1;+ min-height: 0;+ overflow: hidden;+}+.zoombar {+ padding: 4px var(--sp-4) 8px;+ background: var(--bg);+ flex-shrink: 0;+ border-top: 1px solid var(--border-soft);+}++/* T11 — Navigator strip. Moved to TimelinePane.module.css so the+ className (applied via TimelinePane's own styles import) actually+ matches the CSS. CSS modules' class hashes don't match across+ files. The shape and the elements are unchanged from axcut's+ .timeline-navigator / .timeline-navigator-window. */+.zoombar .zoomTrack {+ position: relative;+ height: 18px;+ width: 100%;+}+.zoombar .zoomFill {+ position: absolute;+ top: 50%;+ transform: translateY(-50%);+ left: 0;+ width: 100%;+ height: 6px;+ background: var(--accent);+ border-radius: 3px;+ pointer-events: none;+}++/* Radix Slider — visible two-handle range, design-aligned. */+.sliderRoot {+ position: relative;+ display: flex;+ align-items: center;+ height: 18px;+ width: 100%;+ touch-action: none;+ user-select: none;+}+.sliderTrack {+ position: relative;+ height: 6px;+ width: 100%;+ background: var(--surface-2);+ border-radius: 3px;+ overflow: hidden;+}+.sliderRange {+ position: absolute;+ height: 100%;+ background: var(--accent);+ border-radius: 3px;+}+.sliderThumb {+ display: block;+ width: 14px;+ height: 14px;+ background: var(--accent);+ border: 1px solid var(--bg);+ border-radius: 3px;+ cursor: ew-resize;+ transition: box-shadow var(--motion-fast) var(--ease);+}+.sliderThumb:hover,+.sliderThumb:focus-visible {+ outline: none;+ box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent);+}++/* ─── modals ───────────────────────────────────────────────────── */+.modal {+ position: fixed;+ inset: 0;+ display: none;+ z-index: 100;+}+.modal.isOpen { display: block; }+.modalBackdrop {+ position: absolute;+ inset: 0;+ background: var(--overlay-dark);+ backdrop-filter: blur(4px);+ -webkit-backdrop-filter: blur(4px);+}+.modalCard {+ position: relative;+ width: min(960px, 92vw);+ max-height: 88vh;+ margin: 6vh auto 0;+ background: var(--bg);+ border: 1px solid var(--border);+ border-radius: var(--r-lg);+ box-shadow: 0 24px 60px rgba(22, 23, 29, 0.5);+ display: flex;+ flex-direction: column;+ overflow: hidden;+ color: var(--fg);+}+.modalCard.wide { width: min(720px, 92vw); }+.modalHead {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ padding: 20px 24px 12px;+ gap: 16px;+}+.modalHead h2 {+ margin: 0;+ font: 600 20px/1.3 var(--font-display);+ color: var(--fg);+}+.modalHead p {+ margin: 4px 0 0;+ font: 400 var(--fs-app)/1.5 var(--font-body);+ color: var(--muted);+}+.modalHead .closeBtn {+ width: 28px;+ height: 28px;+ display: grid;+ place-items: center;+ border-radius: var(--r-sm);+ color: var(--muted);+ background: transparent;+ border: 0;+ cursor: pointer;+}+.modalHead .closeBtn:hover { background: var(--surface-3); color: var(--fg); }+.modalBody {+ padding: 8px 24px 24px;+ display: flex;+ flex-direction: column;+ gap: 20px;+ overflow: auto;+}++.btn {+ height: 32px;+ padding: 0 14px;+ border-radius: var(--r-md);+ font: 500 var(--fs-app)/1 var(--font-body);+ cursor: pointer;+ display: inline-flex;+ align-items: center;+ gap: 6px;+ transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);+}+.btnSecondary {+ background: var(--surface);+ color: var(--fg);+ border: 1px solid var(--border);+}+.btnSecondary:hover { background: var(--surface-warm); border-color: var(--border-hi); }+.btnPrimary {+ background: var(--accent);+ color: var(--accent-on);+ border: 1px solid var(--accent);+}+.btnPrimary:hover { background: var(--brand-lo); }+.btnPrimary:disabled {+ background: var(--surface-2);+ border-color: var(--border);+ color: var(--muted);+ cursor: not-allowed;+}++/* ─── Edit Clip modal — draggable source-range track ────────────── */+.editClipRangeDragging {+ box-shadow: 0 0 0 2px var(--accent-soft);+}++/* ─── media card (left panel media list) ───────────────────────── */+.mediaList {+ list-style: none;+ padding: 0;+ margin: 0;+ display: flex;+ flex-direction: column;+ gap: 10px;+}+.mediaCard {+ display: flex;+ flex-direction: column;+ border-radius: var(--r-md);+ overflow: hidden;+ border: 1px solid var(--border-soft);+ background: var(--bg);+ cursor: pointer;+ transition: border-color var(--motion-fast) var(--ease);+}+.mediaCard:hover { border-color: var(--brand); }+.mediaCard .thumb {+ aspect-ratio: 16 / 9;+ display: flex;+ align-items: center;+ justify-content: center;+ color: rgba(255, 255, 255, 0.95);+}+.thumbRed { background: var(--danger); }+.thumbGreen { background: var(--success); }+.thumbAmber { background: var(--warn); }+.thumbCyan { background: var(--accent); }+.mediaMeta {+ padding: 8px 10px 10px;+ background: var(--surface-2);+ display: flex;+ flex-direction: column;+ gap: 2px;+}+.mediaMeta .name {+ font: var(--fs-app) var(--font-body);+ color: var(--fg);+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}+.mediaMeta .row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+}+.mediaMeta .timecode { font: 11px var(--font-mono); color: var(--muted); }+.mediaMeta .size { font: 11px var(--font-body); color: var(--muted); }++.importBtn {+ margin: 8px var(--sp-3) 12px;+ padding: 10px 12px;+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: var(--sp-2);+ border: 1px dashed var(--border-hi);+ border-radius: var(--r-md);+ background: transparent;+ color: var(--muted);+ font: var(--fs-app) var(--font-body);+ font-weight: 500;+ cursor: pointer;+}+.importBtn:hover { background: var(--surface-warm); color: var(--fg); border-color: var(--accent); }++/* Custom range slider / progress bar */+.scrubBar {+ flex: 1;+ min-width: 0;+ position: relative;+ height: 24px;+ display: flex;+ align-items: center;+ cursor: pointer;+}+.scrubTrack {+ position: absolute;+ left: 0;+ right: 0;+ height: 4px;+ background: var(--border-hi);+ border-radius: 9999px;+ overflow: hidden;+}+.scrubProgress {+ height: 100%;+ background: var(--accent);+ border-radius: 9999px;+}+.scrubInput {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ opacity: 0;+ cursor: pointer;+ z-index: 10;+ margin: 0;+}+.scrubThumb {+ position: absolute;+ width: 10px;+ height: 10px;+ background: #ffffff;+ border-radius: 50%;+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);+ pointer-events: none;+ transform: translate(-50%, -50%);+ top: 50%;+ opacity: 1;+ transition: transform 100ms ease;+}+.scrubBar:hover .scrubThumb {+ transform: translate(-50%, -50%) scale(1.2);+}++/* ─── AI provider settings (axcut parity) ────────────────────────── */++.providerGrid {+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: 10px;+}+.providerCard {+ display: flex;+ flex-direction: column;+ gap: 6px;+ padding: 12px 14px;+ border: 1px solid var(--border);+ border-radius: var(--r-md);+ background: var(--surface);+ color: var(--fg-2);+ cursor: pointer;+ font: 500 13px/1.2 var(--font-body);+ text-align: left;+ transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);+}+.providerCard:hover { border-color: var(--border-hi); }+.providerCard.active {+ border-color: var(--accent);+ background: var(--accent-soft);+ color: var(--fg);+}+.providerCard .head {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+}+.providerCard .label {+ font-weight: 600;+ font-size: 14px;+ color: var(--fg);+}+.providerCard .model {+ font: 500 11px var(--font-mono);+ color: var(--muted);+ letter-spacing: 0.02em;+ text-transform: lowercase;+}+.statusPill {+ display: inline-flex;+ align-items: center;+ gap: 4px;+ padding: 2px 8px;+ border-radius: 9999px;+ font: 600 10px/1 var(--font-mono);+ letter-spacing: 0.06em;+ text-transform: uppercase;+ border: 1px solid transparent;+}+.statusPill.ready {+ background: var(--success-soft, rgba(68, 175, 105, 0.18));+ color: var(--success, #44af69);+ border-color: color-mix(in srgb, var(--success, #44af69) 30%, transparent);+}+.statusPill.idle {+ background: var(--surface-2);+ color: var(--muted);+ border-color: var(--border);+}+.statusPill.auth {+ background: color-mix(in srgb, var(--accent) 18%, transparent);+ color: var(--accent);+ border-color: color-mix(in srgb, var(--accent) 35%, transparent);+}+.statusPill.pat {+ background: color-mix(in srgb, var(--warn) 18%, transparent);+ color: var(--warn);+ border-color: color-mix(in srgb, var(--warn) 35%, transparent);+}++.providerForm {+ display: flex;+ flex-direction: column;+ gap: 16px;+}+.providerForm .title {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+}+.providerForm .title h3 {+ margin: 0;+ font: 600 16px var(--font-display);+ color: var(--fg);+}+.providerForm .actions {+ display: flex;+ justify-content: flex-end;+ gap: 8px;+ padding-top: 8px;+ border-top: 1px solid var(--border-soft);+ margin-top: 4px;+}+.providerForm .actionsLeft {+ display: flex;+ gap: 8px;+}+.dangerBtn {+ background: color-mix(in srgb, var(--danger) 14%, transparent);+ color: var(--danger);+ border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);+}+.dangerBtn:hover {+ background: color-mix(in srgb, var(--danger) 22%, transparent);+ color: var(--danger);+}++.authPanel {+ padding: 14px 16px;+ border: 1px solid var(--brand);+ background: color-mix(in srgb, var(--accent) 8%, var(--surface));+ border-radius: var(--r-md);+ display: flex;+ flex-direction: column;+ gap: 10px;+}+.authPanel strong {+ display: block;+ font: 600 13px var(--font-body);+ color: var(--fg);+}+.authPanel p {+ margin: 4px 0 0;+ font: 400 12px/1.45 var(--font-body);+ color: var(--muted);+}+.authCodeRow {+ display: flex;+ align-items: center;+ gap: 10px;+}+.authCodeRow code {+ flex: 1;+ font: 600 18px/1 var(--font-mono);+ letter-spacing: 0.18em;+ padding: 10px 14px;+ background: var(--bg);+ border: 1px solid var(--border);+ border-radius: var(--r-md);+ color: var(--fg);+ user-select: all;+}+.linkBtn {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 0 12px;+ height: 32px;+ border-radius: var(--r-md);+ background: var(--surface);+ border: 1px solid var(--border);+ color: var(--fg);+ font: 500 var(--fs-app) var(--font-body);+ cursor: pointer;+ text-decoration: none;+}+.linkBtn:hover { background: var(--surface-warm); border-color: var(--border-hi); }++.errorRow {+ margin: 0;+ padding: 10px 12px;+ border-radius: var(--r-md);+ border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);+ background: color-mix(in srgb, var(--danger) 8%, var(--surface));+ color: var(--danger);+ font: 500 12px var(--font-body);+}++.iconBtn {+ width: 28px;+ height: 28px;+ display: inline-grid;+ place-items: center;+ border-radius: var(--r-sm);+ background: transparent;+ border: 1px solid transparent;+ color: var(--muted);+ cursor: pointer;+}+.iconBtn:hover { background: var(--surface-3); color: var(--fg); }+.iconBtn:disabled { opacity: 0.5; cursor: not-allowed; }++.backBtn {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 0 10px;+ height: 28px;+ border-radius: var(--r-sm);+ background: transparent;+ color: var(--fg);+ border: 1px solid var(--border);+ cursor: pointer;+ font: 500 12px var(--font-body);+}+.backBtn:hover { background: var(--surface-3); }+.backBtn:disabled { opacity: 0.5; cursor: not-allowed; }++/* ─── chat welcome (no provider connected) ──────────────────────── */+/* .panelBody supplies the horizontal inset (var(--sp-3) var(--sp-4)); only the+ top breathing room is ours, or the card sits twice as far in as the messages. */+.chatWelcome {+ display: flex;+ flex-direction: column;+ align-items: stretch;+ gap: var(--sp-3);+ padding: var(--sp-2) 0 0;+ text-align: left;+}++.chatWelcomeHero {+ display: flex;+ flex-direction: column;+ align-items: center;+ text-align: center;+ gap: 6px;+ padding: 4px 0 0;+}++.chatWelcomeIcon {+ color: var(--accent);+ margin-bottom: 4px;+}++.chatWelcomeTitle {+ margin: 0;+ font: 600 14px/1.3 var(--font-body);+ color: var(--fg);+ letter-spacing: -0.01em;+}++.chatWelcomeSubtitle {+ margin: 0;+ font: 400 12px/1.5 var(--font-body);+ color: var(--muted);+ max-width: 32ch;+}++/* Native list markers — no flex on the ul/li, or the items stop being+ list-items and the markers vanish. padding-inline-start keeps them inside+ the card in both writing directions. */+.chatWelcomeFeatures {+ /* explicit: the global reset sets list-style: none on every ul */+ list-style: disc;+ margin: 0;+ padding: 10px 12px;+ padding-inline-start: 26px;+ background: var(--surface);+ border: 1px solid var(--border-soft);+ border-radius: var(--r-md);+ font: 400 12px/1.45 var(--font-body);+ color: var(--fg-2);+}+.chatWelcomeFeatures li + li { margin-top: 6px; }+.chatWelcomeFeatures li::marker { color: var(--accent); }++.chatWelcomeCta {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ gap: 6px;+ width: 100%;+ height: 34px;+ border-radius: var(--r-md);+ background: var(--accent);+ color: var(--accent-on);+ border: 1px solid var(--accent);+ font: 600 12.5px var(--font-body);+ cursor: pointer;+ transition: filter 120ms ease;+}+.chatWelcomeCta:hover { filter: brightness(0.95); }+.chatWelcomeCta:focus-visible {+ outline: none;+ box-shadow: var(--focus-ring);+}++.chatWelcomeDisclaimer {+ margin: 0;+ display: flex;+ align-items: flex-start;+ gap: 6px;+ font: 400 10.5px/1.45 var(--font-body);+ color: var(--muted);+}++.chatWelcomeDisclaimerIcon {+ flex: 0 0 auto;+ margin-top: 2px;+ opacity: 0.8;+}diff --git a/src/components/ai-edition/Preview.test.tsx b/src/components/ai-edition/Preview.test.tsxindex 651e4ab91..6a9ef9d6b 100644--- a/src/components/ai-edition/Preview.test.tsx+++ b/src/components/ai-edition/Preview.test.tsx@@ -253,9 +253,31 @@ describe("Preview keeps the stage when the media fails", () => {expect(errorCard()).not.toBeInTheDocument();});+ // Taking the card's own advice — import a replacement — grows the source list+ // without touching the dead <video>: it is not remounted, nothing re-fires+ // `error`, and dropping the card here would leave a frozen stage with no+ // explanation and no Retry button.+ it("keeps the card when an unrelated source joins the timeline", () => {+ const { rerender } = renderPreview({+ videoSources: [source("moved")],+ clips: [clip("clip_a", "moved", 0, 60)],+ });+ click("fail-moved");+ expect(errorCard()).toBeInTheDocument();++ rerender(+ previewProps({+ videoSources: [source("moved"), source("fresh")],+ clips: [clip("clip_a", "moved", 0, 60), clip("clip_b", "fresh", 60, 90)],+ }),+ );++ expect(errorCard()).toBeInTheDocument();+ });+// Swapping the media out has to clear the failure, or the card would outlive// the file that caused it.- it("clears the failure when the source set changes", () => {+ it("clears the failure when the failed asset leaves the timeline", () => {const { rerender } = renderPreview({videoSources: [source("truncated")],clips: [clip("clip_a", "truncated", 0, 60)],diff --git a/src/components/ai-edition/Preview.tsx b/src/components/ai-edition/Preview.tsxindex 89e5db7c6..2764f2c5c 100644--- a/src/components/ai-edition/Preview.tsx+++ b/src/components/ai-edition/Preview.tsx@@ -1,4 +1,4 @@-import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { useCallback, useEffect, useMemo, useState } from "react";import type { CameraFullscreenRegion, ZoomFocus } from "@/components/video-editor/types";import { useScopedT } from "@/contexts/I18nContext";import type {@@ -87,8 +87,10 @@ export function Preview({// later moved or deleted, or one left behind when its clip was removed — and// handing the asset list straight to the canvas made `videoSources[0]` (the// source VirtualPreview mounts first) that dead asset: its <video> errored,- // latched the failure flag below, and collapsed the WHOLE preview to the- // empty state while every clip on the timeline was perfectly playable.+ // and the whole preview collapsed to the empty state while every clip on the+ // timeline was perfectly playable. (A media error no longer collapses+ // anything — see below — but mounting an asset nothing references is still+ // the wrong source to put the decode clock on.)// Ordered by timeline position, so the first source mounted is the one the// playhead actually needs at 0:00.// The fallback is load-bearing: the first clip of a fresh import is minted@@ -128,13 +130,19 @@ export function Preview({// the mounted one is.const [failure, setFailure] = useState<{ assetId: string; detail: string } | null>(null);const [retryToken, setRetryToken] = useState(0);+ // Dropped only when the FAILED asset itself leaves the timeline — not+ // whenever the source list changes shape. Appending a replacement recording+ // (which is the advice the card gives) grows the list without touching the+ // dead <video>: it is not remounted, nothing re-fires `error`, and clearing+ // here would take the card and its Retry button away from a stage that is+ // still frozen. A same-id source whose URL changed does re-run the load+ // algorithm, and the resulting recovery clears the failure on its own.const sourceKey = previewSources.map((source) => `${source.id}::${source.src}`).join("|");- const previousSourceKeyRef = useRef<string | null>(null);+ // biome-ignore lint/correctness/useExhaustiveDependencies: keyed on the source list's identity, read through previewSourcesuseEffect(() => {- if (previousSourceKeyRef.current !== sourceKey) {- previousSourceKeyRef.current = sourceKey;- setFailure(null);- }+ setFailure((prev) =>+ prev && !previewSources.some((source) => source.id === prev.assetId) ? null : prev,+ );}, [sourceKey]);const handleVideoError = useCallback((assetId: string, detail: string) => {setFailure({ assetId, detail });diff --git a/src/components/ai-edition/VirtualPreview.mediaError.test.tsx b/src/components/ai-edition/VirtualPreview.mediaError.test.tsxindex 852263624..58975ad08 100644--- a/src/components/ai-edition/VirtualPreview.mediaError.test.tsx+++ b/src/components/ai-edition/VirtualPreview.mediaError.test.tsx@@ -136,7 +136,11 @@ function mount(clips: AxcutClip[] = [clip("clip_1", "a1", 0)]) {const onVideoError = vi.fn<(assetId: string, detail: string) => void>();const onVideoRecovered = vi.fn<(assetId: string) => void>();const onTimeChange = vi.fn<(timeSec: number) => void>();- const tree = (retryToken: number) => (+ let seekRequestId = 0;+ const tree = (+ retryToken: number,+ seekTarget: { timeSec: number; requestId: number } | null = null,+ ) => (<VirtualPreviewvideoSources={SOURCES}clips={clips}@@ -144,6 +148,7 @@ function mount(clips: AxcutClip[] = [clip("clip_1", "a1", 0)]) {onVideoError={onVideoError}onVideoRecovered={onVideoRecovered}retryToken={retryToken}+ seekTarget={seekTarget}/>);const view = render(tree(0));@@ -162,6 +167,12 @@ function mount(clips: AxcutClip[] = [clip("clip_1", "a1", 0)]) {onVideoRecovered,onTimeChange,bumpRetryToken: (token: number) => view.rerender(tree(token)),+ /** Move the playhead the way the shell does — a new seekTarget requestId. */+ scrubTo: (timeSec: number) =>+ act(() => {+ seekRequestId += 1;+ view.rerender(tree(0, { timeSec, requestId: seekRequestId }));+ }),};}@@ -212,6 +223,24 @@ describe("VirtualPreview media-error recovery (issue #395)", () => {expect(video.playCalls).toBeGreaterThan(0);});+ // …and "at reload time" is the load-bearing half. Resolving it when the error+ // fired, or from the last position sampled off the element, both give 4 here —+ // only reading the live playhead when the timer runs gives 7.+ it("honours a scrub made during the backoff", () => {+ const { video, scrubTo } = mount();++ video.play();+ video.seekTo(4);+ tick();++ video.fail(3);+ scrubTo(7);+ advance(RETRY_DELAYS_MS[0]);++ video.loadedMetadata();+ expect(video.currentTime).toBeCloseTo(7, 5);+ });+// An `error` does not fire `pause`, so `v.paused` — the gate the rest of the// tick relies on — is still false while the decoder is dead. Without its own// guard the tick would keep taking clip-boundary decisions on a frozen clock@@ -261,11 +290,13 @@ describe("VirtualPreview media-error recovery (issue #395)", () => {expect(onVideoError).toHaveBeenCalledWith("a1", "MEDIA_ERR_SRC_NOT_SUPPORTED (4) — code 4");});- // Success re-arms the budget. Without this a long session slowly walks into- // the same dead end — #395 with a longer fuse.- it("re-arms the budget on a successful load", () => {+ // Getting PAST the bad spot re-arms the budget. Without any re-arming a long+ // session slowly walks into the same dead end — #395 with a longer fuse.+ it("re-arms the budget once playback gets past the failure point", () => {const { video, onVideoError, onVideoRecovered } = mount();+ video.seekTo(4);+ tick();for (const delay of RETRY_DELAYS_MS) {video.fail(3);advance(delay);@@ -273,6 +304,9 @@ describe("VirtualPreview media-error recovery (issue #395)", () => {video.loadedMetadata();expect(onVideoRecovered).toHaveBeenCalledWith("a1");+ video.seekTo(5); // decoded past where it died+ tick();+// A fresh failure now gets the full budget again rather than being fatal.video.fail(3);advance(RETRY_DELAYS_MS[0]);@@ -280,6 +314,31 @@ describe("VirtualPreview media-error recovery (issue #395)", () => {expect(video.loadCalls).toBe(RETRY_DELAYS_MS.length + 1);});+ // The livelock this fix originally shipped with. `loadedmetadata` only means+ // the container header parsed — a truncated recording re-fires it on every+ // reload — so re-arming the budget there handed it back faster than failures+ // could spend it: a 400 ms reload loop, forever, and the user never saw the+ // card. Progress past the failure point, not a completed load, is the signal.+ it("still gives up on a file that reloads cleanly and fails at the same spot", () => {+ const { video, onVideoError } = mount();++ video.play();+ video.seekTo(4);+ tick();++ // Three rounds of "the header parses, the data does not".+ for (let round = 0; round < RETRY_DELAYS_MS.length + 1; round += 1) {+ video.fail(3);+ advance(5_000);+ video.loadedMetadata(); // header fine, decoder willing+ video.seekTo(4); // …and straight back to the byte that killed it+ tick();+ }++ expect(onVideoError).toHaveBeenCalledWith("a1", "MEDIA_ERR_DECODE (3) — code 3");+ expect(video.loadCalls).toBe(RETRY_DELAYS_MS.length);+ });+it("treats an error with no MediaError as transient", () => {const { video, onVideoError } = mount();@@ -314,7 +373,12 @@ describe("VirtualPreview media-error recovery (issue #395)", () => {const { view, video } = mount();video.fail(3);+ // Assert the cancellation itself: `reloadActiveSource` bails on a null+ // videoRef anyway, so a surviving timer would still leave loadCalls at 0+ // and prove nothing about the cleanup this test exists for.+ expect(vi.getTimerCount()).toBe(1);view.unmount();+ expect(vi.getTimerCount()).toBe(0);advance(5_000);expect(video.loadCalls).toBe(0);diff --git a/src/components/ai-edition/VirtualPreview.tsx b/src/components/ai-edition/VirtualPreview.tsxindex 0d6766f47..3d1e54ea8 100644--- a/src/components/ai-edition/VirtualPreview.tsx+++ b/src/components/ai-edition/VirtualPreview.tsx@@ -139,8 +139,10 @@ export function VirtualPreview({const isProgrammaticSeekRef = useRef(false);const pendingSeekRef = useRef<{ sourceTimeSec: number; play: boolean } | null>(null);// Reload bookkeeping for the mounted source (see `reloadActiveSource`).- // `attempts` is spent by failures and reset by a SUCCESS, never by elapsed- // time — a budget that only counts up is issue #395 with a longer fuse.+ // `attempts` is spent by failures and re-armed by playing past the point one+ // died at — never by elapsed time, and never by a reload merely completing.+ // A budget that only counts up is issue #395 with a longer fuse; one handed+ // back too easily is a reload loop that never surfaces anything at all.const retryRef = useRef<{ attempts: number; timer: number | null }>({attempts: 0,timer: null,@@ -152,6 +154,10 @@ export function VirtualPreview({// after load(), and 0 after a load that failed before decoding a frame, so// it cannot be the fallback resume point — that is a silent rewind.const lastGoodSourceTimeRef = useRef(0);+ // Where the decoder died, while a reload is outstanding. Playing PAST it is+ // what re-arms the retry budget: see markSourceLoaded for why a reload+ // completing is not evidence of anything.+ const failedAtSourceTimeRef = useRef<number | null>(null);// Which clip the rAF tick below believes is currently playing — set// whenever a seek unambiguously resolves one (via locateVirtualPosition,// timeline position → clip). Passed back into locateSourcePosition so@@ -323,6 +329,14 @@ export function VirtualPreview({// where a reload has to put the playhead back if it cannot// resolve one from the timeline.lastGoodSourceTimeRef.current = v.currentTime;+ // …and here is the only place that can prove a reload WORKED:+ // the decoder is past the bytes it died on. A quarter second of+ // margin so re-decoding the same frame doesn't count as progress.+ const failedAt = failedAtSourceTimeRef.current;+ if (failedAt !== null && v.currentTime > failedAt + 0.25) {+ failedAtSourceTimeRef.current = null;+ retryRef.current.attempts = 0;+ }}// À L'ARRÊT, le `<video>` ne pilote PLUS la position de la timeline.//@@ -518,6 +532,18 @@ export function VirtualPreview({const video = videoRef.current;if (!video) return;+ if (pendingSeekRef.current) {+ // A load is in flight (a reload, or a source that has just been+ // swapped in), so the seek below is a no-op — assigning+ // `currentTime` before metadata only sets the default playback+ // start position, and `onLoadedMetadata` is about to apply the+ // queued resume over the top of it. Re-aim that resume instead:+ // it is older intent than the gesture the user just made.+ pendingSeekRef.current = {+ sourceTimeSec: position.sourceTimeSec,+ play: shouldContinuePlayback,+ };+ }isProgrammaticSeekRef.current = true;updateVirtualTime(position.virtualTimeSec);if (Math.abs(video.currentTime - position.sourceTimeSec) > 0.01) {@@ -594,12 +620,17 @@ export function VirtualPreview({}, delayMs);}, []);- /** A frame decoded — whatever went wrong is over. Success, not elapsed time,- * is what re-arms the retry budget, and it is the only signal the caller has- * that a failure it is showing can be dropped. */- const markSourceHealthy = useCallback(() => {+ /** The element is loaded again, so the reload is over and any failure the+ * caller is showing can go. Note what this does NOT do: re-arm the retry+ * budget. `loadedmetadata`/`canplay` prove the container header parsed and+ * the decoder is willing — not that the bytes that killed us are readable.+ * A truncated recording (intact header, unreadable data — the case the error+ * card exists for) re-fires both on every reload, so re-arming here would+ * hand back the budget faster than failures could spend it: a 400 ms reload+ * loop, forever, with nothing ever shown to the user. Getting PAST the+ * failure point is the only honest evidence, and the rAF tick below owns it. */+ const markSourceLoaded = useCallback(() => {recoveringRef.current = false;- retryRef.current.attempts = 0;const id = activeSourceRef.current?.id;if (id) onVideoRecovered?.(id);}, [onVideoRecovered]);@@ -612,6 +643,7 @@ export function VirtualPreview({useEffect(() => {retryRef.current = { attempts: 0, timer: null };recoveringRef.current = false;+ failedAtSourceTimeRef.current = null;return () => {if (retryRef.current.timer !== null) {window.clearTimeout(retryRef.current.timer);@@ -627,6 +659,7 @@ export function VirtualPreview({useEffect(() => {if (!retryToken) return;retryRef.current.attempts = 0;+ failedAtSourceTimeRef.current = null;reloadActiveSource(false, 0);}, [retryToken]);@@ -683,7 +716,7 @@ export function VirtualPreview({playsInlineonLoadedMetadata={(e) => {setLoadState("ready");- markSourceHealthy();+ markSourceLoaded();// ponytail: forward the raw duration (possibly NaN for// MediaRecorder WebMs) to the parent. handleLoadedMetadata// falls back to a 60s seed when it isn't finite so the@@ -720,7 +753,7 @@ export function VirtualPreview({onWaiting={() => setLoadState("loading")}onCanPlay={() => {setLoadState("ready");- markSourceHealthy();+ markSourceLoaded();}}onError={(e) => {const el = e.currentTarget;@@ -760,6 +793,11 @@ export function VirtualPreview({if (disposition === "retry") {console.warn("[preview] <video> failed, reloading", context);retryRef.current.attempts = attemptsSpent + 1;+ // The bar the reload has to clear before the budget is+ // handed back (see the rAF tick).+ failedAtSourceTimeRef.current = Number.isFinite(el.currentTime)+ ? el.currentTime+ : lastGoodSourceTimeRef.current;// Deliberately no pause(): a 400 ms reload should be a blip// the user never sees, and pausing here would flip the// shell's transport for it. What keeps the rAF fromdiff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.jsonindex bed9ceebf..e272183f6 100644--- a/src/i18n/locales/vi/editor.json+++ b/src/i18n/locales/vi/editor.json@@ -366,7 +366,7 @@"webcamPreview": "Xem trước webcam (kéo để đổi vị trí)","mediaError": {"title": "Xem trước đã dừng",- "description": "Không thể giải mã video. Tệp có thể đã bị di chuyển hoặc vẫn đang được ghi xong — dự án của bạn vẫn nguyên vẹn.",+ "description": "Không thể giải mã video. Tệp có thể đã bị di chuyển hoặc vẫn chưa được ghi xong — dự án của bạn vẫn nguyên vẹn.","retry": "Thử lại","detail": "Chi tiết: {{detail}}"}diff --git a/technical-documentation/architecture/preview.md b/technical-documentation/architecture/preview.mdindex d30bc0002..0a83ac5fd 100644--- a/technical-documentation/architecture/preview.md+++ b/technical-documentation/architecture/preview.md@@ -258,9 +258,15 @@ What replaced it, in two layers:process is still writing reports as unsupported); everything else — includingan `error` event carrying no `MediaError` — rides `RETRY_DELAYS_MS`. Thereload is a plain `load()`: re-assigning `src` first would start a second load- that aborts the first and emit a spurious abort. The budget is reset by a- **successful** load, not by elapsed time — without that, the fourth transient- failure of a long session is terminal, which is #395 with a longer fuse.+ that aborts the first and emit a spurious abort. The budget is re-armed by+ **playing past the position the failure happened at** (tracked in the rAF+ tick). Both obvious alternatives are wrong: never re-arming makes the third+ transient failure of a long session terminal — #395 with a longer fuse — while+ re-arming when the reload *completes* is worse still, because+ `loadedmetadata`/`canplay` prove the header parsed and the decoder is willing,+ not that the bytes that killed us are readable. A truncated recording re-fires+ both on every reload, so that version loops at 400 ms forever and never+ surfaces the card at all.- **Resume through the existing path.** The reload queues `pendingSeekRef` andlets `onLoadedMetadata` restore position and playback — the same path across-asset seek uses, so the component has one resume path rather than two.