/* Pixlane video studio — shared styles for /video-tools/ pages. */

:root {
  --vx-bg: #0b0e14;
  --vx-panel: #11151f;
  --vx-panel-2: #161b28;
  --vx-line: rgba(255, 255, 255, 0.08);
  --vx-line-strong: rgba(255, 255, 255, 0.16);
  --vx-text: #eef2f9;
  --vx-dim: #9aa4b5;
  --vx-accent: #6c8cff;
  --vx-accent-2: #38d9a9;
  --vx-danger: #ff6b6b;
  --vx-radius: 14px;
}
html[data-theme="light"] {
  --vx-bg: #f4f6fa;
  --vx-panel: #ffffff;
  --vx-panel-2: #eef1f7;
  --vx-line: rgba(10, 14, 22, 0.1);
  --vx-line-strong: rgba(10, 14, 22, 0.2);
  --vx-text: #10141d;
  --vx-dim: #5a6475;
}


/* `hidden` must always win over component display values. */
.vx-page [hidden] { display: none !important; }
.vx-page { background: var(--vx-bg); color: var(--vx-text); min-height: 100vh; font-family: var(--font-sans, "Manrope", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif); }
.vx-wrap { max-width: 1240px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 28px) 64px; }
.vx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin: 10px 0 16px; }
.vx-head h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); margin: 0; letter-spacing: -0.02em; }
.vx-head .vx-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.vx-badge { font-size: 0.74rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--vx-line-strong); color: var(--vx-dim); white-space: nowrap; }
.vx-badge--ai { color: var(--vx-accent-2); border-color: color-mix(in srgb, var(--vx-accent-2) 45%, transparent); }
/* Hero description spans the full content column (no early ch-cap) — uses the
   horizontal space instead of wrapping to half-width + extra lines. */
.vx-sub { color: var(--vx-dim); margin: 0 0 18px; max-width: none; line-height: 1.55; text-wrap: pretty; }


/* ── Site header (standalone pages ship no global stylesheet) ─────── */
.pl-nav {
  display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(14px, 3vw, 30px);
  background: color-mix(in srgb, var(--vx-bg) 86%, #000);
  border-bottom: 1px solid var(--vx-line);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px);
}
.pl-nav .brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--vx-text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.pl-nav .pip { display: grid; grid-template-columns: 7px 7px; gap: 2.5px; }
.pl-nav .pip span { width: 7px; height: 7px; border-radius: 2px; background: var(--vx-accent); }
.pl-nav .pip span:nth-child(2), .pl-nav .pip span:nth-child(3) { opacity: .45; }
.pl-nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-nav nav a {
  color: var(--vx-dim); text-decoration: none; font-size: .9rem; font-weight: 550;
  padding: 7px 12px; border-radius: 9px; transition: color .15s ease, background .15s ease;
}
.pl-nav nav a:hover { color: var(--vx-text); background: var(--vx-panel-2); }
.pl-nav nav a[aria-current] { color: var(--vx-text); background: var(--vx-panel-2); }
.pl-nav .theme-toggle {
  margin-left: auto; width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--vx-line-strong); background: var(--vx-panel-2);
  color: var(--vx-text); cursor: pointer; display: grid; place-items: center;
}
.pl-nav .theme-toggle svg { width: 17px; height: 17px; }
html[data-theme="light"] .pl-nav .theme-toggle .tt-moon { display: none; }
html[data-theme="dark"] .pl-nav .theme-toggle .tt-sun { display: none; }
html:not([data-theme="light"]) .pl-nav .theme-toggle .tt-sun { display: none; }

/* ── Stage / dropzone ─────────────────────────────────────────────── */
.vx-stage { position: relative; }
.vx-drop {
  border: 1.5px dashed var(--vx-line-strong);
  border-radius: calc(var(--vx-radius) + 4px);
  background:
    radial-gradient(1200px 500px at 20% -10%, color-mix(in srgb, var(--vx-accent) 14%, transparent), transparent 60%),
    var(--vx-panel);
  min-height: 380px; display: grid; place-items: center; text-align: center;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.vx-drop.is-drag { border-color: var(--vx-accent); transform: scale(1.004); }
.vx-drop__inner { padding: 44px 24px; }
.vx-drop__icon { width: 64px; margin: 0 auto 14px; color: var(--vx-accent); opacity: 0.9; }
.vx-drop h2 { margin: 0 0 6px; font-size: 1.35rem; }
.vx-drop__meta { color: var(--vx-dim); margin: 0 0 22px; font-size: 0.92rem; }
.vx-drop__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.vx-btn {
  appearance: none; border: 1px solid var(--vx-line-strong); background: var(--vx-panel-2);
  color: var(--vx-text); border-radius: 10px; padding: 10px 18px; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.vx-btn:hover { transform: translateY(-1px); border-color: var(--vx-accent); }
.vx-btn--primary {
  background: linear-gradient(135deg, var(--vx-accent), color-mix(in srgb, var(--vx-accent) 55%, #9d6cff));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--vx-accent) 35%, transparent);
}
.vx-btn--ghost { background: transparent; }
.vx-btn--icon { padding: 10px; border-radius: 999px; }
.vx-btn--icon svg { width: 20px; height: 20px; }
.vx-btn:disabled { opacity: 0.55; cursor: default; transform: none; }

/* ── Editor layout ────────────────────────────────────────────────── */
.vx-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
@media (max-width: 940px) { .vx-editor { grid-template-columns: 1fr; } }
.vx-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.vx-player {
  position: relative; background: #000; border-radius: var(--vx-radius);
  overflow: hidden; border: 1px solid var(--vx-line);
  aspect-ratio: 16 / 9; display: grid; place-items: center;
}
.vx-player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vx-overlay { position: absolute; inset: 0; pointer-events: none; }
.vx-bigplay {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: color-mix(in srgb, #000 45%, transparent);
  backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.vx-bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.vx-bigplay:hover { transform: scale(1.06); }
.vx-bigplay.is-hidden { opacity: 0; pointer-events: none; }

/* crop box */
.vx-cropbox {
  position: absolute; pointer-events: auto; cursor: move;
  outline: 1.5px solid var(--vx-accent);
  box-shadow: 0 0 0 9999px color-mix(in srgb, #000 55%, transparent);
  border-radius: 4px; touch-action: none;
}
.vx-cropbox__grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), var(--vx-line-strong) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), var(--vx-line-strong) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), var(--vx-line-strong) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), var(--vx-line-strong) 66.66%, transparent calc(66.66% + 0.5px));
}
.vx-handle {
  position: absolute; width: 14px; height: 14px; background: #fff;
  border: 2px solid var(--vx-accent); border-radius: 4px; pointer-events: auto;
}
.vx-handle--nw { top: -7px; left: -7px; cursor: nwse-resize; }
.vx-handle--ne { top: -7px; right: -7px; cursor: nesw-resize; }
.vx-handle--sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.vx-handle--se { bottom: -7px; right: -7px; cursor: nwse-resize; }
.vx-handle--n { top: -7px; left: calc(50% - 7px); cursor: ns-resize; }
.vx-handle--s { bottom: -7px; left: calc(50% - 7px); cursor: ns-resize; }
.vx-handle--e { right: -7px; top: calc(50% - 7px); cursor: ew-resize; }
.vx-handle--w { left: -7px; top: calc(50% - 7px); cursor: ew-resize; }

/* safe zones (reels) */
.vx-safezone { position: absolute; pointer-events: none; }
.vx-safezone__band {
  position: absolute; left: 0; right: 0; height: 12%;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--vx-danger) 22%, transparent) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.vx-safezone__band--top { top: 0; border-bottom: 1px dashed color-mix(in srgb, var(--vx-danger) 60%, transparent); }
.vx-safezone__band--bottom { bottom: 0; height: 17%; border-top: 1px dashed color-mix(in srgb, var(--vx-danger) 60%, transparent); }
.vx-safezone__side {
  position: absolute; top: 30%; bottom: 30%; width: 13%;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--vx-danger) 16%, transparent) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.vx-safezone__side--right { right: 0; border-left: 1px dashed color-mix(in srgb, var(--vx-danger) 50%, transparent); }
.vx-safezone span {
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; opacity: 0.85; text-shadow: 0 1px 2px #000;
  transform: rotate(0deg); white-space: nowrap;
}
.vx-safezone__side span { writing-mode: vertical-rl; }

/* ── Timeline ─────────────────────────────────────────────────────── */
.vx-timeline { user-select: none; }
.vx-strip {
  position: relative; height: 84px; border-radius: 12px; overflow: visible;
  background: var(--vx-panel-2); border: 1px solid var(--vx-line); cursor: pointer;
  touch-action: none;
}
.vx-strip__thumbs { display: flex; height: 100%; border-radius: 11px; overflow: hidden; }
.vx-strip__thumbs img, .vx-strip__thumbs span { flex: 1 1 0; min-width: 0; object-fit: cover; height: 100%; background: var(--vx-panel); }
/* While frames are still being decoded, animate the timeline instead of showing a flat grey bar. */
.vx-strip__thumbs.is-loading { background: linear-gradient(90deg, var(--vx-panel) 25%, var(--vx-panel-2) 37%, var(--vx-panel) 63%); background-size: 400% 100%; animation: vx-thumbs-shimmer 1.3s ease infinite; }
@keyframes vx-thumbs-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.vx-thumbs-fallback { display: grid; place-items: center; width: 100%; color: var(--vx-dim); font-size: 0.8rem; }
.vx-strip__shade { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, #000 70%, transparent); pointer-events: none; z-index: 2; }
.vx-strip__shade--left { left: 0; width: 0; border-radius: 11px 0 0 11px; }
.vx-strip__shade--right { right: 0; left: 100%; border-radius: 0 11px 11px 0; }
/* bright selection frame (the kept window) */
.vx-sel {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 3; pointer-events: none;
  border-top: 3px solid var(--vx-accent); border-bottom: 3px solid var(--vx-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vx-accent) 55%, transparent), 0 0 14px color-mix(in srgb, var(--vx-accent) 28%, transparent);
}
.vx-trimhandle {
  position: absolute; top: -3px; bottom: -3px; width: 14px; margin-left: -7px; z-index: 5;
  background: var(--vx-accent); cursor: ew-resize; border-radius: 5px;
  touch-action: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.vx-trimhandle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; }
.vx-trimhandle__grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 6px; height: 22px; opacity: 0.92; border-radius: 1px;
  background:
    linear-gradient(#fff, #fff) 0/2px 100% no-repeat,
    linear-gradient(#fff, #fff) 50%/2px 100% no-repeat,
    linear-gradient(#fff, #fff) 100%/2px 100% no-repeat;
}
.vx-trimhandle__tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  padding: 3px 7px; border-radius: 6px; background: var(--vx-accent); color: #fff;
  font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transition: opacity 0.12s ease; pointer-events: none;
}
.vx-trimhandle.is-active .vx-trimhandle__tip,
.vx-trimhandle:hover .vx-trimhandle__tip,
.vx-trimhandle:focus-visible .vx-trimhandle__tip { opacity: 1; }
.vx-trimhandle:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.vx-playhead { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; z-index: 4; pointer-events: none; box-shadow: 0 0 6px rgba(255, 255, 255, 0.7); }
.vx-playhead__cap { position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #fff; }
.vx-playhead__tip {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 2px 6px; border-radius: 5px; background: #fff; color: #0a0a0a;
  font-size: 0.7rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transition: opacity 0.12s ease;
}
.vx-strip.is-scrubbing .vx-playhead__tip { opacity: 1; }
.vx-timeline__times { display: flex; justify-content: space-between; align-items: center; color: var(--vx-dim); font-size: 0.8rem; padding: 10px 2px 0; font-variant-numeric: tabular-nums; }
.vx-timeline__cur { color: var(--vx-text); font-weight: 600; }
.vx-timeline__dur { color: var(--vx-accent); font-weight: 600; }
.vx-timeline__dur::before { content: "\21CB "; opacity: 0.7; }

/* ── Action bar ───────────────────────────────────────────────────── */
.vx-actionbar {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--vx-panel); border: 1px solid var(--vx-line); border-radius: var(--vx-radius);
}
.vx-actionbar__spacer { flex: 1; }
.vx-timefields { display: flex; gap: 10px; }
.vx-timefields label { display: flex; align-items: center; gap: 6px; color: var(--vx-dim); font-size: 0.82rem; }
.vx-timefields input {
  width: 72px; background: var(--vx-panel-2); color: var(--vx-text);
  border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 7px 9px;
  font-variant-numeric: tabular-nums; font-size: 0.9rem;
}

/* ── Settings rail ────────────────────────────────────────────────── */
.vx-rail {
  background: var(--vx-panel); border: 1px solid var(--vx-line);
  border-radius: var(--vx-radius); padding: 16px; height: fit-content;
  position: sticky; top: 14px;
}
.vx-rail__title { margin: 0 0 14px; font-size: 1rem; }
.vx-field { margin-bottom: 16px; }
.vx-field__label { display: block; color: var(--vx-dim); font-size: 0.8rem; margin-bottom: 8px; letter-spacing: 0.02em; }
.vx-field--row { display: flex; align-items: end; gap: 8px; }
.vx-field--row label { flex: 1; display: flex; flex-direction: column; gap: 6px; color: var(--vx-dim); font-size: 0.78rem; }
.vx-field input[type="number"], .vx-field input[type="text"] {
  width: 100%; background: var(--vx-panel-2); color: var(--vx-text);
  border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 8px 10px; font-size: 0.92rem;
}
.vx-field input[type="range"] { width: 100%; accent-color: var(--vx-accent); }
.vx-field input[type="color"] {
  width: 100%; min-height: 36px; background: var(--vx-panel-2); border: 1px solid var(--vx-line-strong);
  border-radius: 8px; padding: 4px; cursor: pointer;
}
.vx-field--effect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vx-field--effect-grid label, .vx-field > label {
  display: flex; flex-direction: column; gap: 6px; color: var(--vx-dim); font-size: 0.78rem;
}
.vx-effect-advanced {
  border: 1px solid var(--vx-line); border-radius: 8px; padding: 10px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--vx-panel-2) 62%, transparent);
}
.vx-effect-advanced summary { cursor: pointer; color: var(--vx-text); font-size: 0.86rem; margin-bottom: 10px; }
.vx-effect-advanced summary em { color: var(--vx-dim); font-style: normal; font-size: 0.76rem; float: right; }
.vx-lock { background: var(--vx-panel-2); border: 1px solid var(--vx-line-strong); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.vx-lock[aria-pressed="false"] { opacity: 0.4; }
.vx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-chips button {
  background: var(--vx-panel-2); color: var(--vx-text); border: 1px solid var(--vx-line-strong);
  border-radius: 999px; padding: 7px 13px; font-size: 0.84rem; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vx-chips button:hover { border-color: var(--vx-accent); }
.vx-chips button.is-on {
  background: color-mix(in srgb, var(--vx-accent) 22%, var(--vx-panel-2));
  border-color: var(--vx-accent); color: var(--vx-text);
}
.vx-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--vx-text); font-size: 0.9rem; }

/* ── Op-stack (unified editor) ────────────────────────────────────── */
.vx-ops { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--vx-line); }
.vx-ops__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.vx-ops__head .vx-rail__title { margin: 0; }
.vx-ops__add { position: relative; }
.vx-op-add { padding: 6px 12px; font-size: 0.82rem; }
.vx-op-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px;
  background: var(--vx-panel); border: 1px solid var(--vx-line-strong); border-radius: 12px;
  padding: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.vx-op-menu__grp { color: var(--vx-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 8px 4px; }
.vx-op-menu__item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--vx-text); border-radius: 8px;
  padding: 8px 8px; font-size: 0.88rem; cursor: pointer;
}
.vx-op-menu__item:hover { background: var(--vx-panel-2); }
.vx-op-menu__item em { color: var(--vx-dim); font-size: 0.74rem; font-style: normal; margin-left: auto; }
.vx-op-menu__ic { width: 16px; height: 16px; display: inline-flex; color: var(--vx-accent); }
.vx-op-menu__ic svg { width: 16px; height: 16px; }
.vx-op-menu__empty { color: var(--vx-dim); font-size: 0.82rem; padding: 8px; margin: 0; }

.vx-op-list { display: flex; flex-direction: column; gap: 8px; }
.vx-op-card {
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px;
  background: var(--vx-panel-2); border: 1px solid var(--vx-line); border-radius: 10px;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.vx-op-card.is-selected { border-color: var(--vx-accent); background: color-mix(in srgb, var(--vx-accent) 12%, var(--vx-panel-2)); }
.vx-op-card.is-off { opacity: 0.5; }
.vx-op-card__main {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  background: transparent; border: 0; color: var(--vx-text); cursor: pointer; padding: 0; font-size: 0.9rem;
}
.vx-op-card__icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--vx-accent); display: inline-flex; }
.vx-op-card__icon svg { width: 18px; height: 18px; }
.vx-op-card__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-op-card__cap { color: var(--vx-danger); font-style: normal; font-size: 0.72rem; font-weight: 700; }
.vx-op-card__tools { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.vx-op-icon {
  width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; color: var(--vx-dim); border-radius: 7px; font-size: 0.88rem; line-height: 1;
}
.vx-op-icon:hover { background: var(--vx-panel); color: var(--vx-text); }
.vx-op-icon--del:hover { color: var(--vx-danger); }
.vx-note { color: var(--vx-dim); font-size: 0.82rem; line-height: 1.5; margin: 10px 0 0; }
.vx-fileinfo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--vx-line); color: var(--vx-dim); font-size: 0.82rem; line-height: 1.5; }
.vx-fileinfo strong { color: var(--vx-text); word-break: break-all; }

/* ── Progress ─────────────────────────────────────────────────────── */
.vx-progress { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: color-mix(in srgb, #000 62%, transparent); backdrop-filter: blur(4px); }
.vx-progress__card {
  background: var(--vx-panel); border: 1px solid var(--vx-line-strong);
  border-radius: 18px; padding: 26px 30px; text-align: center; max-width: 440px;
  max-height: 94vh; overflow: auto;
}
/* live preview of the processed frame (fills in alongside the ring).
   Shrink-wraps the canvas and caps it by BOTH width and height so a portrait
   (9:16) clip can't grow tall enough to push the progress ring off-screen. */
.vx-progress__preview {
  position: relative; margin: 0 auto 16px; max-width: 100%; max-height: 42vh;
  border-radius: 12px; display: inline-block; vertical-align: top;
  overflow: hidden; border: 1px solid var(--vx-line-strong); line-height: 0;
  background: repeating-conic-gradient(#2a2f3a 0 25%, #232831 0 50%) 0 0 / 18px 18px;
}
.vx-progress__preview canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 42vh; }
.vx-progress__live {
  position: absolute; left: 8px; top: 8px; line-height: 1;
  font: 700 10px/1 var(--font-sans, system-ui); letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: rgba(8,12,20,.66);
  padding: 4px 7px; border-radius: 5px;
}
.vx-progress__live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ff5a5a; margin-right: 5px; vertical-align: middle; box-shadow: 0 0 6px #ff5a5a;
}
.vx-progress__ring { position: relative; width: 96px; margin: 0 auto 14px; }
.vx-progress__ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.vx-progress__ring .ring-bg { fill: none; stroke: var(--vx-line-strong); stroke-width: 6; }
.vx-progress__ring .ring-fg {
  fill: none; stroke: var(--vx-accent); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 175.93; stroke-dashoffset: 175.93; transition: stroke-dashoffset 0.2s ease;
}
.vx-progress__ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.vx-progress__hint { color: var(--vx-dim); font-size: 0.8rem; margin: 6px 0 16px; }

/* ── Result ───────────────────────────────────────────────────────── */
.vx-result { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: color-mix(in srgb, #000 58%, transparent); backdrop-filter: blur(4px); padding: 18px; }
.vx-result__card {
  background: var(--vx-panel); border: 1px solid var(--vx-line-strong); border-radius: 18px;
  padding: 22px; width: min(720px, 94vw); max-height: 92vh; overflow: auto;
}
.vx-result__card h3 { margin: 0 0 12px; }
.vx-result__card video { width: 100%; border-radius: 10px; background: #000; max-height: 56vh; }
.vx-result__card audio { width: 100%; }
.vx-result__meta { color: var(--vx-dim); font-size: 0.86rem; margin: 10px 2px; }
.vx-result__actions { display: flex; gap: 12px; justify-content: end; }

/* toast */
.vx-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--vx-panel); color: var(--vx-text); border: 1px solid var(--vx-line-strong);
  padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 70; max-width: min(520px, 92vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); font-size: 0.92rem;
}
.vx-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* SEO content under the editor */
.vx-seo { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.vx-seo h2 { font-size: 1.02rem; margin: 0 0 8px; }
.vx-seo p { color: var(--vx-dim); font-size: 0.9rem; line-height: 1.6; margin: 0; }
.vx-faq { margin-top: 40px; max-width: 860px; }
.vx-faq h2 { font-size: 1.15rem; }
.vx-faq details { border-bottom: 1px solid var(--vx-line); padding: 12px 2px; }
.vx-faq summary { cursor: pointer; font-weight: 600; }
.vx-faq p { color: var(--vx-dim); line-height: 1.6; }
.vx-how { margin-top: 40px; max-width: 860px; }
.vx-how h2 { font-size: 1.15rem; margin: 0 0 12px; }
.vx-how .vx-steps { margin: 0; padding-left: 1.15em; color: var(--vx-dim); line-height: 1.6; }
.vx-how .vx-steps li { margin: 0 0 10px; padding-left: 4px; }
.vx-how .vx-steps li strong { color: var(--vx-text); }
.vx-related { margin-top: 48px; }
.vx-related h2 { font-size: 1.15rem; margin: 0 0 14px; }
.vx-related__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.vx-related__grid a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--vx-line); border-radius: var(--radius-md, 12px); background: var(--vx-panel); color: var(--vx-text); text-decoration: none; transition: border-color .14s ease, transform .14s ease; }
.vx-related__grid a:hover { border-color: var(--vx-accent); transform: translateY(-2px); }
.vx-related__name { font-weight: 600; font-size: 0.95rem; }
.vx-related__desc { color: var(--vx-dim); font-size: 0.82rem; line-height: 1.5; }

/* ── Mobile (≤640px) ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pl-nav { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .pl-nav .brand { font-size: 0.98rem; }
  .pl-nav nav { gap: 0; flex: 1 1 100%; order: 3; overflow-x: auto; scrollbar-width: none; }
  .pl-nav nav::-webkit-scrollbar { display: none; }
  .pl-nav nav a { padding: 6px 9px; font-size: 0.84rem; white-space: nowrap; }
  .pl-nav .theme-toggle { margin-left: auto; width: 32px; height: 32px; }

  .vx-wrap { padding: 12px 12px 48px; }
  .vx-actionbar { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .vx-timefields { order: 2; flex: 1 1 100%; justify-content: space-between; }
  .vx-timefields input { width: 64px; }
  .vx-actionbar__spacer { display: none; }
  .vx-actionbar .vx-btn--primary { flex: 1 1 100%; order: 3; justify-content: center; }
  .vx-actionbar #vx-replace { flex: 1 1 auto; justify-content: center; }
  .vx-rail { position: static; }
  .vx-strip { height: 68px; }
  .vx-trimhandle { width: 18px; margin-left: -9px; }
  /* Full-screen result on mobile (majority traffic) with a sticky download bar.
     100dvh avoids the iOS Safari toolbar clipping the action buttons. */
  .vx-result { padding: 0; }
  .vx-result__card { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 14px; display: flex; flex-direction: column; }
  .vx-result__card video { max-height: calc(100dvh - 200px); flex: 0 1 auto; }
  .vx-result__actions { position: sticky; bottom: 0; margin-top: auto; padding-top: 10px; background: var(--vx-bg); gap: 8px; }
  .vx-result__actions .vx-btn { flex: 1 1 0; justify-content: center; }
  .vx-progress__card { padding: 22px 18px; margin: 0 12px; }

  /* Op-stack becomes a horizontal scroll of compact chips on mobile. */
  .vx-op-list { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .vx-op-list::-webkit-scrollbar { display: none; }
  .vx-op-card { flex: 0 0 auto; }
  .vx-op-card__label { max-width: 110px; }
  .vx-op-menu { right: auto; left: 0; }
}
/* hard guard: the studio never scrolls sideways. The edge trim handles + their
   time-bubbles overhang the strip by ~12px; clip at the document root so narrow
   screens get no horizontal scrollbar (clip keeps vertical scrolling intact). */
html, body, .vx-page { overflow-x: clip; }
