/* Videotöötlus — Claude Design makett „Redaktor 1b" (kolm veergu) + „Muud vaated".
   Pinnad ja tekst saidi teematokenitest. Rakenduse omad tokenid on kolmes kohas
   (hele, käsitsi tume, süsteemi tume), sest saidil --accent-soft/--accent-ring puuduvad. */
:root {
    --vt-playhead: #e03131;
    --vt-clip-bg: #2b2f36;
    --vt-on-accent: #0f1419;   /* mõlema teema aktsent on hele → tume ikoon/tekst (≥8:1) */
    --vt-accent-soft: rgba(0, 209, 178, 0.10);
    --vt-accent-ring: rgba(0, 209, 178, 0.32);
    --vt-danger: #cc0f35;
    --vt-shade: rgba(10, 10, 20, 0.72);
    --vt-r-sm: 6px;
    --vt-r-md: 8px;
    --vt-r-card: 12px;
    --vt-r-lg: 16px;
    --vt-shadow-1: 0 1px 2px rgba(17, 17, 26, .06), 0 4px 12px rgba(17, 17, 26, .08);
    --vt-shadow-2: 0 2px 4px rgba(17, 17, 26, .08), 0 12px 24px rgba(17, 17, 26, .12);
}
[data-theme="dark"] {
    --vt-playhead: #ff6b6b; --vt-clip-bg: #1d2026;
    --vt-accent-soft: rgba(34, 211, 238, 0.10); --vt-accent-ring: rgba(34, 211, 238, 0.35);
    --vt-danger: #ff6b81;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --vt-playhead: #ff6b6b; --vt-clip-bg: #1d2026;
        --vt-accent-soft: rgba(34, 211, 238, 0.10); --vt-accent-ring: rgba(34, 211, 238, 0.35);
        --vt-danger: #ff6b81;
    }
}

#vt-app [hidden] { display: none !important; }

/* ---------- Ühised väikekomponendid ---------- */
.vt-ghost {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--vt-r-md);
    background: transparent; color: var(--text-secondary); cursor: pointer; font: inherit;
    transition: background-color 150ms, color 150ms;
}
.vt-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.vt-ghost:disabled { opacity: .4; cursor: default; background: transparent; }
.vt-ghost-sm { width: 36px; height: 36px; }
.vt-ghost.is-danger:hover { color: var(--vt-danger); }
.vt-badge {
    flex: none; width: 40px; height: 40px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--vt-accent-soft); color: var(--accent-color);
}
.vt-badge-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }
.vt-muted { color: var(--text-secondary); }
.vt-range { width: 100%; accent-color: var(--accent-color); cursor: pointer; }
.vt-group-title { font-size: 14px; font-weight: 600; color: var(--text-primary); padding: 0; margin: 0; }
.vt-section-label { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin: 0 0 12px; }

/* ---------- Projektid ---------- */
.vt-projects .container { max-width: 1040px; }
.vt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.vt-head-title { display: flex; gap: 16px; align-items: center; min-width: 0; }
.vt-h1 { margin-bottom: 4px !important; letter-spacing: -0.01em; }
.vt-lead { color: var(--text-secondary); max-width: 60ch; line-height: 1.5; }
.vt-cta { font-weight: 600; }
.vt-head-actions { margin: 0 !important; }
.vt-notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--vt-r-card); border: 1px solid var(--border-color); background: var(--bg-card); margin-bottom: 24px; color: var(--text-primary); }
.vt-notice.is-danger i { color: var(--vt-danger); margin-top: 3px; }
.vt-empty { text-align: center; padding: 48px 16px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--vt-r-lg); box-shadow: var(--vt-shadow-1); max-width: 560px; margin: 0 auto 32px; }
.vt-empty p { color: var(--text-secondary); margin: 12px 0 16px; }
.vt-plist-wrap { margin-bottom: 32px; }
.vt-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.vt-pcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--vt-r-card); overflow: hidden; transition: transform 150ms cubic-bezier(.4, 0, .2, 1), border-color 150ms; }
.vt-pcard-cover { position: relative; aspect-ratio: 16 / 9; background: var(--vt-clip-bg) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .35); font-size: 24px; }
.vt-pcard-cover.has-image > i { display: none; }
.vt-pcard-dur { position: absolute; right: 8px; bottom: 8px; padding: 0 6px; border-radius: 4px; font-size: 12px; background: rgba(0, 0, 0, .65); color: #fff; font-variant-numeric: tabular-nums; }
.vt-pcard-row { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; }
.vt-pcard-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vt-pcard-link { font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-pcard-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* terve kaart klikitav */
.vt-pcard-link:hover { color: var(--text-primary); }
.vt-pcard-meta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vt-pcard .vt-ghost { position: relative; z-index: 2; color: var(--text-muted); }
.vt-pcard:focus-within { border-color: var(--accent-color); }
@media (hover: hover) { .vt-pcard:hover { transform: translateY(-2px); border-color: var(--border-color); box-shadow: var(--vt-shadow-2); } }
#vt-tts-go { margin-top: 16px; }
/* Mallid */
.vt-tpl-wrap { margin-bottom: 32px; }
.vt-tpl-lead { color: var(--text-secondary); font-size: 14px; max-width: 70ch; margin: -4px 0 12px; }
.vt-tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vt-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 12px 14px 14px; text-align: left; font: inherit; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--vt-r-card); cursor: pointer; transition: transform 150ms cubic-bezier(.4, 0, .2, 1), border-color 150ms; }
.vt-tpl:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.vt-tpl-strip { display: flex; gap: 3px; width: 100%; height: 22px; margin-bottom: 4px; }
.vt-tpl-strip > span { flex: 1; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.vt-tpl-head { display: flex; align-items: center; gap: 4px; }
.vt-tpl-head .icon { color: var(--accent-color); }
.vt-tpl-desc { font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.vt-tpl-meta { font-size: 12px; color: var(--text-muted); }
@media (hover: hover) { .vt-tpl:hover { transform: translateY(-2px); border-color: var(--border-color); box-shadow: var(--vt-shadow-2); } }
.vt-device-note { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 16px; border-radius: var(--vt-r-card); border: 1px solid var(--border-light); background: var(--bg-secondary); color: var(--text-secondary); font-size: 14px; }
.vt-device-note > i { color: var(--text-muted); }
.vt-device-note > p { flex: 1 1 320px; margin: 0; line-height: 1.5; }
.vt-storage { flex: 0 1 200px; display: flex; flex-direction: column; gap: 6px; }
.vt-storage-nums { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vt-storage-bar { height: 6px; border-radius: 999px; background: var(--border-color); overflow: hidden; }
.vt-storage-bar > div { height: 100%; background: var(--accent-color); min-width: 2px; }

/* ---------- Redaktor: kolm veergu ---------- */
.vt-editor {
    --vt-tl-h: 252px;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr) 320px;
    grid-template-rows: 56px minmax(0, 1fr) var(--vt-tl-h);
    grid-template-areas: "bar bar bar" "media stage props" "tl tl tl";
    height: calc(100vh - var(--vt-top, 52px));
    height: calc(100svh - var(--vt-top, 52px));
    min-height: 600px;
    background: var(--bg-primary);
    color: var(--text-primary);
}
@media (min-width: 900px) and (max-width: 1279px) { .vt-editor { grid-template-columns: 224px minmax(0, 1fr) 296px; } }
@media (min-width: 900px) and (max-height: 760px) { .vt-editor { --vt-tl-h: 212px; } }
.vt-editor.is-dropping { outline: 3px dashed var(--accent-color); outline-offset: -6px; }
.vt-tabs, .vt-story-pane { display: none; }

.vt-bar { grid-area: bar; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); min-width: 0; }
.vt-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.vt-name {
    flex: 0 1 auto; width: 360px; min-width: 120px; height: 32px; padding: 0 8px; margin-left: -8px;
    border: 1px solid transparent; border-radius: var(--vt-r-sm); background: transparent;
    font: inherit; font-size: 16px; font-weight: 600; color: var(--text-primary); text-overflow: ellipsis;
    max-width: 360px;
}
@supports (field-sizing: content) { .vt-name { field-sizing: content; width: auto; } }   /* lai sisu järgi (makett); vanemas brauseris 360 px */
.vt-name:hover { border-color: var(--border-color); }
.vt-save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.vt-save-state[data-state="saved"]::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; }
.vt-save-state[data-state="error"] { color: var(--vt-danger); font-weight: 600; }
.vt-bar-group { display: flex; gap: 4px; }
.vt-export-btn { font-weight: 600; }

/* Meedia (vasak) */
.vt-media-pane { grid-area: media; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-color); background: var(--bg-secondary); }
.vt-pane-head { flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 0 16px; }
.vt-pane-title { font-size: 14px; font-weight: 600; margin: 0; }
.vt-pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.vt-import-status { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; margin: 0; }
.vt-media-empty { text-align: center; padding: 32px 12px; border: 2px dashed var(--border-color); border-radius: var(--vt-r-card); color: var(--text-secondary); }
.vt-media-empty > i { font-size: 30px; color: var(--text-muted); }
.vt-media-empty p { margin: 8px 0 12px; font-size: 14px; line-height: 1.5; }
.vt-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vt-media-grid:empty, .vt-media-audio:empty { display: none; }
.vt-mtile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: grab; }
.vt-mtile-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--vt-r-sm); background: var(--vt-clip-bg) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .35); }
.vt-mtile-dur { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 4px; font-size: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-variant-numeric: tabular-nums; }
.vt-mtile-name { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-media-audio { display: flex; flex-direction: column; gap: 4px; }
.vt-arow { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px 0 8px; border-radius: var(--vt-r-md); background: var(--bg-card); border: 1px solid var(--border-light); cursor: grab; min-width: 0; }
.vt-arow > i { flex: none; width: 14px; font-size: 12px; color: var(--text-muted); }
.vt-arow-name { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-arow-dur { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vt-macts { display: flex; gap: 4px; opacity: 0; transition: opacity 150ms; }
.vt-mtile .vt-macts { position: absolute; top: 4px; right: 4px; }
.vt-mtile:hover .vt-macts, .vt-mtile:focus-within .vt-macts, .vt-arow:hover .vt-macts, .vt-arow:focus-within .vt-macts { opacity: 1; }
.vt-mact { width: 28px; height: 28px; border: 0; border-radius: var(--vt-r-sm); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; background: rgba(0, 0, 0, .62); color: #fff; }
.vt-mact:hover { background: rgba(0, 0, 0, .82); }
.vt-arow .vt-mact { background: transparent; color: var(--text-secondary); }
.vt-arow .vt-mact:hover { background: var(--bg-hover); color: var(--text-primary); }
.vt-mact.is-danger:hover { color: var(--vt-danger); }
.vt-capture-row { margin: 0 !important; }
.vt-capture { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(320px, calc(100% - 32px)); padding: 12px; border-radius: var(--vt-r-lg); background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: var(--vt-shadow-2); color: var(--text-primary); display: flex; flex-direction: column; gap: 8px; }
.vt-capture-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vt-cap-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.vt-rec-dot { width: 10px; height: 10px; border-radius: 999px; background: #e03131; animation: vt-pulse 1.2s ease-in-out infinite; }
.vt-capture video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--vt-r-sm); object-fit: contain; }
.vt-capture-btns { margin: 0 !important; }
.vt-drop-hint { margin: auto 0 0; padding: 16px 12px; border: 2px dashed var(--border-color); border-radius: var(--vt-r-card); text-align: center; font-size: 12px; line-height: 1.5; color: var(--text-muted); }

/* Eelvaade (keskel) */
.vt-stage { grid-area: stage; display: flex; flex-direction: column; gap: 12px; padding: 16px 24px; min-height: 0; min-width: 0; }
.vt-preview { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.vt-preview canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.vt-transport { flex: none; display: flex; align-items: center; gap: 12px; }
.vt-play { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--accent-color); color: var(--vt-on-accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.vt-play:hover { background: var(--accent-hover); }
.vt-play .fa-play { margin-left: 2px; }
.vt-time-now { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vt-time-total { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vt-seek { flex: 1; min-width: 60px; }

/* Omadused (parem) */
.vt-props-pane { grid-area: props; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border-color); background: var(--bg-secondary); }
.vt-props { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vt-props-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 24px; }
.vt-props-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-light); }
.vt-props-foot .vt-spacer { flex: 1; }
.vt-props-foot.is-info { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.5; }
.vt-props-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.vt-props-head-text { flex: 1; min-width: 0; }
.vt-props-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-props-sub { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.4; }
.vt-group { display: flex; flex-direction: column; gap: 12px; }
.vt-group.is-tight { gap: 8px; }
.vt-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vt-value { font-size: 12px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.vt-value.is-muted { color: var(--text-muted); }
.vt-sublabel { font-size: 13px; color: var(--text-secondary); }
.vt-help { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.vt-seg { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 4px; }
.vt-seg-btn {
    min-height: 40px; min-width: 0; padding: 4px 6px; display: flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--vt-r-md); border: 1.5px solid var(--border-color); background: transparent;
    color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; text-align: center; line-height: 1.25;
}
.vt-seg-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.vt-seg-btn > i { font-size: 12px; }
.vt-seg-btn[aria-pressed="true"] { border-color: var(--accent-color); background: var(--vt-accent-soft); color: var(--text-primary); font-weight: 600; }
.vt-seg-btn[aria-pressed="true"] > i { color: var(--accent-color); }
.vt-seg-btn.is-tile { flex-direction: column; gap: 6px; padding: 8px 4px; min-height: 72px; font-size: 12px; }
.vt-shape { border: 2px solid var(--text-muted); border-radius: 3px; }
.vt-seg-btn[aria-pressed="true"] .vt-shape { border-color: var(--accent-color); }
.vt-frame { width: 48px; height: 27px; border-radius: 3px; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; padding: 4px 0; box-sizing: border-box; }
.vt-frame > span { width: 28px; height: 3px; border-radius: 2px; background: var(--text-muted); }
.vt-seg-btn[aria-pressed="true"] .vt-frame > span { background: var(--accent-color); width: 32px; }
.vt-font-sample { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.vt-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); justify-items: center; gap: 8px 4px; }
.vt-swatch { position: relative; width: 32px; height: 32px; padding: 0; border-radius: 999px; border: 2px solid var(--border-color); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vt-swatch[aria-pressed="true"], .vt-swatch-custom.is-active { box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--accent-color); }
.vt-swatch-custom { background: conic-gradient(#ff6b6b, #ffd43b, #8ce99a, #74c0fc, #b197fc, #ff6b6b); overflow: hidden; }
.vt-swatch-custom > i { font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); pointer-events: none; }
.vt-swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.vt-swatch-custom:focus-within { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.vt-optlist { display: flex; flex-direction: column; gap: 4px; }
.vt-optlist .vt-seg-btn { justify-content: space-between; padding: 0 12px; text-align: left; }
.vt-optlist .vt-seg-btn > i { display: none; }
.vt-optlist .vt-seg-btn[aria-pressed="true"] > i { display: inline; }
.vt-rot-row, .vt-crop-btns { margin: 0 !important; }
.vt-crop { position: relative; margin: 0 auto; border-radius: var(--vt-r-sm); overflow: hidden; background: var(--vt-clip-bg); touch-action: none; user-select: none; }
.vt-crop-img { display: block; width: 100%; height: 100%; }
.vt-crop-rect { position: absolute; border: 2px solid var(--accent-color); box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); cursor: move; box-sizing: border-box; }
.vt-crop-rect:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.vt-crop-h { position: absolute; width: 14px; height: 14px; background: var(--accent-color); border-radius: 3px; }
.vt-crop-h.is-nw { left: -7px; top: -7px; cursor: nwse-resize; }
.vt-crop-h.is-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.vt-crop-h.is-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.vt-crop-h.is-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.vt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vt-num { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vt-num-box { position: relative; }
.vt-num-box .input { height: 40px; padding-right: 28px; font-variant-numeric: tabular-nums; }
.vt-num-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-muted); pointer-events: none; }
.vt-props textarea.textarea { min-height: 80px; line-height: 1.5; }
.vt-switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.vt-switch-row .switch { flex: none; }
.vt-switch-row input:checked + .slider { background-color: var(--accent-color); }
.vt-switch-row input:focus-visible + .slider { outline: 2px solid var(--accent-color); outline-offset: 2px; }
/* Kärpimisliugur: üks juhtelement kahe otsaga */
.vt-trim { position: relative; height: 40px; border-radius: var(--vt-r-sm); overflow: hidden; background-color: var(--vt-clip-bg); background-repeat: repeat-x; background-size: auto 100%; touch-action: none; cursor: pointer; user-select: none; }
.vt-trim.is-audio { background-color: var(--bg-card); background-image: repeating-linear-gradient(90deg, transparent 0 3px, var(--border-color) 3px 4px); border: 1px solid var(--border-light); }
.vt-trim-shade { position: absolute; top: 0; bottom: 0; background: var(--vt-shade); pointer-events: none; }
.vt-trim-win { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent-color); border-radius: 4px; pointer-events: none; }
.vt-trim-h { position: absolute; top: 0; bottom: 0; width: 14px; cursor: ew-resize; touch-action: none; display: flex; }
.vt-trim-h.is-a { justify-content: flex-start; }                      /* käepidemed akna SEES (makett) */
.vt-trim-h.is-b { justify-content: flex-end; margin-left: -14px; }
.vt-trim-h::before { content: ""; width: 8px; height: 100%; background: var(--accent-color); }
.vt-trim-h.is-a::before { border-radius: 4px 0 0 4px; }
.vt-trim-h.is-b::before { border-radius: 0 4px 4px 0; }
.vt-trim-h:focus-visible { outline: 2px solid var(--text-primary); outline-offset: -2px; }
.vt-trim-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ---------- Ajatelg ---------- */
.vt-timeline { grid-area: tl; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--border-color); background: var(--bg-secondary); }
.vt-tl-tools { flex: none; min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--border-light); }
.vt-tl-tools .button { margin: 0 !important; }
.vt-sep { width: 1px; height: 24px; background: var(--border-color); margin: 0 8px; }
.vt-tools-spacer { flex: 1; }
.vt-zoom { width: 80px; flex: none; }
.vt-rec-btn.is-recording .icon { animation: vt-pulse 1.2s ease-in-out infinite; }
@keyframes vt-pulse { 50% { opacity: .35; } }
.vt-tl-body { flex: 1; min-height: 0; display: flex; overflow-y: auto; }
.vt-tl-labels { flex: none; width: 136px; border-right: 1px solid var(--border-color); align-self: flex-start; }
.vt-tl-label { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); box-sizing: border-box; }
.vt-tl-label > i { width: 14px; color: var(--text-muted); }
.vt-tl-label > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-tl-label.is-main { background: var(--bg-primary); color: var(--text-primary); }
.vt-tl-label.is-ruler { border-bottom-color: var(--border-color); }
.vt-lane-add { flex: none; width: 24px; height: 24px; border: 0; border-radius: var(--vt-r-sm); background: transparent; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.vt-lane-add:hover { background: var(--bg-hover); color: var(--text-primary); }
.vt-tl-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; align-self: flex-start; }
.vt-tl-inner { position: relative; isolation: isolate; user-select: none; -webkit-user-select: none; }   /* sisemised z-indeksid (kuni 700) ei tohi ulatuda modaali (40) kohale */
.vt-tl-ruler { position: absolute; top: 0; left: 0; right: 0; cursor: pointer; border-bottom: 1px solid var(--border-color); }
.vt-tick { position: absolute; top: 0; height: 100%; padding-left: 4px; border-left: 1px solid var(--border-color); font-size: 11px; line-height: 22px; color: var(--text-muted); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.vt-lane { position: absolute; left: 0; right: 0; border-bottom: 1px solid var(--border-light); }
.vt-lane-main { background: var(--bg-primary); }
.vt-lane-empty { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); pointer-events: none; white-space: nowrap; }
.vt-end-mark { position: absolute; top: 24px; bottom: 0; border-left: 2px dashed var(--text-muted); opacity: .5; pointer-events: none; }
.vt-end-label { position: absolute; top: 24px; padding: 2px 0 0 6px; font-size: 11px; color: var(--text-muted); white-space: nowrap; pointer-events: none; }
.vt-item { position: absolute; display: flex; align-items: center; border-radius: var(--vt-r-sm); border: 1px solid var(--border-color); font-size: 12px; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.vt-item:active { cursor: grabbing; }
.vt-item-label { padding: 0 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.vt-item-clip { align-items: flex-end; color: #fff; border-color: transparent; background-color: var(--vt-clip-bg); background-position: left center; background-repeat: repeat-x; background-size: auto 100%; }
.vt-item-clip .vt-item-label { width: 100%; padding: 16px 8px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.vt-item-dur { position: absolute; top: 4px; right: 8px; padding: 0 4px; border-radius: 4px; font-size: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-variant-numeric: tabular-nums; pointer-events: none; }
.vt-item-speed { position: absolute; top: 4px; left: 28px; padding: 0 4px; border-radius: 4px; font-size: 10px; font-weight: 700; background: var(--accent-color); color: var(--vt-on-accent); pointer-events: none; }
.vt-item-clip.is-card { background-image: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .18)); }
.vt-item-mute { position: absolute; top: 6px; left: 10px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; pointer-events: none; }
.vt-xf { position: absolute; left: 0; top: 0; bottom: 0; pointer-events: none; }
.vt-xf-fade { background: linear-gradient(to right, rgba(0, 0, 0, .5), transparent); }
.vt-xf-black { background: linear-gradient(to right, rgba(0, 0, 0, .85), transparent); }
.vt-item-text { background: var(--bg-card); color: var(--text-primary); border-left: 3px solid var(--accent-color); }
.vt-item-audio { gap: 6px; padding-left: 8px; background-color: var(--bg-card); color: var(--text-primary); background-image: repeating-linear-gradient(90deg, transparent 0 3px, var(--border-light) 3px 4px); }
.vt-item-audio .vt-item-label { padding: 0; }
.vt-wave { position: absolute; left: 0; top: 2px; width: 100%; height: calc(100% - 4px); opacity: .5; pointer-events: none; }
.vt-item-audio.has-wave { background-image: none; }
.vt-item-audio > .vt-item-label, .vt-item-audio > i { position: relative; z-index: 1; }
.vt-trim-wave { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; pointer-events: none; }
.vt-trim.has-wave { background-image: none; }
.vt-item-icon { color: var(--text-muted); font-size: 11px; pointer-events: none; flex: none; }
.vt-item-link { margin-left: 6px; font-size: 10px; color: var(--accent-color); pointer-events: none; flex: none; }
.vt-item-audio .vt-item-link { margin-left: 0; }
.vt-item.is-selected { box-shadow: 0 0 0 2px var(--accent-color); z-index: 500 !important; }
.vt-item.is-dragging { opacity: .8; z-index: 600 !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); cursor: grabbing; }
.vt-h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 2; }
.vt-h-l { left: 0; }
.vt-h-r { right: 0; }
.vt-item.is-selected .vt-h { background: var(--accent-color); width: 6px; }
.vt-item.is-selected .vt-h::after { content: ""; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; }   /* puuteala jääb laiaks */
@media (hover: hover) { .vt-item:not(.is-selected):hover .vt-h { background: rgba(255, 255, 255, .25); } }
.vt-trans-badge { position: absolute; z-index: 450;   /* valitud klipi (500) all: selle kärpimisserv jääb haaratavaks */ width: 24px; height: 24px; margin-left: -12px; padding: 0; border-radius: 999px; background: var(--bg-card); border: 1.5px solid var(--accent-color); color: var(--accent-color); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; }
.vt-trans-badge:hover { background: var(--vt-accent-soft); }
.vt-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--vt-playhead); pointer-events: none; z-index: 700; }
.vt-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid var(--vt-playhead); }
.vt-drop-marker { position: absolute; top: 24px; bottom: 0; left: 0; width: 3px; background: var(--accent-color); pointer-events: none; z-index: 650; border-radius: 2px; }

/* ---------- Ekspordi dialoog ---------- */
.vt-dialog { position: relative; z-index: 1; width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; border-radius: var(--vt-r-lg); background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-primary); box-shadow: var(--vt-shadow-2); }
.vt-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 0 24px; }
.vt-dialog-title { font-size: 20px; font-weight: 700; margin: 0; }
.vt-dialog-body { padding: 16px 24px 24px; }
.vt-ex-view { display: flex; flex-direction: column; gap: 24px; }
#vt-ex-progress, #vt-ex-done { gap: 16px; }
.vt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--bg-hover); font-size: 14px; font-variant-numeric: tabular-nums; }
.vt-chip > i { font-size: 11px; color: var(--text-muted); }
.vt-ex-res { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vt-ex-res legend { grid-column: 1 / -1; margin-bottom: 8px; }
.vt-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--vt-r-card); border: 1.5px solid var(--border-color); cursor: pointer; }
.vt-tile input { position: absolute; opacity: 0; pointer-events: none; }
.vt-tile strong { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.vt-tile span { font-size: 14px; color: var(--text-secondary); }
.vt-tile-check { position: absolute; top: 12px; right: 12px; color: var(--accent-color); display: none; }
.vt-tile:has(input:checked) { border-color: var(--accent-color); background: var(--vt-accent-soft); }
.vt-tile:has(input:checked) .vt-tile-check { display: inline; }
.vt-tile:has(input:focus-visible) { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.vt-ex-mem { margin: 0; }
.vt-ex-numbers { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.vt-ex-pct { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.vt-ex-eta { font-size: 14px; color: var(--text-muted); }
.vt-progress { height: 8px; border-radius: 999px; background: var(--border-color); overflow: hidden; }
.vt-progress > div { width: 0; height: 100%; border-radius: 999px; background: var(--accent-color); transition: width 150ms linear; }
.vt-ex-done-row { display: flex; gap: 16px; align-items: center; }
.vt-ex-done-row p { margin: 0; line-height: 1.5; }

/* ---------- Kitsas ekraan: süžeeskeem ---------- */
.vt-sb-section { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.vt-sb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vt-sb-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin: 0; }
.vt-sb-count { font-size: 12px; color: var(--text-muted); }
.vt-sb-empty { font-size: 14px; color: var(--text-muted); margin: 0; }
.vt-sb-card { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 12px; border-radius: var(--vt-r-card); background: var(--bg-card); border: 1.5px solid var(--border-light); cursor: pointer; min-width: 0; }
.vt-sb-card.is-selected { border-color: var(--accent-color); }
.vt-sb-n { flex: none; width: 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vt-sb-thumb { flex: none; width: 56px; height: 40px; border-radius: var(--vt-r-sm); background: var(--vt-clip-bg) center / cover no-repeat; color: rgba(255, 255, 255, .7); display: flex; align-items: center; justify-content: center; }
.vt-sb-thumb.is-plain { background: var(--bg-hover); color: var(--text-muted); }
.vt-sb-body { flex: 1; min-width: 0; }
.vt-sb-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-sb-meta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-sb-card .vt-ghost { width: 44px; height: 44px; }
.vt-sb-trans { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border-color); font-size: 12px; color: var(--text-secondary); }
.vt-sb-trans > i { color: var(--accent-color); font-size: 10px; }
.vt-sb-add { margin: 0 !important; }

@media (pointer: coarse) {
    .vt-swatch { width: 40px; height: 40px; }
    .vt-macts { opacity: 1; }
    .vt-mact { width: 36px; height: 36px; }
    .vt-h { width: 16px; }
    .vt-trim-h { width: 28px; }
    .vt-trim-h.is-b { margin-left: -28px; }
}

@media (max-width: 899px) {
    .vt-editor { display: flex; flex-direction: column; height: auto; min-height: 0; }
    .vt-timeline { display: none; }
    .vt-bar { order: 1; position: sticky; top: 0; z-index: 20; height: auto; min-height: 52px; padding: 4px 8px; gap: 8px; }
    .vt-title { flex-direction: column; align-items: flex-start; gap: 0; }
    .vt-name { flex: none; width: 100%; height: 26px; font-size: 14px; margin-left: -8px; }
    .vt-save-state { padding-left: 1px; }
    .vt-ghost { width: 44px; height: 44px; }
    .vt-export-btn { width: 44px; height: 44px; padding: 0 !important; }
    .vt-export-btn .icon { margin: 0 !important; }
    .vt-export-label { display: none; }
    .vt-stage { order: 2; padding: 12px; gap: 8px; }
    .vt-preview { flex: none; width: 100%; aspect-ratio: var(--vt-ar, 16 / 9); max-height: 55svh; margin: 0 auto; }
    .vt-preview[data-aspect="9:16"] { max-height: 60svh; }
    .vt-transport { gap: 8px; }
    #vt-to-start { display: none; }
    .vt-time-now, .vt-time-total { font-size: 12px; }
    .vt-seek { height: 44px; }
    .vt-tabs { order: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 12px; padding: 4px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--border-light); }
    .vt-tab { height: 40px; border: 0; border-radius: var(--vt-r-md); background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
    .vt-tab.is-active { background: var(--bg-card); color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--accent-color); }
    .vt-panel { order: 4; display: none !important; border: 0 !important; background: transparent !important; }
    .vt-panel.is-active { display: flex !important; flex-direction: column; }
    .vt-story-pane.is-active { display: block !important; padding: 16px 12px; }
    .vt-pane-head { padding: 12px 12px 0; height: auto; }
    .vt-pane-body { overflow: visible; padding: 12px; }
    .vt-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vt-props-body { overflow: visible; padding: 16px 12px; }
    .vt-props-foot { padding: 12px; }
}
@media (max-width: 480px) {
    .vt-redo { display: none; }
    .vt-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
