/* VideoLab — scoped workstation UI. No runtime CSS compiler required.
 *
 * Palette matches the shared CYFARE grey-dark shell (AudioLab / Mapinate):
 * bg #0e1420, panels #131a27, hairlines rgba(148,163,184,.14), accent green.
 */
.vl-page { background: #0e1420; }
.vl-root {
  --vl-bg: var(--color-bg-primary, #0e1420);
  --vl-panel: #131a27;
  --vl-panel-2: #1a2333;
  --vl-panel-3: #161e2e;
  --vl-line: var(--color-border-subtle, rgba(148,163,184,.14));
  --vl-line-strong: rgba(148,163,184,.28);
  --vl-text: var(--color-text-primary, #f2f6fc);
  --vl-text-soft: var(--color-text-secondary, #c6cfe0);
  --vl-muted: var(--color-text-muted, #93a0b6);
  --vl-dim: #7d8ba0;
  --vl-faint: #64748b;
  --vl-accent: var(--color-accent, #00ff88);
  --vl-accent-dark: #04140c;
  --vl-accent-soft: rgba(0,255,136,.1);
  --vl-accent-line: rgba(0,255,136,.34);
  --vl-cyan: var(--color-accent-cyan, #00d4ff);
  --vl-danger: var(--color-accent-red, #ff4757);
  --vl-gold: var(--color-accent-gold, #ffd700);
  --vl-radius: 12px;
  --vl-topbar-h: 64px;
  --vl-media-w: 264px;
  --vl-inspector-w: 288px;
  --vl-timeline-h: 330px;
  --vl-split: 6px;
  position: relative;
  display: grid;
  grid-template-rows: var(--vl-topbar-h) minmax(0, 1fr) var(--vl-split) var(--vl-timeline-h);
  margin-top: var(--cf-nav-h, 64px);
  height: calc(100dvh - var(--cf-nav-h, 64px));
  min-height: 680px;
  overflow: hidden;
  color: var(--vl-text);
  background: var(--vl-bg);
  font-family: var(--font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 13px;
  line-height: 1.4;
  color-scheme: dark;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.vl-root *, .vl-root *::before, .vl-root *::after { box-sizing: border-box; }
.vl-root [hidden] { display: none !important; }
.vl-root button, .vl-root input, .vl-root select, .vl-root textarea { font: inherit; }
.vl-root button { color: inherit; }
.vl-root button, .vl-root select, .vl-root input[type="range"], .vl-root input[type="color"] { cursor: pointer; }
.vl-root input[type="text"], .vl-root input[type="search"], .vl-root input[type="number"], .vl-root textarea { cursor: text; }
.vl-root button:focus-visible, .vl-root input:focus-visible, .vl-root select:focus-visible, .vl-root textarea:focus-visible, .vl-root [tabindex]:focus-visible {
  outline: 2px solid rgba(0,255,136,.7);
  outline-offset: 2px;
}
.vl-root ::selection { color: #04140c; background: var(--vl-accent); }
.vl-root ::-webkit-scrollbar { width: 8px; height: 8px; }
.vl-root ::-webkit-scrollbar-track { background: transparent; }
.vl-root ::-webkit-scrollbar-thumb { background: rgba(148,163,184,.28); border-radius: 10px; }
.vl-root ::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.46); }
.vl-root { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.3) #0e1420; }
.vl-ico { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.vl-root h2, .vl-root h3, .vl-root p { margin: 0; }
.vl-root h2 { font-size: 14px; line-height: 1.2; letter-spacing: -.01em; }
.vl-root h3 { font-size: 12px; }
.vl-root kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; min-height: 20px; padding: 1px 5px;
  border: 1px solid rgba(148,163,184,.28); border-bottom-color: rgba(148,163,184,.44);
  border-radius: 5px; color: var(--vl-text-soft); background: rgba(255,255,255,.05);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.vl-topbar {
  z-index: 30; display: flex; align-items: center; gap: 20px; min-width: 0;
  padding: 0 18px; border-bottom: 1px solid var(--vl-line);
  background: linear-gradient(180deg, #161e2e, #121926); box-shadow: 0 8px 30px rgba(4,8,16,.24);
}
.vl-brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.vl-brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; color: var(--vl-accent-dark); background: var(--vl-accent);
  box-shadow: 0 0 22px rgba(0,255,136,.18);
}
.vl-brand-mark .vl-ico { width: 15px; height: 15px; }
.vl-brand-name { font-size: 13px; font-weight: 520; letter-spacing: .12em; }
.vl-brand-name b { color: var(--vl-accent); font-weight: 800; }
.vl-project { display: flex; flex-direction: column; min-width: 110px; max-width: 190px; }
.vl-project-name {
  width: 100%; min-width: 0; padding: 1px 4px; border: 0; border-radius: 4px;
  color: #e7eef8; background: transparent; font-size: 12px; font-weight: 600;
  text-overflow: ellipsis;
}
.vl-project-name:hover, .vl-project-name:focus { background: rgba(255,255,255,.05); }
.vl-save-status { padding-left: 4px; color: var(--vl-muted); font-size: 9px; white-space: nowrap; }
.vl-save-status.is-saving { color: var(--vl-gold); }
.vl-save-status.is-saved { color: var(--vl-accent); }
.vl-top-sep { width: 1px; height: 22px; background: var(--vl-line); flex: 0 0 auto; }
.vl-transport { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.vl-clock { display: flex; gap: 6px; margin-left: 9px; color: #d9e3f0; font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.vl-clock-sep, #vl-duration { color: #7d8ba0; }
.vl-time-input { width: 7.5ch; min-width: 0; padding: 2px 0; border: 1px solid transparent; border-radius: 4px; color: #d9e3f0; background: transparent; font: inherit; text-align: center; }
.vl-time-input.is-hours { width: 10.5ch; }
.vl-time-input:hover, .vl-time-input:focus { border-color: var(--vl-line); background: rgba(255,255,255,.05); outline: none; }
.vl-top-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.vl-narrow-actions { display: none; align-items: center; gap: 6px; margin-left: auto; }

.vl-btn, .vl-icon-btn, .vl-chip, .vl-text-btn, .vl-play-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 8px; white-space: nowrap; transition: background .16s, color .16s, border-color .16s, transform .16s, opacity .16s;
}
.vl-btn { min-height: 34px; padding: 0 12px; font-size: 11px; font-weight: 650; }
.vl-btn:active, .vl-icon-btn:active, .vl-play-btn:active { transform: translateY(1px); }
.vl-btn:disabled, .vl-icon-btn:disabled, .vl-chip:disabled { opacity: .34; cursor: not-allowed; transform: none; }
.vl-btn-primary { color: var(--vl-accent-dark) !important; background: var(--vl-accent); box-shadow: 0 3px 14px rgba(0,255,136,.12); }
.vl-btn-primary:hover { background: #33ff9f; box-shadow: 0 4px 20px rgba(0,255,136,.2); }
.vl-btn-quiet { border: 1px solid var(--vl-line); color: var(--vl-text-soft); background: rgba(255,255,255,.03); }
.vl-btn-quiet:hover { color: #fff; border-color: var(--vl-line-strong); background: rgba(255,255,255,.07); }
.vl-btn-danger { border: 1px solid rgba(255,71,87,.24); color: #ff818c; background: rgba(255,71,87,.08); }
.vl-btn-danger:hover { background: rgba(255,71,87,.15); }
.vl-icon-btn { width: 32px; height: 32px; padding: 0; color: var(--vl-muted); background: transparent; }
.vl-icon-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.vl-icon-btn[aria-pressed="true"], .vl-icon-btn.is-active { color: var(--vl-accent); background: rgba(0,255,136,.1); }
.vl-play-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; color: var(--vl-accent-dark); background: var(--vl-accent); }
.vl-play-btn:hover { background: #33ff9f; transform: scale(1.035); }
.vl-chip { min-height: 27px; padding: 0 9px; color: var(--vl-muted); background: transparent; font-size: 10px; font-weight: 600; }
.vl-chip .vl-ico { width: 12px; height: 12px; }
.vl-chip:hover { color: #e4ecf6; background: rgba(255,255,255,.05); }
.vl-chip.is-active, .vl-chip[aria-pressed="true"] { color: #b5ffd8; background: rgba(0,255,136,.1); }
.vl-text-btn { padding: 3px 4px; color: var(--vl-muted); background: transparent; font-size: 10px; }
.vl-text-btn .vl-ico { width: 12px; height: 12px; }
.vl-text-btn:hover { color: var(--vl-accent); }
.vl-accent { color: var(--vl-accent); }

/* ── Workspace + resizable panels ─────────────────────────────── */
.vl-workspace {
  display: grid;
  grid-template-columns: var(--vl-media-w) auto minmax(0, 1fr) auto var(--vl-inspector-w);
  grid-template-areas: "media media-split preview inspector-split inspector";
  min-height: 0;
}
.vl-panel { min-width: 0; min-height: 0; background: var(--vl-panel); }
.vl-media-panel { grid-area: media; display: flex; flex-direction: column; border-right: 1px solid var(--vl-line); }
.vl-preview-panel { grid-area: preview; }
.vl-inspector { grid-area: inspector; }
.vl-split-media { grid-area: media-split; }
.vl-split-inspector { grid-area: inspector-split; }

.vl-root.is-media-detached { --vl-media-w: 0px; }
.vl-root.is-inspector-detached { --vl-inspector-w: 0px; }
.vl-root.is-media-detached .vl-split-media,
.vl-root.is-inspector-detached .vl-split-inspector { display: none; }

.vl-splitter {
  position: relative;
  z-index: 26;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: none;
  user-select: none;
}
.vl-splitter::after {
  position: absolute;
  content: "";
  border-radius: 2px;
  background: var(--vl-line);
  transition: background .15s, opacity .15s;
}
.vl-splitter-v { width: var(--vl-split); cursor: col-resize; }
.vl-splitter-v::after { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }
.vl-splitter-h { height: var(--vl-split); cursor: row-resize; }
.vl-splitter-h::after { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.vl-splitter:hover::after,
.vl-splitter.is-active::after,
.vl-splitter:focus-visible::after { background: var(--vl-accent); opacity: .72; }
.vl-root.is-resizing-x, .vl-root.is-resizing-x * { cursor: col-resize !important; }
.vl-root.is-resizing-y, .vl-root.is-resizing-y * { cursor: row-resize !important; }

.vl-panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 63px; padding: 13px 15px 10px; }
.vl-panel-head-actions { display: flex; align-items: center; gap: 2px; }
.vl-panel-head-actions .vl-icon-btn { width: 28px; height: 28px; }
.vl-kicker { display: block; margin-bottom: 4px; color: #7d8ba0; font-size: 8px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.vl-only-drawer { display: none; }

/* Floating panels keep their own geometry; the docked grid column collapses. */
.vl-panel.is-floating {
  position: absolute;
  grid-area: auto;
  z-index: 72;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 1px solid var(--vl-line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--vl-panel);
  box-shadow: 0 24px 70px rgba(3,7,14,.58), 0 0 0 1px rgba(0,255,136,.06);
}
.vl-panel.is-floating .vl-panel-head { cursor: grab; touch-action: none; }
.vl-panel.is-floating .vl-panel-head::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-right: 2px;
  opacity: .75;
  background-image: radial-gradient(circle, rgba(148,163,184,.6) 1px, transparent 1.2px);
  background-size: 4px 4px;
}
.vl-panel.is-dragging-panel .vl-panel-head { cursor: grabbing; }
.vl-panel-resize { display: none; position: absolute; z-index: 6; right: 2px; bottom: 2px; width: 17px; height: 17px; cursor: nwse-resize; touch-action: none; }
.vl-panel.is-floating .vl-panel-resize { display: block; }
.vl-panel-resize::after {
  position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px;
  border-right: 1px solid rgba(148,163,184,.55);
  border-bottom: 1px solid rgba(148,163,184,.55);
  border-radius: 0 0 2px 0;
  content: "";
}

/* ── Media library ───────────────────────────────────────────── */
.vl-import-card {
  display: flex; align-items: center; gap: 11px; margin: 0 13px 12px; padding: 13px 12px;
  border: 1px dashed rgba(0,255,136,.26); border-radius: 11px; text-align: left;
  color: #d6f5e2; background: linear-gradient(135deg, rgba(0,255,136,.07), rgba(0,255,136,.015));
}
.vl-import-card:hover { border-color: rgba(0,255,136,.5); background: rgba(0,255,136,.09); }
.vl-import-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: var(--vl-accent); background: rgba(0,255,136,.1); }
.vl-import-card strong, .vl-import-card small { display: block; }
.vl-import-card strong { margin-bottom: 3px; font-size: 11px; }
.vl-import-progress { margin: -3px 13px 12px; padding: 10px 11px; border: 1px solid rgba(0,255,136,.16); border-radius: 9px; background: rgba(0,255,136,.04); }
.vl-import-progress > div { display: flex; justify-content: space-between; gap: 8px; color: #b2cdbd; font-size: 9px; }
.vl-import-progress progress { display: block; width: 100%; height: 4px; margin: 8px 0 6px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: #22362c; }
.vl-import-progress progress::-webkit-progress-bar { background: #22362c; }
.vl-import-progress progress::-webkit-progress-value { background: var(--vl-accent); }
.vl-import-progress progress::-moz-progress-bar { background: var(--vl-accent); }
.vl-import-progress small { display: block; overflow: hidden; color: var(--vl-dim); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.vl-import-card small { color: #86a394; font-size: 9px; line-height: 1.4; }
.vl-search { position: relative; display: flex; align-items: center; margin: 0 13px 10px; }
.vl-search .vl-ico { position: absolute; left: 10px; width: 13px; height: 13px; color: var(--vl-dim); pointer-events: none; }
.vl-search input {
  width: 100%; height: 33px; padding: 0 10px 0 31px; border: 1px solid var(--vl-line); border-radius: 8px;
  color: #e3ebf5; background: var(--vl-bg); font-size: 10px; outline: none;
}
.vl-search input:focus { border-color: var(--vl-accent-line); }
.vl-search input::placeholder { color: var(--vl-faint); }
.vl-filter-row { display: flex; gap: 2px; padding: 0 11px 9px; border-bottom: 1px solid var(--vl-line); }
.vl-filter-row .vl-chip { flex: 1; padding: 0 4px; }
.vl-media-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: max-content; align-content: start; gap: 9px; flex: 1; min-height: 0; padding: 11px 12px; overflow-y: auto; }
.vl-media-panel.is-populated .vl-import-card { display: none; }
.vl-media-item { position: relative; min-width: 0; border: 1px solid var(--vl-line); border-radius: 9px; overflow: hidden; background: var(--vl-panel-2); cursor: grab; user-select: none; transition: border-color .15s, transform .15s; }
.vl-media-item:hover { border-color: var(--vl-accent-line); transform: translateY(-1px); }
.vl-media-item:active { cursor: grabbing; }
.vl-media-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16/10; color: var(--vl-dim); background: #0b111b; overflow: hidden; }
.vl-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vl-media-thumb.is-graphic img { padding: 4px; object-fit: contain; }
.vl-media-thumb .vl-ico { width: 23px; height: 23px; }
.vl-media-type { position: absolute; left: 5px; bottom: 5px; padding: 2px 4px; border-radius: 4px; color: #e2eaf4; background: rgba(4,9,15,.78); font-size: 7px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(4px); }
.vl-media-add { position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 6px; color: var(--vl-accent-dark); background: var(--vl-accent); opacity: 0; transition: opacity .15s; }
.vl-media-add .vl-ico { width: 12px; height: 12px; }
.vl-media-item:hover .vl-media-add, .vl-media-add:focus-visible { opacity: 1; }
.vl-media-meta { padding: 7px 7px 8px; }
.vl-media-name { display: block; overflow: hidden; color: #ccd7e5; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.vl-media-info { display: block; margin-top: 2px; color: var(--vl-dim); font-size: 8px; }
.vl-media-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-height: 100px; padding: 24px 28px; text-align: center; }
.vl-media-empty > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 13px; color: var(--vl-dim); background: rgba(255,255,255,.04); }
.vl-media-empty strong { margin-bottom: 6px; color: #b8c4d4; font-size: 11px; }
.vl-media-empty p { color: var(--vl-dim); font-size: 9px; line-height: 1.6; }
.vl-media-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; min-height: 40px; padding: 6px 13px; border-top: 1px solid var(--vl-line); color: var(--vl-dim); font-size: 9px; }
.vl-storage-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 27px; padding: 0 13px; border-top: 1px solid var(--vl-line); color: var(--vl-faint); font-size: 8px; }
.vl-storage-foot > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.vl-storage-foot .vl-ico { width: 10px; height: 10px; }
#vl-storage-status { color: #8492a6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
#vl-storage-status.is-warning { color: var(--vl-gold); }

/* ── Preview ─────────────────────────────────────────────────── */
.vl-preview-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0b111b; }
.vl-preview-toolbar { z-index: 2; display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 13px; border-bottom: 1px solid var(--vl-line); background: #111927; }
.vl-format-control, .vl-preview-tools { display: flex; align-items: center; gap: 8px; }
.vl-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--vl-accent); box-shadow: 0 0 8px rgba(0,255,136,.5); }
.vl-select, .vl-input {
  width: 100%; min-width: 0; border: 1px solid var(--vl-line); border-radius: 7px;
  color: #dbe4f0; background: var(--vl-bg); outline: none; font-size: 10px;
}
.vl-select { height: 32px; padding: 0 27px 0 9px; }
.vl-select:focus, .vl-input:focus { border-color: var(--vl-accent-line); }
.vl-select-compact { width: auto; height: 27px; border-color: transparent; background: transparent; color: #aab8ca; font-size: 9px; }
.vl-resolution { color: var(--vl-dim); font: 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.vl-preview-tools .vl-icon-btn { width: 28px; height: 28px; }
.vl-preview-tools .vl-chip { min-height: 26px; }
.vl-stage { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #1b2537 0, #0c131e 58%, #080d15 100%); }
.vl-stage::before { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(circle, black, transparent 80%); }
.vl-canvas-wrap { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; padding: 22px; }
#vl-canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 3px; background: #03060a; box-shadow: 0 18px 65px rgba(0,0,0,.52), 0 0 0 1px rgba(148,163,184,.14); touch-action: none; cursor: default; }
.vl-preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; pointer-events: none; }
.vl-preview-empty > * { pointer-events: auto; }
.vl-empty-orbit { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 15px; border: 1px solid rgba(0,255,136,.16); border-radius: 50%; background: radial-gradient(circle, rgba(0,255,136,.1), transparent 65%); box-shadow: 0 0 0 10px rgba(0,255,136,.02), 0 0 0 22px rgba(0,255,136,.012); }
.vl-empty-orbit span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: var(--vl-accent-dark); background: var(--vl-accent); }
.vl-empty-orbit .vl-ico { width: 15px; height: 15px; }
.vl-preview-empty h2 { margin-bottom: 7px; color: #eef3f9; font-size: clamp(15px, 2vw, 20px); font-weight: 650; letter-spacing: -.035em; }
.vl-preview-empty p { max-width: 330px; margin-bottom: 17px; color: #8a97ab; font-size: 10px; line-height: 1.6; }
.vl-preview-empty .vl-btn { min-height: 35px; }
.vl-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.vl-stage-note { z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 25px; padding: 0 13px; color: #6b7a90; font-size: 8px; }
.vl-export-badge { position: absolute; left: 50%; top: 30px; display: flex; align-items: center; gap: 7px; transform: translateX(-50%); padding: 7px 11px; border: 1px solid rgba(255,71,87,.28); border-radius: 20px; color: #ffd9dd; background: rgba(38,14,19,.88); font-size: 9px; backdrop-filter: blur(10px); }
.vl-export-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--vl-danger); animation: vl-pulse 1.3s infinite; }
@keyframes vl-pulse { 50% { opacity: .35; } }

/* ── Inspector ───────────────────────────────────────────────── */
.vl-inspector { display: flex; flex-direction: column; border-left: 1px solid var(--vl-line); }
.vl-inspector-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.vl-inspector-empty-art { display: grid; place-items: center; width: 51px; height: 51px; margin-bottom: 15px; border: 1px solid var(--vl-line); border-radius: 15px; color: var(--vl-dim); background: linear-gradient(145deg, rgba(255,255,255,.05), transparent); transform: rotate(-4deg); }
.vl-inspector-empty-art .vl-ico { width: 23px; height: 23px; }
.vl-inspector-empty h3 { margin-bottom: 7px; color: #c9d4e2; font-size: 11px; }
.vl-inspector-empty > p { max-width: 205px; margin-bottom: 20px; color: var(--vl-dim); font-size: 9px; line-height: 1.65; }
.vl-shortcut-tip { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 200px; padding: 5px 0; color: #7d8ba0; font-size: 9px; text-align: left; }
.vl-shortcut-tip kbd { min-width: 30px; }
.vl-inspector-body { flex: 1; min-height: 0; padding: 0 14px 18px; overflow-y: auto; }
.vl-insp-identity { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; }
.vl-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; color: var(--vl-accent); background: rgba(0,255,136,.1); font-size: 7px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.vl-input { height: 32px; padding: 0 9px; }
.vl-insp-identity .vl-input { height: 29px; border-color: transparent; background: rgba(255,255,255,.03); font-weight: 600; }
.vl-time-grid, .vl-position-grid, .vl-color-grid, .vl-button-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.vl-time-grid label > span, .vl-color-grid label > span { display: block; margin: 0 0 5px 2px; color: #8b98ac; font-size: 8px; }
.vl-time-grid .vl-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.vl-insp-section { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--vl-line); }
.vl-section-title { display: flex; align-items: center; justify-content: space-between; min-height: 20px; margin-bottom: 9px; }
.vl-section-title h3 { color: #c9d4e2; font-size: 10px; font-weight: 650; }
.vl-section-title > span { color: #6f8a79; font-size: 7px; font-weight: 800; letter-spacing: .1em; }

.vl-smart-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px; padding: 10px; border: 1px solid rgba(0,212,255,.2); border-radius: 9px; text-align: left; color: #d2f1fb; background: linear-gradient(120deg, rgba(0,212,255,.1), rgba(0,212,255,.02)); }
.vl-smart-btn:hover { border-color: rgba(0,212,255,.42); background: rgba(0,212,255,.13); }
.vl-smart-spark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--vl-cyan); background: rgba(0,212,255,.1); }
.vl-smart-btn strong, .vl-smart-btn small { display: block; }
.vl-smart-btn strong { margin-bottom: 2px; font-size: 10px; }
.vl-smart-btn small { color: #7e9ba8; font-size: 8px; }
.vl-button-pair .vl-btn { padding: 0 7px; font-size: 9px; }
.vl-textarea { min-height: 68px; padding: 8px 9px; resize: vertical; line-height: 1.5; }
.vl-text-align { grid-template-columns: repeat(3,1fr); margin: 8px 0; }
.vl-text-align .vl-chip { border: 1px solid var(--vl-line); }
.vl-title-presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.vl-title-presets .vl-chip { min-height: 30px; border: 1px solid var(--vl-line); }
.vl-field { display: block; min-width: 0; margin-top: 10px; }
.vl-field > span { display: flex; align-items: center; justify-content: space-between; margin: 0 1px 6px; color: #8b98ac; font-size: 9px; }
.vl-field output { color: #c2cdda; font: 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.vl-field-note { margin-top: 7px; color: #77859a; font-size: 8px; line-height: 1.55; }
.vl-inspector-tip { margin-top: 14px; }
.vl-root input[type="range"] { width: 100%; height: 14px; margin: 0; padding: 0; appearance: none; background: transparent; }
.vl-root input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: #2a3446; }
.vl-root input[type="range"]::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; border: 2px solid #101725; border-radius: 50%; appearance: none; background: #ccd6e2; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.vl-root input[type="range"]:hover::-webkit-slider-thumb { background: var(--vl-accent); }
.vl-root input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: #2a3446; }
.vl-root input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #101725; border-radius: 50%; background: #ccd6e2; }
.vl-color-grid label { padding: 8px; border: 1px solid var(--vl-line); border-radius: 8px; background: rgba(255,255,255,.02); }
.vl-root input[type="color"] { width: 100%; height: 25px; padding: 0; border: 0; border-radius: 5px; background: transparent; }
.vl-presets { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; }
.vl-preset { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; color: var(--vl-dim); background: transparent; font-size: 7px; }
.vl-preset i { display: block; width: 100%; aspect-ratio: 1.3; border: 2px solid transparent; border-radius: 6px; background-color: #313d50; transition: border-color .15s, transform .15s; }
.vl-preset:hover i { transform: translateY(-1px); }
.vl-preset.is-active { color: #d6f5e5; }
.vl-preset.is-active i { border-color: var(--vl-accent); }
.vl-preset-original { background-image: linear-gradient(135deg,#7d8ba0,#323d4e); }
.vl-preset-vivid { background-image: linear-gradient(135deg,#e99d64,#7454a6 55%,#47a9a1); }
.vl-preset-cinema { background-image: linear-gradient(135deg,#c49863,#283a4a 70%); }
.vl-preset-warm { background-image: linear-gradient(135deg,#e8aa6c,#8c4e3e); }
.vl-preset-mono { background-image: linear-gradient(135deg,#ddd,#333); }
.vl-position-grid { gap: 10px; }
.vl-insp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vl-insp-actions .vl-btn { padding: 0 8px; font-size: 9px; }

/* ── Timeline ────────────────────────────────────────────────── */
.vl-timeline { position: relative; z-index: 20; display: grid; grid-template-rows: 47px minmax(0,1fr) 27px; min-width: 0; min-height: 0; border-top: 1px solid var(--vl-line); background: #111927; box-shadow: 0 -10px 35px rgba(3,7,14,.2); }
.vl-timeline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--vl-line); }
.vl-edit-tools, .vl-timeline-tools { display: flex; align-items: center; gap: 5px; }
.vl-toolbar-label { margin-right: 7px; color: #c9d4e2; font-size: 10px; font-weight: 650; }
.vl-timeline-toolbar .vl-btn { min-height: 28px; padding: 0 9px; font-size: 9px; }
.vl-timeline-toolbar .vl-btn .vl-ico { width: 12px; height: 12px; }
.vl-timeline-toolbar .vl-icon-btn { width: 27px; height: 27px; }
.vl-timeline-toolbar .vl-icon-btn .vl-ico { width: 12px; height: 12px; }
.vl-timeline-body { display: grid; grid-template-columns: 148px minmax(0,1fr); grid-template-rows: minmax(0,1fr); min-height: 0; overflow: hidden; }
.vl-track-labels { z-index: 12; min-height: 0; padding-top: 30px; overflow: hidden; border-right: 1px solid var(--vl-line); background: var(--vl-panel); box-shadow: 7px 0 18px rgba(3,7,14,.16); }
.vl-track-label { display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 9px 0 13px; border-bottom: 1px solid var(--vl-line); }
.vl-track-label > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vl-track-label .vl-ico { width: 13px; height: 13px; color: var(--vl-dim); }
.vl-track-label strong { display: block; color: #a4b0c1; font-size: 9px; font-weight: 600; }
.vl-track-label small { display: block; margin-top: 1px; color: #6b7a90; font-size: 7px; }
.vl-track-actions { display: flex; gap: 1px; }
.vl-track-action { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; color: #69788e; background: transparent; font-size: 8px; font-weight: 700; }
.vl-track-action:hover { color: #d3dce8; background: rgba(255,255,255,.06); }
.vl-track-action[aria-pressed="true"] { color: var(--vl-danger); background: rgba(255,71,87,.1); }

.vl-timeline-scroll { min-width: 0; min-height: 0; overflow: auto; background: #0c121b; }
.vl-timeline-content { position: relative; min-width: 100%; min-height: 100%; }
.vl-ruler { position: relative; z-index: 8; height: 30px; border-bottom: 1px solid var(--vl-line); background: #101725; cursor: ew-resize; }
#vl-ruler-canvas { display: block; width: 100%; height: 30px; }
.vl-track-rows { position: relative; }
.vl-track-row { position: relative; height: 54px; border-bottom: 1px solid var(--vl-line); background-image: linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 50px 100%; }
.vl-track-row:nth-child(even) { background-color: rgba(255,255,255,.012); }
.vl-track-row.is-drag-over { background-color: rgba(0,255,136,.06); box-shadow: inset 0 0 0 1px rgba(0,255,136,.22); }
.vl-track-row.is-muted .vl-clip { opacity: .45; }
.vl-clip { position: absolute; top: 5px; bottom: 5px; min-width: 8px; border: 1px solid rgba(120,160,255,.24); border-radius: 7px; overflow: hidden; color: #e7edf6; background: linear-gradient(135deg, #283a57, #1e2b40); box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: grab; user-select: none; touch-action: none; }
.vl-clip:hover { border-color: rgba(170,195,235,.5); }
.vl-clip.is-selected { z-index: 4; border-color: var(--vl-accent); box-shadow: 0 0 0 1px var(--vl-accent), 0 3px 14px rgba(0,0,0,.28); }
.vl-clip.is-dragging { cursor: grabbing; opacity: .82; }
.vl-clip[data-kind="text"] { border-color: rgba(184,41,221,.34); background: linear-gradient(135deg,#433863,#30294c); }
.vl-clip[data-kind="image"] { border-color: rgba(50,220,190,.3); background: linear-gradient(135deg,#24483f,#1c3733); }
.vl-clip[data-kind="audio"] { border-color: rgba(255,190,90,.3); background: linear-gradient(135deg,#4a3b29,#352d24); }
.vl-clip-bg { position: absolute; inset: 0; opacity: .22; background-position: center; background-size: cover; pointer-events: none; }
.vl-clip[data-kind="audio"] .vl-clip-bg { opacity: .18; background-image: repeating-linear-gradient(90deg, transparent 0 2px, #ffd38c 2px 3px, transparent 3px 6px); background-size: 6px 65%; background-repeat: repeat-x; background-position: center; }
.vl-clip-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 10px; pointer-events: none; }
.vl-clip-name { overflow: hidden; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.vl-clip-meta { margin-top: 2px; color: rgba(255,255,255,.55); font-size: 7px; white-space: nowrap; }
.vl-clip-fade { position: absolute; top: 0; bottom: 0; z-index: 2; width: 0; pointer-events: none; opacity: .45; }
.vl-clip-fade-in { left: 0; background: linear-gradient(90deg,#05070a,transparent); }
.vl-clip-fade-out { right: 0; background: linear-gradient(-90deg,#05070a,transparent); }
.vl-clip-handle { position: absolute; z-index: 5; top: 0; bottom: 0; width: 9px; padding: 0; border: 0; background: transparent; cursor: ew-resize; touch-action: none; }
.vl-clip-handle::after { position: absolute; top: 50%; width: 2px; height: 14px; border-radius: 2px; content: ""; background: rgba(255,255,255,.45); transform: translateY(-50%); opacity: 0; }
.vl-clip-handle:hover::after, .vl-clip.is-selected .vl-clip-handle::after { opacity: 1; }
.vl-clip-handle-left { left: 0; }
.vl-clip-handle-left::after { left: 3px; }
.vl-clip-handle-right { right: 0; }
.vl-clip-handle-right::after { right: 3px; }
.vl-playhead { position: absolute; z-index: 18; top: 0; bottom: 0; left: 0; width: 1px; background: var(--vl-danger); pointer-events: none; box-shadow: 0 0 6px rgba(255,71,87,.3); }
.vl-playhead > span { position: absolute; top: 0; left: -5px; width: 11px; height: 10px; border-radius: 2px 2px 5px 5px; background: var(--vl-danger); }
.vl-snap-guide { position: absolute; z-index: 17; top: 0; bottom: 0; left: 0; width: 1px; background: var(--vl-accent); box-shadow: 0 0 7px rgba(0,255,136,.46); pointer-events: none; }
.vl-timeline-tooltip { position: absolute; z-index: 45; max-width: calc(100% - 16px); padding: 6px 9px; border: 1px solid var(--vl-accent-line); border-radius: 7px; color: #e4f7ec; background: rgba(16,23,37,.97); box-shadow: 0 8px 24px rgba(0,0,0,.36); font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; pointer-events: none; }
.vl-timeline-foot { display: flex; align-items: center; gap: 15px; padding: 0 12px; border-top: 1px solid var(--vl-line); color: #6b7a90; font-size: 8px; }
.vl-timeline-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.vl-timeline-foot kbd { min-width: 16px; min-height: 15px; padding: 0 3px; font-size: 7px; }
.vl-foot-privacy { margin-left: auto; color: #7f9c8f !important; }
.vl-foot-privacy .vl-ico { width: 10px; height: 10px; }

/* ── Overlays, toasts, dialogs ───────────────────────────────── */
.vl-drawer-backdrop { position: absolute; z-index: 55; inset: 0; background: rgba(4,8,16,.7); backdrop-filter: blur(3px); }
.vl-drop-overlay { position: absolute; z-index: 90; inset: 10px; display: grid; place-items: center; border: 2px dashed rgba(0,255,136,.5); border-radius: 16px; background: rgba(8,15,12,.88); backdrop-filter: blur(14px); pointer-events: none; }
.vl-drop-overlay > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vl-drop-overlay > div > span { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 5px; border-radius: 18px; color: var(--vl-accent); background: rgba(0,255,136,.1); }
.vl-drop-overlay .vl-ico { width: 29px; height: 29px; }
.vl-drop-overlay strong { color: #e4f7ec; font-size: 19px; }
.vl-drop-overlay small { color: #8fb39f; font-size: 10px; }
.vl-media-host { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.vl-toast-host { position: absolute; z-index: 120; right: 16px; bottom: calc(var(--vl-timeline-h) + var(--vl-split) + 12px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.vl-toast { display: flex; align-items: center; gap: 10px; max-width: min(360px,calc(100vw - 32px)); padding: 11px 12px; border: 1px solid rgba(148,163,184,.22); border-left: 2px solid var(--toast-accent,var(--vl-accent)); border-radius: 10px; color: #e6edf6; background: rgba(20,29,44,.97); box-shadow: 0 12px 35px rgba(0,0,0,.4); font-size: 10px; pointer-events: auto; backdrop-filter: blur(12px); animation: vl-toast-in .2s ease-out; }
.vl-toast-close { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; color: var(--vl-dim); background: transparent; }
.vl-toast-close:hover { color: #fff; background: rgba(255,255,255,.07); }
.vl-toast-action { min-height: 26px; padding: 0 8px; border: 1px solid rgba(0,255,136,.24); border-radius: 6px; color: var(--vl-accent); background: rgba(0,255,136,.08); font-size: 9px; font-weight: 700; }
.vl-toast-action:hover { background: rgba(0,255,136,.15); }
.vl-toast.leaving { opacity: 0; transform: translateY(4px); transition: .2s; }
@keyframes vl-toast-in { from { opacity: 0; transform: translateY(6px); } }

.vl-dialog { width: min(620px,calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--vl-line-strong); border-radius: 16px; color: var(--vl-text); background: #151e2d; box-shadow: 0 30px 100px rgba(0,0,0,.68); overflow: auto; }
.vl-dialog::backdrop { background: rgba(4,8,16,.76); backdrop-filter: blur(8px); }
.vl-dialog[open] { animation: vl-dialog-in .2s ease-out; }
@keyframes vl-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.vl-dialog-card { padding: 22px; }
.vl-dialog-small { width: min(450px,calc(100vw - 28px)); }
.vl-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.vl-dialog-head h2 { font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.vl-dialog-intro { color: #93a0b6; font-size: 11px; line-height: 1.65; }
.vl-export-summary { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 13px; border: 1px solid var(--vl-line); border-radius: 10px; background: rgba(255,255,255,.03); }
.vl-export-summary > span { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; color: var(--vl-accent); background: rgba(0,255,136,.1); }
.vl-export-summary strong, .vl-export-summary small { display: block; }
.vl-export-summary strong { margin-bottom: 3px; font-size: 11px; }
.vl-export-summary small { color: var(--vl-dim); font-size: 9px; }
.vl-export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.vl-export-grid .vl-field > span { font-size: 10px; }
.vl-export-estimate { display: block; margin-top: 12px; color: var(--vl-dim); font-size: 9px; line-height: 1.5; }
.vl-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--vl-line); }
.vl-export-progress { margin-top: 18px; padding: 13px; border-radius: 10px; background: rgba(0,255,136,.05); }
.vl-export-progress > div { display: flex; justify-content: space-between; margin-bottom: 8px; color: #b2cdbd; font-size: 10px; }
.vl-export-progress progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; appearance: none; background: #22362c; }
.vl-export-progress progress::-webkit-progress-bar { background: #22362c; }
.vl-export-progress progress::-webkit-progress-value { border-radius: 5px; background: var(--vl-accent); }
.vl-export-progress progress::-moz-progress-bar { border-radius: 5px; background: var(--vl-accent); }
.vl-export-progress small { display: block; margin-top: 8px; color: #7d9c8a; font-size: 8px; }
.vl-export-error { margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(255,71,87,.26); border-radius: 8px; color: #f6a6ae; background: rgba(255,71,87,.08); font-size: 10px; line-height: 1.5; }
.vl-help-card { padding: 24px; }
.vl-help-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 20px 0; }
.vl-help-steps > div { padding: 13px; border: 1px solid var(--vl-line); border-radius: 10px; background: rgba(255,255,255,.02); }
.vl-help-steps b { display: grid; place-items: center; width: 23px; height: 23px; margin-bottom: 10px; border-radius: 7px; color: var(--vl-accent-dark); background: var(--vl-accent); font-size: 10px; }
.vl-help-steps strong, .vl-help-steps small { display: block; }
.vl-help-steps strong { margin-bottom: 5px; font-size: 10px; }
.vl-help-steps small { color: var(--vl-dim); font-size: 9px; line-height: 1.5; }
.vl-shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; margin-bottom: 18px; padding: 14px; border-radius: 10px; background: var(--vl-bg); }
.vl-shortcut-grid > span { display: flex; align-items: center; gap: 8px; color: var(--vl-muted); font-size: 9px; }
.vl-shortcut-grid kbd { min-width: 55px; }
.vl-more-list { display: grid; gap: 7px; margin-top: 18px; }
.vl-more-list .vl-btn { justify-content: flex-start; min-height: 42px; padding: 0 13px; }
.vl-more-list .vl-btn[aria-pressed="true"] { color: var(--vl-accent); border-color: rgba(0,255,136,.24); background: rgba(0,255,136,.08); }
.vl-root.is-exporting .vl-workspace, .vl-root.is-exporting .vl-timeline, .vl-root.is-exporting .vl-splitter { pointer-events: none; }
.vl-root.is-exporting #vl-canvas { pointer-events: none; }

/* ── Media selection, quick actions and preview player ─────────── */
.vl-media-selection { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 6px 12px; border-bottom: 1px solid rgba(0,255,136,.16); background: rgba(0,255,136,.055); color: #b8dcc8; font-size: 9px; }
.vl-media-selection-actions { display: flex; align-items: center; gap: 1px; }
.vl-media-selection .vl-text-btn { color: #b8dcc8; }
.vl-media-foot-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1px 2px; }
.vl-media-foot .vl-text-btn { gap: 4px; }
.vl-media-item.is-selected { border-color: var(--vl-accent); box-shadow: inset 0 0 0 1px var(--vl-accent); }
.vl-media-item.is-selected::after { content: "✓"; position: absolute; z-index: 4; top: 5px; left: 5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--vl-accent-dark); background: var(--vl-accent); font-size: 10px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.vl-media-preview { position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: var(--vl-accent-dark); background: rgba(0,255,136,.92); opacity: 0; pointer-events: none; transform: translate(-50%,-50%); box-shadow: 0 4px 14px rgba(0,0,0,.4); transition: opacity .15s, transform .15s; }
.vl-media-preview .vl-ico { width: 13px; height: 13px; }
.vl-media-item:hover .vl-media-preview, .vl-media-preview:focus-visible { opacity: 1; pointer-events: auto; }
.vl-media-remove { position: absolute; z-index: 3; right: 32px; top: 5px; display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 1px solid rgba(255,71,87,.3); border-radius: 6px; color: #ff8b95; background: rgba(24,9,12,.8); opacity: 0; transition: opacity .15s, background .15s; }
.vl-media-remove .vl-ico { width: 11px; height: 11px; }
.vl-media-remove:hover { background: rgba(255,71,87,.2); }
.vl-media-item:hover .vl-media-remove, .vl-media-remove:focus-visible, .vl-media-item.is-selected .vl-media-remove { opacity: 1; }
.vl-media-selection:not([hidden]) + .vl-media-list { border-top: 0; }
.vl-media-preview-dialog { width: min(720px,calc(100vw - 28px)); }
.vl-media-preview-dialog .vl-dialog-head > div { min-width: 0; }
.vl-media-preview-dialog .vl-dialog-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-media-preview-stage { display: grid; place-items: center; min-height: 220px; max-height: min(52vh,460px); padding: 12px; border: 1px solid var(--vl-line); border-radius: 12px; background: #0b111b; overflow: hidden; }
.vl-media-preview-stage video, .vl-media-preview-stage img { max-width: 100%; max-height: min(48vh,420px); border-radius: 6px; background: #03060a; }
.vl-media-preview-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; padding: 20px; }
.vl-media-preview-audio .vl-ico { width: 44px; height: 44px; color: var(--vl-accent); }
.vl-media-preview-audio audio { width: min(420px,100%); }
.vl-media-preview-meta { margin-top: 10px; color: var(--vl-dim); font-size: 9px; }

/* ── Asset studio ───────────────────────────────────────────────── */
.vl-assets-dialog { width: min(780px,calc(100vw - 28px)); }
.vl-asset-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--vl-line); }
.vl-asset-tabs .vl-chip { border: 1px solid transparent; }
.vl-asset-tabs .vl-chip.is-active { border-color: rgba(0,255,136,.26); }
.vl-asset-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.vl-asset-search { flex: 1 1 190px; margin: 0; }
.vl-asset-search input { height: 34px; }
.vl-asset-categories { display: flex; flex-wrap: wrap; gap: 3px; }
.vl-asset-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(92px,1fr)); gap: 8px; max-height: min(48vh,420px); padding: 5px; border: 1px solid var(--vl-line); border-radius: 12px; background: rgba(0,0,0,.16); overflow-y: auto; }
.vl-asset-grid[data-tab="audio"] { grid-template-columns: repeat(auto-fill,minmax(195px,1fr)); }
.vl-asset-grid[data-tab="online"] { grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); }
.vl-asset-emoji { display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 1px solid var(--vl-line); border-radius: 9px; background: rgba(255,255,255,.025); font-size: clamp(22px,3vw,31px); line-height: 1; transition: border-color .15s, background .15s, transform .15s; }
.vl-asset-emoji:hover { border-color: var(--vl-accent-line); background: rgba(0,255,136,.08); transform: translateY(-1px); }
.vl-asset-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 7px; border: 1px solid var(--vl-line); border-radius: 9px; color: var(--vl-muted); background: rgba(255,255,255,.025); font-size: 8px; text-align: center; transition: border-color .15s, background .15s; }
.vl-asset-tile:hover { border-color: var(--vl-accent-line); background: rgba(0,255,136,.06); }
.vl-asset-tile img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.vl-asset-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-asset-audio-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--vl-line); border-radius: 10px; background: rgba(255,255,255,.025); }
.vl-asset-audio-info strong, .vl-asset-audio-info small { display: block; }
.vl-asset-audio-info strong { color: var(--vl-text-soft); font-size: 10px; }
.vl-asset-audio-info small { margin-top: 2px; color: var(--vl-dim); font-size: 8px; line-height: 1.45; }
.vl-asset-audio-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vl-asset-audio-add { min-height: 28px; padding: 0 9px; font-size: 9px; }
.vl-asset-gif { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 0; border: 1px solid var(--vl-line); border-radius: 9px; overflow: hidden; color: var(--vl-muted); background: rgba(255,255,255,.025); transition: border-color .15s, background .15s; }
.vl-asset-gif:hover { border-color: var(--vl-accent-line); background: rgba(0,255,136,.06); }
.vl-asset-gif img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #0b111b; }
.vl-asset-gif span { overflow: hidden; padding: 0 6px 6px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.vl-asset-gif.is-added::after { content: "✓"; position: absolute; right: 5px; top: 5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--vl-accent-dark); background: var(--vl-accent); font-size: 10px; font-weight: 800; }
.vl-asset-gif.is-busy { opacity: .55; }
.vl-asset-empty { grid-column: 1 / -1; padding: 28px 16px; color: var(--vl-dim); font-size: 10px; line-height: 1.55; text-align: center; }
.vl-asset-status { min-height: 14px; margin-top: 8px; color: var(--vl-accent); font-size: 9px; }
.vl-asset-note { margin-top: 6px; color: var(--vl-dim); font-size: 9px; line-height: 1.55; }
.vl-asset-credit { margin-top: 7px; color: var(--vl-faint); font-size: 8px; }
.vl-asset-credit a { color: var(--vl-muted); }

/* ── Track manager ──────────────────────────────────────────────── */
.vl-tracks-dialog { width: min(560px,calc(100vw - 28px)); }
.vl-track-add-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 13px; }
.vl-track-add-row .vl-btn { padding: 0 8px; font-size: 9px; }
.vl-track-manager { display: grid; gap: 6px; max-height: min(40vh,320px); margin-bottom: 13px; overflow-y: auto; }
.vl-track-manager-row { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid var(--vl-line); border-radius: 9px; background: rgba(255,255,255,.02); }
.vl-track-manager-row > .vl-ico { color: var(--vl-muted); }
.vl-track-manager-name { flex: 1; min-width: 0; }
.vl-track-manager-name strong, .vl-track-manager-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-track-manager-name strong { color: var(--vl-text-soft); font-size: 10px; }
.vl-track-manager-name small { margin-top: 2px; color: var(--vl-dim); font-size: 8px; }
.vl-track-manager-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.vl-track-manager-btn { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--vl-muted); background: transparent; font-size: 12px; font-weight: 700; }
.vl-track-manager-btn:hover { color: var(--vl-text); border-color: var(--vl-line); background: rgba(255,255,255,.06); }
.vl-track-manager-btn:disabled { opacity: .25; cursor: default; background: transparent; border-color: transparent; }
.vl-track-manager-btn.is-danger:hover { color: var(--vl-danger); border-color: rgba(255,71,87,.25); background: rgba(255,71,87,.1); }
.vl-track-manager-btn .vl-ico { width: 13px; height: 13px; }

@media (max-width: 1240px) {
  .vl-root { --vl-media-w: 230px; --vl-inspector-w: 260px; }
  .vl-topbar { gap: 12px; padding: 0 12px; }
  .vl-project { max-width: 140px; }
  .vl-top-actions { gap: 3px; }
  .vl-top-actions .vl-btn { padding: 0 9px; }
  .vl-resolution { display: none; }
}
@media (max-width: 1050px) {
  .vl-root { --vl-inspector-w: 288px; }
  .vl-workspace {
    grid-template-columns: var(--vl-media-w) auto minmax(0, 1fr);
    grid-template-areas: "media media-split preview";
  }
  .vl-split-inspector { display: none; }
  .vl-panel-detach { display: none; }
  .vl-inspector {
    grid-area: auto; position: absolute; z-index: 60;
    top: var(--vl-topbar-h); right: 0; bottom: calc(var(--vl-timeline-h) + var(--vl-split));
    display: flex; width: clamp(260px, var(--vl-inspector-w), 88vw);
    border-left: 1px solid var(--vl-line);
    box-shadow: -18px 0 45px rgba(0,0,0,.4);
    transform: translateX(102%); transition: transform .2s ease;
  }
  .vl-inspector.is-open { transform: translateX(0); }
  .vl-only-drawer { display: inline-flex; }
  .vl-top-actions #vl-btn-help, .vl-top-actions .vl-top-sep { display: none; }
  .vl-clock { font-size: 10px; }
}
/* Between 801 and 1050 px the inspector is a drawer but the narrow topbar is
   still hidden, so expose its toggle without duplicating the other actions. */
@media (min-width: 801px) and (max-width: 1050px) {
  .vl-narrow-actions { display: flex; }
  .vl-narrow-actions #vl-btn-media,
  .vl-narrow-actions #vl-btn-mobile-play,
  .vl-narrow-actions #vl-btn-mobile-export,
  .vl-narrow-actions #vl-btn-more { display: none; }
  #vl-btn-close-media { display: none; }
}
/* The desktop transport + top actions fill the bar down here; drop the
   project name so the inspector toggle is never clipped. */
@media (min-width: 801px) and (max-width: 900px) {
  .vl-project { display: none; }
}
@media (max-width: 800px) {
  /* !important because the layout module writes inline sizes; the mobile
     workspace uses its own fixed timeline height. */
  .vl-root {
    --vl-topbar-h: 58px;
    --vl-timeline-h: 310px !important;
    grid-template-rows: var(--vl-topbar-h) minmax(0,1fr) var(--vl-timeline-h);
    min-height: 650px;
  }
  .vl-split-timeline, .vl-splitter-v { display: none; }
  .vl-topbar { justify-content: space-between; }
  .vl-brand-name, .vl-project, .vl-transport, .vl-top-actions { display: none; }
  .vl-narrow-actions { display: flex; }
  .vl-workspace { display: block; }
  .vl-preview-panel { height: 100%; }
  .vl-media-panel { grid-area: auto; position: absolute; z-index: 60; top: var(--vl-topbar-h); left: 0; bottom: var(--vl-timeline-h); display: flex; width: min(290px,85vw); border-right: 1px solid var(--vl-line); box-shadow: 18px 0 45px rgba(0,0,0,.4); transform: translateX(-102%); transition: transform .2s ease; }
  .vl-media-panel.is-open { transform: translateX(0); }
  .vl-inspector { top: var(--vl-topbar-h); bottom: var(--vl-timeline-h); width: min(300px,88vw); }
  .vl-canvas-wrap { padding: 14px; }
  .vl-preview-toolbar { min-height: 41px; }
  .vl-preview-tools .vl-chip { font-size: 0; gap: 0; }
  .vl-preview-tools .vl-chip .vl-ico { width: 14px; height: 14px; }
  .vl-timeline { grid-template-rows: 43px minmax(0,1fr) 25px; }
  .vl-timeline-body { grid-template-columns: 104px minmax(0,1fr); }
  .vl-track-label { padding: 0 6px 0 8px; }
  .vl-track-label > div { gap: 4px; }
  .vl-track-label small, .vl-track-label .vl-ico { display: none; }
  .vl-toolbar-label, #vl-btn-duplicate, .vl-timeline-tools .vl-top-sep, #vl-btn-follow { display: none; }
  .vl-timeline-toolbar { padding: 0 7px; }
  .vl-timeline-toolbar .vl-btn { padding: 0 7px; }
  .vl-timeline-foot { gap: 9px; padding: 0 8px; }
  .vl-timeline-foot > span:nth-child(3), .vl-timeline-foot > .vl-foot-privacy { display: none; }
  .vl-toast-host { bottom: calc(var(--vl-timeline-h) + 12px); }
}
@media (max-width: 520px) {
  .vl-root {
    --vl-topbar-h: 54px;
    --vl-timeline-h: 292px !important;
    min-height: 630px;
  }
  .vl-media-panel, .vl-inspector { top: var(--vl-topbar-h); bottom: var(--vl-timeline-h); }
  .vl-brand-mark { width: 28px; height: 28px; }
  .vl-preview-tools { gap: 3px; }
  .vl-select-compact { max-width: 118px; }
  #vl-btn-fullscreen { display: none; }
  .vl-stage-note { justify-content: center; }
  #vl-frame-rate { display: none; }
  .vl-preview-empty p { max-width: 260px; }
  .vl-timeline-body { grid-template-columns: 82px minmax(0,1fr); }
  .vl-track-label strong { font-size: 8px; }
  .vl-track-actions { flex-direction: column; gap: 0; }
  .vl-track-action { width: 17px; height: 17px; font-size: 7px; }
  #vl-btn-duplicate, #vl-btn-delete { display: none; }
  .vl-edit-tools, .vl-timeline-tools { gap: 2px; }
  .vl-timeline-tools .vl-chip { padding: 0 6px; }
  .vl-dialog-card, .vl-help-card { padding: 18px; }
  .vl-export-grid, .vl-help-steps { grid-template-columns: 1fr; }
  .vl-help-steps { gap: 7px; }
  .vl-help-steps > div { display: flex; gap: 10px; padding: 10px; }
  .vl-help-steps b { flex: 0 0 auto; margin: 0; }
  .vl-shortcut-grid { grid-template-columns: 1fr; }
  .vl-media-selection { flex-wrap: wrap; }
  .vl-asset-grid { grid-template-columns: repeat(auto-fill,minmax(62px,1fr)); }
  .vl-asset-grid[data-tab="audio"] { grid-template-columns: 1fr; }
  .vl-track-add-row { grid-template-columns: 1fr; }
  .vl-media-preview-stage { min-height: 180px; }
  .vl-toast-host { bottom: calc(var(--vl-timeline-h) + 12px); right: 10px; }
}
/* Touch devices cannot hover, so keep the quick-add control visible. */
@media (hover: none) {
  .vl-media-add, .vl-media-preview, .vl-media-remove { opacity: 1; }
  .vl-media-preview { pointer-events: auto; }
}
@media (pointer: coarse) {
  .vl-root { --vl-split: 10px; }
  .vl-clip-handle { width: 20px; }
  .vl-track-actions { gap: 12px; }
  .vl-track-action { position: relative; }
  .vl-track-action::after { position: absolute; inset: -6px; content: ""; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-root *, .vl-root *::before, .vl-root *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Context menu (body-level so the site nav can never cover it) ──── */
.vl-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 218px;
  max-width: 292px;
  max-height: min(72vh, 580px);
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 11px;
  color: #f2f6fc;
  background: #131a27;
  box-shadow: 0 22px 60px rgba(0,0,0,.58), 0 0 0 1px rgba(0,0,0,.3);
  font-family: var(--font-sans, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 11px;
  line-height: 1.35;
  user-select: none;
  animation: vl-context-in .12s ease-out;
}
.vl-context-menu[hidden] { display: none; }
.vl-context-heading {
  overflow: hidden;
  padding: 7px 9px 8px;
  color: #8b98ac;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.vl-context-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 31px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  color: #c6cfe0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.vl-context-item:hover:not(:disabled),
.vl-context-item:focus-visible {
  color: #f2f6fc;
  background: rgba(0,255,136,.1);
  outline: none;
}
.vl-context-item:disabled { opacity: .32; cursor: default; }
.vl-context-item.is-danger { color: #ff8a95; }
.vl-context-item.is-danger:hover:not(:disabled) { color: #ffb3ba; background: rgba(255,71,87,.13); }
.vl-context-icon { width: 14px; height: 14px; flex: 0 0 auto; color: #7d8ba0; }
.vl-context-item:hover .vl-context-icon,
.vl-context-item:focus-visible .vl-context-icon { color: #00ff88; }
.vl-context-item.is-danger .vl-context-icon { color: #ff8a95; }
.vl-context-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-context-shortcut {
  flex: 0 0 auto;
  padding: 1px 4px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 4px;
  color: #64748b;
  font: 8px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.vl-context-separator { height: 1px; margin: 4px 7px; background: rgba(148,163,184,.14); }
@keyframes vl-context-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-context-menu { animation: none; }
}
