@font-face { font-family: 'Editor Caption'; src: url('/fonts/DejaVuSans.ttf') format('truetype'); font-display: swap; }

.video-page, .video-workspace {
  --accent: #ae3048; --accent-hover: #8b2239; --tint: #faedf0; --ink: #24232a;
  --muted: #605e68; --line: #e1dfe4; --field: #f7f6f8; --monitor: #202027;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
}
.editor-panel.video-page { max-width: 1192px; margin: clamp(22px,4vw,52px) auto 56px; padding: 0 clamp(16px,3vw,36px); }
.ve-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.video-page .ve-heading h1 { margin: 0; font-size: clamp(27px,3vw,40px); font-weight: 650; letter-spacing: -.045em; text-align: start; }
.ve-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; min-height: 44px; }
.ve-back:hover { color: var(--accent); text-decoration: underline; }
.video-page .ve-start { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 8px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 14px 40px -30px #24182870; text-align: start; }
.ve-start.is-over { outline: 3px dashed var(--accent); outline-offset: 3px; }
.ve-import { padding: clamp(28px,4vw,60px); align-self: center; }
.ve-import-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 15px; }
.ve-import h2 { margin: 0 0 8px; font-size: clamp(26px,3vw,38px); line-height: 1.15; letter-spacing: -.04em; }
.ve-import p { color: var(--muted); font-size: 16px; margin: 0; max-width: 34ch; }
.ve-picker, .ve-example-cta { display: inline-flex; justify-content: center; align-items: center; gap: 10px; font-weight: 600; }
.ve-picker { cursor: pointer; position: relative; margin-top: 24px; color: #fff; background: var(--accent); padding: 12px 20px; border-radius: 10px; min-height: 46px; overflow: hidden; }
.ve-picker:hover { background: var(--accent-hover); }
.ve-picker svg, .ve-example-cta svg { width: 19px; height: 19px; }
.video-page .ve-picker input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; }
.ve-picker input::file-selector-button { cursor: pointer; }
.ve-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.ve-import details { margin-top: 16px; }
.ve-import details p { margin-top: 8px; }
.ve-import .ve-privacy { font-size: 13px; margin-top: 14px; }
.ve-example { position: relative; isolation: isolate; min-height: 300px; border: 0; padding: 20px; overflow: hidden; border-radius: 15px; background: #2c3027; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: start; }
.ve-example img, .ve-example::before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ve-example::before { content: ''; background: linear-gradient(0deg,#110e19a6,transparent 50%); z-index: -1; }
.ve-example-cta { min-height: 44px; padding: 0 16px; background: #fff; color: var(--ink); border-radius: 24px; font-size: 14px; }
.ve-example:hover .ve-example-cta { background: var(--tint); }
.ve-example-length { align-self: flex-end; background: #17171ccb; padding: 3px 8px; border-radius: 5px; font-variant-numeric: tabular-nums; font-size: 13px; }
.video-page [role=status]:empty { margin: 0; min-height: 0; }
.video-page [data-editor-message]:not(:empty) { margin: 16px 0 8px; font-weight: 550; }
.video-page progress { accent-color: var(--accent); max-width: 100%; }
.video-page .editor-actions { gap: 10px; }
.video-page .editor-actions:not(:has(> :not([hidden]))) { display: none; }
.video-page .editor-actions .button-secondary { border: 1px solid var(--line); border-radius: 9px; color: var(--ink); margin-top: 12px; font-size: 14px; min-height: 44px; padding: 10px 16px; }
.video-page .editor-actions [data-render-result] { background: var(--accent); color: white; border-color: var(--accent); }
.video-workspace {
  border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: start;
  overflow: clip; font-size: 14px; line-height: 1.45; box-shadow: 0 14px 40px -30px #24182870;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(264px,29%);
  grid-template-areas: "bar bar" "monitor inspector" "timeline inspector";
}
.video-workspace button { color: inherit; border: 1px solid #cecbd2; border-radius: 8px; padding: 7px 12px; min-height: 40px; background: #fff; font: inherit; font-weight: 550; }
.video-workspace :is(.vw-fields,.vw-tabs,.vw-actions) button:not(:disabled):hover { border-color: #99949d; }
.video-workspace button:disabled { cursor: default; opacity: .42; }
.video-workspace :is(button,input,select):focus-visible, .ve-example:focus-visible { outline: 3px solid #974061; outline-offset: 2px; z-index: 6; }
.video-workspace h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; line-height: 1.25; }
.vw-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.vw-toolbar, .vw-actions, .vw-file, .vw-transport, .vw-timeline-title { display: flex; align-items: center; }
.vw-toolbar { grid-area: bar; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.vw-file { gap: 10px; min-width: 0; }
.vw-file > svg { width: 36px; height: 36px; padding: 8px; border-radius: 9px; color: var(--accent); background: var(--tint); }
.vw-file > div { min-width: 0; }
.vw-file strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-file small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.vw-actions { gap: 5px; }
.vw-actions button, .vw-tabs button, .vw-transport button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.vw-actions :is([data-action=undo],[data-action=redo]) { width: 40px; padding: 0; border-color: transparent; }
.vw-actions .vw-export { color: white; padding-inline: 15px; margin-inline-start: 5px; background: var(--accent); border-color: var(--accent); }
.vw-actions .vw-export:not(:disabled):hover { color: #fff; background: var(--accent-hover); border-color: var(--accent-hover); }
.vw-monitor { grid-area: monitor; display: flex; flex-direction: column; background: var(--monitor); min-width: 0; }
.vw-stage { position: relative; isolation: isolate; height: clamp(238px,32vw,390px); overflow: hidden; background-image: radial-gradient(#ffffff16 .8px,transparent 1px); background-size: 9px 9px; }
.vw-frame, .vw-source, .vw-caption-layer, .vw-crop { position: absolute; }
.vw-frame, .vw-caption-layer { overflow: hidden; }
.vw-frame { background: #000; }
.video-workspace .vw-source :is(video, .vw-color-frame) { position: absolute; top: 50%; left: 50%; display: block; max-width: none; max-height: none; margin: 0; padding: 0; border-radius: 0; object-fit: fill; }
.vw-caption-layer { pointer-events: none; }
.video-workspace .vw-caption { position: absolute; min-height: 0; padding: 0; border: 0; background: transparent; border-radius: 0; cursor: move; touch-action: none; }
.vw-caption canvas { display: block; width: 100%; height: 100%; }
.video-workspace[data-tool=text] .vw-caption:is(:hover,:focus-visible) { outline: 1px dashed #fff; outline-offset: 1px; }
.vw-crop { border: 1px solid white; box-shadow: 0 0 0 200vmax #09121eb3; }
.vw-crop::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right,transparent calc(33.333% - .5px),#ffffff70 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff70 66.666%,transparent calc(66.666% + .5px)),linear-gradient(to bottom,transparent calc(33.333% - .5px),#ffffff70 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff70 66.666%,transparent calc(66.666% + .5px)); }
.vw-crop .vw-crop-move, .vw-crop .vw-corner { position: absolute; background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 0; touch-action: none; }
.vw-crop .vw-crop-move { inset: 0; width: 100%; height: 100%; cursor: move; }
.vw-crop .vw-corner { width: 24px; height: 24px; z-index: 1; }
.vw-corner::after { content: ''; position: absolute; inset: 0; border: solid white; border-width: 0; filter: drop-shadow(0 0 1px #101923); }
.vw-corner[data-handle=nw] { top: 0; left: 0; cursor: nwse-resize; } .vw-corner[data-handle=nw]::after { border-width: 3px 0 0 3px; }
.vw-corner[data-handle=ne] { top: 0; right: 0; cursor: nesw-resize; } .vw-corner[data-handle=ne]::after { border-width: 3px 3px 0 0; }
.vw-corner[data-handle=sw] { bottom: 0; left: 0; cursor: nesw-resize; } .vw-corner[data-handle=sw]::after { border-width: 0 0 3px 3px; }
.vw-corner[data-handle=se] { bottom: 0; right: 0; cursor: nwse-resize; } .vw-corner[data-handle=se]::after { border-width: 0 3px 3px 0; }

.vw-transport { padding: 4px 12px; gap: 6px; color: #fff; background: #25252d; font-variant-numeric: tabular-nums; font-size: 13px; }
.vw-transport [data-action=play] { background: transparent; color: #fff; width: 40px; padding: 0; border: 0; }
.vw-transport [data-action=play]:hover { background: #383840!important; }
.vw-original-length { color: #cfccd5; }
.vw-inspector { grid-area: inspector; min-width: 0; padding: 16px; border-inline-start: 1px solid var(--line); }
.vw-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.vw-tabs button { min-width: 0; justify-content: flex-start; padding: 8px; font-size: 13px; min-height: 42px; border: 1px solid transparent; background: var(--field); }
.vw-tabs button[aria-pressed=true], .vw-fields button[aria-pressed=true] { color: #86223b; border-color: #daa2b0; background: var(--tint); }
.vw-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 10px; margin-top: 12px; }
.vw-hint, .vw-fields > button:not(.vw-preset), .vw-field { grid-column: 1/-1; }
.vw-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.vw-field:has(input[type=number]) { grid-column: auto; }
.vw-fields button[data-control=keep]:not(:disabled) { background: var(--tint); color: #86223b; border-color: #daa2b0; }
.vw-field { display: grid; gap: 5px; grid-template-columns: 1fr auto; min-width: 0; font-size: 13px; font-weight: 550; }
.vw-field :is(input,select) { grid-column: 1/-1; width: 100%; min-width: 0; padding: 7px 9px; min-height: 40px; border: 1px solid #c9c5cd; border-radius: 7px; background: #fff; color: var(--ink); }
.vw-field input[type=range] { padding: 0; cursor: pointer; accent-color: var(--accent); }
.vw-field input[type=color] { padding: 3px; }
.vw-field output, .vw-ruler, .vw-edited-length { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.vw-timeline { grid-area: timeline; min-width: 0; padding: 14px 18px; border-top: 1px solid var(--line); }
.vw-timeline-title { justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vw-track { position: relative; height: 48px; margin: 0 12px; background: var(--monitor); }
.vw-film, .vw-gaps, .vw-selection, .vw-seek, .vw-playhead { position: absolute; inset: 0; }
.vw-film { display: flex; overflow: hidden; }
.vw-film canvas { display: block; width: 12.5%; height: 100%; object-fit: cover; }
.vw-gaps i { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg,#101923c7 0 5px,#354353db 5px 7px); }
.vw-selection { right: auto; border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent); pointer-events: none; }
.vw-seek { display: block; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: crosshair; }
.vw-track:has(.vw-seek:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.vw-playhead { right: auto; width: 2px; background: white; box-shadow: 0 0 2px #101923; pointer-events: none; }
.vw-playhead::before { content: ''; position: absolute; left: -4px; top: -4px; border: 5px solid transparent; border-top: 7px solid #fff; }
.vw-track .vw-handle { position: absolute; width: 28px; height: 100%; min-height: 0; top: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; touch-action: none; }
.vw-handle[data-boundary=start] { transform: translateX(-80%); } .vw-handle[data-boundary=end] { transform: translateX(-20%); }
.vw-handle::after { content: ''; position: absolute; background: #fff; border: 2px solid var(--accent); border-radius: 3px; width: 10px; top: 0; bottom: 0; }
.vw-handle[data-boundary=start]::after { right: 0; } .vw-handle[data-boundary=end]::after { left: 0; }
.vw-ruler { display: flex; justify-content: space-between; gap: 3px; margin-top: 5px; }

@media (max-width: 740px) {
  .video-page .ve-start { grid-template-columns: minmax(0,1fr); }
  .ve-import { padding: 24px; }
  .ve-import-icon { width: 36px; height: 36px; margin-bottom: 8px; }
  .ve-example { min-height: 165px; padding: 14px; }
  .ve-heading { gap: 0 12px; margin-bottom: 12px; }
  .ve-back { font-size: 13px; }
  .video-workspace { display: flex; flex-direction: column; }
  .vw-toolbar { position: sticky; top: 0; z-index: 7; background: white; padding: 6px 8px; }
  .vw-stage { height: auto; aspect-ratio: 16/9; }
  .vw-file { gap: 5px; }
  .vw-file > svg { display: none; }
  .vw-actions { gap: 1px; }
  .vw-actions :is([data-action=undo],[data-action=redo]), .vw-transport [data-action=play] { width: 44px; }
  .vw-actions .vw-export { margin-inline-start: 0; padding-inline: 10px; }
  .video-workspace :is(.vw-actions button,.vw-tabs button,.vw-fields button,.vw-field input,.vw-field select,.vw-transport button) { min-height: 44px; }
  .vw-inspector { padding: 0 14px 14px; border-inline-start: 0; }
  .vw-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); margin-bottom: 14px; }
  .vw-tabs button { flex-direction: column; justify-content: center; gap: 3px; padding: 6px 1px; font-size: 12px; overflow-wrap: anywhere; }
  .vw-timeline { padding: 12px 14px; }
  .vw-fields:has([data-control=keep]) > :is([data-control=keep],[data-control=remove]) { grid-column: auto; height: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .ve-picker,.ve-example-cta,.vw-tabs button,.vw-actions button { transition: background-color .16s, border-color .16s; }
}
