/* KorvAI live editor: a working copy of the app's editor window.
 * Colors, radii and sizes follow the app's Theme.swift (window, surface, raised, stage, stroke, text tiers,
 * clip colors by kind, coral playhead). The window is a fixed 1440×860 canvas scaled to fit the page.
 * Linked with media="(min-width: 768px)": phones get a still image instead, so this never blocks their first paint.
 * The section around the editor (.studio-*) is styled in main.css.
 */

[data-live-editor]:fullscreen { display: grid; place-items: center; background: #050506; }
.kv-scale { position: relative; margin: 0 auto; }

.kv-noscript { padding: 40px; border: 1px solid var(--line); border-radius: var(--r-card); color: var(--muted); text-align: center; }

/* ---- Theme -------------------------------------------------------------------------------------- */

.kv {
  --k-window: #0a0a0b; --k-surface: #151516; --k-raised: #1e1e20; --k-raised-h: #29292c; --k-stage: #101011;
  --k-stroke: rgba(255, 255, 255, 0.06); --k-stroke-2: rgba(255, 255, 255, 0.1);
  --k-text: #ededef; --k-text-2: #a1a1a8; --k-text-3: #8a8a92;
  --k-accent: var(--k-accent-dark, #c8f23c); --k-on-accent: var(--k-on-accent-dark, #13160f);
  --k-playhead: #ff5c7a; --k-success: #34d399; --k-warning: #ffa94d; --k-purple: #bf5af2; --k-danger: #ff6b6b;
  --k-menu: #252528; --k-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --k-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Helvetica Neue", Arial, sans-serif;
  --k-mono: "SF Mono", ui-monospace, "Geist Mono", Menlo, monospace;
  color-scheme: dark;
}
[data-theme="light"] .kv {
  --k-window: #e9e9ec; --k-surface: #ffffff; --k-raised: #f1f1f4; --k-raised-h: #e4e4e8; --k-stage: #1a1a1d;
  --k-stroke: rgba(0, 0, 0, 0.08); --k-stroke-2: rgba(0, 0, 0, 0.12);
  --k-text: #16161a; --k-text-2: #5c5c66; --k-text-3: #67676f;
  --k-accent: var(--k-accent-light, #4f8a00); --k-on-accent: var(--k-on-accent-light, #ffffff);
  --k-menu: #ffffff; --k-shadow: 0 30px 80px -24px rgba(40, 52, 18, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.1);
  color-scheme: light;
}

.kv {
  position: absolute; top: 0; left: 0; width: 1440px; height: 860px; transform-origin: 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--k-window); color: var(--k-text); border-radius: 12px; box-shadow: var(--k-shadow);
  font-family: var(--k-font); font-size: 13px; line-height: 1.35; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; outline: none;
  transition: box-shadow 0.3s var(--ease);
}
.kv.active { box-shadow: var(--k-shadow), 0 0 0 1px color-mix(in srgb, var(--k-accent) 40%, transparent); }
.kv [hidden] { display: none !important; }
:where(.kv) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; }
:where(.kv) button:disabled { cursor: default; opacity: 0.35; }
.kv input, .kv textarea { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
.kv :focus-visible { outline: 2px solid var(--k-accent); outline-offset: 1px; border-radius: 6px; }
.kv .ki { width: 15px; height: 15px; flex: none; fill: currentColor; display: block; }
.kv kbd { font-family: var(--k-mono); }
.kv .kv-sep { width: 1px; height: 18px; background: var(--k-stroke-2); margin: 0 6px; flex: none; }
.kv .kv-hr { display: block; height: 1px; background: var(--k-stroke); margin: 12px 0; }
.kv .kv-muted { color: var(--k-text-3); font-size: 12px; }
.kv .kv-spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--k-stroke-2); border-top-color: var(--k-accent); animation: kv-spin 0.7s linear infinite; display: inline-block; flex: none; }
@keyframes kv-spin { to { transform: rotate(360deg); } }

/* ---- Title bar ------------------------------------------------------------------------------------ */

.kv-titlebar { flex: none; height: 48px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; }
.kv-lights { display: flex; gap: 8px; margin-right: 14px; }
.kv-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2); }
.kv-lights i:nth-child(2) { background: #febc2e; }
.kv-lights i:nth-child(3) { background: #28c840; }
.kv-tb-icon { width: 28px; height: 28px; justify-content: center; border-radius: 7px; color: var(--k-text-2); transition: background-color 0.15s; }
.kv-tb-icon:hover:not(:disabled) { background: var(--k-raised); color: var(--k-text); }
.kv-tb-icon .ki { width: 16px; height: 16px; }
.kv-appicon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; margin: 0 4px 0 2px;
  background: #13160f; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent) 45%, transparent), 0 0 14px -4px color-mix(in srgb, var(--k-accent) 60%, transparent); }
.kv-appicon img { width: 17px; height: 18px; }
.kv-proj-name { font-size: 14px; font-weight: 600; padding: 3px 4px; border-radius: 5px; cursor: text; }
.kv-proj-input { font-size: 14px; font-weight: 600; width: 180px; background: var(--k-raised); border: 1px solid var(--k-accent); border-radius: 6px; padding: 2px 6px; outline: none; }
.kv-tb-sep { width: 1px; height: 18px; background: var(--k-stroke-2); margin: 0 6px; }
.kv-tb-spacer { flex: 1; }
.kv-gen-btn { height: 28px; padding: 0 11px; gap: 6px; border-radius: 8px; background: var(--k-raised); font-size: 12.5px; font-weight: 600; }
.kv-gen-btn:hover { background: var(--k-raised-h); }
.kv-export-btn { height: 30px; padding: 0 13px; gap: 7px; border-radius: 8px; margin-left: 4px; background: var(--k-accent); color: var(--k-on-accent) !important;
  font-size: 13px; font-weight: 600; box-shadow: 0 0 18px -6px var(--k-accent); transition: filter 0.15s, transform 0.15s; }
.kv-export-btn:hover { filter: brightness(1.06); }
.kv-export-btn:active { transform: scale(0.97); }

/* ---- Layout --------------------------------------------------------------------------------------- */

.kv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 8px 8px; }
.kv.on-page .kv-body { display: none; }
.kv-upper { flex: 0 0 478px; display: flex; gap: 6px; min-height: 0; }
.kv-panel { background: var(--k-surface); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--k-stroke); position: relative; }
.kv-timeline { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---- Rail ------------------------------------------------------------------------------------------- */

.kv-rail { flex: 0 0 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.kv-rail-btn { position: relative; width: 50px; height: 52px; border-radius: 11px; flex-direction: column; justify-content: center; gap: 4px;
  font-size: 10.5px; font-weight: 500; color: var(--k-text-2); transition: background-color 0.15s, color 0.15s; }
.kv-rail-btn .ki { width: 19px; height: 19px; color: var(--k-text-2); }
.kv-rail-btn:hover { color: var(--k-text); }
.kv-rail-btn.on { background: var(--k-raised-h); color: var(--k-text); }
.kv-rail-btn.on .ki { color: var(--k-accent); }
.kv-badge { position: absolute; top: 5px; right: 7px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--k-accent); color: var(--k-on-accent);
  font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.kv-rail-sep { width: 26px; height: 1px; background: var(--k-stroke-2); margin: 6px 0; }

/* ---- Side panel --------------------------------------------------------------------------------- */

.kv-side { flex: 0 0 286px; overflow: hidden; display: flex; flex-direction: column; }
.kv-panel-in { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 0; }
.kv-panel-in.scroll { overflow-y: auto; padding-bottom: 12px; }
.kv-ph { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin-bottom: 10px; gap: 8px; }
.kv-ph-title { font-size: 15px; font-weight: 600; margin: 0; }
.kv-ph-right { display: flex; align-items: center; gap: 6px; }
.kv-chip-btn { height: 26px; padding: 0 9px; gap: 5px; border-radius: 7px; background: var(--k-raised); font-size: 12px; font-weight: 500; transition: background-color 0.15s; }
.kv-chip-btn:hover { background: var(--k-raised-h); }
.kv-chip-btn.accent { color: var(--k-accent); }
.kv-chip-btn.danger { color: var(--k-danger); }
.kv-chip-btn .ki { width: 13px; height: 13px; }
.kv-icon-btn { width: 26px; height: 26px; border-radius: 7px; justify-content: center; color: var(--k-text-2); transition: background-color 0.15s; }
.kv-icon-btn:hover { background: var(--k-raised); color: var(--k-text); }
.kv-icon-btn.accent { color: var(--k-accent); }
.kv-icon-btn.toggle.on { background: color-mix(in srgb, var(--k-accent) 20%, transparent); color: var(--k-accent); }
.kv-desc { font-size: 12px; color: var(--k-text-2); margin: -4px 0 10px; line-height: 1.4; }
.kv-sub { font-size: 12px; font-weight: 600; color: var(--k-text-2); margin: 2px 0 8px; }
.kv-sub.row { display: flex; justify-content: space-between; margin-top: 12px; }
.kv-hint { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--k-text-3); margin: 8px 0 0; }
.kv-hint .ki { width: 12px; height: 12px; }
.kv-panel-foot { flex: none; font-size: 11px; color: var(--k-text-3); padding: 8px 2px 10px; }
.kv-muted-note { font-size: 12px; color: var(--k-text-3); }
.kv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 30px 16px; color: var(--k-text-2); font-size: 12px; }
.kv-empty b { color: var(--k-text); font-size: 13.5px; font-weight: 600; }
.kv-empty .ki { width: 22px; height: 22px; color: var(--k-text-3); }
.kv-empty.center { height: 100%; }
.kv-empty.tall { flex: 1; }
.kv-empty-ico { width: 34px; height: 34px; display: grid; place-items: center; color: var(--k-text-3); }
.kv-empty-ico .ki { width: 24px; height: 24px; }

.kv-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 8px; background: var(--k-raised); flex: 1; min-width: 0; }
.kv-search .ki { width: 13px; height: 13px; color: var(--k-text-3); }
.kv-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13px; }
.kv-search input::placeholder { color: var(--k-text-3); }
.kv-media-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }

.kv-seg { display: inline-flex; background: var(--k-raised); border-radius: 8px; padding: 2px; gap: 2px; }
.kv-seg button { height: 26px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--k-text-2); gap: 6px; justify-content: center; transition: background-color 0.15s, color 0.15s; }
.kv-seg button:hover:not(.on) { color: var(--k-text); }
.kv-seg button.on { background: var(--k-accent); color: var(--k-on-accent); }
.kv-seg.small button { height: 24px; padding: 0 7px; }
.kv-seg.pill button.on { background: var(--k-raised-h); color: var(--k-text); }
.kv-seg.wide { flex-wrap: wrap; background: none; padding: 0; gap: 6px; }
.kv-seg.wide button { background: var(--k-raised); height: 30px; padding: 0 11px; }
.kv-seg.wide button.on { background: var(--k-accent); color: var(--k-on-accent); }

/* Media */
.kv-media-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -12px; padding: 0 12px 6px; }
.kv-media-list.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; align-content: start; }
.kv-media-list.list { display: flex; flex-direction: column; gap: 2px; }
.kv-media-item { cursor: grab; min-width: 0; border-radius: 10px; }
.kv-media-item:active { cursor: grabbing; }
.kv-thumb-wrap { position: relative; aspect-ratio: 1.58; border-radius: 10px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px var(--k-stroke); }
.kv-media-item:hover .kv-thumb-wrap { box-shadow: 0 0 0 2px color-mix(in srgb, var(--k-accent) 70%, transparent); }
.kv-thumb { position: absolute; inset: 0; }
.kv-thumb img, .kv-thumb video, .kv-thumb-strip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kv-thumb-strip { background-repeat: no-repeat; }
.kv-thumb.audio { background: linear-gradient(160deg, #3cc596 0%, #23946b 55%, #1b7d59 100%); }
.kv-thumb-wave { position: absolute; inset: 10% 8%; display: flex; align-items: center; gap: 2.5px; }
.kv-thumb-wave i { flex: 1; border-radius: 2px; background: rgba(255, 255, 255, 0.32); }
.kv-thumb-badge { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 10px;
  background: rgba(10, 60, 40, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); display: grid; place-items: center; color: #fff; backdrop-filter: blur(4px); }
.kv-thumb-badge .ki { width: 18px; height: 18px; }
.kv-used { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--k-accent); color: var(--k-on-accent); display: grid; place-items: center; }
.kv-used .ki { width: 10px; height: 10px; }
.kv-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.7); color: #fff; border-radius: 5px; padding: 1px 5px; font: 600 11px/1.4 var(--k-mono); }
.kv-media-name { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12.5px; font-weight: 500; min-width: 0; }
.kv-media-name .ki { width: 12px; height: 12px; color: var(--k-text-3); }
.kv-media-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-media-list.list .kv-media-item { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; padding: 5px; }
.kv-media-list.list .kv-media-item:hover { background: var(--k-raised); }
.kv-media-list.list .kv-thumb-wrap { border-radius: 6px; }
.kv-media-list.list .kv-media-name { margin: 0; }
.kv-media-list.list .kv-thumb-badge, .kv-media-list.list .kv-dur, .kv-media-list.list .kv-used { display: none; }
.kv-media-meta { font: 11px var(--k-mono); color: var(--k-text-3); }
.kv-drag-img { position: fixed; top: -100px; left: 0; padding: 6px 10px; border-radius: 8px; background: #1e1e20; color: #ededef; font: 600 12px -apple-system, sans-serif; }

/* Words */
.kv-words-search { flex: none; margin-bottom: 8px; }
.kv-words { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -12px; padding: 0 12px; outline: none; user-select: none; }
.kv-sentence { padding: 7px 0 8px; border-bottom: 1px solid var(--k-stroke); }
.kv-sentence-tc { display: block; font: 600 11px var(--k-mono); color: var(--k-text-3); margin-bottom: 3px; }
.kv-sentence p { margin: 0; font-size: 13px; line-height: 1.5; font-weight: 500; }
.kv-word { padding: 1px 1.5px; margin: 0 -1.5px; border-radius: 4px; cursor: text; transition: background-color 0.1s; }
.kv-word:hover { background: var(--k-raised-h); }
.kv-word.now { color: var(--k-accent); }
.kv-word.sel { background: color-mix(in srgb, var(--k-accent) 30%, transparent); }
.kv-sentence.editing small { display: block; font-size: 11px; color: var(--k-text-3); margin-top: 4px; }
.kv-correct { font-size: 13px; resize: none; }

/* Motion */
.kv-ask-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kv-ask-chip { height: 30px; padding: 0 8px; gap: 6px; border-radius: 8px; background: color-mix(in srgb, var(--k-accent) 9%, var(--k-raised)); color: var(--k-accent); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; transition: background-color 0.15s; }
.kv-ask-chip:hover { background: color-mix(in srgb, var(--k-accent) 18%, var(--k-raised)); }
.kv-ask-chip .ki { width: 13px; height: 13px; }
.kv-motion-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.kv-motion-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer; }
.kv-motion-item:hover, .kv-motion-item.sel { background: var(--k-raised); }
.kv-motion-thumb { width: 52px; height: 32px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1e8f96, #12585c); }
.kv-motion-thumb.text { background: linear-gradient(135deg, #7446e0, #4b2a99); }
.kv-motion-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kv-motion-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-motion-text small { font: 11px var(--k-mono); color: var(--k-text-3); }

/* Notes */
.kv-notes-tools { margin-bottom: 8px; }
.kv-note-add { margin-bottom: 8px; }
.kv-notes { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.kv-note { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.kv-note:hover { background: var(--k-raised); }
.kv-note.done .kv-note-text b { text-decoration: line-through; color: var(--k-text-3); }
.kv-check { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--k-text-3); justify-content: center; flex: none; }
.kv-check.on { background: var(--k-accent); color: var(--k-on-accent); box-shadow: none; }
.kv-check .ki { width: 10px; height: 10px; }
.kv-note-main { flex: 1; min-width: 0; gap: 8px; text-align: left; }
.kv-note-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kv-note-text { display: flex; flex-direction: column; min-width: 0; }
.kv-note-text b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-note-text small { font-size: 11.5px; color: var(--k-text-3); }
.kv-note-tc { font: 11px var(--k-mono); color: var(--k-text-3); }
.kv-ask-fix { flex: none; justify-content: center; gap: 6px; height: 30px; margin: 8px 0 12px; border-radius: 8px; color: var(--k-accent); font-size: 12.5px; font-weight: 500; }
.kv-ask-fix:disabled { color: var(--k-text-3); }

/* Brief */
.kv-wide-btn { justify-content: center; gap: 6px; height: 30px; border-radius: 8px; background: var(--k-raised); font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.kv-wide-btn:hover { background: var(--k-raised-h); }
.kv-wide-btn .ki { color: var(--k-accent); }
.kv-brief { flex: 1; min-height: 0; resize: none; background: var(--k-raised); border: 1px solid var(--k-stroke); border-radius: 9px; padding: 10px; font-size: 12.5px; line-height: 1.5; outline: none; }
.kv-brief:focus { border-color: var(--k-accent); }
.kv-saved { font-size: 11.5px; color: var(--k-text-3); }
.kv-link-btn { color: var(--k-accent); font-size: 12px; margin: 8px 0 12px; }

/* Style */
.kv-drop { border: 1.5px dashed var(--k-stroke-2); border-radius: 12px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  font-size: 11.5px; color: var(--k-text-2); transition: border-color 0.15s, background-color 0.15s; }
.kv-drop b { color: var(--k-text); font-size: 13px; font-weight: 600; }
.kv-drop:hover, .kv-drop.over { border-color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 6%, transparent); }
.kv-drop-ico { color: var(--k-accent); }
.kv-drop-ico .ki { width: 22px; height: 22px; }
.kv-refs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.kv-ref { width: 56px; height: 40px; border-radius: 6px; background: center / cover; box-shadow: inset 0 0 0 1px var(--k-stroke); }
.kv-looks { display: flex; flex-direction: column; gap: 3px; }
.kv-look { display: flex; align-items: center; gap: 10px; padding: 5px 7px; border-radius: 9px; text-align: left; width: 100%; box-shadow: inset 0 0 0 1px transparent; transition: background-color 0.15s; }
.kv-look:hover { background: var(--k-raised); }
.kv-look.on { background: color-mix(in srgb, var(--k-accent) 12%, var(--k-raised)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent) 60%, transparent); }
.kv-look img, .kv-look-none { width: 44px; height: 30px; border-radius: 5px; object-fit: cover; flex: none; }
.kv-look-none { display: grid; place-items: center; background: var(--k-raised-h); color: var(--k-text-3); }
.kv-look-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kv-look-text b { font-size: 12.5px; font-weight: 600; }
.kv-look-text small { font-size: 11px; color: var(--k-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-look-check { color: var(--k-accent); }

/* Context */
.kv-ctx { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--k-raised); }
.kv-ctx-ico { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--k-warning) 18%, transparent); color: var(--k-warning); }
.kv-ctx-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kv-ctx-text b { font-size: 13px; font-weight: 600; }
.kv-ctx-text small { font-size: 11px; color: var(--k-text-2); }
.kv-ctx-ok { color: var(--k-success); }
.kv-ctx-actions { margin-top: 10px; display: flex; }
.kv-ctx-actions .kv-chip-btn { gap: 7px; }

/* ---- Viewer ----------------------------------------------------------------------------------------- */

.kv-viewer { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px; }
.kv-viewer-top { flex: none; display: flex; justify-content: space-between; align-items: center; height: 30px; }
.kv-viewer-chip { background: var(--k-raised); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--k-text-2); }
.kv-aspect { height: 30px; padding: 0 10px; gap: 6px; border-radius: 8px; background: var(--k-raised); }
.kv-aspect b { font-size: 13px; font-weight: 600; }
.kv-aspect .ki:last-child { width: 11px; height: 11px; color: var(--k-text-2); }
.kv-aspect:hover { background: var(--k-raised-h); }
.kv-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; }
.kv-frame { position: relative; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  transition: width 0.35s var(--ease), height 0.35s var(--ease); container-type: size; }
.kv-layers, .kv-overlay { position: absolute; inset: 0; }
.kv-overlay { pointer-events: none; z-index: 50; }
.kv-clip-layer { position: absolute; inset: 0; will-change: transform, opacity; }
.kv-clip-layer > video, .kv-clip-layer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.kv-tint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; }
.kv-title-text { position: absolute; max-width: 88%; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; line-height: 1.08; white-space: pre-wrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45); outline: none; letter-spacing: -0.01em; }
.kv-title-text[data-font="Dongle"] { font-family: "Dongle", sans-serif; line-height: 0.9; }
.kv-title-text[data-font="Georgia"] { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
.kv-title-text[contenteditable="true"] { user-select: text; -webkit-user-select: text; cursor: text; background: rgba(0, 0, 0, 0.25); }
.kv-caps-line { position: absolute; left: 50%; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.28em; width: max-content; max-width: 86%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; color: #fff; text-align: center; line-height: 1.15;
  text-shadow: 0 0.06em 0.3em rgba(0, 0, 0, 0.75), 0 0 0.08em rgba(0, 0, 0, 0.9); transform: translate(-50%, -50%); }
.kv-caps-line.p-box { background: rgba(0, 0, 0, 0.6); padding: 0.22em 0.55em; border-radius: 0.3em; text-shadow: none; }
.kv-caps-line.p-minimal { font-weight: 500; text-shadow: 0 0.05em 0.25em rgba(0, 0, 0, 0.8); }
.kv-caps-line.p-bold { font-weight: 800; letter-spacing: 0.01em; }
.kv-selbox { position: absolute; pointer-events: auto; cursor: move; box-shadow: inset 0 0 0 1.5px var(--k-accent); transform-origin: 50% 50%; }
.kv-selbox.text { transform: none !important; }
.kv-handle { position: absolute; width: 10px; height: 10px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--k-accent); }
.kv-handle[data-corner="tl"] { left: -5px; top: -5px; cursor: nwse-resize; }
.kv-handle[data-corner="tr"] { right: -5px; top: -5px; cursor: nesw-resize; }
.kv-handle[data-corner="bl"] { left: -5px; bottom: -5px; cursor: nesw-resize; }
.kv-handle[data-corner="br"] { right: -5px; bottom: -5px; cursor: nwse-resize; }
.kv-selbox.text .kv-handle { display: none; }

/* Motion graphics: animations are scrubbed by --lt (negative clip-local time) while paused. */
.kv-gfx { position: absolute; inset: 0; container-type: size; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: #fff; }
.kv-gfx * { animation-play-state: paused !important; animation-fill-mode: both !important; animation-delay: calc(var(--lt, 0s) + var(--d, 0s)) !important; }
.kv-gfx .g-bg { position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 40%, #1d2410, #08090a 70%); animation: g-fade 0.5s ease both; }
.kv-gfx .g-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqh; text-align: center; }
.kv-gfx .g-mark { width: 14cqh; height: auto; animation: g-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.kv-gfx .g-title { font-family: "Dongle", sans-serif; font-size: 16cqh; line-height: 0.8; font-weight: 700; animation: g-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; --d: 0.25s; }
.kv-gfx .g-sub { font-size: 4.2cqh; color: #c8f23c; font-weight: 600; animation: g-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; --d: 0.45s; }
.kv-gfx.g-logo .g-mark { width: 18cqh; animation: g-spin 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.kv-gfx.g-logo .g-title { animation: g-wipe 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; --d: 0.5s; }
.kv-gfx.g-logo .g-sub { color: #edefe8; --d: 0.8s; }
.kv-gfx .g-lt { position: absolute; left: 6cqw; bottom: 12cqh; display: flex; gap: 1.6cqw; align-items: stretch; padding: 2cqh 3cqw 2cqh 0; }
.kv-gfx .g-lt::before { content: ""; position: absolute; inset: 0 -2cqw 0 -1cqw; background: rgba(8, 9, 10, 0.78); border-radius: 1.2cqh; animation: g-slide 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.kv-gfx .g-bar { position: relative; width: 0.8cqw; border-radius: 1cqh; background: #c8f23c; animation: g-grow 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; --d: 0.15s; }
.kv-gfx .g-lt > div { position: relative; }
.kv-gfx .g-lt .g-title { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 6cqh; line-height: 1.1; --d: 0.25s; }
.kv-gfx .g-lt .g-sub { font-size: 3.6cqh; --d: 0.4s; }
.kv-gfx .g-words { flex-direction: row; flex-wrap: wrap; gap: 0 2.4cqw; padding: 0 8cqw; }
.kv-gfx .g-words span { font-family: "Dongle", sans-serif; font-size: 20cqh; line-height: 0.85; font-weight: 700; animation: g-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.kv-gfx .g-words span:nth-child(even) { color: #c8f23c; }
.kv-gfx .g-chart { position: absolute; inset: 14cqh 10cqw; display: flex; flex-direction: column; justify-content: center; gap: 1.2cqh; padding: 4cqh 4cqw; border-radius: 2cqh; background: rgba(8, 9, 10, 0.8); animation: g-fade 0.4s ease both; }
.kv-gfx .g-chart .g-title { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 6cqh; line-height: 1.1; }
.kv-gfx .g-chart .g-sub { color: #a6ab9e; font-weight: 500; }
.kv-gfx .g-bars { display: flex; flex-direction: column; gap: 2cqh; margin-top: 2cqh; }
.kv-gfx .g-barrow { display: grid; grid-template-columns: 14cqw 1fr 9cqw; align-items: center; gap: 2cqw; font-size: 3.8cqh; }
.kv-gfx .g-barrow i { height: 5cqh; border-radius: 1cqh; background: linear-gradient(90deg, #c8f23c, #8fd400); width: var(--w); animation: g-grow-x 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; transform-origin: left; }
.kv-gfx .g-barrow:first-child i { background: #4a4f42; }
.kv-gfx .g-barrow b { font-weight: 700; animation: g-fade 0.3s ease both; }
.kv-gfx .g-pill { padding: 2.2cqh 5cqw; border-radius: 99cqh; background: #c8f23c; color: #13160f; font-size: 6cqh; font-weight: 700; animation: g-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both, g-pulse 1.4s ease-in-out 0.8s infinite; }
@keyframes g-fade { from { opacity: 0; } }
@keyframes g-pop { from { opacity: 0; transform: scale(0.5); } }
@keyframes g-rise { from { opacity: 0; transform: translateY(4cqh); } }
@keyframes g-spin { from { opacity: 0; transform: rotate(-120deg) scale(0.3); } }
@keyframes g-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes g-slide { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes g-grow { from { transform: scaleY(0); } }
@keyframes g-grow-x { from { transform: scaleX(0); } }
@keyframes g-pulse { 50% { box-shadow: 0 0 0 1.6cqh rgba(200, 242, 60, 0.25); } }

/* Transport */
.kv-transport { flex: none; display: flex; align-items: center; gap: 4px; height: 50px; margin-top: 10px; padding: 0 16px 0 12px; border-radius: 25px; background: var(--k-raised); }
.kv-tp { width: 30px; height: 30px; justify-content: center; border-radius: 50%; color: var(--k-text); }
.kv-tp:hover { background: var(--k-raised-h); }
.kv-tp .ki { width: 15px; height: 15px; }
.kv-play { width: 38px; height: 38px; justify-content: center; border-radius: 50%; background: #fff; color: #000; margin: 0 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
[data-theme="light"] .kv-play { background: #16161a; color: #fff; }
.kv-play:active { transform: scale(0.92); }
.kv-play .ki { width: 16px; height: 16px; }
.kv-time { font: 600 13px var(--k-mono); min-width: 66px; margin-left: 10px; font-variant-numeric: tabular-nums; }
.kv-dur-time { font: 500 13px var(--k-mono); color: var(--k-text-3); min-width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
.kv-scrub { flex: 1; height: 20px; position: relative; cursor: pointer; margin: 0 8px; }
.kv-scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: var(--k-stroke-2); }
.kv-scrub-fill { position: absolute; left: 0; top: 8px; height: 4px; border-radius: 2px; width: var(--p, 0%); background: color-mix(in srgb, var(--k-accent) 45%, transparent); }
.kv-scrub-knob { position: absolute; top: 4px; left: var(--p, 0%); width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--k-accent); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, 0.4); }

/* ---- Right panel: Inspector / AI Chat -------------------------------------------------------- */

.kv-right { flex: 0 0 428px; display: flex; flex-direction: column; overflow: hidden; }
.kv-right-tabs { flex: none; padding: 8px 8px 8px; border-bottom: 1px solid var(--k-stroke); }
.kv-seg.tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding: 3px; border-radius: 10px; }
.kv-seg.tabs button { height: 30px; border-radius: 8px; font-size: 13px; font-weight: 500; gap: 7px; }
.kv-seg.tabs button.on { background: var(--k-raised-h); color: var(--k-text); font-weight: 600; }
.kv-seg.tabs .ki { width: 14px; height: 14px; }
.kv-count { font-size: 11px; font-weight: 500; color: var(--k-text-2); }
.kv-insp-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.kv-insp { display: flex; flex-direction: column; gap: 10px; }
.kv-insp-head { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; background: var(--k-raised); }
.kv-insp-head b { display: block; font-size: 14px; font-weight: 600; max-width: 290px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-insp-head small { font-size: 12px; color: var(--k-text-3); }
.kv-tile { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; background: #3460c8; }
.kv-tile .ki { width: 18px; height: 18px; }
.kv-tile.audio { background: #1f8a62; }
.kv-tile.text { background: #7446e0; }
.kv-tile.captions { background: #d9861c; }
.kv-tile.compound { background: #1e8f96; }
.kv-tile.small { width: 28px; height: 28px; border-radius: 7px; background: var(--k-raised-h); color: var(--k-text-2); }
.kv-sec { border-radius: 11px; box-shadow: inset 0 0 0 1px var(--k-stroke-2); }
.kv-sec-head { width: 100%; height: 42px; padding: 0 12px; gap: 9px; font-size: 13.5px; font-weight: 600; }
.kv-sec-ico { color: var(--k-accent); }
.kv-sec-acc { margin-left: auto; display: flex; gap: 2px; }
.kv-sec-chev { width: 12px !important; height: 12px !important; color: var(--k-text-2); }
.kv-sec-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 11px; }
.kv-mini-btn { width: 24px; height: 24px; justify-content: center; border-radius: 6px; color: var(--k-text-2); }
.kv-mini-btn:hover:not(:disabled) { background: var(--k-raised); color: var(--k-text); }
.kv-mini-btn .ki { width: 13px; height: 13px; }
.kv-sl { display: flex; flex-direction: column; gap: 4px; }
.kv-sl-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--k-text-2); }
.kv-sl-val { font-variant-numeric: tabular-nums; color: var(--k-text-3); }
.kv-sl-track { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.kv-sl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--k-stroke-2); }
.kv-sl-fill { position: absolute; top: 7px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--k-accent) 55%, transparent); }
.kv-sl-zero { position: absolute; top: 5px; width: 1px; height: 8px; background: var(--k-text-3); }
.kv-sl-knob { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.2); z-index: 1; }
.kv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kv-chip { height: 28px; padding: 0 10px; border-radius: 7px; background: var(--k-raised); font-size: 12.5px; font-weight: 600; }
.kv-chip:hover:not(.on) { background: var(--k-raised-h); }
.kv-chip.on { background: var(--k-accent); color: var(--k-on-accent); }
.kv-more-btn { gap: 4px; font-size: 12px; color: var(--k-text-2); }
.kv-more-btn .ki { width: 11px; height: 11px; }
.kv-more-body { display: flex; flex-direction: column; gap: 11px; margin-top: 10px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--k-text-2); }
.kv-row.center { justify-content: center; }
.kv-toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--k-text-2); }
.kv-switch { width: 30px; height: 18px; border-radius: 9px; background: var(--k-stroke-2); position: relative; transition: background-color 0.2s; }
.kv-switch i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.kv-switch.on { background: var(--k-accent); }
.kv-switch.on i { transform: translateX(12px); }
.kv-stepper { display: flex; align-items: center; height: 30px; border-radius: 8px; background: var(--k-raised); }
.kv-stepper button { width: 28px; height: 30px; justify-content: center; color: var(--k-text-2); }
.kv-stepper b { font-size: 14px; font-weight: 600; padding: 0 4px; color: var(--k-text); }
.kv-stepper small { font-size: 12px; color: var(--k-text-3); font-weight: 400; }
.kv-swatches { display: flex; gap: 7px; }
.kv-swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.kv-swatch.on { box-shadow: 0 0 0 2px var(--k-surface), 0 0 0 3.5px var(--k-text); }
.kv-swatches.big { gap: 9px; margin-bottom: 8px; }
.kv-swatches.big .kv-swatch { width: 22px; height: 22px; }
.kv-input { width: 100%; background: var(--k-raised); border: 1px solid var(--k-stroke); border-radius: 8px; padding: 7px 9px; font-size: 13px; outline: none; resize: none; }
.kv-input:focus { border-color: var(--k-accent); }
.kv-input::placeholder { color: var(--k-text-3); }
.kv-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--k-text-2); }
.kv-warn { font-size: 11.5px; color: var(--k-warning); margin: 0; line-height: 1.4; }
.kv-btn { height: 28px; padding: 0 12px; gap: 6px; border-radius: 8px; font-size: 12.5px; font-weight: 600; justify-content: center; transition: filter 0.15s, background-color 0.15s; }
.kv-btn .ki { width: 13px; height: 13px; }
.kv-btn.primary { background: var(--k-accent); color: var(--k-on-accent); }
.kv-btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.kv-btn.secondary { background: var(--k-raised); }
.kv-btn.secondary:hover:not(:disabled) { background: var(--k-raised-h); }
.kv-btn.ghost { color: var(--k-text-2); }
.kv-btn.small { height: 26px; font-size: 12px; padding: 0 10px; background: var(--k-raised); }
.kv-btn.small:hover { background: var(--k-raised-h); }
.kv-btn.lg { height: 36px; padding: 0 20px; font-size: 13.5px; }

/* Chat */
.kv-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.kv-chat-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 4px 14px; }
.kv-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.kv-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kv-status.ready { color: var(--k-success); }
.kv-status.busy { color: var(--k-purple); }
.kv-status.busy i { animation: kv-pulse 1s ease-in-out infinite; }
@keyframes kv-pulse { 50% { opacity: 0.3; } }
.kv-chat-icons { display: flex; gap: 2px; }
.kv-chat-icons .ki { width: 16px; height: 16px; }
.kv-chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 14px 12px; display: flex; flex-direction: column; gap: 10px; user-select: text; -webkit-user-select: text; }
.kv-sys { margin: 0; text-align: center; font-size: 12px; color: var(--k-text-2); }
.kv-user { align-self: flex-end; max-width: 86%; padding: 9px 13px; border-radius: 14px; background: color-mix(in srgb, var(--k-accent) 17%, var(--k-raised)); font-size: 13.5px; line-height: 1.42; white-space: pre-wrap; animation: kv-in 0.25s var(--ease) both; }
.kv-user-files { display: flex; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--k-text-2); }
.kv-user-files span { display: inline-flex; gap: 4px; align-items: center; }
.kv-ai { display: flex; gap: 8px; animation: kv-in 0.3s var(--ease) both; }
.kv-ai-ico { color: #d06cf5; padding-top: 3px; }
.kv-ai-ico .ki { width: 13px; height: 13px; }
.kv-ai-text { font-size: 13.5px; line-height: 1.45; flex: 1; min-width: 0; }
.kv-ai-list { margin: 6px 0 0; padding-left: 18px; color: var(--k-text-2); font-size: 12.5px; line-height: 1.6; list-style: disc; }
.kv-suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; user-select: none; }
.kv-suggest button { text-align: left; padding: 8px 11px; border-radius: 9px; background: var(--k-raised); font-size: 12.5px; line-height: 1.35; box-shadow: inset 0 0 0 1px var(--k-stroke); transition: box-shadow 0.15s, background-color 0.15s; }
.kv-suggest button:hover { box-shadow: inset 0 0 0 1px var(--k-accent); background: var(--k-raised-h); }
@keyframes kv-in { from { opacity: 0; transform: translateY(6px); } }
.kv-steps { border-radius: 8px; background: color-mix(in srgb, var(--k-text) 5%, transparent); padding: 7px 10px; animation: kv-in 0.25s var(--ease) both; user-select: none; }
.kv-steps-head { width: 100%; gap: 7px; font-size: 13px; font-weight: 600; text-align: left; }
.kv-steps-chev { width: 11px !important; height: 11px !important; color: var(--k-text-2); transition: transform 0.2s var(--ease); }
.kv-steps.open .kv-steps-chev { transform: rotate(90deg); }
.kv-steps-ico { color: #d06cf5; }
.kv-steps-ico .ki { width: 14px; height: 14px; }
.kv-steps-count { color: var(--k-text-2); font-weight: 500; }
.kv-steps-list { display: none; flex-direction: column; gap: 5px; margin-top: 7px; padding-left: 18px; }
.kv-steps.open .kv-steps-list { display: flex; }
.kv-step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--k-text-2); }
.kv-step code { margin-left: auto; font: 11px var(--k-mono); color: var(--k-text-3); }
.kv-step-ico { width: 14px; display: grid; place-items: center; }
.kv-step-ico .ki { width: 12px; height: 12px; color: var(--k-success); }
.kv-step.run .ki, .kv-step:not(.run) .kv-spin { display: none; }
.kv-elapsed { display: flex; align-items: center; gap: 5px; margin: -4px 0 0; padding-left: 21px; font-size: 11.5px; color: var(--k-text-3); }
.kv-elapsed .ki { width: 11px; height: 11px; }
.kv-turn { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--k-purple) 11%, transparent); animation: kv-in 0.3s var(--ease) both; user-select: none; }
.kv-turn.undone { background: color-mix(in srgb, var(--k-purple) 4%, transparent); }
.kv-turn-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--k-purple); margin-bottom: 2px; }
.kv-turn.undone .kv-turn-title { color: var(--k-text-2); }
.kv-turn-title .ki { width: 13px; height: 13px; }
.kv-turn p { margin: 0; font-size: 12px; color: var(--k-text-2); }
.kv-turn-actions { display: flex; gap: 8px; margin-top: 6px; }
.kv-chat-ctx { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; border-top: 1px solid var(--k-stroke); }
.kv-ctx-chip { height: 24px; padding: 0 8px; gap: 5px; border-radius: 6px; background: var(--k-raised); font-size: 12px; color: var(--k-text-2); max-width: 220px; }
.kv-ctx-chip:first-child { font-family: var(--k-mono); font-size: 11.5px; }
.kv-ctx-chip.on { color: var(--k-accent); background: color-mix(in srgb, var(--k-accent) 12%, var(--k-raised)); }
.kv-ctx-chip .ki { width: 12px; height: 12px; }
.kv-composer { flex: none; margin: 8px 10px 10px; padding: 10px 10px 8px 12px; border-radius: 13px; background: color-mix(in srgb, var(--k-text) 3%, var(--k-surface)); box-shadow: inset 0 0 0 1px var(--k-stroke-2); }
.kv-composer:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent) 60%, transparent); }
.kv-composer-top { display: flex; gap: 8px; align-items: flex-start; }
.kv-plus { width: 20px; height: 22px; justify-content: center; color: var(--k-text-2); }
.kv-plus .ki { width: 16px; height: 16px; }
.kv-composer-input { flex: 1; min-height: 44px; max-height: 110px; background: none; border: 0; outline: none; resize: none; font-size: 14px; line-height: 1.4; padding: 1px 0; }
.kv-composer-input::placeholder { color: var(--k-text-3); }
.kv-composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.kv-composer-menus { display: flex; gap: 4px; min-width: 0; flex: 1; overflow: hidden; }
.kv-cmenu { height: 28px; padding: 0 6px 0 7px; gap: 4px; border-radius: 7px; background: var(--k-raised); font-size: 11.5px; font-weight: 600; white-space: nowrap; flex: none; }
.kv-cmenu:hover { background: var(--k-raised-h); }
.kv-cmenu .ki { width: 13px; height: 13px; color: var(--k-text-2); }
.kv-cmenu + .kv-cmenu .ki:first-child { display: none; }
.kv-cmenu .ki:last-child { width: 10px; height: 10px; }
.kv-composer-right { display: flex; align-items: center; gap: 5px; flex: none; }
.kv-rings { display: flex; align-items: center; gap: 3px; }
.kv-ring { display: flex; align-items: center; gap: 2px; }
.kv-ring small { font-size: 11px; font-weight: 600; color: var(--k-accent); }
.kv-ring-dial { position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.kv-ring-dial b { position: relative; font-size: 9px; font-weight: 700; }
.kv-ring-svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.kv-ring-svg circle { fill: none; stroke-width: 2.4; }
.kv-ring-svg .bg { stroke: var(--k-stroke-2); }
.kv-ring-svg .fg { stroke: var(--k-accent); stroke-linecap: round; transition: stroke-dasharray 0.6s var(--ease); }
.kv-ring-sep { width: 1px; height: 16px; background: var(--k-stroke-2); }
.kv-send { width: 24px; height: 24px; justify-content: center; border-radius: 50%; background: var(--k-raised-h); color: var(--k-text-3); transition: background-color 0.15s, color 0.15s; }
.kv-send .ki { width: 13px; height: 13px; }
.kv-send.ready { background: var(--k-accent); color: var(--k-on-accent); }
.kv-send.stop { background: var(--k-text); color: var(--k-surface); }
.kv-attach-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kv-attach-row:not(:empty) { margin-bottom: 8px; }
.kv-attach { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 8px; border-radius: 6px; background: var(--k-raised); font-size: 12px; }
.kv-attach .ki { width: 12px; height: 12px; }

/* ---- Timeline ---------------------------------------------------------------------------------------- */

.kv-tl-toolbar { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-bottom: 1px solid var(--k-stroke); }
.kv-tl-tools { display: flex; align-items: center; gap: 2px; }
.kv-tool { height: 30px; padding: 0 9px; gap: 7px; border-radius: 7px; font-size: 13px; font-weight: 500; transition: background-color 0.15s; }
.kv-tool .ki { width: 15px; height: 15px; color: var(--k-text-2); }
.kv-tool.icon { padding: 0 7px; }
.kv-tool:hover { background: var(--k-raised); }
.kv-tool.on { background: color-mix(in srgb, var(--k-accent) 20%, transparent); }
.kv-tool.on .ki { color: var(--k-accent); }
.kv-tool.dim { opacity: 0.35; }
.kv-tool.rec { color: var(--k-playhead); background: color-mix(in srgb, var(--k-playhead) 15%, transparent); }
.kv-tool.rec .ki { color: var(--k-playhead); animation: kv-pulse 1s infinite; }
.kv-tl-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.kv-tl-row { flex: none; display: grid; grid-template-columns: 196px 1fr; gap: 8px; padding: 0 10px; }
.kv-tl-row.top { height: 18px; align-items: center; }
.kv-tl-row.ruler-row { height: 26px; }
.kv-nav { height: 8px; position: relative; }
.kv-nav-track { position: absolute; inset: 0; border-radius: 4px; cursor: pointer; }
.kv-nav-thumb { position: absolute; top: 0; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--k-text) 26%, transparent); transition: background-color 0.15s; }
.kv-nav-track:hover .kv-nav-thumb { background: color-mix(in srgb, var(--k-text) 40%, transparent); }
.kv-nav-track.full .kv-nav-thumb { background: color-mix(in srgb, var(--k-text) 14%, transparent); }
.kv-ruler { position: relative; overflow: hidden; cursor: pointer; border-bottom: 1px solid var(--k-stroke-2); }
.kv-ruler-inner { position: absolute; inset: 0; }
.kv-tick { position: absolute; bottom: 0; width: 1px; height: 4px; background: var(--k-text-3); opacity: 0.6; }
.kv-tick.major { height: 8px; opacity: 1; }
.kv-tick-label { position: absolute; top: 2px; font: 500 11px var(--k-mono); color: var(--k-text-2); white-space: nowrap; pointer-events: none; }
.kv-marker { position: absolute; top: 4px; width: 14px; height: 16px; margin-left: -2px; color: var(--mc); justify-content: flex-start; z-index: 2; }
.kv-marker .ki { width: 13px; height: 13px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }
.kv-marker.done { opacity: 0.45; }
.kv-tracks { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 10px 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.kv-tr { flex: none; display: grid; grid-template-columns: 196px 1fr; gap: 8px; }
.kv-tr.spacer { height: 34px; }
.kv-th { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 9px; border-radius: 10px; background: var(--k-raised); min-width: 0; transition: background-color 0.15s; }
.kv-th.ghost { background: none; }
.kv-th.active { background: color-mix(in srgb, var(--k-accent) 22%, var(--k-raised)); }
.kv-th-kind { width: 14px !important; height: 14px !important; color: var(--k-text-2); }
.kv-th.active .kv-th-kind { color: var(--k-accent); }
.kv-th-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.kv-th-input { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; background: var(--k-surface); border: 1px solid var(--k-accent); border-radius: 5px; padding: 1px 4px; outline: none; }
.kv-th-btns { display: flex; gap: 0; }
/* 28px so the buttons stay a comfortable target when the editor is scaled down to fit the page. */
.kv-th-btn { width: 28px; height: 28px; justify-content: center; border-radius: 6px; color: var(--k-text-2); }
.kv-th-btn:hover { background: var(--k-raised-h); color: var(--k-text); }
.kv-th-btn .ki { width: 12.5px; height: 12.5px; }
.kv-th-btn.warn { color: var(--k-warning); }
.kv-th-btn.accent { color: var(--k-accent); }
.kv-th-resize { position: absolute; left: 6px; right: 6px; bottom: -5px; height: 6px; cursor: ns-resize; z-index: 2; }
.kv-tr .kv-th-resize:hover { background: color-mix(in srgb, var(--k-accent) 50%, transparent); border-radius: 3px; }
.kv-lane { position: relative; overflow: hidden; border-radius: 6px; }
.kv-tr.locked .kv-lane::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(128, 128, 128, 0.12) 6px 8px); }
.kv-tr.hidden .kv-lane .kv-c { opacity: 0.35; filter: grayscale(0.7); }
.kv-tr.muted .kv-lane .kv-c { opacity: 0.45; }

/* Clips */
.kv-c { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; overflow: hidden; cursor: grab; touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28); transition: box-shadow 0.12s, opacity 0.15s; }
.kv-c:active { cursor: grabbing; }
.kv-c-body { position: absolute; inset: 0; }
.kv-c.video .kv-c-body, .kv-c.image .kv-c-body { background: #3460c8; }
.kv-strip { position: absolute; inset: 0 0 3px; display: flex; overflow: hidden; }
.kv-strip i { flex: none; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; box-shadow: inset -1px 0 0 #5b8cff; }
.kv-c.video .kv-c-body::after, .kv-c.image .kv-c-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #5b8cff; }
.kv-c.audio .kv-c-body { background: linear-gradient(180deg, #3ab386, #23966c); }
.kv-wave { position: absolute; left: 0; bottom: 2px; display: block; }
.kv-c.text .kv-c-body { background: linear-gradient(180deg, #8459ee, #7446e0); }
.kv-c.captions .kv-c-body { background: linear-gradient(180deg, #e3922a, #d9861c); }
.kv-c.graphic .kv-c-body { background: linear-gradient(180deg, #24a3ab, #1e8f96); }
.kv-c-caps { position: absolute; left: 0; right: 0; top: 19px; bottom: 3px; }
.kv-c-caps i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: rgba(255, 236, 205, 0.5); box-shadow: inset 0 0 0 1px rgba(120, 60, 0, 0.25); font: 600 9.5px/1 var(--k-font); font-style: normal; color: #3d2200;
  padding: 3px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kv-c-desc { position: absolute; left: 6px; bottom: 4px; right: 6px; font-size: 10.5px; color: rgba(255, 255, 255, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-c-label { position: absolute; top: 3px; left: 4px; max-width: calc(100% - 10px); display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; pointer-events: none; }
.kv-c.audio .kv-c-label { background: rgba(0, 40, 26, 0.45); }
.kv-c-label .ki { width: 11px; height: 11px; }
.kv-c.tiny .kv-c-label, .kv-c.tiny .kv-c-badges { display: none; }
.kv-c-badges { position: absolute; top: 3px; right: 5px; display: flex; gap: 3px; z-index: 2; pointer-events: none; }
.kv-c-badges > * { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 10px; font-weight: 700; }
.kv-c-badges .ki { width: 16px; height: 16px; padding: 2px 3px; box-sizing: border-box; border-radius: 4px; background: rgba(0, 0, 0, 0.5); color: #fff; }
.kv-vol { position: absolute; left: 0; right: 0; height: 9px; margin-top: -4px; cursor: ns-resize; z-index: 3; }
.kv-vol::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: #f2d94e; opacity: 0.95; }
.kv-vol:hover::after { height: 2px; top: 3.5px; }
.kv-vol-tip { position: absolute; right: 6px; top: 3px; z-index: 4; padding: 1px 5px; border-radius: 4px; background: #000; color: #f2d94e; font: 600 10.5px var(--k-mono); }
.kv-fade { position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: none; background: rgba(0, 0, 0, 0.42); }
.kv-fade.in { left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.kv-fade.out { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.kv-fh { position: absolute; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.35); z-index: 4; cursor: ew-resize; opacity: 0; transition: opacity 0.12s; }
.kv-fh.l { margin-left: 2px; }
.kv-fh.r { margin-right: 2px; }
.kv-c:hover .kv-fh, .kv-c.sel .kv-fh { opacity: 1; }
.kv-c .kv-fh.l { top: 3px; }
.kv-c:hover .kv-c-label, .kv-c.sel .kv-c-label { margin-left: 10px; }
.kv-trim { position: absolute; top: 0; bottom: 0; width: 8px; z-index: 3; cursor: ew-resize; }
.kv-trim.l { left: 0; }
.kv-trim.r { right: 0; }
.kv-trim::after { content: ""; position: absolute; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: 2px; background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.12s; }
.kv-trim.l::after { left: 2px; }
.kv-trim.r::after { right: 2px; }
.kv-c:hover .kv-trim::after { opacity: 0.55; }
.kv-c.sel .kv-trim::after { opacity: 1; }
.kv-c.sel { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--k-accent); z-index: 4; }
.kv-c.muted { opacity: 0.55; }
.kv-c.dragging { opacity: 0.85; z-index: 8; box-shadow: inset 0 0 0 2px #fff, 0 8px 22px rgba(0, 0, 0, 0.5); cursor: grabbing; }
.kv-c.trimming { z-index: 8; }
.kv-tracks:has(.kv-c.dragging) { overflow: visible; }
.kv-tracks:has(.kv-c.dragging) .kv-lane { overflow: visible; }
.kv-gap { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; background: color-mix(in srgb, var(--k-accent) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--k-accent); display: grid; place-items: center; z-index: 2; }
.kv-gap-x { width: 20px; height: 20px; justify-content: center; border-radius: 50%; background: var(--k-accent); color: var(--k-on-accent); }
.kv-gap-x .ki { width: 11px; height: 11px; }
.kv-marquee { position: absolute; z-index: 20; pointer-events: none; border: 1px solid var(--k-accent); background: color-mix(in srgb, var(--k-accent) 12%, transparent); border-radius: 3px; }
.kv-playhead { position: absolute; top: 18px; bottom: 0; left: 0; width: 0; z-index: 15; pointer-events: none; }
.kv-playhead::before { content: ""; position: absolute; top: 8px; bottom: 0; left: -0.75px; width: 1.5px; background: var(--k-playhead); box-shadow: 0 0 6px rgba(255, 92, 122, 0.5); }
.kv-ph-pill { position: absolute; top: 2px; left: 0; transform: translateX(-12%); background: var(--k-playhead); color: #fff; font: 700 11.5px/1 var(--k-mono); padding: 4px 7px; border-radius: 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kv-snapline { position: absolute; top: 18px; bottom: 0; left: 0; width: 1px; background: var(--k-accent); z-index: 14; pointer-events: none; box-shadow: 0 0 6px var(--k-accent); }
.kv-rec { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; background: rgba(255, 92, 122, 0.3); box-shadow: inset 0 0 0 1px var(--k-playhead); z-index: 5; color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; padding-left: 6px; overflow: hidden; white-space: nowrap; }
.kv-rec span { display: inline-flex; gap: 4px; align-items: center; }
.kv-rec .ki { width: 10px; height: 10px; color: var(--k-playhead); }
.kv-drop-ghost { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; border: 2px dashed var(--k-accent); background: color-mix(in srgb, var(--k-accent) 15%, transparent); font-size: 11px; font-weight: 600; padding: 3px 6px; z-index: 9; pointer-events: none; white-space: nowrap; overflow: hidden; }
.kv-lane.empty-lane { min-height: 30px; }

/* Clip action bar */
.kv-clipbar { position: absolute; top: 0; left: 0; z-index: 30; display: flex; align-items: center; gap: 2px; height: 38px; padding: 4px; border-radius: 12px;
  background: var(--k-raised); box-shadow: inset 0 0 0 1px var(--k-stroke-2), 0 6px 28px rgba(0, 0, 0, 0.45); animation: kv-bar-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); white-space: nowrap; }
@keyframes kv-bar-in { from { opacity: 0; scale: 0.85; } }
.kv-bar-btn { height: 30px; padding: 0 9px; gap: 5px; border-radius: 8px; font-size: 12px; font-weight: 500; }
.kv-bar-btn:hover:not(:disabled) { background: var(--k-raised-h); }
.kv-bar-btn .ki { width: 14px; height: 14px; }
.kv-bar-btn.danger { color: var(--k-danger); }
.kv-bar-btn.accent { color: var(--k-accent); }

/* ---- Floating layers ------------------------------------------------------------------------------- */

.kv-layer { position: absolute; z-index: 100; animation: kv-pop-in 0.16s var(--ease); }
.kv-layer.out { opacity: 0; transition: opacity 0.12s; pointer-events: none; }
@keyframes kv-pop-in { from { opacity: 0; transform: translateY(-3px) scale(0.98); } }
.kv-menu { min-width: 210px; max-width: 320px; max-height: 420px; overflow-y: auto; padding: 5px; border-radius: 10px; background: var(--k-menu);
  box-shadow: 0 0 0 1px var(--k-stroke-2), 0 14px 40px rgba(0, 0, 0, 0.45); }
.kv-menu-item { width: 100%; gap: 7px; padding: 5px 9px 5px 4px; border-radius: 6px; font-size: 13px; text-align: left; }
.kv-menu-item:hover:not(:disabled), .kv-menu-item.on { background: var(--k-accent); color: var(--k-on-accent); }
.kv-menu-item:hover:not(:disabled) small, .kv-menu-item.on small, .kv-menu-item:hover:not(:disabled) kbd { color: inherit; opacity: 0.75; }
.kv-menu-item.danger { color: var(--k-danger); }
.kv-menu-item.danger:hover { background: var(--k-danger); color: #fff; }
.kv-menu-item .ki { width: 14px; height: 14px; }
.kv-menu-check { width: 14px; display: grid; place-items: center; }
.kv-menu-check .ki { width: 11px; height: 11px; }
.kv-menu-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kv-menu-label small { font-size: 11px; color: var(--k-text-2); }
.kv-menu-item kbd { font-size: 11.5px; color: var(--k-text-3); margin-left: 12px; }
.kv-menu-section { padding: 6px 10px 3px 22px; font-size: 11px; font-weight: 600; color: var(--k-text-3); }
.kv-menu-sep { height: 1px; margin: 4px 6px; background: var(--k-stroke-2); }
.kv-mention { min-width: 240px; }
.kv-pop { width: 260px; padding: 12px; border-radius: 12px; background: var(--k-menu); box-shadow: 0 0 0 1px var(--k-stroke-2), 0 14px 40px rgba(0, 0, 0, 0.45); }
.kv-pop-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--k-text-2); margin-bottom: 9px; }
.kv-pop-title .ki { width: 13px; height: 13px; color: var(--k-warning); }
.kv-pop-note { margin: 0; font-size: 11.5px; color: var(--k-text-3); line-height: 1.4; }
.kv-pop-actions { display: flex; justify-content: space-between; margin-top: 4px; }
.kv-marker-pop { display: flex; flex-direction: column; gap: 8px; }
.kv-marker-pop .kv-pop-title { margin: 0; }
.kv-history-pop { width: 270px; }
.kv-history { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.kv-history-row { gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; text-align: left; }
.kv-history-row:hover { background: var(--k-raised); }
.kv-history-row.current { background: color-mix(in srgb, var(--k-accent) 22%, transparent); }
.kv-history-row.future { opacity: 0.45; }
.kv-history-row .ki { width: 13px; height: 13px; color: var(--k-text-2); }
.kv-settings .kv-menu-item { padding-left: 6px; }
.kv-toast { position: absolute; left: 50%; bottom: 22px; z-index: 120; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; max-width: 520px;
  padding: 9px 15px; border-radius: 11px; background: var(--k-menu); box-shadow: 0 0 0 1px var(--k-stroke-2), 0 10px 30px rgba(0, 0, 0, 0.4); font-size: 13px; text-align: center;
  transition: opacity 0.2s, transform 0.25s var(--ease); }
.kv-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Sheets */
.kv-sheet-backdrop { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.18s; }
.kv-sheet-backdrop.in { opacity: 1; }
.kv-sheet { width: 540px; max-height: 760px; overflow-y: auto; padding: 16px 18px 18px; border-radius: 14px; background: var(--k-surface); box-shadow: 0 0 0 1px var(--k-stroke-2), 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.98); transition: transform 0.25s var(--ease); }
.kv-sheet-backdrop.in .kv-sheet { transform: none; }
.kv-sheet.wide { width: 900px; }
.kv-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kv-sheet-title { margin: 0; font-size: 16px; font-weight: 600; }
.kv-gen { display: flex; flex-direction: column; gap: 12px; }
.kv-soon { display: flex; gap: 9px; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; color: var(--k-text-2);
  background: color-mix(in srgb, var(--k-accent) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent) 30%, transparent); }
.kv-soon b { color: var(--k-text); }
.kv-soon .ki { color: var(--k-accent); margin-top: 2px; }
.kv-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 22px; }
.kv-keys h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.kv-keys section.wide { grid-column: 1 / -1; }
.kv-key-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--k-stroke); font-size: 12.5px; color: var(--k-text-2); }
.kv-key-row b { color: var(--k-text); font-weight: 500; }
.kv-keys-k { display: flex; gap: 3px; flex: none; }
.kv-keys kbd { min-width: 20px; text-align: center; padding: 1px 5px; border-radius: 5px; background: var(--k-raised); box-shadow: inset 0 0 0 1px var(--k-stroke-2); font-size: 11.5px; color: var(--k-text); }
.kv-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }

/* Export page */
.kv-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 8px 8px; animation: kv-in 0.25s var(--ease); }
.kv-page-head { flex: none; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 10px; border-radius: 14px; background: var(--k-surface); box-shadow: inset 0 0 0 1px var(--k-stroke); }
.kv-page-title { margin: 0; font-size: 17px; font-weight: 600; }
.kv-page-head span { font-size: 12.5px; color: var(--k-text-2); }
.kv-back { height: 30px; padding: 0 10px 0 6px; gap: 4px; border-radius: 8px; background: var(--k-raised); font-size: 12.5px; font-weight: 600; }
.kv-back:hover { background: var(--k-raised-h); }
.kv-exp-main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; overflow-y: auto;
  border-radius: 14px 14px 0 0; background: var(--k-surface); box-shadow: inset 1px 1px 0 var(--k-stroke), inset -1px 0 0 var(--k-stroke); }
.kv-exp-thumb { position: relative; height: 230px; max-width: 420px; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--k-stroke-2); transition: aspect-ratio 0.3s var(--ease); }
.kv-exp-thumb i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; }
.kv-exp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kv-exp-audio { position: absolute; inset: 0; display: grid; place-items: center; color: var(--k-success); background: linear-gradient(160deg, #1d7a58, #0f3d2c); }
.kv-exp-audio .ki { width: 40px; height: 40px; }
.kv-exp-spec { margin: 0; font-size: 12.5px; color: var(--k-text-2); font-variant-numeric: tabular-nums; }
.kv-exp-spec b { color: var(--k-text); }
.kv-ready { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; color: var(--k-success); background: color-mix(in srgb, var(--k-success) 12%, transparent); }
.kv-ready .ki { width: 12px; height: 12px; }
.kv-exp-tiles { display: flex; gap: 8px; }
.kv-exp-tile { width: 128px; height: 70px; flex-direction: column; align-items: flex-start !important; justify-content: flex-end; gap: 1px; padding: 10px; border-radius: 10px; background: var(--k-raised); text-align: left; position: relative;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.15s, background-color 0.15s; }
.kv-exp-tile:hover { background: var(--k-raised-h); }
.kv-exp-tile .ki { position: absolute; top: 10px; left: 10px; width: 14px; height: 14px; color: var(--k-text-2); }
.kv-exp-tile b { font-size: 12.5px; font-weight: 600; }
.kv-exp-tile small { font-size: 10.5px; color: var(--k-text-3); white-space: nowrap; }
.kv-exp-tile.on { box-shadow: inset 0 0 0 1.5px var(--k-accent); background: color-mix(in srgb, var(--k-accent) 7%, var(--k-raised)); }
.kv-exp-tile.on .ki { color: var(--k-accent); }
.kv-exp-more { position: absolute; top: 8px; left: 10px; right: 8px; display: flex; justify-content: space-between; }
.kv-exp-more .ki { position: static; }
.kv-exp-customize { width: 672px; border-radius: 10px; background: var(--k-raised); }
.kv-exp-custom-head { width: 100%; gap: 9px; padding: 12px 14px; font-size: 13px; }
.kv-exp-custom-head b { font-weight: 600; }
.kv-exp-custom-head span { margin-left: auto; font-size: 11.5px; color: var(--k-text-3); }
.kv-exp-custom-head .ki { color: var(--k-text-2); }
.kv-exp-custom { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.kv-exp-custom input[type="range"] { flex: 1; accent-color: var(--k-accent); }
.kv-exp-custom b { min-width: 36px; text-align: right; color: var(--k-text); }
.kv-exp-queue { width: 672px; }
.kv-exp-qrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--k-raised); font-size: 12.5px; }
.kv-exp-qrow small { color: var(--k-text-3); }
.kv-exp-qrow em { margin-left: auto; font-style: normal; color: var(--k-warning); font-size: 11.5px; }
.kv-exp-progress { width: 440px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.kv-exp-progress p { margin: 0; font-size: 12.5px; color: var(--k-text-2); font-variant-numeric: tabular-nums; }
.kv-exp-bar { height: 6px; border-radius: 3px; background: var(--k-raised-h); overflow: hidden; }
.kv-exp-bar i { display: block; height: 100%; background: var(--k-accent); transition: width 0.09s linear; }
.kv-exp-note { margin: 0; max-width: 440px; text-align: center; font-size: 12px; color: var(--k-text-3); }
.kv-exp-foot { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px calc(50% - 336px); border-radius: 0 0 14px 14px; background: var(--k-surface);
  box-shadow: inset 1px -1px 0 var(--k-stroke), inset -1px 0 0 var(--k-stroke), inset 0 1px 0 var(--k-stroke); }
.kv-exp-file { display: flex; align-items: center; gap: 9px; }
.kv-exp-file b { display: block; font-size: 12.5px; font-weight: 600; }
.kv-exp-file small { font-size: 11px; color: var(--k-text-3); }
.kv-exp-btns { display: flex; gap: 8px; }
.kv-exp-btns .kv-btn.primary { min-width: 136px; box-shadow: 0 0 18px -6px var(--k-accent); }

@media (prefers-reduced-motion: reduce) {
  .kv *, .kv *::before, .kv *::after { transition-duration: 0.01ms !important; }
  .kv .kv-user, .kv .kv-ai, .kv .kv-steps, .kv .kv-turn, .kv .kv-layer, .kv .kv-clipbar, .kv .kv-page { animation: none !important; }
}

@media (max-width: 900px) {
}
