AI media harness for planning, generating, and editing locally
TypeScript
/* ============================================================================
timeline.css — the edit view: scene/media panels, program monitor, clip
inspector, and the multi-track timeline.
Dense scale. An editor is a tool surface, not a form, so it runs smaller
than the rest of the app — the way Premiere, Resolve and Clipchamp do:
toolbars 36px (--chrome-row), the monitor footer 24px (--chrome-row-sm),
ruler 28px, video tracks 88px (thumbnails read at a useful size), audio tracks 56px, caption tracks 32px,
transport and toolbar buttons 24px (--control-sm), track toggles 20px,
captions 12px. The export screen (export.css) uses the same scale.
Surfaces follow the ladder in tokens.css: the side panes on
--surface-pane, every toolbar, the ruler, the track heads and the monitor
footer on --surface-chrome with a --stroke-divider where they meet another
rung, the lanes on --surface-well (every other one --surface-well-alt),
and the program stage on --surface-stage.
Every pane is resizable (Splitter + usePaneSize, which set the --pane-*
variables inline) and the side panes collapse from the timeline toolbar
rather than vanishing at a window width.
========================================================================== */
.timeline-view {
/* Defaults for the pane sizes TimelineView sets inline from usePaneSize. */
--pane-timeline-sources: 296px;
--pane-timeline-inspector: 340px;
--pane-timeline-height: 340px;
--pane-timeline-tracks: 180px;
--toolbar-height: var(--chrome-row);
--ruler-height: 28px;
--track-video-height: 88px;
--track-audio-height: 56px;
--track-caption-height: 32px;
height: 100%;
min-height: 0;
display: grid;
grid-template-rows: minmax(120px, 1fr) auto minmax(120px, var(--pane-timeline-height));
background: var(--layer);
}
/* The view itself is focusable (tabIndex={0}) so its shortcuts reach the
editor wherever the user clicked. Inset so the ring is not clipped. */
.timeline-view:focus-visible {
outline: var(--focus-ring-width) solid var(--focus-outer);
outline-offset: -2px;
box-shadow: inset 0 0 0 3px var(--focus-inner);
}
.edit-panels {
min-height: 0;
display: grid;
/* The side panes shrink toward a floor before the row overflows: with the
agent pane open in a 900px window the content area is ~540px, less than
the two stored pane widths together. */
grid-template-columns: minmax(160px, var(--pane-timeline-sources)) auto minmax(160px, 1fr) auto minmax(220px, var(--pane-timeline-inspector));
}
.edit-panels--no-sources { grid-template-columns: minmax(160px, 1fr) auto minmax(220px, var(--pane-timeline-inspector)); }
.edit-panels--no-inspector { grid-template-columns: minmax(160px, var(--pane-timeline-sources)) auto minmax(160px, 1fr); }
.edit-panels--no-sources.edit-panels--no-inspector { grid-template-columns: minmax(0, 1fr); }
.scene-panel,
.clip-inspector {
min-width: 0;
min-height: 0;
background: var(--surface-pane);
}
.scene-panel {
display: flex;
flex-direction: column;
overflow: hidden;
}
.clip-inspector {
overflow-y: auto;
}
/* --- Sources toolbar ---------------------------------------------------------
One PaneHeader for both views: Scenes / Media as a segmented control,
Import and (on Media) the grid/list toggle on the trailing edge. It is the
page's top bar, so it has the Generator and References command bars'
height (--command-row) and their 32px, 14px controls. */
.scene-panel__toolbar {
height: auto;
min-height: var(--command-row);
flex-wrap: wrap;
padding-block: var(--space-1);
}
.scene-panel__toolbar .ui-selector-bar--compact {
height: var(--control-md);
}
.scene-panel__toolbar .ui-selector-bar--compact .ui-selector-bar__item {
padding: 0 var(--space-2);
font-size: var(--text-base);
line-height: var(--leading-normal);
}
/* Icon-only, like the layout toggles beside it, so it never crowds the
source tabs; the name is in an .sr-only span and the tooltip. */
.scene-panel__import {
width: var(--control-md);
height: var(--control-md);
flex: none;
display: inline-grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: transparent;
transition: var(--transition-control);
}
.scene-panel__import:hover:not(:disabled) { background: var(--fill-subtle-hover); }
.scene-panel__import:active:not(:disabled) { background: var(--fill-subtle-pressed); }
.scene-panel__import:disabled { color: var(--text-disabled); }
.scene-panel__layout {
display: flex;
gap: 2px;
}
/* Icon-only, so each button carries its name in an .sr-only span. The on
state is the shared accent tint (.ui-toggle-button[aria-pressed]). */
.scene-panel__toggle {
width: var(--control-md);
height: var(--control-md);
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-secondary);
background: transparent;
transition: var(--transition-control);
}
.scene-panel__toggle:hover { background: var(--fill-subtle-hover); }
/* --- Scene panel ----------------------------------------------------------- */
.scene-list {
flex: 1 1 auto;
min-height: 0;
padding: 0 0 var(--space-3);
overflow-y: auto;
}
.panel-hint {
margin: var(--space-2) var(--space-2) var(--space-4);
color: var(--text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
}
/* A row in a separated list (.ui-selectable--separated): transparent at rest,
a hairline under it, the accent pill when it is the scene the Generator
has open. No background of its own, or the shared states would lose. */
.scene-card {
width: 100%;
min-height: 64px;
display: grid;
grid-template-columns: 88px minmax(0, 1fr);
gap: var(--space-2);
align-items: center;
padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
border: 0;
border-bottom: 1px solid var(--line);
border-radius: 0;
text-align: left;
color: var(--text-muted);
}
.scene-card:active { background: var(--fill-subtle-pressed); }
.scene-card--navigation { grid-template-columns: 32px minmax(0, 1fr); min-height: 48px; }
.scene-card--navigation > svg { justify-self: center; color: var(--accent); }
/* Flat placeholder with a glyph: no hatching, no invented art. */
.scene-card__thumb {
position: relative;
height: 50px;
display: grid;
place-items: center;
overflow: hidden;
border-radius: var(--radius-sm);
color: var(--text-faint);
background: var(--panel-3);
}
.scene-card__thumb .shot-thumb {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
border-radius: 0;
}
.scene-card__thumb .shot-thumb img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
/* The 88×50 thumbnail has no room for the shot's own status caption
("Rendering 68%", "Waiting to render", the ETA) — the text column beside it
already says the same thing. Keep the glyph and the progress line only. */
.scene-card__thumb .shot-thumb em,
.scene-card__thumb .shot-thumb small {
display: none;
}
/* Flat badges: a dark plate, 2px corners, no glass. Direct children only, so
the rule never reaches into the shot thumbnail's own markup. */
.scene-card__thumb > i,
.scene-card__thumb > em {
position: absolute;
z-index: 2;
padding: 0 var(--space-1);
border-radius: 2px;
color: var(--on-stage);
background: color-mix(in srgb, var(--stage-bg) 60%, transparent);
font-size: var(--text-xs);
font-style: normal;
line-height: 16px;
font-variant-numeric: tabular-nums;
}
.scene-card__thumb > i { left: 2px; top: 2px; }
.scene-card__thumb > em { right: 2px; bottom: 2px; }
.scene-card > span:last-child,
.scene-card b,
.scene-card > span:last-child small {
display: block;
min-width: 0;
}
.scene-card b {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: var(--text-primary);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
}
.scene-card > span:last-child small {
overflow: hidden;
color: var(--text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
text-overflow: ellipsis;
white-space: nowrap;
}
/* The status word with a dot before it, coloured by where the scene is. */
.scene-card__status {
display: inline-flex;
align-items: center;
gap: var(--space-1);
}
.scene-card__status::before {
content: "";
width: 6px;
height: 6px;
flex: none;
border-radius: var(--radius-pill);
background: var(--text-faint);
}
.scene-card__status--generating::before,
.scene-card__status--ready::before { background: var(--accent); }
.scene-card__status--completed::before { background: var(--success); }
.scene-card__status--failed::before { background: var(--danger); }
.scene-add.secondary-button {
width: calc(100% - 2 * var(--space-2));
margin: var(--space-2) var(--space-2) 0;
gap: var(--space-2);
}
/* --- Media panel ----------------------------------------------------------- */
.media-grid {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
display: grid;
grid-template-columns: 1fr 1fr;
/* The rows size to their cards and the panel scrolls: a definite height
divided between auto rows used to collapse every card to a sliver. */
grid-auto-rows: max-content;
align-content: start;
gap: var(--space-2);
padding: var(--space-2) var(--space-2) var(--space-3);
}
.media-grid .panel-hint,
.media-grid__empty {
grid-column: 1 / -1;
}
.media-grid:has(> .media-grid__empty) {
height: 100%;
padding-top: 0;
}
/* A card (.ui-selectable--card): the rest state is set with single-class
selectors (or :where) so the shared hover and selected states — an accent
ring on the card's own edge — still win. */
.media-card__source {
min-width: 0;
min-height: var(--control-sm);
padding: 0 0 var(--space-1);
overflow: hidden;
border: 1px solid var(--stroke-card);
border-radius: var(--radius-sm);
text-align: left;
background: var(--card);
}
.media-grid .media-card__source b,
.media-grid .media-card__source small {
display: block;
padding: 0 var(--space-2);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.media-grid .media-card__source b {
margin-top: var(--space-1);
color: var(--text-primary);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
}
.media-grid .media-card__source small {
color: var(--text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
}
/* A flat plate with a glyph until a real frame arrives. */
.media-thumb {
height: 64px;
min-width: 0;
display: grid;
/* Intrinsic image dimensions must not expand the thumbnail's grid track. */
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr);
place-items: center;
overflow: hidden;
color: var(--text-faint);
background: var(--panel-3);
}
.media-thumb--poster {
padding: 0;
}
.media-thumb--motion { position: relative; }
.media-thumb--motion .motion-canvas {
display: block;
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
object-fit: contain;
}
.media-thumb--poster img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.media-card {
position: relative;
min-width: 0;
}
.media-card__source {
width: 100%;
height: 100%;
}
/* --- Media panel, list layout ---------------------------------------------
One row per file: a small still on the left, name and kind beside it. Same
buttons, same drag behaviour — only the shape changes. */
.media-grid--list {
grid-template-columns: minmax(0, 1fr);
gap: 2px;
}
.media-grid--list .media-card__source {
display: grid;
grid-template-columns: 64px minmax(0, 1fr);
grid-template-rows: auto auto;
align-content: center;
column-gap: var(--space-2);
padding: 0;
}
:where(.media-grid--list) .media-card__source {
border-color: transparent;
background: transparent;
}
.media-grid--list .media-thumb {
grid-row: 1 / 3;
width: 64px;
height: 36px;
border-radius: var(--radius-sm);
}
.media-grid--list .media-card__source b {
align-self: end;
margin-top: 0;
padding-left: 0;
}
.media-grid--list .media-card__source small {
align-self: start;
padding-left: 0;
}
.panel-hint--error {
color: var(--danger);
}
/* --- Program monitor ------------------------------------------------------- */
.program-panel {
min-width: 0;
min-height: 0;
container: program-panel / inline-size;
display: grid;
grid-template-rows: minmax(0, 1fr) auto;
background: var(--surface-stage);
}
/* A flat stage, no dot grid. At a percentage zoom the stage has a fixed size and
this scrolls; `margin: auto` on the stage centres it without clipping the
top-left of a picture larger than the panel. */
.program-canvas {
min-height: 0;
min-width: 0;
overflow: hidden;
display: flex;
background: var(--stage-bg);
}
.program-canvas--zoomed {
overflow: auto;
overscroll-behavior: contain;
}
.program-stage {
position: relative;
width: 100%;
height: 100%;
margin: auto;
container-type: size;
}
/* The picture itself. The panel is the frame; the shot is fitted inside it and
the rest is the project's background colour, so a 9:16 cut looks 9:16 while
it is being cut rather than being stretched to fill a 16:9 panel. */
.program-picture {
position: relative;
width: 100%;
height: 100%;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.program-picture video,
.program-picture img,
.program-picture canvas {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
transform-origin: center;
will-change: transform, opacity, filter, clip-path;
}
/* Timeline-only direct manipulation. The export monitor never receives the
editing callbacks, so none of this chrome can appear in an exported preview. */
.program-transform {
position: absolute;
z-index: 3;
box-sizing: border-box;
border: 1px solid var(--accent-bright);
cursor: move;
touch-action: none;
transform-origin: center;
}
.program-transform::before {
content: "";
position: absolute;
left: 50%;
bottom: 100%;
width: 1px;
height: 18px;
background: var(--accent-bright);
}
.program-transform__rotate,
.program-transform__scale {
position: absolute;
z-index: 1;
width: 12px;
height: 12px;
padding: 0;
border: 1px solid var(--accent-bright);
border-radius: 2px;
background: var(--panel);
touch-action: none;
transition: background-color var(--motion-fast) linear;
}
/* Hover fills the handle, so it is clear which one the press will take. */
.program-transform__rotate:hover,
.program-transform__scale:hover {
background: var(--accent-bright);
}
.program-transform__rotate {
left: 50%;
top: -24px;
translate: -50% 0;
border-radius: var(--radius-pill);
cursor: grab;
}
.program-transform__scale--tl { left: -7px; top: -7px; cursor: nwse-resize; }
.program-transform__scale--tr { right: -7px; top: -7px; cursor: nesw-resize; }
.program-transform__scale--bl { left: -7px; bottom: -7px; cursor: nesw-resize; }
.program-transform__scale--br { right: -7px; bottom: -7px; cursor: nwse-resize; }
.program-transform:active,
.program-transform__rotate:active {
cursor: grabbing;
}
/* What the monitor has to say when there is no picture to show. Over the frame
rather than instead of it, so the black stays black. */
.program-note {
position: absolute;
display: flex;
align-items: center;
gap: var(--space-2);
max-width: min(90%, 480px);
padding: var(--space-1) var(--space-2);
border-radius: var(--radius-sm);
color: var(--on-stage);
font-size: var(--text-xs);
line-height: var(--leading-snug);
background: color-mix(in srgb, var(--stage-bg) 72%, transparent);
}
.program-note--error {
color: var(--stage-alert-ink);
background: var(--stage-alert-bg);
}
/* An empty timeline: the shared empty state, in stage ink — the stage is
dark in both themes. */
.program-empty.ui-empty-state {
height: 100%;
}
.program-empty .ui-empty-state__icon,
.program-empty .ui-empty-state__description {
color: color-mix(in srgb, var(--on-stage) 62%, transparent);
}
.program-empty .ui-empty-state__title {
color: var(--on-stage);
}
/* Title-safe (80%) and action-safe (90%) guides, drawn over the project's
frame: the frame box is the largest box of the project's aspect that fits
the stage (container query units), centred like the picture. */
.program-safe {
position: absolute;
z-index: 4;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
}
.program-safe__frame {
position: relative;
width: min(100cqw, 100cqh * var(--frame-aspect, 1.7778));
aspect-ratio: var(--frame-aspect, 1.7778);
}
.program-safe__action,
.program-safe__title {
position: absolute;
border: 1px dashed color-mix(in srgb, var(--on-stage) 55%, transparent);
}
.program-safe__action { inset: 5%; }
.program-safe__title { inset: 10%; }
/* The monitor's control strip: labelled mono values leading, the zoom and
the safe-area toggle trailing, all at the 24px compact size. */
.program-footer {
min-width: 0;
min-height: var(--chrome-row-sm);
display: flex;
align-items: center;
gap: var(--space-4);
padding: 0 0 0 var(--space-2);
border-top: 1px solid var(--stroke-divider);
color: var(--text-secondary);
background: var(--surface-chrome);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
line-height: 1;
white-space: nowrap;
}
.program-footer__value {
display: inline-flex;
align-items: baseline;
gap: var(--space-1);
font-family: var(--font-mono);
}
.program-footer__label {
color: var(--text-muted);
font-family: var(--font-sans);
}
.program-footer__spacer { flex: 1; }
.program-footer .ui-combo {
height: var(--control-sm);
min-height: 0;
min-width: 72px;
padding: 0 var(--space-1) 0 var(--space-2);
border-radius: var(--radius-sm);
font-size: var(--text-xs);
}
.program-footer__toggle {
width: var(--control-sm);
height: var(--control-sm);
flex: none;
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-secondary);
background: transparent;
transition: var(--transition-control);
}
.program-footer__toggle:hover { background: var(--fill-subtle-hover); }
.program-footer__toggle:disabled { opacity: 0.4; }
/* A narrow monitor keeps the values and drops their labels first. */
@container program-panel (max-width: 360px) {
.program-footer__label { display: none; }
}
/* --- Clip inspector ----------------------------------------------------------
PropSection / PropRow: 28px rows, 12px labels that scrub, reset on the right.
No 40px stacked fields, no spin buttons. */
/* The clip heads the pane (ItemHeader). The name field sits inside a heading
so the pane still has one; the heading itself adds nothing to the look. */
.clip-inspector {
display: flex;
flex-direction: column;
}
.clip-inspector__header {
position: sticky;
top: 0;
z-index: 2;
}
.clip-inspector__heading {
flex: 1;
min-width: 0;
display: flex;
margin: 0;
font: inherit;
}
.clip-inspector__heading .ui-item-header__input:focus {
border-bottom-color: var(--field-focus-line);
outline: none;
}
.clip-inspector__more.icon-button {
width: var(--control-sm);
height: var(--control-sm);
}
.inspector-value {
color: var(--text-primary);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
}
.inspector-timecode {
font-variant-numeric: tabular-nums;
}
.clip-inspector .ui-prop-row__value .text-field {
height: var(--control-sm);
min-height: 0;
padding: 0 var(--space-2);
font-size: var(--text-xs);
}
.inspector-unit {
width: 14px;
flex: none;
color: var(--text-muted);
font-size: var(--text-xs);
}
.inspector-empty.ui-empty-state {
flex: 1;
}
/* --- Effects (ClipEffects) -----------------------------------------------------
Each effect is an Expander-style block: a 32px header with a chevron and
name, Reset and a ⋯ menu, over its parameter rows. */
.clip-effects {
display: grid;
gap: var(--space-1);
}
.clip-effect {
border: 1px solid var(--stroke-card);
border-radius: var(--radius-sm);
background: var(--card);
}
.clip-effect__header {
height: 32px;
display: flex;
align-items: center;
gap: 2px;
padding: 0 var(--space-1) 0 0;
}
.clip-effect__toggle {
flex: 1;
min-width: 0;
height: 100%;
display: flex;
align-items: center;
gap: var(--space-2);
padding: 0 var(--space-2);
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: transparent;
text-align: left;
transition: var(--transition-control);
}
.clip-effect__toggle:hover { background: var(--fill-subtle-hover); }
/* The same chevron as the section above it: down when open, pointing at the
name when closed. */
.clip-effect__chevron {
flex: none;
color: var(--text-secondary);
transform: rotate(-90deg);
transition: transform var(--motion-normal) var(--ease-decelerate);
}
.clip-effect--open .clip-effect__chevron { transform: none; }
/* Semibold, so an effect's name outranks its parameter rows. */
.clip-effect__name {
min-width: 0;
margin: 0;
overflow: hidden;
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
text-overflow: ellipsis;
white-space: nowrap;
}
/* Bypass: the checkbox sits ahead of the chevron, and a switched-off
effect's name reads secondary, the way Premiere dims an fx that is off. */
.clip-effect__bypass {
flex: none;
margin-left: var(--space-2);
padding-block: 0;
}
.clip-effect--bypassed .clip-effect__name {
color: var(--text-secondary);
}
.clip-effect__action {
width: 24px;
height: 24px;
flex: none;
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-secondary);
background: transparent;
transition: var(--transition-control);
}
.clip-effect__action:hover:not(:disabled) {
color: var(--text-primary);
background: var(--fill-subtle-hover);
}
.clip-effect__action:disabled { color: var(--text-disabled); }
.clip-effect__body {
min-width: 0;
margin: 0;
padding: var(--space-1) var(--space-2) var(--space-2);
border: 0;
border-top: 1px solid var(--line);
display: grid;
gap: 2px;
}
.clip-effect__body .ui-slider,
.clip-effect__body input[type="range"] {
flex: 1;
min-width: 0;
}
.clip-effect__value {
min-width: 48px;
flex: none;
color: var(--text-primary);
font-size: var(--text-xs);
font-family: inherit;
font-variant-numeric: tabular-nums;
text-align: right;
}
.clip-effect__file {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--text-primary);
font-size: var(--text-xs);
text-overflow: ellipsis;
white-space: nowrap;
}
.clip-effect__browse.secondary-button {
height: var(--control-sm);
min-height: 0;
gap: var(--space-1);
padding: 0 var(--space-2);
font-size: var(--text-xs);
}
.clip-effect__note {
margin: 0;
padding-left: calc(var(--prop-label) + var(--space-2));
color: var(--text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
}
.clip-effect__note--error { color: var(--danger); }
.clip-effects__add.secondary-button {
gap: var(--space-2);
margin-top: var(--space-1);
}
/* The add-effect Flyout: 28px items, the description in each item's tooltip. */
.clip-effects__picker {
display: grid;
gap: 2px;
padding: var(--space-1);
max-height: min(320px, 50vh);
overflow-y: auto;
}
.clip-effects__item {
height: 28px;
display: flex;
align-items: center;
padding: 0 var(--space-3);
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: transparent;
font-size: var(--text-xs);
text-align: left;
transition: var(--transition-control);
}
.clip-effects__item:hover,
.clip-effects__item:focus-visible { background: var(--fill-subtle-hover); }
/* --- Colour picker (ColorPicker.tsx) --------------------------------------- */
.color-swatch {
width: 24px;
height: 24px;
flex: none;
padding: 0;
border: 1px solid var(--stroke-strong);
border-radius: var(--radius-sm);
}
.color-swatch:disabled { opacity: 0.5; }
.color-picker {
/* The hue strip's gradient, set inline by ColorPicker (colours are data
there, not palette choices). */
--hue-gradient: none;
width: 232px;
display: grid;
gap: var(--space-3);
padding: var(--space-3);
}
.color-picker__area {
position: relative;
height: 144px;
border-radius: var(--radius-sm);
touch-action: none;
cursor: crosshair;
}
.color-picker__thumb {
position: absolute;
width: 14px;
height: 14px;
margin: -7px 0 0 -7px;
border: 2px solid var(--on-stage);
border-radius: var(--radius-pill);
box-shadow: 0 0 0 1px var(--stage-bg);
pointer-events: none;
}
.color-picker__hue.color-picker__hue {
width: 100%;
height: 12px;
margin: 0;
appearance: none;
border-radius: var(--radius-pill);
background: var(--hue-gradient);
}
.color-picker__hue::-webkit-slider-runnable-track {
height: 12px;
border-radius: var(--radius-pill);
background: var(--hue-gradient);
}
.color-picker__hue::-webkit-slider-thumb {
width: 14px;
height: 14px;
margin-top: -1px;
appearance: none;
border: 2px solid var(--on-stage);
border-radius: var(--radius-pill);
background: transparent;
box-shadow: 0 0 0 1px var(--stage-bg);
}
.color-picker__row {
display: flex;
align-items: center;
gap: var(--space-2);
}
.color-picker__preview {
width: 24px;
height: 24px;
flex: none;
border: 1px solid var(--stroke-strong);
border-radius: var(--radius-sm);
}
.color-picker__hex.text-field {
flex: 1;
min-width: 0;
font-family: var(--font-mono);
text-transform: uppercase;
}
/* --- Timeline toolbar ------------------------------------------------------ */
.pro-timeline {
min-width: 0;
min-height: 0;
container: pro-timeline / inline-size;
display: grid;
grid-template-rows: var(--toolbar-height) minmax(0, 1fr);
background: var(--surface-well);
user-select: none;
}
/* Lead | transport | tools. Two equal rails keep the transport on the row's
centre while there is room; the tools rail never goes below its content, so
in a narrow pane (agent open, 900px window) the transport slides left
instead of the tools spilling over it. The lead rail gives up width first. */
.timeline-toolbar {
height: var(--toolbar-height);
min-width: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-2);
border-bottom: 1px solid var(--stroke-divider);
background: var(--surface-chrome);
}
.timeline-toolbar__lead {
min-width: 0;
overflow: hidden;
display: flex;
align-items: center;
gap: var(--space-2);
}
.timeline-toolbar h2 {
min-width: 0;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-primary);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
}
/* The playhead clock, the anchor of the row: mono at 18px so it does not
twitch under playback, the frames a step dimmer. Click it to type a time;
Enter seeks. */
.transport-time {
flex: none;
height: var(--control-sm);
padding: 0 var(--space-1);
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: transparent;
font-family: var(--font-mono);
font-size: var(--text-md);
font-weight: var(--weight-semibold);
font-variant-numeric: tabular-nums;
line-height: 1;
white-space: nowrap;
transition: var(--transition-control);
}
.transport-time__frames { color: var(--text-muted); }
button.transport-time:hover { background: var(--fill-subtle-hover); }
.transport-time--editing.text-field {
width: 148px;
min-height: 0;
height: var(--control-sm);
font-size: var(--text-base);
}
.transport-format {
flex: none;
color: var(--text-muted);
font-size: var(--text-xs);
white-space: nowrap;
}
/* --- Transport -------------------------------------------------------------
Go to start · Frame back · Play/Pause · Frame forward · Go to end. Flat 24px
(--control-sm) squares with 4px corners and a fill-only hover; Play carries
no accent — it is one control of five. */
.timeline-transport {
display: flex;
align-items: center;
justify-content: center;
gap: 2px;
}
.timeline-transport button {
width: var(--control-sm);
height: var(--control-sm);
flex: 0 0 auto;
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: transparent;
transition: var(--transition-control);
}
.timeline-transport button:hover:not(:disabled) { background: var(--fill-subtle-hover); }
.timeline-transport button:active:not(:disabled) { background: var(--fill-subtle-pressed); }
/* A disabled control still has to be legible — its tooltip is the whole
explanation of why it is off. */
.timeline-transport button:disabled { color: var(--text-disabled); }
.transport-rate {
min-width: 28px;
color: var(--accent-bright);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
text-align: center;
}
.timeline-tools {
min-width: 0;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 2px;
}
.timeline-tools button {
height: var(--control-sm);
min-width: var(--control-sm);
flex: none;
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-1);
padding: 0 var(--space-2);
border: 0;
border-radius: var(--radius-sm);
color: var(--text-primary);
background: none;
font-size: var(--text-xs);
line-height: var(--leading-snug);
transition: var(--transition-control);
}
/* The pane toggles are .ui-toggle-button: their on state is the shared
accent tint, so nothing here restates it. */
.timeline-tools button.timeline-tools__icon { padding: 0; }
.timeline-tools button:hover:not(:disabled) { background: var(--fill-subtle-hover); }
.timeline-tools button:active:not(:disabled) { background: var(--fill-subtle-pressed); }
.timeline-tools button:disabled { color: var(--text-disabled); }
.timeline-tools__separator {
width: 1px;
height: 16px;
flex: none;
margin: 0 var(--space-1);
background: var(--line);
}
.timeline-zoom {
width: 88px;
flex: none;
}
/* A narrow timeline (agent pane open in a 900px window): the tools drop to
their icons — the tooltip still names each one — and the lead keeps only
the playhead clock, so nothing in the row overlaps. */
@container pro-timeline (max-width: 760px) {
.timeline-toolbar { gap: var(--space-1); }
.timeline-toolbar h2,
.transport-format { display: none; }
.timeline-tools button:not(.timeline-tools__icon) {
width: var(--control-sm);
gap: 0;
padding: 0;
font-size: 0;
}
.timeline-zoom { width: 64px; }
}
/* --- Track grid ------------------------------------------------------------ */
.timeline-body {
position: relative;
min-width: 0;
min-height: 0;
}
/* Always scrollable both ways: the wheel scrolls the tracks, Shift+wheel
scrolls sideways, Ctrl+wheel zooms (see TimelineView). */
.timeline-grid-scroll {
position: absolute;
inset: 0;
overflow: auto;
}
.timeline-grid-scroll--panning,
.timeline-grid-scroll--panning * { cursor: grabbing !important; }
.timeline-grid {
touch-action: none;
--track-column: var(--pane-timeline-tracks);
position: relative;
display: grid;
grid-template-columns: var(--track-column) minmax(0, 1fr);
grid-template-rows: var(--ruler-height);
grid-auto-rows: auto;
min-width: 100%;
min-height: 100%;
align-content: start;
}
/* The track-header column's splitter rides on the column's right edge. It
sits outside the scroll area, so it stays put while the lanes scroll. */
.timeline-track-splitter.ui-splitter {
position: absolute;
z-index: 12;
top: 0;
bottom: 0;
left: calc(var(--pane-timeline-tracks) - 2px);
}
/* The ruler row stays in view while the tracks scroll under it, and the track
headers stay in view while the lanes scroll sideways. */
.track-corner {
position: sticky;
top: 0;
left: 0;
z-index: 11;
border-right: 1px solid var(--stroke-divider);
border-bottom: 1px solid var(--stroke-divider);
background: var(--surface-chrome);
}
.time-ruler {
position: sticky;
top: 0;
z-index: 8;
overflow: hidden;
border-bottom: 1px solid var(--stroke-divider);
background-color: var(--surface-chrome);
/* Minor ticks, painted rather than rendered: the interval is set inline
from the zoom (background-size), so a frame-level ruler costs nothing. */
background-image: linear-gradient(90deg, var(--text-faint) 1px, transparent 1px);
background-repeat: repeat-x;
background-position: 0 100%;
cursor: default;
}
.time-ruler__tick {
position: absolute;
top: 0;
height: 100%;
padding: 5px 0 0 var(--space-1);
border-left: 1px solid var(--text-muted);
color: var(--text-secondary);
font-family: var(--font-mono);
font-size: var(--text-xs);
font-variant-numeric: tabular-nums;
line-height: 1;
white-space: nowrap;
pointer-events: none;
}
/* The in/out range (I / O). */
.time-ruler__range {
position: absolute;
top: 0;
bottom: 0;
border-left: 2px solid var(--accent);
border-right: 2px solid var(--accent);
background: var(--accent-soft-strong);
pointer-events: none;
}
.track-head {
position: sticky;
left: 0;
z-index: 10;
min-width: 0;
height: var(--track-video-height);
display: grid;
grid-template-columns: auto minmax(0, 1fr) 20px 20px;
align-items: center;
gap: var(--space-1);
padding: 0 var(--space-1) 0 var(--space-2);
border-right: 1px solid var(--stroke-divider);
border-bottom: 1px solid var(--line);
background: var(--surface-chrome);
}
.track-head--audio,
.track-lane--audio {
height: var(--track-audio-height);
}
.track-head--caption,
.track-lane--caption {
height: var(--track-caption-height);
}
/* "V1", "A1", "C1": the track's kind and number, the way every NLE labels a
track — a chip filled in the kind's colour (--track-kind, set inline). */
.track-label {
--track-kind: var(--clip-video);
min-width: 26px;
height: 20px;
display: inline-grid;
place-items: center;
padding: 0 var(--space-1);
border-radius: var(--radius-sm);
color: var(--on-accent);
background: var(--track-kind);
font-family: var(--font-mono);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: 1;
}
/* An editable field that reads as a label until it is used — a border around
every track name would turn the header into a form. */
.track-head .track-name {
width: 100%;
min-width: 0;
height: 20px;
padding: 0 var(--space-1);
border: 1px solid transparent;
border-radius: var(--radius-sm);
overflow: hidden;
color: var(--text-primary);
background: none;
font-family: inherit;
font-size: var(--text-xs);
font-weight: var(--weight-medium);
line-height: 1;
text-overflow: ellipsis;
white-space: nowrap;
}
.track-head .track-name:hover { background: var(--fill-subtle-hover); }
.track-head .track-name:focus {
outline: none;
color: var(--text-primary);
border-color: var(--stroke-control);
border-bottom-color: var(--field-focus-line);
background: var(--fill-input-focus);
}
.track-head button {
width: 20px;
height: 20px;
display: grid;
place-items: center;
padding: 0;
border: 0;
border-radius: var(--radius-sm);
color: var(--text-secondary);
background: none;
transition: var(--transition-control);
}
.track-head button:hover { background: var(--fill-subtle-hover); }
.track-head button.active {
color: var(--text-primary);
background: var(--fill-subtle-pressed);
}
.track-lane {
position: relative;
height: var(--track-video-height);
overflow: hidden;
border-bottom: 1px solid var(--line);
background-color: var(--surface-well);
background-image: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
/* Set by the view from the ruler's own label interval, so the lines line up
with the timecodes above at every zoom. */
background-size: var(--lane-grid, 14.7%) 100%;
}
.track-lane.muted .clip-audio-visualization {
opacity: 0.24;
}
/* Every other lane a step lighter, so a long clip still reads as sitting on
one row. */
.track-lane--alt { background-color: var(--surface-well-alt); }
/* Lit while a compatible media file is held over this lane. A drop target the
user cannot see is a drop target the user will not find. */
.track-lane--drop {
background-color: var(--accent-soft);
box-shadow: inset 0 0 0 1px var(--accent);
}
/* And a lane that cannot take what is being dragged is dimmed for the whole
drag, so "no" is visible before the pointer ever reaches it. */
.track-lane--reject {
opacity: 0.45;
}
/* A locked track: hatched over its clips, and the clips themselves drained
of most of their colour, so "nothing here moves" reads at a glance. */
.track-lane--locked::after {
content: "";
position: absolute;
z-index: 6;
inset: 0;
background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text-primary) 9%, transparent) 0 6px, transparent 6px 12px);
pointer-events: none;
}
.track-lane--locked .timeline-clip {
filter: saturate(0.45);
}
/* --- Clips -----------------------------------------------------------------
Flat: an 18px title strip in the clip's solid colour with white ink (the
kind's glyph, the name, an fx badge), over a body of that colour mixed 62%
into the well. The colour is the clip's own (--clip-color, inline) and
otherwise its kind's (--clip-kind, from the class). Hover changes the fill
only; selected is a 2px accent ring with the trim handles drawn in. */
/* The clip and the two trim handles that ride on it share one box, positioned
on the ruler. They are siblings rather than children of the clip because the
clip is itself a control. */
.clip-slot {
position: absolute;
top: 3px;
bottom: 3px;
min-width: 6px;
}
.clip-slot.selected { z-index: 3; }
/* The clip being dragged rides over everything, including the clip it is being
dropped next to, so the edge being aimed at stays visible. */
.clip-slot--dragging { z-index: 5; }
.timeline-clip {
--clip-kind: var(--clip-video);
--clip-fill: var(--clip-color, var(--clip-kind));
position: absolute;
inset: 0;
overflow: hidden;
padding: 0;
cursor: grab;
border: 1px solid color-mix(in srgb, var(--clip-fill) 75%, var(--stage-bg));
border-radius: var(--radius-sm);
text-align: left;
color: var(--text-primary);
background: color-mix(in srgb, var(--clip-fill) 62%, var(--surface-well));
transition: background-color var(--motion-fast) linear;
}
.timeline-clip--generated { --clip-kind: var(--clip-generated); }
.timeline-clip--image { --clip-kind: var(--clip-image); }
.timeline-clip--audio { --clip-kind: var(--clip-audio); }
.timeline-clip--caption { --clip-kind: var(--clip-caption); }
.timeline-clip:hover {
background: color-mix(in srgb, var(--clip-fill) 74%, var(--surface-well));
}
.timeline-clip.selected {
box-shadow: 0 0 0 2px var(--accent);
}
.timeline-clip__strip {
position: relative;
z-index: 3;
height: 18px;
display: flex;
align-items: center;
gap: var(--space-1);
padding: 0 var(--space-1) 0 var(--space-2);
overflow: hidden;
color: var(--on-accent);
background: var(--clip-fill);
pointer-events: none;
}
.timeline-clip__strip > svg { flex: none; }
.timeline-clip__title {
min-width: 0;
overflow: hidden;
font-size: var(--text-xs);
font-weight: var(--weight-medium);
line-height: 17px;
text-overflow: ellipsis;
white-space: nowrap;
}
/* "fx 2": how many effects the clip carries. Struck through when every one
of them is bypassed. */
.timeline-clip__fx {
flex: none;
margin-left: auto;
padding: 0 var(--space-1);
border-radius: 2px;
background: color-mix(in srgb, var(--stage-bg) 28%, transparent);
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: 14px;
}
.timeline-clip__fx--off {
text-decoration: line-through;
opacity: 0.75;
}
.timeline-clip__thumbnails {
position: absolute;
z-index: 0;
inset: 18px 0 0;
overflow: hidden;
opacity: 0.9;
pointer-events: none;
}
.timeline-clip--has-audio:not(.timeline-clip--audio-only) .timeline-clip__thumbnails {
bottom: 12px;
}
.timeline-clip__thumbnails img {
position: absolute;
top: 0;
height: 100%;
max-width: none;
object-fit: cover;
user-select: none;
}
.clip-audio-visualization {
position: absolute;
z-index: 2;
right: 0;
bottom: 0;
left: 0;
height: 12px;
padding: 1px var(--space-1);
overflow: hidden;
border-top: 1px solid color-mix(in srgb, var(--stage-bg) 30%, transparent);
background: color-mix(in srgb, var(--surface-well) 34%, transparent);
transition: opacity var(--motion-fast) linear;
pointer-events: none;
}
.timeline-clip--audio-only .clip-audio-visualization {
top: 18px;
height: auto;
border-top: 0;
background: transparent;
}
.clip-audio-visualization svg {
display: block;
width: 100%;
height: 100%;
overflow: visible;
}
.clip-audio-visualization__samples {
fill: none;
stroke: color-mix(in srgb, var(--on-accent) 70%, var(--clip-fill, var(--clip-audio)));
stroke-width: 1px;
stroke-linecap: round;
vector-effect: non-scaling-stroke;
}
.clip-audio-visualization.loading {
opacity: 0.48;
}
/* Nothing on a locked track moves, so nothing on it offers the hand that says
it would. */
.timeline-clip--locked {
cursor: default;
}
/* --- Trimming ------------------------------------------------------------------
The handles are hit targets first: 8px of grab area at each end, drawn as
nothing until the pointer is over one, then a 2px inner edge. They sit ON the
clip's edges, so two clips butted together do not stack four handles. */
.clip-handle {
position: absolute;
z-index: 4;
top: 0;
bottom: 0;
width: 8px;
cursor: ew-resize;
background: transparent;
}
.clip-handle--start { left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.clip-handle--end { right: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.clip-handle--start:hover { box-shadow: inset 2px 0 0 var(--text-primary); }
.clip-handle--end:hover { box-shadow: inset -2px 0 0 var(--text-primary); }
/* A selected clip shows its handles: accent bars on both ends, inside the
ring, wider under the pointer. */
.clip-slot.selected .clip-handle--start { box-shadow: inset 4px 0 0 var(--accent); }
.clip-slot.selected .clip-handle--end { box-shadow: inset -4px 0 0 var(--accent); }
.clip-slot.selected .clip-handle--start:hover { box-shadow: inset 6px 0 0 var(--accent-bright); }
.clip-slot.selected .clip-handle--end:hover { box-shadow: inset -6px 0 0 var(--accent-bright); }
/* Selection is off everywhere outside a text field (see base.css), so a drag
only has to say what it IS. */
.timeline-view--dragging,
.timeline-view--dragging .timeline-clip {
cursor: grabbing;
}
/* --- Playhead ----------------------------------------------------------------
A full-height line from the top of the ruler, and a pentagon head (clip-path)
inside the ruler that can be dragged to scrub. */
.timeline-playhead {
position: absolute;
left: var(--track-column);
/* Composite movement independently of the playing video and track paint. */
will-change: transform;
z-index: 9;
top: 0;
bottom: 0;
width: 1px;
margin-left: -0.5px;
background: var(--danger);
pointer-events: none;
}
/* While scrubbing, the time the playhead is at rides beside its head. */
.timeline-playhead__flag {
position: absolute;
top: 1px;
left: 8px;
padding: 0 var(--space-1);
border-radius: 2px;
color: var(--on-accent);
background: var(--danger);
font-family: var(--font-mono);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: 16px;
white-space: nowrap;
}
/* --- Edit feedback ------------------------------------------------------------
The in/out range carried down through the lanes, and the dashed snap line
with what it snapped to while a clip edge is sitting on a target. */
.timeline-range {
position: absolute;
z-index: 7;
top: var(--ruler-height);
bottom: 0;
border-left: 1px solid var(--accent);
border-right: 1px solid var(--accent);
background: var(--accent-soft);
opacity: 0.55;
pointer-events: none;
}
.timeline-snap {
position: absolute;
z-index: 9;
top: var(--ruler-height);
bottom: 0;
border-left: 1px dashed var(--snap);
pointer-events: none;
}
.timeline-snap span {
position: absolute;
bottom: var(--space-1);
left: var(--space-1);
color: var(--snap);
font-family: var(--font-mono);
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: 1;
white-space: nowrap;
}
.timeline-playhead__head {
position: absolute;
top: 0;
left: -6px;
width: 13px;
height: 16px;
background: var(--danger);
clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
cursor: ew-resize;
pointer-events: auto;
}
/* --- Pane splitters ------------------------------------------------------------ */
.edit-panels__splitter.ui-splitter {
background: var(--panel);
}
.timeline-view__splitter.ui-splitter {
background: var(--panel);
}
.program-media { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.program-composited-picture { position: absolute; inset: 0; pointer-events: none; }
.program-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.program-picture > video, .program-picture > img, .program-keyed-picture { position: absolute; inset: 0; }
/* Grading controls share the inspector's compact sizing. */
.grading-curves { display: grid; gap: var(--space-2); min-width: 0; color: var(--text-primary); }
.grading-curves__graph { width: calc(100% - 16px); margin: var(--space-2); aspect-ratio: 1; overflow: visible; touch-action: none; background: var(--fill-subtle-hover); border: 1px solid var(--stroke-control); color: var(--text-primary); }
.grading-curves__grid { stroke: currentColor; opacity: .12; fill: none; }
.grading-curves__baseline { stroke: currentColor; opacity: .3; stroke-dasharray: 4 4; fill: none; }
.grading-curves__line { stroke: currentColor; stroke-width: 2; fill: none; }
.grading-curves__point { fill: currentColor; stroke: var(--panel); stroke-width: 1; cursor: grab; }
.grading-curves__point--selected, .grading-curves__point:focus { stroke: var(--focus-outer); stroke-width: 2; outline: none; }
.grading-curves__coordinates, .grading-curves__actions { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.grading-curves__coordinates label { display: flex; align-items: center; gap: var(--space-1); flex: 1; font-size: var(--text-xs); }
.grading-curves__coordinates .text-field { width: 64px; min-width: 0; height: var(--control-sm); padding: 0 var(--space-1); font-size: var(--text-xs); }
.grading-curves__actions .secondary-button { padding: var(--space-1) var(--space-2); min-height: var(--control-sm); font-size: var(--text-xs); }
.grading-curves .clip-effect__note { padding-left: 0; }
.grading-wheel-section { display: grid; gap: var(--space-2); color: var(--text-primary); }
.grading-wheel-section__heading { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-xs); }
.grading-wheel { position: relative; width: 128px; height: 128px; margin: var(--space-2) auto; border-radius: 50%; touch-action: none; cursor: crosshair; box-shadow: inset 0 0 0 1px var(--stroke-control); }
.grading-wheel:focus-visible { outline: 2px solid var(--focus-outer); outline-offset: 3px; }
.grading-wheel[aria-disabled="true"] { opacity: .4; cursor: default; }
.grading-wheel__center { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--text-secondary); transform: translate(-50%, -50%); }
.grading-wheel__handle { position: absolute; width: 10px; height: 10px; border: 2px solid var(--focus-outer); border-radius: 50%; box-shadow: 0 0 0 1px var(--focus-inner); transform: translate(-50%, -50%); pointer-events: none; }
.generation-effects > .clip-effect__note { padding-left: 0; }
/* Motions share the media layout and preserve transparent backgrounds. */
.program-layer > .motion-canvas { width: 100%; height: 100%; object-fit: contain; }
.motion-source { width: 100%; min-height: 280px; resize: vertical; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.5; white-space: pre; tab-size: 2; }
.motion-edit-surface { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 5; pointer-events: none; }
.motion-handles { position: absolute; inset: 0; pointer-events: none; }
.motion-element { position: absolute; min-width: 8px; min-height: 8px; padding: 0; background: transparent; border: 1px solid transparent; transform-origin: 0 0; pointer-events: auto; cursor: move; touch-action: none; }
.motion-element:hover { border-color: var(--text-secondary); }
.motion-element.is-selected { border: 1px solid var(--accent); }
.motion-resize { position: absolute; width: 10px; height: 10px; right: -5px; bottom: -5px; background: var(--on-accent); border: 1px solid var(--accent); cursor: nwse-resize; }