/* Local design iteration: progressive disclosure; processing code stays unchanged. */
html.embedded .shell { max-width: none; padding: 0 0 8px; }
.workspace { grid-template-columns: minmax(0, 1fr) minmax(280px, .48fr); box-shadow: none; }
.workspace:not(:has(#video:not([hidden]))) { grid-template-columns: 1fr; }
.workspace:not(:has(#video:not([hidden]))) aside,
.workspace:not(:has(#video:not([hidden]))) .stage-top { display: none; }
.workspace:not(:has(#video:not([hidden]))) .stage { padding: 0; min-height: 0; border: 0; gap: 0; }
.workspace:not(:has(#video:not([hidden]))) .viewport { height: auto; aspect-ratio: 16 / 9; min-height: 300px; }
.empty { background: radial-gradient(ellipse at center, #1b2432, #0d1118 75%); }
.empty .glyph { width: 58px; height: 58px; margin-bottom: 22px; border-radius: 18px; font-size: 26px; }
.empty h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.04em; }
.empty p { max-width: 560px; margin: 6px 0 24px; font-size: 13px; }
.empty .choose { min-width: 164px; min-height: 48px; border-radius: 12px; }
.workspace:has(#video:not([hidden])) .viewport { height: clamp(360px, 42vw, 600px); }
aside { padding: 24px 20px; }
.steps { margin-bottom: 22px; }
.panel-label { font-size: 16px; }
.selection-prompt { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.editor-help { margin: 12px 0 20px; font-size: 12px; color: var(--muted); }
.editor-help summary { cursor: pointer; padding: 8px 0; }
.editor-help summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.editor-help p { margin: 8px 0; }
.editor-help .privacy { margin-top: 8px; padding-top: 8px; }
.secondary-actions { margin-block: 16px; }
.secondary-actions .small-button { font-size: 12px; padding: 8px 10px; }
.run { margin-top: 16px; }
.note { font-size: 12px; }
.processing-details { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 20px; }
@media (max-width: 760px) {
 .workspace { grid-template-columns: 1fr; }
 .workspace:not(:has(#video:not([hidden]))) .viewport { height: 350px; }
 .empty { padding: 24px; }
 .empty p { max-width: 280px; font-size: 12px; }
 .workspace:has(#video:not([hidden])) .viewport { height: 300px; }
 aside { padding: 20px; }
}

/* Active previews keep their source ratio inside a bounded canvas. */
.workspace:has(#video:not([hidden])) .stage { min-width: 0; min-height: 0; }
.workspace:has(#video:not([hidden])) aside { min-width: 0; }
.erase-timeline { padding: 14px; }
.erase-timeline .range-summary { margin-bottom: 0; }
.timeline-tracks { max-height: 240px; overflow-y: auto; }
@media (max-width: 760px) {
 .workspace:has(#video:not([hidden])) .viewport { height: clamp(260px, 65vw, 380px); }
 .workspace:has(#video:not([hidden])) .stage { border-right: 0; }
 .workspace:not(:has(#video:not([hidden]))) .viewport { height: auto; }
}

/* Give names their own row rather than squeezing them beside the timeline. */
.erase-timeline { padding: 16px; }
.erase-timeline h3 { margin: 0 0 14px; font-size: 14px; }
.track-ruler { margin-left: 0; padding-bottom: 8px; font-size: 12px; }
.timeline-tracks { gap: 8px; margin-top: 10px; padding-right: 2px; }
.track-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px; border: 1px solid transparent; }
.track-row.selected { border-color: var(--line); }
.track-label { min-width: 0; padding: 0; white-space: nowrap; font-size: 12px; font-weight: 600; }
.track-times { grid-column: 2; align-self: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.track-lane { grid-column: 1 / -1; height: 32px; }
.track-clip { top: 4px; height: 24px; }
.time-handle { width: 16px; font-size: 16px; }
.track-playhead { top: -2px; bottom: -2px; }
.erase-timeline .range-summary { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
#timelineEmpty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; font-size: 13px; }
.timeline-tracks:empty { display: none; }
@media (max-width: 480px) {
 .track-row { grid-template-columns: minmax(0, 1fr); }
 .track-times { grid-column: 1; text-align: left; }
 .track-lane { grid-column: 1; }
}
