/* Swara Sound Video Editor (/video-editor) - its own look: a dark editor in the style people know
   from phone video apps. No grey text: every label is #cdd4e3 or lighter. */
:root {
  --bg: #0b0c10; --pane: #15171d; --pane2: #1c1f27; --pane3: #242833; --line: #2b303c; --line2: #353b49;
  --text: #f1f3f8; --dim: #e2e7f1; --faint: #cdd4e3;
  --ac: #22d3ee; --ac2: #0fb5d4; --ac-ink: #031317; --gold: #e9a83a;
  --c-text: #c98a1c; --c-music: #138a6b; --c-sfx: #2c63b8; --danger: #ff5a64;
  --r: 10px; --tlh: 250px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body.ve { margin: 0; color: var(--text); font: 14px/1.45 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
.ve-app svg, .ve-land svg, .ve-modal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ve-app a, .ve-land a, .ve-modal a { color: var(--ac); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ================= landing ================= */
.ve-land { min-height: 100vh; background:
  radial-gradient(900px 500px at 15% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
  radial-gradient(800px 500px at 100% 0%, rgba(233, 168, 58, 0.12), transparent 60%), var(--bg); }
.vl-top { display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.vl-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.vl-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.vl-brand b { font-size: 17px; } .vl-brand small { color: var(--faint); font-size: 12px; }
.vl-nav { display: flex; gap: 20px; }
.vl-nav a { color: var(--dim); text-decoration: none; font-weight: 600; font-size: 14px; }
.vl-nav a:hover { color: var(--text); }
.vl-nav .vl-site { color: var(--gold); }
.vl-hero { max-width: 900px; margin: 0 auto; padding: clamp(36px, 8vh, 90px) 20px 40px; text-align: center; }
.vl-eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 99px; border: 1px solid rgba(34, 211, 238, 0.4); color: var(--ac); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; background: rgba(34, 211, 238, 0.07); }
.vl-hero h1 { font-size: clamp(34px, 6.4vw, 64px); line-height: 1.04; margin: 0 0 18px; letter-spacing: -0.02em; }
.vl-hero h1 span { background: linear-gradient(90deg, var(--ac), #7ee8fa 45%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vl-sub { font-size: clamp(16px, 2vw, 19px); color: var(--dim); max-width: 680px; margin: 0 auto 30px; }
.vl-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.vl-go { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border: 0; border-radius: 14px; font-size: 17px; font-weight: 800; color: var(--ac-ink);
  background: linear-gradient(135deg, #5ee6f7, var(--ac) 50%, var(--ac2)); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28); }
.vl-go svg { stroke-width: 2.6; }
.vl-go:hover { filter: brightness(1.08); }
.vl-ghost { padding: 16px 22px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.03); font-weight: 700; color: var(--text); }
.vl-ghost:hover { border-color: var(--faint); }
.vl-cont { display: inline-flex; align-items: center; gap: 12px; margin: 18px auto 0; padding: 12px 18px; border-radius: 12px; border: 1px solid rgba(233, 168, 58, 0.45); background: rgba(233, 168, 58, 0.08); text-align: left; }
.vl-cont svg { color: var(--gold); }
.vl-cont-t { display: flex; flex-direction: column; } .vl-cont-t b { color: var(--gold); } .vl-cont-t > span { color: var(--faint); font-size: 12.5px; }
.vl-shapes { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 34px; }
.vl-shapes > span { color: var(--faint); font-size: 13.5px; width: 100%; }
.vl-shapes button { display: grid; grid-template-columns: 26px auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--pane); font-weight: 800; text-align: left; }
.vl-shapes button:hover { border-color: var(--ac); }
.vl-shapes i { grid-row: span 2; display: block; border: 2px solid var(--ac); border-radius: 4px; justify-self: center; }
.vl-shapes small { color: var(--faint); font-weight: 500; font-size: 12px; }
.vl-drop { color: var(--faint); font-size: 13px; margin-top: 18px; }
.vl-shot { max-width: 1180px; margin: 10px auto 30px; padding: 0 20px; }
.vl-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.08); }
.vl-feats, .vl-why, .vl-faq { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.vl-feats h2, .vl-faq h2 { text-align: center; font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 26px; }
.vl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vl-f { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--pane2), var(--pane)); }
.vl-f b { font-size: 16.5px; } .vl-f p { color: var(--dim); margin: 8px 0 0; }
.vl-why { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vl-why > div { padding: 26px; border-radius: 16px; border: 1px solid var(--line); background: var(--pane); }
.vl-why h2 { margin: 0 0 8px; font-size: 21px; } .vl-why p { color: var(--dim); margin: 0; }
.vl-faq { max-width: 820px; }
.vl-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--pane); margin-bottom: 10px; padding: 0 18px; }
.vl-faq summary { cursor: pointer; padding: 15px 0; font-weight: 700; }
.vl-faq details p { color: var(--dim); margin: 0 0 16px; }
.vl-foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; padding: 30px 20px 50px; border-top: 1px solid var(--line); }
.vl-foot a { color: var(--dim); text-decoration: none; font-size: 13.5px; } .vl-foot a:hover { color: var(--text); }
@media (max-width: 860px) {
  .vl-grid { grid-template-columns: 1fr 1fr; } .vl-why { grid-template-columns: 1fr; }
  .vl-nav a:not(.vl-site) { display: none; }
}
@media (max-width: 520px) { .vl-grid { grid-template-columns: 1fr; } .vl-go, .vl-ghost { width: 100%; justify-content: center; } }

/* drop anywhere */
.ve-dropmask { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(5, 18, 22, 0.78); border: 3px dashed var(--ac); }
.ve-dropmask b { font-size: 26px; color: var(--ac); }
.ve-dropping .ve-dropmask { display: flex; }

/* ================= the editor ================= */
/* inside the site frame: the editor fills the space beside the sidebar and under the supporter strip */
body.ve-on { height: 100vh; height: 100dvh; overflow: hidden; }
body.ve-on .sh, body.ve-on .sh-main { min-height: 0; }
.ve-app { height: calc(100vh - var(--ve-top, 42px)); height: calc(100dvh - var(--ve-top, 42px)); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 50px minmax(0, 1fr) 42px var(--tlh); background: var(--bg); user-select: none; -webkit-user-select: none; }
.ve-top { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--pane); }
.ve-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; white-space: nowrap; }
.ve-app .ve-logo svg { width: 18px; height: 18px; color: var(--ac); }
.ve-name { min-width: 0; width: 220px; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-weight: 600; }
.ve-name:hover, .ve-name:focus { border-color: var(--line2); background: var(--pane2); outline: none; }
.ve-top-c { display: flex; gap: 4px; margin-left: auto; }
.ve-top-r { display: flex; gap: 8px; align-items: center; margin-left: 12px; }
.ve-ib { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--dim); }
.ve-ib:hover:not(:disabled) { background: var(--pane3); color: var(--text); }
.ve-new { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; font-weight: 600; color: var(--dim); }
.ve-new:hover { color: var(--text); border-color: var(--faint); }
.ve-export { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 18px; border-radius: 9px; border: 0; font-weight: 800; color: var(--ac-ink); background: linear-gradient(135deg, #5ee6f7, var(--ac)); text-decoration: none; }
.ve-export svg { stroke-width: 2.4; width: 18px; height: 18px; }
.ve-export:hover:not(:disabled) { filter: brightness(1.08); }
.ve-export.big { padding: 13px 22px; font-size: 16px; border-radius: 12px; width: 100%; }

.ve-main { display: grid; grid-template-columns: 68px 300px minmax(0, 1fr) 290px; min-height: 0; }
.ve-rail { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; background: var(--pane); border-right: 1px solid var(--line); }
.ve-rail button, .ve-tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 7px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font-size: 11.5px; font-weight: 600; }
.ve-rail button:hover { background: var(--pane2); color: var(--text); }
.ve-rail button.on, .ve-tabs button.on { color: var(--ac); background: rgba(34, 211, 238, 0.1); }
.ve-rail em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--ac-ink); background: var(--ac); border-radius: 9px; padding: 0 5px; line-height: 15px; }
.ve-rail em:empty { display: none; }

.ve-panel, .ve-insp { min-height: 0; overflow-y: auto; background: var(--pane); padding: 14px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ve-panel { border-right: 1px solid var(--line); }
.ve-insp { border-left: 1px solid var(--line); }
.ve-panel h3, .ve-insp h3 { margin: 0 0 12px; font-size: 15px; display: flex; flex-direction: column; }
.ve-insp h3 span { font-size: 12px; font-weight: 500; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ve-h { margin: 14px 0 7px; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.ve-note { color: var(--faint); font-size: 12.5px; margin: 8px 0; }
.ve-hint { color: var(--faint); font-size: 13px; grid-column: 1 / -1; }
.ve-sheet-x { display: none; }

.ve-import { width: 100%; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 14px; border-radius: 12px; border: 1.5px dashed rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.06); }
.ve-import svg { grid-row: span 2; width: 26px; height: 26px; color: var(--ac); justify-self: center; }
.ve-import span { color: var(--faint); font-size: 12.5px; }
.ve-import:hover { background: rgba(34, 211, 238, 0.12); }
.ve-media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.ve-tile { position: relative; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #000; padding: 0; }
.ve-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ve-tile-a { display: grid; place-items: center; height: 100%; color: var(--c-music); background: #0f2a24; }
.ve-tile-d { position: absolute; right: 5px; bottom: 5px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.72); }
.ve-tile-n { position: absolute; left: 0; right: 0; top: 0; padding: 3px 6px; font-size: 11px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(rgba(0, 0, 0, 0.7), transparent); opacity: 0; transition: opacity 0.15s; }
.ve-tile-plus { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; border-radius: 50%; background: var(--ac); color: var(--ac-ink); font-weight: 900; font-size: 22px; opacity: 0; transform: scale(0.8); transition: 0.15s; }
.ve-tile:hover { border-color: var(--ac); }
.ve-tile:hover .ve-tile-plus, .ve-tile:hover .ve-tile-n { opacity: 1; transform: none; }

.ve-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ve-chip { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); background: var(--pane2); color: var(--dim); font-size: 12.5px; font-weight: 600; }
.ve-chip.on { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }
.ve-list { display: flex; flex-direction: column; gap: 4px; }
.ve-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.ve-row:hover { background: var(--pane2); }
.ve-aud { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; border: 0; background: var(--pane3); color: var(--text); }
.ve-aud svg { width: 16px; height: 16px; stroke: none; fill: currentColor; }
.ve-aud.on { background: var(--ac); color: var(--ac-ink); animation: ve-pulse 1s infinite alternate; }
.ve-aud-mine { color: var(--gold); } .ve-aud.ve-aud-mine svg { stroke: currentColor; fill: none; }
@keyframes ve-pulse { to { box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25); } }
.ve-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ve-row-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-row-t span { font-size: 12px; color: var(--faint); }
.ve-add { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--line2); background: transparent; font-size: 19px; font-weight: 700; line-height: 1; color: var(--ac); }
.ve-row:hover .ve-add, .ve-add:hover { background: var(--ac); color: var(--ac-ink); border-color: var(--ac); }
.ve-promo { display: block; margin-top: 16px; padding: 14px; border-radius: 12px; text-decoration: none; border: 1px solid rgba(233, 168, 58, 0.4); background: linear-gradient(135deg, rgba(233, 168, 58, 0.14), rgba(233, 168, 58, 0.04)); }
.ve-promo b { display: block; color: var(--gold); } .ve-promo span { color: var(--dim); font-size: 13px; }
.ve-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ve-tp { height: 74px; display: grid; place-items: center; padding: 6px; border-radius: 11px; border: 1px solid var(--line); background: radial-gradient(circle at 30% 20%, #34405a, #161a24); font-size: 16px; overflow: hidden; }
.ve-tp:hover { border-color: var(--ac); }
.ve-tp span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* stage */
.ve-stage { display: grid; grid-template-rows: minmax(0, 1fr) 46px; min-width: 0; min-height: 0; background: #08090c; }
.ve-view { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.ve-frame { position: relative; background: #000; box-shadow: 0 0 0 1px var(--line), 0 14px 40px rgba(0, 0, 0, 0.6); touch-action: none; }
.ve-frame canvas { display: block; width: 100%; height: 100%; }
.ve-guide { position: absolute; background: var(--ac); pointer-events: none; }
.ve-guide.v { left: 50%; top: 0; bottom: 0; width: 1px; } .ve-guide.h { top: 50%; left: 0; right: 0; height: 1px; }
.ve-tsel { position: absolute; border: 1.5px solid var(--ac); border-radius: 4px; cursor: move; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.ve-rs { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ac); cursor: nwse-resize; }
.ve-transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px; border-top: 1px solid var(--line); background: var(--pane); }
.ve-tc { font-variant-numeric: tabular-nums; color: var(--faint); font-size: 13px; }
.ve-tc b { color: var(--text); } .ve-tc.r { text-align: right; }
.ve-nocodec { color: #ffcf6a; font-size: 12px; }
.ve-play { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--text); color: #000; }
.ve-play svg { width: 18px; height: 18px; stroke: none; fill: currentColor; }
.ve-play:hover { background: var(--ac); }

/* inspector controls */
.ve-seg { display: flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--pane3); flex-wrap: wrap; }
.ve-seg button { flex: 1; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ve-seg button.on { background: var(--text); color: #0b0c10; }
.ve-seg button:hover:not(.on) { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.ve-sl { display: block; margin: 12px 0; }
.ve-sl > span { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); font-weight: 600; margin-bottom: 4px; }
.ve-sl b { color: var(--text); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--ac); height: 22px; margin: 0; }
.ve-insp textarea { width: 100%; resize: vertical; padding: 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--pane2); color: var(--text); font: inherit; font-size: 15px; user-select: text; }
.ve-insp textarea:focus { outline: none; border-color: var(--ac); }
.ve-fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ve-fonts button { padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line2); background: var(--pane2); font-size: 13px; white-space: nowrap; overflow: hidden; }
.ve-fonts button.on { border-color: var(--ac); background: rgba(34, 211, 238, 0.12); }
.ve-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.ve-sw button, .ve-sw-pick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); background: var(--c); padding: 0; }
.ve-sw button.on { border-color: var(--ac); box-shadow: 0 0 0 2px var(--bg) inset; }
.ve-sw-pick { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.ve-sw-pick input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; }
.ve-row2 { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ve-row2 .ve-seg { flex: 1; }
.ve-btn { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--pane2); color: var(--text); font-weight: 600; }
.ve-btn:hover { border-color: var(--faint); }
.ve-acts { display: flex; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ve-acts button { flex: 1; padding: 8px 6px; border-radius: 9px; border: 1px solid var(--line2); background: var(--pane2); font-weight: 600; font-size: 13px; }
.ve-acts .danger { color: var(--danger); }
.ve-acts button:hover { border-color: var(--faint); }
.ve-aspects { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ve-aspects button { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 9px; border-radius: 10px; border: 1px solid var(--line2); background: var(--pane2); text-align: left; }
.ve-aspects button.on { border-color: var(--ac); background: rgba(34, 211, 238, 0.1); }
.ve-aspects i { grid-row: span 2; display: block; border: 2px solid var(--dim); border-radius: 3px; justify-self: center; }
.ve-aspects button.on i { border-color: var(--ac); }
.ve-aspects span { font-size: 11px; color: var(--faint); line-height: 1.2; }
.ve-keys { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--faint); }
.ve-keys b { width: 100%; color: var(--dim); }
kbd { display: inline-block; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line2); background: var(--pane3); font: 11px/17px inherit; color: var(--text); }

/* timeline */
.ve-tlbar { display: flex; align-items: center; gap: 4px; padding: 0 10px; background: var(--pane); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ve-tb { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.ve-tb svg { width: 18px; height: 18px; }
.ve-tb:hover { background: var(--pane3); color: var(--text); }
.ve-tb-sp { flex: 1; }
.ve-zoomw { display: flex; align-items: center; gap: 6px; color: var(--faint); width: 200px; }
.ve-zoomw svg { width: 17px; height: 17px; }
.ve-tl { position: relative; min-height: 0; background: #101217; }
.tl-scroll { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.tl-inner { position: relative; min-height: 100%; padding-bottom: 10px; }
.tl-ruler { display: block; position: sticky; top: 0; z-index: 4; background: #101217; border-bottom: 1px solid var(--line); cursor: pointer; }
.tl-lanes { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.tl-lane { position: relative; min-height: 40px; }
.tl-lane-main { height: 64px; }
.tl-lab { position: sticky; left: 0; z-index: 3; float: left; height: 100%; width: 0; }
.tl-lab, .tl-lab svg { color: var(--faint); }
.tl-item { position: absolute; top: 0; height: 100%; border-radius: 7px; overflow: hidden; cursor: grab; touch-action: pan-y; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.tl-item.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(34, 211, 238, 0.6); z-index: 2; overflow: visible; }
.tl-item.lift { transform: scale(1.03); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--ac); z-index: 6; }
.tl-clip { background: #1b2130; border-radius: 7px; }
.tl-clip > canvas.tl-strip { position: absolute; left: 0; top: 0; border-radius: 7px; pointer-events: none; }
.tl-clip.sel > canvas.tl-strip { border-radius: 6px; }
.tl-cwave { position: absolute; left: 0; bottom: 2px; pointer-events: none; opacity: 0.9; }
.tl-dur { position: absolute; left: 6px; top: 4px; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.65); pointer-events: none; }
.tl-mute { position: absolute; right: 8px; top: 3px; font-size: 12px; pointer-events: none; }
.tl-text { height: 30px; background: linear-gradient(180deg, #d49a2c, var(--c-text)); color: #1a1205; font-weight: 700; font-size: 12px; display: flex; align-items: center; }
.tl-audio { height: 38px; background: linear-gradient(180deg, #17a07c, var(--c-music)); }
.tl-audio.sfx { background: linear-gradient(180deg, #3a77d0, var(--c-sfx)); }
.tl-wave { position: absolute; left: 0; top: 3px; pointer-events: none; }
.tl-tx { position: relative; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; font-size: 11.5px; font-weight: 700; }
.tl-audio .tl-tx { position: absolute; left: 0; top: 2px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.tl-h { position: absolute; top: 0; bottom: 0; width: 12px; z-index: 3; cursor: ew-resize; display: none; }
.tl-h.l { left: -1px; border-radius: 7px 0 0 7px; } .tl-h.r { right: -1px; border-radius: 0 7px 7px 0; }
.tl-item.sel .tl-h { display: block; background: #fff; }
.tl-item.sel .tl-h::after { content: ""; position: absolute; left: 5px; top: 35%; bottom: 35%; width: 2px; border-radius: 2px; background: #0b0c10; }
.tl-item:hover:not(.sel) .tl-h { display: block; }
.tl-empty { position: absolute; left: 16px; top: 4px; bottom: 4px; padding: 0 20px; border-radius: 8px; border: 1.5px dashed var(--line2); background: rgba(255, 255, 255, 0.02); color: var(--dim); font-weight: 600; font-size: 13px; }
.tl-empty.sm { top: 3px; bottom: auto; height: 34px; }
.tl-empty:hover { border-color: var(--ac); color: var(--ac); }
.tl-plus { position: absolute; top: 12px; width: 40px; height: 40px; border-radius: 9px; border: 1.5px dashed var(--line2); background: transparent; color: var(--dim); font-size: 22px; }
.tl-plus:hover { border-color: var(--ac); color: var(--ac); }
.tl-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 7; pointer-events: none; }
.tl-head::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); }
.tl-head i { position: absolute; left: -7px; top: 0; width: 14px; height: 16px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); pointer-events: auto; cursor: ew-resize; }
.ve-tabs { display: none; }

/* export */
.ve-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 7, 0.75); backdrop-filter: blur(3px); }
.ve-dlg { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; border-radius: 18px; border: 1px solid var(--line2); background: var(--pane); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.ve-dlg h2 { margin: 0 0 6px; font-size: 20px; }
.ve-dlg-x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--pane3); color: var(--dim); }
.ve-dlg .ve-export.big { margin-top: 14px; }
.ve-exp-cv { display: block; max-width: 100%; max-height: 42vh; margin: 8px auto 14px; border-radius: 10px; background: #000; }
.ve-pb { height: 8px; border-radius: 9px; background: var(--pane3); overflow: hidden; }
.ve-pb i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ac2), var(--ac)); transition: width 0.2s; }
.ve-exp-lab { display: flex; justify-content: space-between; margin: 8px 0; font-weight: 600; }
.ve-exp-video { display: block; width: 100%; max-height: 50vh; border-radius: 12px; background: #000; margin-top: 8px; }
.ve-exp-btns { display: flex; flex-direction: column; gap: 8px; }
.ve-exp-btns .ve-btn { width: 100%; padding: 11px; }
.ve-kofi { color: var(--faint); font-size: 12.5px; text-align: center; margin: 14px 0 0; }
.ve-kofi a { color: var(--gold); }

.ve-toast { position: fixed; left: 50%; top: 62px; z-index: 95; transform: translate(-50%, -12px); max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px; background: #f1f3f8; color: #0b0c10; font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: 0.2s; }
.ve-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ve-toast.bad { background: #ffdee0; color: #5a0b12; }

/* ---- step 2: clip tabs, looks, transitions, captions, recording ---- */
.ve-itabs { display: flex; gap: 2px; margin: 0 0 6px; border-bottom: 1px solid var(--line); }
.ve-itabs button { flex: 1; padding: 8px 4px 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--dim); font-weight: 700; font-size: 12.5px; }
.ve-itabs button.on { color: var(--ac); border-bottom-color: var(--ac); }
.ve-looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.ve-looks button { padding: 0 0 5px; border-radius: 9px; border: 2px solid transparent; background: var(--pane2); overflow: hidden; font-size: 11.5px; font-weight: 600; color: var(--dim); }
.ve-looks img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 4px; }
.ve-looks button.on { border-color: var(--ac); color: var(--text); }
.ve-trs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ve-trs button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 10px; border: 1px solid var(--line2); background: var(--pane2); font-size: 11.5px; font-weight: 600; color: var(--dim); }
.ve-trs button.on { border-color: var(--ac); color: var(--text); background: rgba(34, 211, 238, 0.1); }
.ve-tri { width: 34px; height: 22px; border-radius: 4px; background: linear-gradient(90deg, #3b4a66 50%, #c98a1c 50%); }
.ve-tri.none { background: linear-gradient(90deg, #3b4a66 50%, #2a3140 50%); }
.ve-tri.fade { background: linear-gradient(90deg, #3b4a66, #c98a1c); }
.ve-tri.black { background: linear-gradient(90deg, #3b4a66, #000 50%, #c98a1c); }
.ve-tri.flash { background: linear-gradient(90deg, #3b4a66, #fff 50%, #c98a1c); }
.ve-tri.push { background: linear-gradient(180deg, #3b4a66 50%, #c98a1c 50%); }
.ve-tri.zoom { background: radial-gradient(circle, #c98a1c 35%, #3b4a66 36%); }
.ve-tri.wipe { background: linear-gradient(100deg, #c98a1c 45%, #3b4a66 46%); }
.ve-tri.blur { background: linear-gradient(90deg, #3b4a66, #c98a1c); filter: blur(2px); }
.tl-tr { position: absolute; top: 21px; z-index: 4; width: 22px; height: 22px; padding: 0; border-radius: 6px; border: 1px solid var(--line2); background: #0e1016; color: var(--dim); font-size: 13px; line-height: 1; opacity: 0; transition: opacity 0.15s; }
.tl-lane-main:hover .tl-tr, .tl-tr.on { opacity: 1; }
.tl-tr.on { color: var(--ac); border-color: var(--ac); }
.tl-tr:hover { opacity: 1; border-color: var(--ac); color: var(--ac); }
.ve-capcard { display: flex; flex-direction: column; gap: 8px; padding: 14px; margin-bottom: 6px; border-radius: 14px; border: 1px solid rgba(34, 211, 238, 0.35); background: linear-gradient(160deg, rgba(34, 211, 238, 0.12), rgba(34, 211, 238, 0.02)); }
.ve-capcard > b { display: flex; align-items: center; gap: 8px; font-size: 15px; } .ve-capcard > b svg { color: var(--ac); }
.ve-capcard > span { color: var(--dim); font-size: 12.5px; }
.ve-capcard select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--pane2); color: var(--text); font: inherit; font-size: 13px; }
.ve-capcard .ve-export.big { margin: 0; padding: 11px; font-size: 14.5px; }
.ve-cap-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ve-cap-styles button { padding: 9px 4px; border-radius: 9px; border: 2px solid transparent; background: #0e1118; }
.ve-cap-styles button.on { border-color: var(--ac); }
.ve-cap-styles span { display: inline-block; padding: 2px 7px; border-radius: 5px; font-weight: 800; font-size: 12px; }
.ve-note.ok { color: #7ef0b0; } .ve-note.bad { color: #ffb3b8; }
.ve-beat { width: 100%; margin-top: 12px; border-color: rgba(233, 168, 58, 0.5); color: var(--gold); }
.ve-rec i { width: 10px; height: 10px; border-radius: 50%; background: #ff4d5a; display: inline-block; margin-right: 2px; }
.ve-rec .r1 { display: none; }
.ve-recording .ve-rec { color: #fff; background: #d92d3a; border-color: #d92d3a; }
.ve-recording .ve-rec i { background: #fff; animation: ve-blink 1s infinite; }
.ve-recording .ve-rec .r0 { display: none; } .ve-recording .ve-rec .r1 { display: inline; }
.ve-recording .ve-frame { box-shadow: 0 0 0 3px #d92d3a; }
@keyframes ve-blink { 50% { opacity: 0.3; } }

/* ---- step 3: templates, background ---- */
.ve-tpl-grid { display: flex; flex-direction: column; gap: 9px; }
.ve-tpl { display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--pane2); text-align: left; }
.ve-tpl:hover { border-color: var(--ac); }
.ve-tpl-art { display: grid; place-items: center; height: 86px; border-radius: 9px; background: var(--g); padding: 6px; text-align: center; }
.ve-tpl-art b { font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); text-transform: uppercase; line-height: 1.1; }
.ve-tpl-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ve-tpl-t b { font-size: 14px; } .ve-tpl-t span { color: var(--dim); font-size: 12px; } .ve-tpl-t em { color: var(--gold); font-style: normal; font-size: 11.5px; font-weight: 600; }
.ve-bgpics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ve-bgpics button { aspect-ratio: 1; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--pane3); }
.ve-bgpics button.on { border-color: var(--ac); }
.ve-bgpics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ve-bgadd { font-size: 12px; font-weight: 700; color: var(--ac); }
.ve-cutp { color: var(--ac); }
@media (max-width: 1100px) { .ve-tabs { grid-template-columns: repeat(5, 1fr); } .ve-tpl-grid { display: grid; grid-template-columns: 1fr 1fr; } .ve-tpl { grid-template-columns: 1fr; } .ve-tpl-art { height: 70px; } }

/* ---- merge with Create Video: free pictures, music video card, subtitles file ---- */
.ve-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ve-pack { position: relative; aspect-ratio: 3 / 4; padding: 0; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--pane3); }
.ve-pack img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ve-pack span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; font-size: 11px; font-weight: 700; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); color: #fff; }
.ve-pack:hover { border-color: var(--ac); }
.ve-mv { width: 100%; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px; margin-bottom: 10px; border-radius: 12px; text-align: left;
  border: 1px solid rgba(233, 168, 58, 0.5); background: linear-gradient(135deg, rgba(233, 168, 58, 0.16), rgba(233, 168, 58, 0.03)); }
.ve-mv:hover { border-color: var(--gold); }
.ve-mv-art { display: grid; place-items: center; height: 64px; border-radius: 10px; background: linear-gradient(135deg, #e9a83a, #ff7ad9); font-size: 28px; color: #fff; }
.ve-srt { width: 100%; margin: 12px 0 4px; }

/* narrower computers: inspector folds under the panel column */
@media (max-width: 1500px) and (min-width: 1101px) {
  .ve-main { grid-template-columns: 62px 262px minmax(0, 1fr) 262px; }
  .ve-itabs button { font-size: 11.5px; padding-left: 2px; padding-right: 2px; }
}
/* ================= phones and small tablets ================= */
@media (max-width: 1100px) {
  :root { --tlh: minmax(150px, 1fr); }
  .ve-app { grid-template-rows: 48px minmax(160px, 42vh) 40px minmax(120px, 1fr) 58px; }
  .ve-name { width: 0; flex: 1; }
  .ve-logo span, .ve-top-c { display: none; }
  .ve-top-r { margin-left: 0; }
  .ve-main { grid-template-columns: 1fr; }
  .ve-rail { display: none; }
  .ve-stage { grid-template-rows: minmax(0, 1fr) 44px; }
  .ve-panel, .ve-insp { position: fixed; left: 0; right: 0; bottom: 58px; z-index: 40; max-height: 58dvh; border: 0; border-top: 1px solid var(--line2);
    border-radius: 18px 18px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55); transform: translateY(110%); visibility: hidden; transition: transform 0.22s ease, visibility 0s linear 0.22s; padding: 18px 16px 16px; }
  .ve-sheet-panel .ve-panel, .ve-sheet-insp .ve-insp { transform: none; visibility: visible; transition: transform 0.22s ease; }
  .ve-sheet-x { display: grid; place-items: center; position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--pane3); color: var(--dim); z-index: 2; }
  .ve-media-grid { grid-template-columns: repeat(3, 1fr); }
  .ve-text-grid { grid-template-columns: repeat(3, 1fr); }
  .ve-tlbar { gap: 0; padding: 0 4px; }
  .ve-tb span { display: none; }
  .ve-tb { padding: 8px 12px; }
  .ve-zoomw { width: 140px; }
  .ve-tabs { display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: var(--pane); border-top: 1px solid var(--line); z-index: 45; }
  .ve-tabs button { font-size: 11px; }
  .tl-h { width: 16px; }
}

/* tablets with the sidebar still showing: the sheets start beside it */
@media (min-width: 901px) and (max-width: 1100px) { .ve-panel, .ve-insp { left: 248px; } }
