:root {
  color-scheme: dark;

  --bg: #070708;
  --bg-elev: #0b0b0c;
  --sidebar: #0a0a0b;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .062);
  --input: rgba(255, 255, 255, .045);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f3f2ec;
  --muted: rgba(243, 242, 236, .66);
  --muted-strong: rgba(243, 242, 236, .8);

  /* gold — the brand, unchanged */
  --accent: #d0ac61;
  --accent-hi: #e6c684;
  --accent-soft: rgba(208, 172, 97, .14);
  --accent-line: rgba(208, 172, 97, .34);
  --primary-bg: #d0ac61;
  --primary-fg: #14110a;
  --good: #9bc2a5;
  --bad: #ef9a90;

  --radius: 22px;
  --radius-sm: 13px;
  --radius-xs: 9px;
  --spring: cubic-bezier(.22, 1, .36, 1);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ee;
  --bg-elev: #fffdf8;
  --sidebar: #efece4;
  --panel: #fffdf9;
  --panel-2: rgba(23, 21, 16, .055);
  --input: #ffffff;
  --border: rgba(23, 21, 16, .17);
  --border-strong: rgba(23, 21, 16, .3);
  --text: #1d1b16;
  --muted: rgba(29, 27, 22, .7);
  --muted-strong: rgba(29, 27, 22, .82);
  --accent: #7a5a1a;
  --accent-hi: #8f6b20;
  --accent-soft: rgba(122, 90, 26, .11);
  --accent-line: rgba(122, 90, 26, .4);
  --primary-bg: #1d1b16;
  --primary-fg: #f2e2bb;
  --good: #2f6b45;
  --bad: #a83a2c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 46% at 12% -6%, rgba(208, 172, 97, .10), transparent 70%),
    radial-gradient(52% 44% at 92% 4%, rgba(208, 172, 97, .055), transparent 72%),
    radial-gradient(70% 60% at 60% 110%, rgba(208, 172, 97, .045), transparent 70%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] body::after { opacity: .022; }

::selection { background: var(--accent-soft); color: var(--text); }

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, input:focus-visible, select:focus-visible, .timeline:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ── shell ─────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "side content" "dock dock";
  height: 100vh;
  height: 100dvh;
}

.sidebar {
  grid-area: side;
  display: flex; flex-direction: column;
  min-height: 0; overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 30px 16px 20px;
}

.brand { display: flex; align-items: center; gap: 15px; padding: 0 12px 26px; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark .mark-light { display: none; }
[data-theme="light"] .brand-mark .mark-dark { display: none; }
[data-theme="light"] .brand-mark .mark-light { display: block; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.15; letter-spacing: -.4px; }
.brand-text span {
  display: block; margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  white-space: nowrap;
}

.nav-label {
  padding: 0 13px 10px;
  color: var(--muted);
  font-size: 9px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 11px 13px;
  border: 1px solid transparent; border-radius: var(--radius-xs);
  background: transparent; color: var(--muted);
  font-size: 13px; text-align: left;
  transition: background .18s var(--spring), color .18s var(--spring), border-color .18s var(--spring);
}
.nav-btn svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover { background: var(--panel-2); color: var(--text); }
.nav-btn[aria-current="true"] {
  background: var(--accent-soft); color: var(--accent-hi);
  border-color: var(--accent-line); font-weight: 600;
}
.nav-btn[aria-current="true"]::before {
  content: "";
  position: absolute; left: -1px; top: 50%;
  width: 2px; height: 18px; transform: translateY(-50%);
  border-radius: 2px; background: var(--accent);
}

.side-foot { margin-top: auto; padding-top: 26px; }
.support-status {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 6px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 11px; line-height: 1.5;
}
.support-status::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.support-status.ok { color: var(--good); }
.support-status.warn { color: var(--bad); }
.side-note { padding: 0 12px 0 26px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.build-tag { padding: 8px 12px 0 26px; color: var(--muted); font-size: 9.5px; letter-spacing: .1em; font-family: var(--mono); }

/* ── content ───────────────────────────────────────────── */
.content {
  grid-area: content;
  min-width: 0; overflow: auto;
  padding: 24px clamp(24px, 3.4vw, 56px) 44px;
  padding-bottom: calc(var(--dock-h, 96px) + 28px);
  scrollbar-gutter: stable;
}

.workspace-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.workspace-label {
  font-size: 9px; letter-spacing: .2em; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
}
.workspace-label > span { margin: 0 9px; color: var(--accent); }
.workspace-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.pill-btn {
  display: flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 8px 13px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--muted);
  font-size: 11px;
  transition: color .18s, border-color .18s, background .18s;
}
.pill-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pill-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.panel { display: none; max-width: 1450px; margin: 0 auto; }
.panel.active { display: block; animation: panelIn .34s var(--spring) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 18px; }
.eyebrow {
  display: block; color: var(--accent);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: .2em; line-height: 1.7; text-transform: uppercase;
}
.panel-head h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 600; line-height: 1.04; letter-spacing: -2.2px;
}
.panel-head h1 > span { color: var(--accent); }
.panel-head p { max-width: 60ch; margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(368px, 440px); align-items: start; gap: 24px; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.section-title {
  display: flex; align-items: center; gap: 9px; margin: 0;
  color: var(--text);
  font-size: 11px; font-weight: 600;
  letter-spacing: .16em; line-height: 1.6; text-transform: uppercase;
}
.section-title > span { color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: 0; }

/* ── drop zone ─────────────────────────────────────────── */
.dropzone {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: clamp(240px, 32vh, 360px);
  padding: 38px 24px; text-align: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border));
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color .2s var(--spring), background .2s var(--spring);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 46px; height: 46px; padding: 12px; box-sizing: content-box; margin-bottom: 20px;
  border: 1px solid var(--accent-line); border-radius: 18px; background: rgba(208, 172, 97, .1);
  fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dropzone p { margin: 0 0 16px; font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.dropzone small {
  display: block; margin-top: 22px;
  color: var(--muted); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
}

/* ── preview & timeline ────────────────────────────────── */
.preview {
  display: flex; align-items: center; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #000;
}
:root { --preview-max: 400px; }
.preview video { display: block; width: 100%; max-height: var(--preview-max, 400px); min-height: 140px; background: #000; }
.preview audio { display: block; width: 100%; margin: 28px; }

.timeline-wrap { display: flex; flex-direction: column; gap: 13px; }
.timeline {
  position: relative; height: 42px;
  background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  cursor: crosshair; touch-action: none;
}
.tl-range {
  position: absolute; inset-block: 0; left: 0; width: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 17%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}
.tl-play {
  position: absolute; inset-block: 0; left: 0; width: 2px;
  background: var(--text);
  box-shadow: 0 0 10px rgba(255,255,255,.5);
  z-index: 4;
  pointer-events: none;
}
.tl-play::after {            /* the knob: makes the bar read as a scrubber, not a fill */
  content: '';
  position: absolute; top: -1px; left: 50%;
  width: 12px; height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,.65), 0 0 0 2px rgba(0,0,0,.35);
}

/* grab handles: 3 px visible, 44 px of finger */
.tl-handle {
  position: absolute; top: 0; bottom: 0; z-index: 3;
  width: 44px; margin-left: -22px;
  display: grid; place-items: center;
  cursor: ew-resize; touch-action: none;
}
.tl-handle i {
  position: relative;
  display: block; width: 9px; height: 30px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.5);
}
.tl-handle i::after {           /* grip lines, so the handle reads as draggable */
  content: ''; position: absolute; inset: 7px 3px;
  border-inline: 1px solid rgba(20,17,10,.55);
}
.tl-handle-in i { transform: translateX(5px); }
.tl-handle-out i { transform: translateX(-5px); }
.tl-handle:hover i, .tl-handle:focus-visible i { background: var(--accent-hi); }
.tl-handle:hover i::after { border-color: rgba(20,17,10,.7); }
.tl-handle:focus-visible { outline: none; }
.tl-handle:focus-visible i { outline: 2px solid var(--accent); outline-offset: 2px; }
.mark-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hint-inline { margin-left: auto; color: var(--muted); font-size: 10px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.notice-info {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent-hi);
  font-size: 11px; line-height: 1.6;
}

.notice-warn {
  margin: 2px 0 14px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, #e0857a 45%, transparent);
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, #e0857a 12%, transparent);
  color: #f0b6ad;
  font-size: 11.5px; line-height: 1.6;
}
.chip-warn {
  border-color: color-mix(in srgb, #e0857a 50%, transparent) !important;
  color: #f0b6ad !important;
  background: color-mix(in srgb, #e0857a 12%, transparent) !important;
}

/* segmented control (what comes out) */
.seg {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--input);
}
.seg-btn {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px; font-weight: 500;
  transition: background .18s var(--spring), color .18s var(--spring), border-color .18s var(--spring);
}
.seg-btn:hover { color: var(--text); background: var(--panel-2); }
.seg-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-hi);
  font-weight: 600;
}
.out-group { display: block; }
.out-group[hidden] { display: none; }
.unit {
  display: grid; place-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px; font-family: var(--mono);
  white-space: nowrap;
}
input[type="number"] {
  width: 100%; min-width: 0; min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--input);
  color: var(--text);
  font-size: 13px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
input[type="number"]:focus { border-color: var(--accent); background: var(--accent-soft); }
.clip-len { margin-left: auto; color: var(--muted); font-size: 11px; }
.clip-len b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.mark-row .hint-inline { margin-left: 0; }

/* ── cards & fields ────────────────────────────────────── */
.card {
  min-width: 0; margin: 0; padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border); border-top-color: var(--border-strong);
  border-radius: var(--radius);
}
.filecard {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px 13px;
}
.filecard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.filecard-name { min-width: 0; flex: 1; }
.filecard-actions { display: flex; gap: 6px; flex-shrink: 0; }
.file-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}
.fname {
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn.subtle { background: transparent; border-color: var(--border); color: var(--muted); }
.btn.subtle:hover:not(:disabled) {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, transparent);
  background: color-mix(in srgb, var(--bad) 10%, transparent);
}

/* facts as chips: units never break and no separator is ever orphaned */
.chips { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 10px; }
.chip {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted-strong);
  font-size: 10.5px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html[data-theme="light"] .chip { background: rgba(23, 21, 16, .03); }
.chip.quiet { color: var(--muted); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: block; margin-bottom: 12px; min-width: 0; }
.field > span {
  display: block; margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
input[type="text"], select {
  width: 100%; min-width: 0; min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--input); color: var(--text);
  font-size: 12.5px;
  transition: border-color .16s, background .16s;
}
input[type="text"]:hover, select:hover { border-color: var(--border-strong); }
input[type="text"]:focus, select:focus { border-color: var(--accent); background: var(--accent-soft); }
.pct {
  font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.time-row { display: flex; align-items: stretch; gap: 7px; min-width: 0; }
.hint { margin: -4px 0 16px; color: var(--muted-strong); font-size: 11px; line-height: 1.65; }
.hint b { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 17px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--panel-2); color: var(--text);
  font-size: 12px; font-weight: 500;
  transition: background .18s var(--spring), border-color .18s var(--spring), transform .18s var(--spring);
}
.btn:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); }
.btn.tiny { min-height: 38px; padding: 7px 12px; font-size: 11px; }
.btn.primary {
  background: var(--primary-bg); color: var(--primary-fg);
  border-color: transparent; font-weight: 600;
  box-shadow: 0 8px 22px rgba(208, 172, 97, .16);
}
.btn.primary:hover:not(:disabled) { background: var(--accent-hi); border-color: transparent; }

/* browse button inside the dropzone: a real target */
.dropzone .btn.browse {
  min-height: 44px; padding: 11px 22px;
  border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-hi);
  font-size: 12.5px; font-weight: 600;
}
.dropzone .btn.browse:hover:not(:disabled) { background: var(--accent); color: var(--primary-fg); border-color: var(--accent); }

.volume {
  min-width: 0;
  margin: 4px 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input);
}
.volume legend {
  padding: 0 6px;
  color: var(--muted-strong);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.vol-slider { display: block; }
.vol-slider > span {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  color: var(--muted); font-size: 11px;
}
.vol-slider output { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vol-slider input {
  display: block; width: 100%; height: 34px; margin: 6px 0 0;
  accent-color: var(--accent); cursor: pointer;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.vol-slider input::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.vol-slider input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elev);
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  cursor: grab;
}
.vol-slider input:active::-webkit-slider-thumb { cursor: grabbing; background: var(--accent-hi); }
.vol-slider input::-moz-range-track { height: 8px; border-radius: 999px; background: var(--panel-2); }
.vol-slider input::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-elev);
}
.vol-slider input:disabled { opacity: .45; cursor: not-allowed; }
.vol-scale {
  display: flex; justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted); font-size: 10px; font-family: var(--mono);
}
.check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px; line-height: 1.6;
  cursor: pointer;
}
.check input {
  flex-shrink: 0; margin: 2px 0 0;
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.volume .check { margin-bottom: 8px; font-size: 11.5px; }
.volume .hint { margin: 0; font-size: 10.5px; }

.about-mark {
  display: grid; place-items: center;
  width: 92px; height: 92px;
  margin-bottom: 18px;
}
.about-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.about-mark .mark-light { display: none; }
[data-theme="light"] .about-mark .mark-dark { display: none; }
[data-theme="light"] .about-mark .mark-light { display: block; }

/* ── export dock ───────────────────────────────────────── */
.dock {
  grid-area: dock;
  display: flex; align-items: center; gap: 20px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.1);
  border-top: 1px solid var(--border);
  padding: 15px clamp(18px, 2.4vw, 32px);
  max-height: 42vh; overflow-y: auto;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, .32);
}
html[data-theme="light"] .dock { box-shadow: 0 -14px 30px rgba(60, 50, 30, .08); }
.dock-info { min-width: 0; flex: 1; }
.dock-title { font-size: 13px; font-weight: 600; }
.dock-sub { margin-top: 5px; color: var(--muted-strong); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.dock-bar { display: flex; align-items: center; gap: 13px; flex: 0 1 280px; }
.bar { flex: 1; height: 6px; border-radius: 20px; overflow: hidden; background: var(--panel-2); }
.bar-fill { width: 0; height: 100%; border-radius: 20px; background: var(--accent); box-shadow: 0 0 12px rgba(208,172,97,.5); transition: width .25s var(--spring); }
.pct { min-width: 42px; color: var(--muted-strong); font-size: 11px; text-align: right; }
.dock-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dock.done .bar-fill { background: var(--good); box-shadow: 0 0 12px color-mix(in srgb, var(--good) 45%, transparent); }
.dock.error .bar-fill { background: var(--bad); box-shadow: none; }
.dock.error .dock-sub { color: var(--bad); }

/* ── about ─────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.about-card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.about-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.about-card a { color: var(--accent); text-decoration: none; }
.about-card a:hover { text-decoration: underline; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 11px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.limits { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.9; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border: 3px solid transparent; background-clip: content-box; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(208,172,97,.38); background-clip: content-box; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(23,21,16,.18); background-clip: content-box; }

.update-banner {
  display: block; width: 100%;
  margin: -8px 0 18px;
  padding: 11px 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 12px; font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.update-banner:hover { background: var(--accent); color: var(--primary-fg); }

/* short windows (1280×720, laptops with scaling): keep the whole workflow on one screen */
@media (max-height: 830px) {
  .panel-head { margin-bottom: 12px; }
  .panel-head p { display: none; }
  .col { gap: 10px; }
  .filecard { padding: 10px 12px 11px; }
  .timeline-wrap { gap: 9px; }
}

/* ── responsive ────────────────────────────────────────── */
@media (min-width: 1500px) { .layout { grid-template-columns: minmax(0, 1.15fr) 470px; } }

@media (max-width: 980px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .content { padding-inline: 24px; }
}

@media (max-width: 640px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "side" "content" "dock";
  }
  .sidebar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
    padding: 12px 16px;
    border-right: 0; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .brand { flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .brand-mark { width: 32px; height: 32px; font-size: 11px; }
  .brand-text strong { font-size: 14px; letter-spacing: -.3px; }
  .brand-text span { display: none; }
  .nav-label, .side-note, .support-status { display: none; }
  .nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
  .nav-btn {
    flex-direction: column; justify-content: center; gap: 4px;
    min-height: 56px; padding: 8px 3px;
    font-size: 9.5px; line-height: 1.15; text-align: center;
  }
  .nav-btn[aria-current="true"]::before { display: none; }
  .side-foot { grid-row: 1; grid-column: 2; margin: 0; padding: 0; align-self: center; }
  .content { padding: 14px 16px 30px; padding-bottom: calc(var(--dock-h, 150px) + 22px + env(safe-area-inset-bottom, 0px)); }
  .keyboard-only { display: none; }
  .panel-head p { display: none; }
  .panel-head { margin-bottom: 18px; }
  .panel-head h1 { font-size: 30px; }
  .dropzone { min-height: 200px; padding: 28px 18px; }
  .vol-slider input { height: 44px; }
  .vol-slider input::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -12px; }
  .check { min-height: 44px; align-items: center; }
  .check input { width: 18px; height: 18px; }
  .preview video { max-height: 38vh; min-height: 160px; }
  .workspace-bar { padding-bottom: 13px; margin-bottom: 22px; }
  .workspace-label { font-size: 8px; letter-spacing: .14em; }
  .panel-head { flex-wrap: wrap; margin-bottom: 22px; }
  .panel-head h1 { font-size: 32px; letter-spacing: -1.4px; }
  .panel-head p { font-size: 12px; }
  .card { padding: 20px; border-radius: 18px; }
  .filecard-top { flex-direction: column; gap: 10px; }
  .filecard-actions { width: 100%; }
  .filecard-actions .btn { flex: 1; }
  .dock { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .dock-info { flex-basis: 100%; }
  .dock-bar { flex: 1; }
  .dock-actions { width: 100%; }
  .dock-actions .btn { flex: 1; }
  .pill-btn { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}