:root {
  --bg: #e6e9ee;
  --surface-0: rgba(255, 255, 255, 0.52);
  --surface-1: rgba(250, 251, 253, 0.78);
  --surface-2: rgba(236, 240, 246, 0.9);
  --surface-3: rgba(222, 228, 237, 0.96);
  --editor-bg: #17191d;
  --editor-bg-2: #20242a;
  --line: rgba(96, 109, 128, 0.28);
  --line-soft: rgba(110, 124, 145, 0.16);
  --text: #181b20;
  --muted: #5e6876;
  --dim: #8993a0;
  --accent: #3478f6;
  --accent-ink: #ffffff;
  --assist: #0f6fff;
  --video: #3a7ee8;
  --title: #c08422;
  --audio: #168f64;
  --danger: #ff6b7e;
  --warning: #c08422;
  --shadow: 0 18px 52px rgba(59, 71, 91, 0.14);
  --glass: blur(24px) saturate(1.18);
  --mono-font: "IBM Plex Mono", monospace;
}

body[data-theme="dark"] {
  --bg: #101215;
  --surface-0: rgba(22, 24, 29, 0.62);
  --surface-1: rgba(28, 31, 37, 0.82);
  --surface-2: rgba(35, 39, 47, 0.92);
  --surface-3: rgba(47, 53, 64, 0.96);
  --editor-bg: #08090b;
  --editor-bg-2: #11151a;
  --line: rgba(169, 181, 199, 0.22);
  --line-soft: rgba(172, 184, 202, 0.12);
  --text: #f1f4f8;
  --muted: #a6b0bf;
  --dim: #748091;
  --accent: #66a2ff;
  --accent-ink: #06111f;
  --assist: #8fbdff;
  --warning: #f4a43a;
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -12%, rgba(255, 255, 255, 0.9), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(103, 153, 255, 0.22), transparent 32rem),
    linear-gradient(145deg, #f5f7fa 0%, #e4e8ee 44%, #cfd6df 100%);
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 8% -12%, rgba(80, 122, 186, 0.22), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(92, 140, 220, 0.16), transparent 32rem),
    linear-gradient(145deg, #191c21 0%, #111419 46%, #08090c 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  user-select: none;
}

.app-shell {
  min-height: 100vh;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 9px;
}

@media (min-width: 721px) {
  html,
  body {
    height: 100svh;
    overflow: hidden;
  }

  .app-shell {
    height: 100svh;
  }

  .app-shell.focus-editor {
    padding: 8px;
    gap: 8px;
  }

  .app-shell.focus-editor .workspace {
    padding-left: 58px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    position: fixed;
    top: 50%;
    left: 8px;
    z-index: 82;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    width: 42px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(12, 16, 22, 0.84);
    box-shadow: none;
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    transform: translateY(-50%);
  }

  body[data-theme="dark"] .app-shell.focus-editor .mobile-jump-bar {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(16, 20, 28, 0.78);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 32px;
    padding: 4px 2px;
    border-radius: 3px;
    color: #8f9aaa;
    background: transparent;
    border-color: transparent;
    font-size: 0.64rem;
    font-weight: 800;
    box-shadow: none;
  }

  .app-shell.focus-editor .mobile-jump-bar button:focus-visible,
  .app-shell.focus-editor .mobile-jump-bar button:hover,
  .app-shell.focus-editor .mobile-jump-bar button.active {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: none;
  }
}

.appbar,
.status-strip,
.coach-strip,
.workflow-rail,
.panel,
.export-dialog {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.appbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(300px, 1fr) max-content;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(224, 230, 240, 0.72));
  color: #1f4fb8;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.8),
    0 8px 18px rgba(62, 78, 102, 0.12);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-theme="dark"] .app-mark {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(66, 74, 90, 0.88), rgba(24, 28, 35, 0.72));
  color: #b9d5ff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.02rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.app-identity p,
.panel-kicker,
.mono-label,
.status-strip span {
  font-family: "IBM Plex Mono", monospace;
}

.app-identity p {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.72rem;
}

.workspace-tabs,
.appbar-actions,
.transport,
.timeline-tools,
.timeline-legend,
.export-actions,
.inspector-actions,
.bin-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.workspace-tabs {
  justify-content: center;
  min-width: 0;
}

.appbar-actions {
  justify-content: flex-end;
  min-width: 0;
}

button,
.import-button {
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.62);
  transition:
    background 130ms ease,
    border-color 130ms ease,
    color 130ms ease,
    box-shadow 130ms ease,
    transform 130ms ease;
}

body[data-theme="dark"] button,
body[data-theme="dark"] .import-button {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

button:hover,
.import-button:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(55, 120, 246, 0.3);
  transform: translateY(-1px);
}

body[data-theme="dark"] button:hover,
body[data-theme="dark"] .import-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(102, 162, 255, 0.42);
}

button[data-tip],
label[data-tip],
.action-menu > summary[data-tip],
.timeline-action-hint[data-tip] {
  position: relative;
}

button[data-tip]::after,
label[data-tip]::after,
.action-menu > summary[data-tip]::before,
.timeline-action-hint[data-tip]::after {
  content: "";
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  translate: -50% 8px;
  width: max-content;
  max-width: 240px;
  padding: 8px 9px;
  border: 1px solid rgba(52, 120, 246, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #1b2533;
  box-shadow: 0 16px 40px rgba(62, 78, 102, 0.2);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    translate 140ms ease;
  z-index: 60;
}

body[data-theme="dark"] button[data-tip]::after,
body[data-theme="dark"] label[data-tip]::after,
body[data-theme="dark"] .action-menu > summary[data-tip]::before,
body[data-theme="dark"] .timeline-action-hint[data-tip]::after {
  background: rgba(22, 25, 31, 0.98);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

button[data-tip]:hover::after,
button[data-tip]:focus-visible::after,
label[data-tip]:hover::after,
label[data-tip]:focus-within::after,
.action-menu > summary[data-tip]:hover::before,
.action-menu > summary[data-tip]:focus-visible::before,
.timeline-action-hint[data-tip]:hover::after {
  content: attr(data-tip);
  display: block;
  opacity: 1;
  translate: -50% 0;
}

.load-button {
  display: inline-flex;
  align-items: center;
}

.action-menu,
.template-menu {
  position: relative;
}

.action-menu > summary,
.template-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.action-menu > summary::-webkit-details-marker,
.template-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu > summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  font-weight: 700;
}

.action-menu > summary::after,
.template-menu > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
}

.action-menu[open] > summary {
  border-color: rgba(52, 120, 246, 0.32);
  background: rgba(255, 255, 255, 0.84);
}

.action-menu:not([open]) > .menu-popover,
.template-menu:not([open]) > .menu-popover {
  display: none;
}

.menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 190px;
  max-height: min(70svh, 430px);
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(250, 251, 253, 0.96);
  box-shadow: 0 22px 60px rgba(48, 61, 82, 0.2);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.timeline-menu .menu-popover {
  width: min(340px, calc(100vw - 32px));
  min-width: min(340px, calc(100vw - 32px));
  max-height: min(48svh, 318px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
}

.menu-popover .tool-button,
.menu-popover .tool-chip,
.menu-popover .load-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.menu-section-label {
  display: block;
  margin: 3px 2px -1px;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drawer-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.drawer-switcher .tool-button {
  justify-content: center;
  min-height: 34px;
  padding-inline: 8px;
}

.timeline-menu .menu-popover .tool-chip {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.08;
}

.theme-menu {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  gap: 5px;
  align-items: center;
  padding: 7px;
  border-top: 1px solid var(--line-soft);
}

.theme-menu span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-menu button {
  min-height: 27px;
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.theme-menu button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.tab-button,
.tool-button,
.icon-button,
.danger-button,
.bin-tab,
.tool-chip,
.import-button,
.template-menu > summary {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
}

.tab-button,
.bin-tab,
.tool-chip {
  background: rgba(255, 255, 255, 0.22);
  color: var(--muted);
}

.tab-button.active,
.bin-tab.active,
.tool-chip.active {
  background: #1f242b;
  color: #f7f9fc;
  border-color: rgba(31, 36, 43, 0.9);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

.primary-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #1f64da;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.primary-button:hover {
  background: #1f64da;
}

button:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.danger-button {
  color: #ffd8dd;
  border-color: rgba(255, 107, 126, 0.35);
  background: rgba(255, 107, 126, 0.08);
}

.appbar-actions {
  justify-content: flex-end;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  border-radius: 12px;
}

.status-action {
  min-height: 0;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.status-action:hover {
  color: var(--text);
  transform: none;
}

.status-strip strong {
  margin-left: 6px;
  color: var(--text);
  font-weight: 600;
}

.guided-phase-action {
  padding: 2px 8px;
  border: 1px solid rgba(88, 137, 255, 0.2);
  border-radius: 999px;
  background: rgba(88, 137, 255, 0.08);
}

.guided-phase-action:hover {
  background: rgba(88, 137, 255, 0.14);
}

#guided-phase-stat[data-phase-state="ready"] {
  color: var(--audio);
}

#guided-phase-stat[data-phase-state="source"],
#guided-phase-stat[data-phase-state="cut"],
#guided-phase-stat[data-phase-state="captions"] {
  color: var(--accent);
}

#guided-phase-stat[data-phase-state="refine"],
#guided-phase-stat[data-phase-state="audio"],
#guided-phase-stat[data-phase-state="review-qc"],
#guided-phase-stat[data-phase-state="performance"],
#guided-phase-stat[data-phase-state="deliver"],
#guided-phase-stat[data-phase-state="mosh"] {
  color: var(--title);
}

#delivery-state-stat[data-delivery-state="ready"] {
  color: var(--audio);
}

#delivery-state-stat[data-delivery-state="blocked"] {
  color: var(--title);
}

#delivery-state-stat[data-delivery-state="safe"] {
  color: var(--accent);
}

#workflow-proof-state-stat[data-proof-state="ready"] {
  color: var(--audio);
}

#workflow-proof-state-stat[data-proof-state="progress"] {
  color: var(--accent);
}

#workflow-proof-state-stat[data-proof-state="blocked"] {
  color: var(--title);
}

.proof-chip-action {
  gap: 5px;
}

.guided-phase-chip-action {
  gap: 5px;
  border-color: rgba(88, 137, 255, 0.28);
  background: rgba(88, 137, 255, 0.08);
}

.guided-phase-chip-action strong {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font: 800 0.68rem "IBM Plex Mono", monospace;
}

.guided-phase-chip-action strong[data-phase-state="ready"] {
  color: var(--audio);
}

.guided-phase-chip-action strong[data-phase-state="review-qc"],
.guided-phase-chip-action strong[data-phase-state="performance"],
.guided-phase-chip-action strong[data-phase-state="deliver"],
.guided-phase-chip-action strong[data-phase-state="mosh"] {
  color: var(--title);
}

.proof-chip-action strong {
  color: var(--accent);
  font: 800 0.68rem "IBM Plex Mono", monospace;
}

.proof-chip-action strong[data-proof-state="ready"] {
  color: var(--audio);
}

.proof-chip-action strong[data-proof-state="blocked"] {
  color: var(--title);
}

#performance-state-stat[data-performance-state="busy"] {
  color: var(--title);
}

#performance-state-stat[data-performance-state="risky"] {
  color: var(--danger);
}

#safety-state-stat[data-safety-state="ready"] {
  color: var(--audio);
}

#safety-state-stat[data-safety-state="warn"] {
  color: var(--title);
}

#safety-state-stat[data-safety-state="idle"] {
  color: var(--muted);
}

#save-state-stat[data-storage-state="saved-locally"] {
  color: var(--audio);
}

#save-state-stat[data-storage-state="session-media"],
#save-state-stat[data-storage-state="session-only"] {
  color: var(--title);
}

#save-state-stat[data-storage-state="missing-media"],
#save-state-stat[data-storage-state="import-failed"] {
  color: var(--danger);
}

.coach-strip {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-color: rgba(52, 120, 246, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.08), rgba(255, 255, 255, 0.28) 46%, transparent),
    var(--surface-1);
}

.coach-label {
  display: block;
  margin-bottom: 3px;
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coach-strip strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.96rem;
}

.coach-strip p {
  color: var(--muted);
  font-size: 0.82rem;
}

.coach-button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border-color: rgba(52, 120, 246, 0.22);
  background: rgba(255, 255, 255, 0.62);
  color: #1f4fb8;
  font-weight: 800;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 13px;
  box-shadow: none;
  background: rgba(250, 251, 253, 0.48);
}

.template-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(250, 251, 253, 0.52);
  box-shadow: none;
  backdrop-filter: var(--glass);
}

.template-menu {
  margin-top: 8px;
}

.template-menu > summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.42);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-strip button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1f4fb8;
  font-size: 0.74rem;
  font-weight: 800;
}

.workflow-card {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(52, 120, 246, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.08), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.36);
}

.workflow-card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.workflow-card > summary::-webkit-details-marker {
  display: none;
}

.workflow-card > summary::after {
  content: "Open";
  color: var(--assist);
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-card[open] > summary::after {
  content: "Hide";
}

.workflow-card > summary span {
  grid-column: 1 / -1;
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-card strong {
  color: var(--text);
  font-size: 0.92rem;
}

.workflow-card p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.workflow-card div {
  display: grid;
  gap: 6px;
  margin-top: 1px;
}

.workflow-card button {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 9px;
  text-align: left;
  color: #1f4fb8;
  font-size: 0.78rem;
  font-weight: 800;
}

.workflow-card button:nth-child(2) {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: #1f64da;
}

.workflow-rail button {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 9px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.04), transparent),
    rgba(255, 255, 255, 0.42);
}

.workflow-rail button.active {
  border-color: rgba(52, 120, 246, 0.36);
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.14), rgba(255, 255, 255, 0.54)),
    rgba(255, 255, 255, 0.72);
}

.workflow-rail span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #20242a;
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.workflow-rail strong,
.workflow-rail small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-rail strong {
  font-size: 0.78rem;
}

.workflow-rail small {
  color: var(--muted);
  font-size: 0.7rem;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 8px;
}

.app-shell.focus-editor {
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(20, 24, 31, 0.98), rgba(11, 14, 19, 0.98)),
    #101318;
}

.app-shell.focus-editor .appbar {
  min-height: 42px;
  padding: 5px 7px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(18, 22, 28, 0.92);
  box-shadow: none;
}

.app-shell.focus-editor .app-mark {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
  color: #d7e5ff;
  box-shadow: none;
}

.app-shell.focus-editor h1 {
  color: #f2f6fb;
  font-size: 0.9rem;
}

.app-shell.focus-editor .app-identity p {
  display: none;
}

.app-shell.focus-editor .tab-button,
.app-shell.focus-editor .tool-button,
.app-shell.focus-editor .primary-button,
.app-shell.focus-editor .action-menu > summary {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 0.8rem;
  box-shadow: none;
}

.app-shell.focus-editor .workspace-tabs {
  justify-self: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  background: rgba(7, 10, 14, 0.48);
}

.app-shell.focus-editor .tab-button {
  min-height: 28px;
  padding: 5px 11px;
  border-color: transparent;
  border-radius: 4px;
  color: #8792a1;
  background: transparent;
}

.app-shell.focus-editor .tab-button.active {
  color: #f6f9ff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.07);
}

.app-shell.focus-editor .appbar-actions {
  gap: 4px;
}

.app-shell.focus-editor .appbar-actions .tool-button,
.app-shell.focus-editor .appbar-actions .primary-button,
.app-shell.focus-editor .appbar-actions .action-menu > summary {
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.075);
  color: #c7d0dc;
  background: rgba(255, 255, 255, 0.07);
}

.app-shell.focus-editor .appbar-actions .primary-button {
  color: #ffffff;
  background: #256ff2;
  border-color: rgba(82, 139, 255, 0.5);
}

.app-shell.focus-editor .status-strip,
.app-shell.focus-editor .coach-strip,
.app-shell.focus-editor .workflow-rail,
.app-shell.focus-editor .media-panel,
.app-shell.focus-editor .source-monitor {
  display: none;
}

.app-shell.focus-editor .right-rail {
  display: block;
  min-height: 0;
}

.app-shell.focus-editor .right-rail > .panel {
  display: none;
}

.app-shell.focus-editor .right-rail > .panel.drawer-active {
  display: block;
}

.app-shell.focus-editor .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.focus-editor .editor-column {
  grid-template-rows: minmax(0, 1fr) minmax(238px, 0.58fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background:
    linear-gradient(180deg, #151a21 0%, #11161d 46%, #0d1117 100%);
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
}

.app-shell.focus-editor .monitor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.focus-editor .program-monitor,
.app-shell.focus-editor .timeline-panel {
  border: 0;
  box-shadow: none;
}

.app-shell.focus-editor .program-monitor {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: stretch;
  gap: 7px;
  padding: 8px 10px 7px;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    transparent;
}

.app-shell.focus-editor .program-monitor h2,
.app-shell.focus-editor .timeline-panel h2 {
  color: #f3f6fb;
}

.app-shell.focus-editor .timeline-panel h2 {
  font-size: 0.9rem;
}

.app-shell.focus-editor .program-monitor .panel-kicker,
.app-shell.focus-editor .timeline-panel .panel-kicker,
.app-shell.focus-editor .timecode,
.app-shell.focus-editor .sequence-format-control,
.app-shell.focus-editor .timeline-legend {
  color: #9da9ba;
}

.app-shell.focus-editor .preview-stage {
  --viewer-fit-height: clamp(210px, 31svh, 326px);
  height: var(--viewer-fit-height);
  min-height: var(--viewer-fit-height);
  margin-top: 0;
  margin-bottom: 0;
  align-self: end;
  border-radius: 4px;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.58),
    0 18px 36px rgba(0, 0, 0, 0.26);
}

.app-shell.focus-editor .canvas-preset-bar {
  display: none;
}

.app-shell.focus-editor .transport {
  width: min(100%, 720px);
  height: 36px;
  max-height: 36px;
  grid-template-columns: 34px 48px 58px 48px 34px minmax(120px, 1fr);
  align-self: start;
  align-items: center;
  gap: 3px;
  margin: 0 auto;
  padding: 3px;
  overflow: visible;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(9, 12, 17, 0.52);
  box-shadow: none;
}

.app-shell.focus-editor .transport button,
.app-shell.focus-editor .transport .icon-button,
.app-shell.focus-editor .transport .primary-button {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 4px;
  border-color: rgba(255, 255, 255, 0.09);
  color: #d7dee9;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  white-space: nowrap;
}

.app-shell.focus-editor .transport .primary-button {
  color: #ffffff;
  background: #2f78ff;
  border-color: rgba(100, 161, 255, 0.46);
}

.app-shell.focus-editor .transport input[type="range"] {
  accent-color: #66a2ff;
}

.app-shell.focus-editor .program-monitor.blank-first-run {
  grid-template-rows: 26px minmax(0, 1fr);
}

.app-shell.focus-editor .program-monitor.blank-first-run .transport {
  display: none;
}

.app-shell.focus-editor .program-monitor.blank-first-run .timecode {
  display: none;
}

.app-shell.focus-editor .program-monitor.blank-first-run #sequence-size-chip,
.app-shell.focus-editor .program-monitor.blank-first-run #selected-clip-status {
  display: none;
}

.app-shell.focus-editor .program-monitor.blank-first-run .stage-topline {
  justify-content: flex-end;
}

.app-shell.focus-editor .timeline-panel {
  position: relative;
  padding: 6px 8px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: rgba(8, 11, 16, 0.52);
}

.app-shell.focus-editor .timeline-panel .panel-head {
  margin-bottom: 5px;
}

.app-shell.focus-editor .timeline-tools .tool-chip,
.app-shell.focus-editor .timeline-menu > summary {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 4px;
}

.app-shell.focus-editor .timeline-legend {
  display: none;
}

.app-shell.focus-editor .timeline-status-bar {
  margin-bottom: 5px;
  padding: 4px;
  border-radius: 4px;
  background: #0b0f15;
}

.app-shell.focus-editor .timeline-status-bar button {
  min-height: 26px;
  border-radius: 4px;
}

.app-shell.focus-editor .track-row,
.app-shell.focus-editor .timeline-track-labels button {
  min-height: 25px;
}

.app-shell.focus-editor .clip-chip {
  top: 1px;
  bottom: 1px;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
}

.app-shell.focus-editor .timeline-track {
  gap: 2px;
}

.app-shell.focus-editor .timeline-track-labels {
  gap: 2px;
}

.app-shell.focus-editor .timeline-ruler {
  font-size: 0.62rem;
}

body[data-theme="dark"] .app-shell.focus-editor .editor-column {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(180deg, rgba(23, 28, 36, 0.94), rgba(12, 16, 22, 0.94)),
    rgba(13, 16, 22, 0.86);
  box-shadow: none;
}

body[data-theme="dark"] .app-shell.focus-editor .timeline-panel {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .app-shell.focus-editor {
  background:
    radial-gradient(circle at 12% -16%, rgba(255, 255, 255, 0.96), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(118, 160, 246, 0.2), transparent 30rem),
    linear-gradient(180deg, #f6f8fb 0%, #e8edf4 100%);
}

body[data-theme="light"] .app-shell.focus-editor .appbar {
  border-color: rgba(86, 101, 124, 0.16);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 46px rgba(79, 95, 121, 0.12);
}

body[data-theme="light"] .app-shell.focus-editor .app-mark {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(225, 232, 244, 0.76));
  color: #2059c7;
}

body[data-theme="light"] .app-shell.focus-editor h1,
body[data-theme="light"] .app-shell.focus-editor .program-monitor h2,
body[data-theme="light"] .app-shell.focus-editor .timeline-panel h2 {
  color: #171b22;
}

body[data-theme="light"] .app-shell.focus-editor .workspace-tabs,
body[data-theme="light"] .app-shell.focus-editor .transport,
body[data-theme="light"] .app-shell.focus-editor .timeline-status-bar {
  border-color: rgba(87, 103, 128, 0.15);
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] .app-shell.focus-editor .marker-inline-editor {
  border-color: rgba(87, 103, 128, 0.16);
  color: #17202c;
  background: rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .app-shell.focus-editor .marker-inline-editor label {
  color: #657386;
}

body[data-theme="light"] .app-shell.focus-editor .marker-inline-editor input {
  border-color: rgba(87, 103, 128, 0.16);
  color: #17202c;
  background: rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .app-shell.focus-editor .tab-button,
body[data-theme="light"] .app-shell.focus-editor .appbar-actions .tool-button,
body[data-theme="light"] .app-shell.focus-editor .appbar-actions .action-menu > summary,
body[data-theme="light"] .app-shell.focus-editor .transport button,
body[data-theme="light"] .app-shell.focus-editor .transport .icon-button {
  border-color: rgba(87, 103, 128, 0.14);
  color: #4e5b6e;
  background: rgba(255, 255, 255, 0.5);
}

body[data-theme="light"] .app-shell.focus-editor .tab-button.active,
body[data-theme="light"] .app-shell.focus-editor .appbar-actions .primary-button,
body[data-theme="light"] .app-shell.focus-editor .transport .primary-button {
  color: #ffffff;
  background: #256ff2;
  border-color: rgba(37, 111, 242, 0.42);
}

body[data-theme="light"] .app-shell.focus-editor .editor-column {
  border-color: rgba(88, 104, 130, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(235, 240, 248, 0.86)),
    rgba(246, 248, 252, 0.82);
  box-shadow: 0 24px 70px rgba(73, 89, 114, 0.16);
}

body[data-theme="light"] .app-shell.focus-editor .program-monitor {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 248, 252, 0.18)),
    transparent;
}

body[data-theme="light"] .app-shell.focus-editor .program-monitor .panel-kicker,
body[data-theme="light"] .app-shell.focus-editor .timeline-panel .panel-kicker,
body[data-theme="light"] .app-shell.focus-editor .timecode,
body[data-theme="light"] .app-shell.focus-editor .sequence-format-control,
body[data-theme="light"] .app-shell.focus-editor .timeline-legend {
  color: #627086;
}

body[data-theme="light"] .app-shell.focus-editor .preview-stage {
  border-color: rgba(27, 34, 45, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.76),
    0 22px 52px rgba(61, 75, 96, 0.18);
}

body[data-theme="light"] .app-shell.focus-editor .timeline-panel {
  border-top-color: rgba(88, 104, 130, 0.13);
  background: rgba(255, 255, 255, 0.48);
}

body[data-theme="light"] .app-shell.focus-editor .mobile-jump-bar {
  border-color: rgba(87, 103, 128, 0.16);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 48px rgba(65, 82, 106, 0.16);
}

body[data-theme="light"] .app-shell.focus-editor .mobile-jump-bar button {
  color: #69778b;
}

body[data-theme="light"] .app-shell.focus-editor .track-row,
body[data-theme="light"] .app-shell.focus-editor .timeline-track-labels button {
  border-color: rgba(86, 101, 124, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.app-shell.focus-editor.drawer-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(13, 21, 39, 0.08) 48%, rgba(13, 21, 39, 0.2) 100%);
}

.app-shell.focus-editor.drawer-open .editor-column {
  position: relative;
  z-index: 72;
  pointer-events: auto;
}

.drawer-context-bar {
  display: none;
}

.app-shell.focus-editor .panel.drawer-active {
  display: block;
  position: fixed;
  top: 66px;
  right: 8px;
  bottom: 8px;
  z-index: 90;
  width: min(376px, calc(100vw - 24px));
  max-height: calc(100svh - 74px);
  overflow: auto;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #edf3fb;
  background:
    linear-gradient(180deg, rgba(30, 36, 47, 0.95), rgba(15, 20, 28, 0.92)),
    rgba(13, 16, 22, 0.86);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
  animation: drawerSlideIn 180ms ease-out;
}

.app-shell.focus-editor .panel.drawer-active > .panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(34, 40, 51, 0.96), rgba(24, 30, 40, 0.9));
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.app-shell.focus-editor .panel.drawer-active > :not(.panel-head):not(summary) {
  margin-inline: 14px;
}

.app-shell.focus-editor .panel.drawer-active > :last-child {
  margin-bottom: 14px;
}

.app-shell.focus-editor .panel.drawer-active .panel-kicker {
  color: #8995a8;
}

.app-shell.focus-editor .panel.drawer-active h2,
.app-shell.focus-editor .panel.drawer-active strong {
  color: #f3f7fc;
}

.app-shell.focus-editor .panel.drawer-active p,
.app-shell.focus-editor .panel.drawer-active span,
.app-shell.focus-editor .panel.drawer-active label,
.app-shell.focus-editor .panel.drawer-active .field-value {
  color: #aab5c5;
}

.app-shell.focus-editor .panel.drawer-active .empty-inspector {
  display: grid;
  align-content: center;
  min-height: 220px;
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed rgba(71, 91, 123, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.12), rgba(255, 255, 255, 0.035));
  color: #aab5c5;
}

.app-shell.focus-editor .panel.drawer-active .empty-inspector::before {
  content: "Select a clip on V1, C1, T1, or A1";
  display: block;
  margin-bottom: 8px;
  color: #f3f7fc;
  font-weight: 800;
}

.app-shell.focus-editor .panel.drawer-active .selection-summary,
.app-shell.focus-editor .panel.drawer-active .clip-intelligence,
.app-shell.focus-editor .panel.drawer-active .render-engine-status,
.app-shell.focus-editor .panel.drawer-active .workflow-step,
.app-shell.focus-editor .panel.drawer-active .workflow-path,
.app-shell.focus-editor .panel.drawer-active .context-action,
.app-shell.focus-editor .panel.drawer-active .smart-action,
.app-shell.focus-editor .panel.drawer-active .effect-advice,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

.app-shell.focus-editor .panel.drawer-active .clip-intelligence {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px;
}

.app-shell.focus-editor .panel.drawer-active .intelligence-head {
  align-items: center;
}

.app-shell.focus-editor .panel.drawer-active .intel-meters {
  margin-top: 4px;
  gap: 9px;
}

.app-shell.focus-editor .panel.drawer-active .intel-meters span {
  min-width: 0;
  padding: 0;
}

.app-shell.focus-editor .panel.drawer-active .inspector-form {
  gap: 0;
}

.app-shell.focus-editor .panel.drawer-active .inspector-tabs {
  position: sticky;
  top: 54px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-block: 10px 2px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-1) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}

.app-shell.focus-editor .panel.drawer-active .inspector-tabs button {
  min-height: 28px;
  padding: 4px 3px;
  border: 0;
  border-radius: 6px;
  color: color-mix(in srgb, currentColor 70%, transparent);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.app-shell.focus-editor .panel.drawer-active .inspector-tabs button.active,
.app-shell.focus-editor .panel.drawer-active .inspector-tabs button[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
}

.app-shell.focus-editor .panel.drawer-active .inspector-section {
  padding: 12px 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.app-shell.focus-editor .panel.drawer-active .inspector-section[open] {
  background: transparent;
}

.app-shell.focus-editor .panel.drawer-active .inspector-section summary {
  min-height: 26px;
  margin-bottom: 10px;
}

.app-shell.focus-editor .panel.drawer-active .inspector-section:not([open]) {
  padding-block: 7px;
}

.app-shell.focus-editor .panel.drawer-active .inspector-section:not([open]) summary {
  margin-bottom: 0;
  color: color-mix(in srgb, currentColor 70%, transparent);
}

.app-shell.focus-editor .panel.drawer-active .inspector-section summary::after {
  content: "Open";
  float: right;
  color: color-mix(in srgb, var(--accent) 72%, currentColor);
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-shell.focus-editor .panel.drawer-active .inspector-section[open] summary::after {
  content: "Editing";
}

.app-shell.focus-editor .panel.drawer-active .inspector-section label,
.app-shell.focus-editor .panel.drawer-active .finish-form label,
.app-shell.focus-editor .panel.drawer-active .transcript-editor,
.app-shell.focus-editor .panel.drawer-active .caption-timing label {
  margin-top: 10px;
  gap: 6px;
}

.app-shell.focus-editor .panel.drawer-active .field-value {
  margin-top: -2px;
  font-size: 0.68rem;
}

.app-shell.focus-editor .panel.drawer-active input[type="range"] {
  width: 100%;
  min-height: 18px;
}

.app-shell.focus-editor .panel.drawer-active .inspector-form input[type="text"],
.app-shell.focus-editor .panel.drawer-active .inspector-form textarea,
.app-shell.focus-editor .panel.drawer-active .inspector-form select,
.app-shell.focus-editor .panel.drawer-active .caption-timing input,
.app-shell.focus-editor .panel.drawer-active .transcript-editor textarea,
.app-shell.focus-editor .panel.drawer-active .finish-form select {
  border-color: rgba(88, 103, 128, 0.2);
  color: #edf3fb;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.drawer-return-button {
  display: none;
}

.app-shell.focus-editor.drawer-open .drawer-return-button {
  position: fixed;
  top: 78px;
  right: 20px;
  bottom: auto;
  z-index: 92;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: #dbe9ff;
  background: rgba(31, 39, 52, 0.84);
  box-shadow: none;
  font-weight: 800;
  font-size: 0.76rem;
}

body[data-theme="light"] .app-shell.focus-editor.drawer-open::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.16) 42%, rgba(108, 131, 166, 0.2) 100%);
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active {
  border-color: rgba(86, 101, 124, 0.18);
  color: #171b22;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 244, 250, 0.86)),
    rgba(247, 249, 252, 0.82);
  box-shadow: 0 28px 74px rgba(66, 82, 106, 0.2);
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active > .panel-head {
  border-bottom-color: rgba(86, 101, 124, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 243, 250, 0.88));
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .panel-kicker {
  color: #6c798c;
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active h2,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active strong,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .empty-inspector::before {
  color: #171b22;
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active p,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active span,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active label,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .field-value,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .empty-inspector {
  color: #5c6878;
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .empty-inspector,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .selection-summary,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .clip-intelligence,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .render-engine-status,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .workflow-step,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .context-action,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .smart-action,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .effect-advice,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .delivery-prep-button {
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .inspector-form input[type="text"],
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .inspector-form textarea,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .inspector-form select,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .caption-timing input,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .transcript-editor textarea,
body[data-theme="light"] .app-shell.focus-editor .panel.drawer-active .finish-form select {
  border-color: rgba(86, 101, 124, 0.18);
  color: #171b22;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .app-shell.focus-editor.drawer-open .drawer-return-button {
  color: #2059c7;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(86, 101, 124, 0.16);
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active {
  border-color: rgba(255, 255, 255, 0.14);
  color: #edf3fb;
  background:
    linear-gradient(180deg, rgba(35, 41, 52, 0.92), rgba(17, 22, 31, 0.9)),
    rgba(13, 16, 22, 0.82);
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.48);
}

body[data-theme="dark"] .app-shell.focus-editor.drawer-open .drawer-return-button {
  color: #dbe9ff;
  background: rgba(31, 39, 52, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active > .panel-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(35, 41, 52, 0.96), rgba(25, 30, 39, 0.88));
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active h2,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active strong,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .empty-inspector::before {
  color: #f3f7fc;
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active p,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active span,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active label,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .field-value,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .empty-inspector {
  color: #aab5c5;
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .empty-inspector,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .selection-summary,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .clip-intelligence,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .render-engine-status,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .workflow-step,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .context-action,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .smart-action,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .effect-advice,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .delivery-prep-button {
  background: rgba(255, 255, 255, 0.055);
}

body[data-theme="dark"] .finish-mode-rail {
  background: rgba(15, 23, 42, 0.48);
}

body[data-theme="dark"] .finish-mode-rail button.active,
body[data-theme="dark"] .finish-mode-rail button[aria-selected="true"] {
  color: #dbeafe;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.26), rgba(15, 23, 42, 0.66)),
    rgba(15, 23, 42, 0.72);
}

body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .inspector-form input[type="text"],
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .inspector-form textarea,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .inspector-form select,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .caption-timing input,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .transcript-editor textarea,
body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active .finish-form select {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

@keyframes drawerSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: 11px;
  overflow: hidden;
  border-radius: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head.compact {
  margin-bottom: 8px;
}

.panel-kicker {
  color: var(--dim);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin-top: 2px;
  font-size: 0.96rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.mono-label,
.timecode,
.field-value {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
}

.timecode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timecode-jump {
  min-height: 26px;
  padding: 3px 6px;
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  font: inherit;
}

body[data-theme="dark"] .timecode-jump {
  background: rgba(255, 255, 255, 0.08);
}

.media-panel,
.right-rail {
  min-height: 0;
}

.right-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
}

.editor-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(340px, 1.05fr) minmax(260px, 0.95fr);
  gap: 8px;
}

.monitor-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.74fr) minmax(360px, 1.26fr);
  gap: 8px;
}

.source-monitor,
.program-monitor {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
}

.source-placeholder {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: var(--editor-bg);
  border: 1px solid rgba(20, 25, 34, 0.28);
  border-radius: 10px;
}

.source-placeholder p {
  color: var(--dim);
  font-size: 0.86rem;
}

.source-placeholder img,
.source-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.source-placeholder.loaded {
  place-items: stretch;
  align-content: stretch;
}

.source-performance-note {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  display: grid;
  gap: 2px;
  max-width: min(360px, calc(100% - 20px));
  border: 1px solid color-mix(in srgb, var(--warning) 34%, rgba(255, 255, 255, 0.18));
  border-radius: 10px;
  padding: 7px 9px;
  color: #ffffff;
  background: rgba(17, 21, 30, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.source-performance-note strong {
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-performance-note span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.25;
}

.source-performance-note button {
  justify-self: start;
  min-height: 24px;
  margin-top: 3px;
  border: 1px solid color-mix(in srgb, #ffffff 34%, transparent);
  border-radius: 999px;
  padding: 3px 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.source-performance-note button:hover,
.source-performance-note button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.source-range-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.58);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(1.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.14);
}

.source-range-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

.source-range-track:focus-visible {
  box-shadow: 0 0 0 2px rgba(169, 204, 255, 0.42);
}

.source-range-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--source-in, 0%);
  width: var(--source-width, 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, #a9ccff, var(--accent));
}

.source-range-track b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--source-cue, 0%);
  width: 2px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(8, 12, 18, 0.52), 0 0 14px rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
}

.source-range-hud span {
  color: #e8eef7;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.source-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(7, auto);
  gap: 6px;
  align-items: end;
  margin-top: 8px;
}

.source-range label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-range input {
  min-width: 0;
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

body[data-theme="dark"] .source-range input {
  background: rgba(255, 255, 255, 0.08);
}

.source-range .tool-button {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.68rem;
}

.source-range .source-range-chip {
  padding-inline: 7px;
  color: var(--text);
  background: var(--surface);
}

.source-range span {
  grid-column: 1 / -1;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
}

.source-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.source-next-step div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.source-next-step strong {
  color: var(--text);
  font-size: 0.82rem;
}

.source-next-step span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.source-next-step small {
  display: block;
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 0.61rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0.76;
}

.source-next-step .source-add-button {
  min-width: 104px;
  margin: 0;
}

.source-alt-edits {
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-0) 52%, transparent);
}

.source-alt-edits > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.source-alt-edits > summary::-webkit-details-marker {
  display: none;
}

.source-alt-edits > summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono-font);
  font-size: 0.78rem;
}

.source-alt-edits[open] > summary::after {
  content: "-";
}

.source-alt-edits:not([open]) > .source-actions {
  display: none;
}

.source-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 0 8px 8px;
}

.source-add-button {
  margin-top: 8px;
  min-height: 32px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.source-actions .source-add-button {
  margin-top: 0;
}

.source-add-button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.52);
}

.source-add-button.recommended {
  border-color: rgba(52, 120, 246, 0.52);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.11);
}

body[data-theme="dark"] .source-add-button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.film-strip {
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 6px;
}

.film-strip span {
  height: 54px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    var(--editor-bg-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}

.preview-stage {
  position: relative;
  min-height: 0;
  --viewer-fit-height: clamp(190px, 30svh, 310px);
  width: min(100%, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
  max-width: 100%;
  max-height: var(--viewer-fit-height);
  margin-inline: auto;
  aspect-ratio: var(--sequence-aspect-ratio, 16 / 9);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(72, 92, 136, 0.68), rgba(40, 126, 107, 0.78)),
    #08090b;
  border: 1px solid rgba(20, 25, 34, 0.34);
  border-radius: 12px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 18px 45px rgba(38, 48, 64, 0.18);
}

body.import-drop-active .preview-stage,
body.import-drop-active .timeline-scroll-shell {
  outline: 2px solid rgba(52, 120, 246, 0.72);
  outline-offset: 3px;
}

body.import-drop-active .preview-stage::before {
  content: "Drop media to import and place it on the timeline";
  position: absolute;
  inset: 12px;
  z-index: 8;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 22, 34, 0.72);
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.sequence-format-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: -2px 0 6px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sequence-format-control select {
  min-height: 30px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="dark"] .sequence-format-control select {
  background: rgba(255, 255, 255, 0.08);
}

.canvas-preset-bar {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.canvas-preset-bar::-webkit-scrollbar {
  display: none;
}

.canvas-preset-bar button {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
  border-color: var(--line-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.canvas-preset-bar button.active {
  color: #ffffff;
  background: #1f2732;
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 8px 20px rgba(26, 38, 55, 0.18);
}

body[data-theme="dark"] .canvas-preset-bar button {
  background: rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .canvas-preset-bar button.active {
  color: #07111f;
  background: #a9ccff;
  border-color: rgba(255, 255, 255, 0.2);
}

.preview-stage.look-cinematic {
  filter: contrast(1.08) saturate(0.92) brightness(0.96);
}

.preview-stage.look-warm {
  filter: sepia(0.12) saturate(1.12) contrast(1.04);
}

.preview-stage.look-mono {
  filter: grayscale(0.92) contrast(1.16);
}

.preview-stage.monitor-compare-before::after {
  content: "Before";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(13, 19, 28, 0.68);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.preview-stage.monitor-compare-before.effect-mosh::before,
.preview-stage.monitor-compare-before.effect-mosh::after {
  background: rgba(13, 19, 28, 0.68);
  mix-blend-mode: normal;
  translate: 0 0;
}

.preview-stage.effect-mosh::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--mosh-opacity);
  background:
    linear-gradient(90deg, hsla(var(--mosh-hue), 90%, 58%, 0.34), transparent 34%, rgba(255, 56, 96, 0.26) 66%, transparent),
    repeating-linear-gradient(0deg, transparent 0 var(--mosh-slice-height), rgba(255, 255, 255, var(--mosh-scan-opacity)) calc(var(--mosh-slice-height) + 1px));
  mix-blend-mode: screen;
  translate: var(--mosh-shift) 0;
}

.preview-stage.effect-mosh::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(var(--mosh-opacity) * 0.72);
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.2) 19%, transparent 21%),
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(255, 255, 255, 0.16) 23px, transparent 25px);
  mix-blend-mode: difference;
  translate: calc(var(--mosh-shift) * -0.6) 0;
}

.preview-stage video,
.preview-stage img,
.fallback-frame,
.text-overlay,
.preview-safe-guides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.preview-stage video,
.preview-stage img {
  object-fit: cover;
  display: none;
  transform-origin: center;
  transition:
    transform 160ms ease,
    object-fit 160ms ease;
}

.fallback-frame {
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 44px);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(25, 31, 41, 0.96), rgba(10, 13, 18, 0.98));
}

.frame-copy {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  max-width: 420px;
  text-align: center;
}

.frame-copy p {
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.frame-copy h3 {
  max-width: 18ch;
  font-size: clamp(1.05rem, 2.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.program-empty-copy {
  display: block;
  max-width: 34ch;
  margin-top: 8px;
  color: rgba(219, 230, 246, 0.72);
  font-size: 0.82rem;
  line-height: 1.45;
}

.viewer-empty-actions {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.viewer-import-button {
  position: relative;
  z-index: 6;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 34px rgba(20, 100, 255, 0.28);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.viewer-import-button.secondary {
  color: #dbe6f6;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .fallback-frame {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, rgba(239, 244, 250, 0.98), rgba(218, 226, 236, 0.96));
}

body[data-theme="light"] .frame-copy h3 {
  color: #17202c;
}

body[data-theme="light"] .program-empty-copy {
  color: rgba(47, 60, 78, 0.74);
}

body[data-theme="light"] .viewer-import-button.secondary {
  color: #243143;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(41, 52, 72, 0.12);
}

.stage-topline {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.stage-right-chrome {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  pointer-events: auto;
}

.viewer-chip,
.audio-pill {
  padding: 5px 7px;
  background: rgba(8, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #d8dde4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  font-weight: 600;
}

.stage-topline .viewer-chip {
  pointer-events: auto;
}

.stage-topline .sequence-format-control {
  position: static;
  min-height: 29px;
  margin: 0;
  padding: 4px 5px 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #d8dde4;
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(16px) saturate(1.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.14);
  font-size: 0.62rem;
}

.stage-topline .sequence-format-control select {
  min-height: 22px;
  max-width: 112px;
  padding: 0 20px 0 6px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #eef4fb;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.canvas-menu {
  position: relative;
  pointer-events: auto;
}

.canvas-menu > summary {
  list-style: none;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #d8dde4;
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(16px) saturate(1.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.14);
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
}

.canvas-menu > summary::-webkit-details-marker {
  display: none;
}

.canvas-menu > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.58;
}

.canvas-menu[open] > summary {
  color: #07111f;
  background: rgba(255, 255, 255, 0.84);
}

.canvas-menu .canvas-preset-bar {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  display: none;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 5px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

.canvas-menu[open] .canvas-preset-bar {
  display: grid;
}

.canvas-menu .canvas-preset-bar button {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  color: #e8eef7;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  font-size: 0.68rem;
}

.canvas-menu .canvas-preset-bar button.active {
  color: #07111f;
  background: rgba(255, 255, 255, 0.86);
}

body[data-theme="light"] .stage-topline .sequence-format-control,
body[data-theme="light"] .canvas-menu > summary,
body[data-theme="light"] .viewer-chip {
  color: #253041;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(45, 61, 86, 0.14);
}

body[data-theme="light"] .stage-topline .sequence-format-control select {
  color: #1b2533;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(45, 61, 86, 0.12);
}

body[data-theme="light"] .canvas-menu .canvas-preset-bar {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(45, 61, 86, 0.14);
  box-shadow: 0 18px 44px rgba(52, 68, 92, 0.18);
}

body[data-theme="light"] .canvas-menu .canvas-preset-bar button {
  color: #253041;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(45, 61, 86, 0.14);
}

body[data-theme="light"] .canvas-menu .canvas-preset-bar button.active {
  color: var(--accent-ink);
  background: var(--accent);
}

.text-overlay {
  display: grid;
  place-items: end start;
  padding: 7%;
  pointer-events: none;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.text-overlay.pos-center {
  place-items: center;
  text-align: center;
}

.text-overlay.pos-top-left {
  place-items: start start;
}

.text-overlay.pos-bottom-center {
  place-items: end center;
  text-align: center;
}

.text-overlay.title-lower,
.text-overlay.title-caption {
  font-weight: 700;
}

.text-overlay.title-caption {
  padding: 7% 12%;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.18));
}

.preview-safe-guides::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.audio-hud {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 160px;
  display: grid;
  gap: 6px;
}

.audio-pill {
  justify-self: end;
}

.audio-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.audio-meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--audio), #7fb2ff);
  transition: width 120ms linear;
}

.viewer-action-dock {
  position: static;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: min(100%, 560px);
  margin: 0 auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(8, 12, 18, 0.58);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

.viewer-action-dock button {
  display: inline-block;
  min-height: 26px;
  min-width: 0;
  max-width: 136px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 999px;
  color: #e8eef7;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-action-dock button.primary {
  color: #111820;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.9);
}

.viewer-action-dock button.status {
  color: #eaf6ff;
  background:
    linear-gradient(135deg, rgba(91, 169, 255, 0.26), rgba(255, 255, 255, 0.08));
  border-color: rgba(139, 198, 255, 0.38);
}

.viewer-action-dock button.mosh-proof {
  color: #f7fff5;
  background:
    linear-gradient(135deg, rgba(62, 170, 104, 0.38), rgba(255, 255, 255, 0.1));
  border-color: rgba(139, 225, 168, 0.5);
}

.transport {
  width: min(100%, 760px);
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: 42px 68px 78px 68px 42px minmax(0, 1fr);
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.55);
}

body[data-theme="dark"] .transport {
  background: rgba(9, 12, 17, 0.62);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.transport input[type="range"],
.inspector-form input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.timeline-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
}

.timeline-tools,
.timeline-legend {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timeline-legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.7rem;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
}

.legend-swatch.video {
  background: var(--video);
}

.legend-swatch.title {
  background: var(--title);
}

.legend-swatch.caption {
  background: #2f64d8;
}

.legend-swatch.audio {
  background: var(--audio);
}

.timeline-status-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(145px, 1fr) max-content minmax(170px, 1.1fr) minmax(150px, 0.9fr) minmax(128px, 0.72fr) max-content max-content max-content;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  padding: 5px;
  border: 1px solid rgba(120, 136, 160, 0.16);
  border-radius: 9px;
  color: #d9e2ef;
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(15, 19, 25, 0.96));
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.timeline-status-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-action-hint {
  color: rgba(217, 226, 239, 0.72);
  font-size: 0.62rem;
}

.timeline-edit-point-status {
  color: rgba(180, 205, 238, 0.76);
}

.selection-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.selection-meter::-webkit-scrollbar {
  display: none;
}

.selection-meter span {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #cbd7e6;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.6rem;
  font-weight: 800;
}

.selection-meter span[data-selection-tone="video"] {
  color: #dbe8ff;
  background: rgba(58, 126, 232, 0.16);
}

.selection-meter span[data-selection-tone="duration"] {
  color: #edf4ff;
  background: rgba(124, 145, 178, 0.18);
}

.selection-meter span[data-selection-tone="audio"] {
  color: #dff8ec;
  background: rgba(22, 143, 100, 0.16);
}

.selection-meter span[data-selection-tone="caption"] {
  color: #ffeecf;
  background: rgba(192, 132, 34, 0.16);
}

.selection-meter span[data-selection-tone="source"] {
  color: #d8f3ff;
  background: rgba(48, 149, 190, 0.16);
}

.selection-meter span[data-selection-tone="safe"] {
  color: #dff8ec;
  background: rgba(31, 139, 106, 0.14);
}

.selection-meter span[data-selection-tone="protected"] {
  color: #ffd8df;
  background: rgba(255, 107, 126, 0.16);
}

.timeline-status-bar button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline-context-menu {
  position: fixed;
  z-index: 120;
  width: min(286px, calc(100vw - 20px));
  max-height: calc(100svh - 20px);
  display: grid;
  gap: 2px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(138, 157, 184, 0.22);
  border-radius: 10px;
  background: rgba(246, 248, 251, 0.96);
  box-shadow:
    0 22px 58px rgba(31, 42, 58, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

body[data-theme="dark"] .timeline-context-menu,
.app-shell.focus-editor .timeline-context-menu {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(22, 26, 33, 0.96);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.08);
}

.timeline-context-menu.hidden {
  display: none;
}

.timeline-context-menu-head {
  display: grid;
  gap: 2px;
  padding: 6px 7px 7px;
  border-bottom: 1px solid var(--line-soft);
}

.timeline-context-menu-head strong,
.timeline-context-menu-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-context-menu-head strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline-context-menu-head span {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.62rem;
}

.timeline-context-group {
  padding: 6px 7px 2px;
  color: var(--dim);
  font-family: var(--mono-font);
  font-size: 0.54rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-context-menu button {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.timeline-context-menu button:hover,
.timeline-context-menu button:focus-visible {
  background: rgba(52, 120, 246, 0.12);
  outline: none;
}

.timeline-context-menu button.danger {
  color: #c43d51;
}

body[data-theme="dark"] .timeline-context-menu button.danger,
.app-shell.focus-editor .timeline-context-menu button.danger {
  color: #ff8fa0;
}

.timeline-context-menu button span,
.timeline-context-menu button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-context-menu button span {
  font-size: 0.78rem;
  font-weight: 760;
}

.timeline-context-menu button small {
  color: var(--dim);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 800;
}

.timeline-context-divider {
  display: block;
  height: 1px;
  margin: 3px 4px;
  background: var(--line-soft);
}

@media (max-width: 720px) {
  .timeline-context-menu {
    width: min(316px, calc(100vw - 18px));
    padding: 7px;
    border-radius: 13px;
  }

  .timeline-context-menu button {
    min-height: 42px;
    padding: 9px 10px;
  }

  .timeline-context-menu button span {
    font-size: 0.86rem;
  }

  .timeline-context-menu-head {
    padding: 8px 9px 9px;
  }

  .timeline-context-group {
    padding: 8px 10px 2px;
    font-size: 0.56rem;
  }
}

.marker-inline-editor {
  display: grid;
  grid-template-columns: max-content minmax(180px, 1fr) 112px max-content max-content max-content;
  align-items: end;
  gap: 6px;
  margin: -2px 0 7px;
  padding: 6px;
  border: 1px solid rgba(127, 178, 255, 0.2);
  border-radius: 9px;
  color: #dbe8f8;
  background:
    linear-gradient(180deg, rgba(27, 34, 44, 0.92), rgba(14, 18, 24, 0.92));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  font-family: "IBM Plex Mono", monospace;
}

.marker-inline-editor.review-fix {
  border-color: rgba(245, 159, 58, 0.34);
}

.marker-editor-kicker {
  align-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: #9fc5ff;
  background: rgba(52, 120, 246, 0.14);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marker-inline-editor.review-fix .marker-editor-kicker {
  color: #ffe2b7;
  background: rgba(245, 159, 58, 0.16);
}

.marker-inline-editor label {
  display: grid;
  gap: 3px;
  color: rgba(219, 232, 248, 0.68);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marker-inline-editor input {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  padding: 5px 8px;
  color: #f5f9ff;
  background: rgba(255, 255, 255, 0.07);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
}

.marker-inline-editor button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid rgba(127, 178, 255, 0.26);
  color: #ffffff;
  background: rgba(52, 120, 246, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.marker-inline-editor button.ghost {
  color: #d5dfed;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.11);
}

.marker-inline-editor button.danger {
  color: #ffecef;
  background: rgba(217, 76, 83, 0.22);
  border-color: rgba(255, 131, 137, 0.32);
}

.timecode-dialog {
  width: min(440px, calc(100vw - 24px));
}

.timecode-entry {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.timecode-entry input {
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-0) 74%, white);
  font-family: var(--mono-font);
  font-size: 1rem;
  font-weight: 800;
}

.timecode-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.timecode-presets button {
  min-height: 34px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  font-family: var(--mono-font);
  font-size: 0.74rem;
  font-weight: 900;
}

.confirm-dialog {
  width: min(460px, calc(100vw - 24px));
}

.confirm-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.confirm-actions button {
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 999px;
  font-weight: 800;
}

.confirm-modal.danger #confirm-accept {
  color: #fff6f7;
  background: #d94c53;
  border-color: rgba(217, 76, 83, 0.5);
}

.timeline-quick-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 24px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}

.timeline-quick-actions::-webkit-scrollbar {
  display: none;
}

.timeline-quick-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #dce7f6;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-quick-actions kbd {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  padding: 1px 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(7, 11, 18, 0.28);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  line-height: 1;
}

.timeline-quick-actions button:first-child {
  color: #ffffff;
  background: rgba(52, 120, 246, 0.28);
  border-color: rgba(127, 178, 255, 0.28);
}

.timeline-quick-actions button.danger {
  color: #ffecec;
  background: rgba(217, 76, 83, 0.18);
  border-color: rgba(255, 131, 137, 0.28);
}

.timeline-quick-actions button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.timeline-quick-more {
  position: relative;
  flex: 0 0 auto;
}

.timeline-quick-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: #dce7f6;
  background: rgba(255, 255, 255, 0.04);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.timeline-quick-more > summary span {
  display: inline-grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding-inline: 4px;
  border-radius: 999px;
  color: #12213a;
  background: rgba(220, 231, 246, 0.86);
  font-size: 0.5rem;
  line-height: 1;
}

.timeline-quick-more > summary::-webkit-details-marker {
  display: none;
}

.timeline-quick-more > summary::after {
  content: "+";
  margin-left: 5px;
  color: rgba(220, 231, 246, 0.74);
}

.timeline-quick-more[open] > summary {
  color: #ffffff;
  background: rgba(52, 120, 246, 0.22);
  border-color: rgba(127, 178, 255, 0.28);
}

.timeline-quick-more:not([open]) > .timeline-quick-more-menu {
  display: none;
}

.timeline-quick-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 50;
  display: grid;
  gap: 4px;
  min-width: 176px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 25, 34, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
}

.timeline-quick-more-menu button {
  justify-content: space-between;
  width: 100%;
  border-radius: 7px;
  background: transparent;
}

body[data-theme="light"] .timeline-quick-more > summary {
  color: #324052;
  border-color: rgba(82, 100, 124, 0.16);
  background: rgba(255, 255, 255, 0.42);
}

body[data-theme="light"] .timeline-quick-more > summary::after {
  color: rgba(58, 70, 88, 0.66);
}

body[data-theme="light"] .timeline-quick-more > summary span {
  color: #ffffff;
  background: rgba(52, 120, 246, 0.86);
}

body[data-theme="light"] .timeline-quick-more[open] > summary {
  color: #ffffff;
  background: rgba(52, 120, 246, 0.9);
  border-color: rgba(52, 120, 246, 0.92);
}

body[data-theme="light"] .timeline-quick-more-menu {
  border-color: rgba(82, 100, 124, 0.16);
  background: rgba(250, 252, 255, 0.96);
  box-shadow: 0 18px 38px rgba(67, 78, 96, 0.18);
}

body[data-theme="light"] .timeline-quick-more-menu button {
  color: #2b3545;
}

.timeline-overview {
  position: relative;
  display: block;
  width: 100%;
  height: 22px;
  margin: -2px 0 7px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 8.33% 100%,
    #0d1117;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: crosshair;
}

.timeline-overview-map,
.timeline-review-range,
.timeline-selection-range,
.timeline-overview-window,
.timeline-overview-playhead,
.overview-segment,
.overview-marker {
  position: absolute;
  inset-block: 0;
  pointer-events: none;
}

.timeline-overview-map {
  inset-inline: 0;
}

.overview-segment {
  top: 5px;
  height: 12px;
  border-radius: 4px;
  opacity: 0.86;
}

.overview-segment.video {
  background: var(--video);
}

.overview-segment.audio {
  background: var(--audio);
}

.overview-segment.caption {
  top: 2px;
  height: 4px;
  background: #6094ff;
}

.overview-marker {
  top: 2px;
  width: 2px;
  height: 18px;
  background: var(--warning);
}

.timeline-review-range {
  top: 2px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 10%, transparent 10% 50%, rgba(255, 255, 255, 0.24) 50% 60%, transparent 60% 100%) 0 0 / 10px 10px,
    rgba(52, 120, 246, 0.28);
  box-shadow: inset 0 0 0 1px rgba(169, 204, 255, 0.68), 0 0 16px rgba(52, 120, 246, 0.24);
}

.timeline-selection-range {
  top: 5px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(52, 120, 246, 0.22),
    0 0 16px rgba(52, 120, 246, 0.2);
}

body[data-theme="light"] .timeline-selection-range {
  border-color: rgba(36, 75, 138, 0.32);
  background: rgba(52, 120, 246, 0.14);
  box-shadow: 0 0 0 1px rgba(52, 120, 246, 0.18);
}

.timeline-review-handle {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 26px;
  border: 1px solid rgba(216, 232, 255, 0.82);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.92), rgba(116, 171, 255, 0.84));
  box-shadow: 0 4px 12px rgba(18, 72, 166, 0.34);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
}

.timeline-review-handle::after {
  content: "";
  position: absolute;
  inset: 6px 6px;
  border-inline: 1px solid rgba(22, 58, 120, 0.5);
}

.timeline-review-handle[data-review-edge="in"] {
  left: 0;
  transform: translateX(-50%);
}

.timeline-review-handle[data-review-edge="out"] {
  right: 0;
  transform: translateX(50%);
}

.timeline-overview-window {
  top: 2px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 999px rgba(3, 6, 10, 0.18);
}

.timeline-overview-playhead {
  top: 0;
  width: 2px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.timeline-scroll-shell {
  position: relative;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: #10141a;
  cursor: grab;
  touch-action: pan-x;
}

.timeline-scroll-shell.panning {
  cursor: grabbing;
  user-select: none;
}

.timeline-body {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
}

.timeline-scale {
  padding-left: 42px;
  min-width: fit-content;
}

.timeline-ruler {
  position: relative;
  min-height: 18px;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.timeline-ruler span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line-soft);
  padding-left: 6px;
}

.timeline-ruler,
.timeline-playhead {
  cursor: ew-resize;
}

.timeline-track-labels {
  display: grid;
  gap: 3px;
  width: 42px;
  padding-top: 3px;
}

.timeline-track-labels button {
  min-height: 32px;
  border-radius: 0;
  padding: 0;
  color: #aeb8c6;
  background: #0d1117;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
}

.timeline-track-labels button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.timeline-track-labels button:not(.active) {
  color: #687384;
  background: #111419;
}

.timeline-track {
  position: relative;
  display: grid;
  gap: 2px;
  min-width: fit-content;
  padding: 2px 4px 2px 0;
}

.timeline-empty-state {
  position: absolute;
  inset: 48px auto auto 72px;
  z-index: 2;
  display: grid;
  gap: 6px;
  max-width: min(340px, calc(100vw - 140px));
  padding: 13px 14px;
  color: var(--muted);
  background: rgba(250, 252, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(42, 54, 74, 0.16);
}

body[data-theme="dark"] .timeline-empty-state {
  background: rgba(20, 25, 33, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

.timeline-empty-state strong {
  color: var(--text);
  font-size: 0.9rem;
}

.timeline-empty-state span {
  font-size: 0.76rem;
  line-height: 1.35;
}

.empty-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.timeline-empty-state button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.timeline-empty-state button[data-empty-action="demo"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line-soft);
}

body[data-theme="dark"] .timeline-empty-state button[data-empty-action="demo"] {
  color: #edf3fb;
  background: rgba(255, 255, 255, 0.09);
}

.track-row {
  position: relative;
  min-height: 32px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 51px, rgba(255, 255, 255, 0.035) 52px),
    #151920;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.track-row.drop-active {
  border-color: #76a8ff;
}

.track-row.disabled {
  opacity: 0.38;
}

.track-row.locked {
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 51px, rgba(255, 255, 255, 0.035) 52px),
    linear-gradient(90deg, rgba(255, 190, 80, 0.08), transparent 28%),
    #151920;
}

.track-row.locked::after {
  content: "locked";
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  color: #f1b95c;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.track-row.disabled::after {
  content: "hidden - protected";
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-track-labels button[data-track-state="protected"]::after {
  content: "P";
  display: block;
  margin-top: 1px;
  color: var(--dim);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.timeline-track-labels button[data-track-state="locked"]::after {
  content: "L";
  display: block;
  margin-top: 1px;
  color: #f1b95c;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.track-row.blade-ready {
  cursor: crosshair;
}

.timeline-marquee {
  position: absolute;
  top: 3px;
  bottom: 3px;
  z-index: 3;
  display: none;
  border: 1px solid rgba(127, 178, 255, 0.78);
  border-radius: 5px;
  background: rgba(127, 178, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.timeline-marquee.active {
  display: block;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #7fb2ff;
  box-shadow: 0 0 14px rgba(127, 178, 255, 0.5);
  cursor: ew-resize;
  z-index: 4;
}

.timeline-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  padding: 0;
  border: 0;
  background: var(--assist);
  box-shadow: 0 0 12px rgba(52, 120, 246, 0.38);
  cursor: ew-resize;
  z-index: 3;
}

.timeline-marker.review-fix {
  width: 3px;
  background: #f59f3a;
  box-shadow: 0 0 14px rgba(245, 159, 58, 0.52);
}

.timeline-marker:active {
  cursor: grabbing;
}

.timeline-marker.selected {
  background: #ffffff;
  box-shadow:
    0 0 0 3px rgba(52, 120, 246, 0.34),
    0 0 18px rgba(52, 120, 246, 0.58);
}

.timeline-marker::after {
  content: attr(data-marker-type) " · " attr(data-label);
  position: absolute;
  top: 4px;
  left: 5px;
  padding: 3px 5px;
  border: 1px solid rgba(127, 178, 255, 0.28);
  background: rgba(8, 10, 12, 0.86);
  color: #edf5ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  white-space: nowrap;
}

.timeline-marker.review-fix::after {
  border-color: rgba(245, 159, 58, 0.44);
  background: rgba(33, 20, 6, 0.9);
  color: #fff3dd;
}

.review-issue-strip {
  position: relative;
  z-index: 3;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  overflow-x: auto;
  border-top: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
  color: var(--muted);
  scrollbar-width: none;
}

.review-issue-strip::-webkit-scrollbar {
  display: none;
}

.review-issue-strip.hidden {
  display: none;
}

.review-issue-strip-label {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--warning) 76%, var(--text));
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-issue-chip,
.review-issue-fix,
.review-issue-next {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-0) 70%, transparent);
  color: var(--text);
  box-shadow: none;
}

.review-issue-chip {
  max-width: min(260px, 34vw);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-issue-chip strong {
  color: color-mix(in srgb, var(--warning) 82%, var(--text));
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
}

.review-issue-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 760;
}

.review-issue-chip.active,
.review-issue-chip:hover,
.review-issue-fix:hover,
.review-issue-next:hover {
  border-color: color-mix(in srgb, var(--warning) 70%, var(--line));
  background: color-mix(in srgb, var(--warning) 18%, var(--surface-0));
}

.review-issue-fix {
  color: color-mix(in srgb, var(--warning) 82%, var(--text));
  font-size: 0.66rem;
  font-weight: 940;
}

.review-issue-next {
  color: color-mix(in srgb, var(--accent) 78%, var(--text));
  font-size: 0.66rem;
  font-weight: 900;
}

.timeline-gap {
  position: absolute;
  top: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: rgba(216, 221, 228, 0.5);
  background: rgba(255, 255, 255, 0.035);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.clip-chip {
  position: absolute;
  top: 3px;
  bottom: 3px;
  padding: 3px 8px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  cursor: pointer;
  color: #f5f7fb;
}

.clip-chip[data-tip] {
  position: absolute;
}

.clip-chip > strong,
.clip-chip > span,
.clip-chip > em {
  position: relative;
  z-index: 2;
}

.trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transition: opacity 120ms ease;
}

.clip-chip:hover .trim-handle,
.clip-chip.selected .trim-handle,
.clip-chip.trim-ready .trim-handle {
  opacity: 1;
}

.clip-chip.trim-ready {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 0 1px rgba(127, 178, 255, 0.28);
}

.trim-start {
  left: 0;
}

.trim-end {
  right: 0;
}

.clip-chip.video {
  background:
    linear-gradient(180deg, rgba(62, 88, 131, 0.72), rgba(24, 39, 68, 0.9)),
    #25385f;
}

.clip-chip.title {
  background: linear-gradient(180deg, rgba(205, 150, 53, 0.82), rgba(126, 84, 24, 0.9));
}

.clip-chip.caption {
  background:
    linear-gradient(180deg, rgba(78, 122, 220, 0.84), rgba(35, 67, 142, 0.92));
  cursor: grab;
}

.clip-chip.caption.linked::after {
  content: attr(data-caption-state);
  position: absolute;
  top: 2px;
  right: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clip-chip.caption.loose {
  border-style: dashed;
}

.clip-chip.caption.loose::after,
.clip-chip.caption.caption-needs-review::after {
  content: attr(data-caption-state);
  position: absolute;
  top: 2px;
  right: 5px;
  color: rgba(255, 255, 255, 0.86);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clip-chip.caption.caption-needs-review {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 16px rgba(192, 132, 34, 0.28);
}

.clip-chip.caption:active {
  cursor: grabbing;
}

.clip-chip.audio {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, rgba(60, 172, 119, 0.78), rgba(30, 104, 75, 0.88));
  background-position: left 72%, left top;
  background-repeat: repeat-x, no-repeat;
  background-size: 100% 34%, 100% 100%;
}

.clip-chip.audio.unlinked {
  border-style: dashed;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, rgba(86, 132, 145, 0.72), rgba(47, 73, 88, 0.92));
  background-position: left 72%, left top;
  background-repeat: repeat-x, no-repeat;
  background-size: 100% 34%, 100% 100%;
}

.clip-chip.effect-mosh {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(52, 120, 246, 0.3);
}

.mosh-pulse-map {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  z-index: 1;
  height: 5px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.18);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.timeline-filmstrip {
  position: absolute;
  inset: 3px 4px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--timeline-thumb-columns, 4), minmax(18px, 1fr));
  gap: 2px;
  overflow: hidden;
  border-radius: 7px;
  opacity: 0.72;
  pointer-events: none;
}

.timeline-filmstrip i {
  display: block;
  min-width: 0;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(116, 151, 203, 0.72), rgba(28, 43, 72, 0.9));
  background-position:
    center,
    calc(var(--frame-index, 0) * 11%) center;
  background-size:
    cover,
    cover;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
}

.timeline-filmstrip.source-backed i {
  background-position:
    center,
    var(--frame-position, center) center;
  background-size:
    cover,
    cover;
}

.clip-chip.video::after {
  content: "";
  position: absolute;
  inset: 3px 4px;
  z-index: 1;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(8, 13, 24, 0.72), rgba(8, 13, 24, 0.18) 38%, rgba(8, 13, 24, 0.68)),
    linear-gradient(180deg, transparent 0 58%, rgba(8, 13, 24, 0.52));
  pointer-events: none;
}

.mosh-pulse-map i {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #78a7ff;
  box-shadow:
    0 0 0 4px rgba(120, 167, 255, 0.18),
    0 0 16px rgba(255, 95, 135, 0.32);
  transform: translate(-50%, -50%);
}

.clip-chip.missing-source {
  border-style: dashed;
  color: #fff7f7;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, rgba(138, 49, 59, 0.9), rgba(80, 35, 42, 0.96));
}

.clip-chip em {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clip-status-badges {
  position: absolute;
  inset: 3px 5px auto auto;
  z-index: 3;
  display: flex;
  max-width: calc(100% - 10px);
  gap: 3px;
  pointer-events: none;
}

.clip-status-badges b {
  min-width: 0;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(8, 12, 18, 0.42);
  font-family: var(--mono-font);
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.clip-status-badges b[data-badge-tone="danger"] {
  background: rgba(217, 76, 83, 0.5);
}

.clip-status-badges b[data-badge-tone="audio"] {
  background: rgba(22, 143, 100, 0.5);
}

.clip-status-badges b[data-badge-tone="title"] {
  background: rgba(192, 132, 34, 0.52);
}

.clip-status-badges b[data-badge-tone="effect"] {
  background: rgba(52, 120, 246, 0.56);
}

.waveform {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  z-index: 1;
  height: 38%;
  display: grid;
  grid-template-columns: repeat(22, 1fr);
  align-items: center;
  gap: 2px;
  opacity: 0.52;
}

.waveform i {
  display: block;
  min-height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.clip-chip.waveform-missing::after {
  content: "waveform pending";
  position: absolute;
  right: 8px;
  bottom: 4px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.54);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clip-chip.selected {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(52, 120, 246, 0.8);
}

.clip-chip.multi-selected {
  box-shadow:
    0 0 0 2px rgba(52, 120, 246, 0.8),
    0 10px 24px rgba(52, 120, 246, 0.22);
}

.tool-chip:disabled {
  cursor: default;
  opacity: 0.42;
  transform: none;
}

.clip-chip.blade-ready {
  cursor: crosshair;
}

.clip-chip.dragging {
  opacity: 0.55;
}

.clip-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 700;
}

.clip-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.86);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
}

.clip-chip.audio span {
  display: none;
}

.media-bin {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.media-bin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 6px;
  margin-top: 8px;
}

.media-bin-tools label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-bin-tools input,
.media-bin-tools select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
}

.media-bin-tools input {
  padding: 0 10px;
}

.media-bin-tools select {
  padding: 0 8px;
}

.media-recovery-banner {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(196, 132, 32, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(196, 132, 32, 0.12), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
}

.media-recovery-banner.hidden {
  display: none;
}

.media-recovery-banner strong {
  color: var(--text);
  font-size: 0.82rem;
}

.media-recovery-banner span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.media-recovery-banner button {
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #b87514;
  font-size: 0.74rem;
  font-weight: 800;
}

.empty-bin-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
}

.empty-bin-state strong {
  color: var(--text);
  font-size: 0.86rem;
}

.empty-bin-state span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.empty-bin-action {
  width: fit-content;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.media-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  background: color-mix(in srgb, var(--surface-0) 76%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  cursor: pointer;
}

.media-card.selected {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-1) 90%, transparent);
  box-shadow: inset 3px 0 color-mix(in srgb, var(--accent) 88%, transparent);
}

.media-card.source-weight-warning {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--line-soft));
}

.media-card.unused-source {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 44%),
    color-mix(in srgb, var(--surface-0) 76%, transparent);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(52, 120, 246, 0.18), rgba(22, 143, 100, 0.12));
  overflow: hidden;
  border-radius: 7px;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-weight-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #ffffff 22%, transparent);
  border-radius: 999px;
  padding: 2px 5px;
  color: #ffffff;
  background: rgba(18, 22, 30, 0.78);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.source-weight-badge.lean {
  background: color-mix(in srgb, var(--warning) 72%, rgba(18, 22, 30, 0.82));
}

.source-weight-badge.used {
  background: color-mix(in srgb, var(--audio) 72%, rgba(18, 22, 30, 0.82));
}

.media-meta {
  min-width: 0;
}

.media-meta h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 700;
}

.media-meta p {
  margin-top: 2px;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.source-card-button,
.add-clip-button {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}

.source-card-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: color-mix(in srgb, var(--surface-1) 78%, transparent);
}

.source-card-button:hover,
.source-card-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.inspector-panel {
  min-height: 0;
}

.secondary-panel {
  padding: 0;
  overflow: visible;
}

.secondary-panel > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-panel > summary::-webkit-details-marker {
  display: none;
}

.secondary-panel > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--assist);
  background: rgba(255, 255, 255, 0.62);
  font-family: "IBM Plex Mono", monospace;
}

.secondary-panel[open] > summary::before {
  content: "-";
}

.secondary-panel > summary span {
  flex: 1;
}

.secondary-panel > summary strong {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
}

.secondary-panel > :not(summary) {
  margin: 0 11px 11px;
}

.health-panel {
  order: 4;
  display: grid;
  gap: 9px;
}

.smart-panel {
  order: 1;
}

.transcript-panel {
  order: 2;
}

.inspector-panel {
  order: 3;
}

.health-score {
  min-width: 52px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #1f242b;
  color: #ffffff;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.health-copy {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.health-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(20, 25, 34, 0.12);
}

.health-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f64da, #7fb2ff);
  transition: width 180ms ease;
}

.fix-next-button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 9px;
  border-color: rgba(52, 120, 246, 0.24);
  border-radius: 9px;
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
}

.fix-next-button.batch {
  border-color: rgba(31, 100, 218, 0.32);
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.14), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.58);
}

.fix-next-button.ready {
  border-color: rgba(32, 136, 94, 0.24);
  background:
    linear-gradient(135deg, rgba(32, 136, 94, 0.12), rgba(255, 255, 255, 0.64)),
    rgba(255, 255, 255, 0.58);
}

.fix-next-button:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.fix-next-button strong {
  color: var(--text);
  font-size: 0.84rem;
}

.fix-next-button span {
  color: var(--muted);
  font-size: 0.75rem;
}

.smart-panel {
  overflow: visible;
}

.transcript-panel {
  display: grid;
  gap: 9px;
}

.transcript-copy {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.transcript-editor {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.transcript-editor textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.4;
}

.transcript-editor textarea:disabled {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.28);
}

.caption-timing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.caption-timing label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.caption-timing input {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
}

.caption-health-action {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(120, 136, 160, 0.18);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
  text-align: left;
}

.caption-health-action strong {
  color: var(--text);
  font-size: 0.78rem;
}

.caption-health-action span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.caption-health-action.ready {
  border-color: rgba(31, 139, 106, 0.28);
  background: rgba(31, 139, 106, 0.09);
}

.caption-health-action.warn,
.caption-health-action.check {
  border-color: rgba(221, 154, 55, 0.32);
  background: rgba(221, 154, 55, 0.1);
}

.transcript-next-action {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  border-radius: 11px;
  color: var(--accent-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #ffffff 8%), color-mix(in srgb, var(--accent) 72%, #111827 8%));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 18%, transparent);
  text-align: left;
}

.transcript-next-action strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.transcript-next-action span {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0.84;
}

.transcript-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.transcript-actions button,
.caption-import-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: #1f4fb8;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.transcript-actions button:last-child {
  border-color: #1f64da;
  background: var(--accent);
  color: var(--accent-ink);
}

.transcript-lines {
  display: grid;
  gap: 6px;
}

.transcript-line {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border-radius: 9px;
  text-align: left;
  background: rgba(255, 255, 255, 0.46);
}

.transcript-line span {
  display: inline-flex;
  justify-content: center;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(31, 36, 43, 0.08);
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transcript-line strong {
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.transcript-line.selected {
  border-color: rgba(52, 120, 246, 0.42);
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.12), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(52, 120, 246, 0.1);
}

.transcript-line.selected span {
  background: #1f242b;
  color: #ffffff;
}

.context-actions {
  display: grid;
  gap: 7px;
}

.selection-summary,
.clip-intelligence,
.render-engine-status,
.production-master-status,
.production-package-audit {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(52, 120, 246, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.08), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.42);
}

.selection-summary {
  margin-bottom: 8px;
}

.workflow-queue {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.workflow-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-queue-head strong {
  color: var(--assist);
  font-size: 0.64rem;
}

.workflow-route {
  display: grid;
  gap: 5px;
}

.workflow-step {
  width: 100%;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 3px 8px;
  padding: 8px 9px;
  border-color: rgba(82, 101, 130, 0.18);
  border-radius: 9px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.08), transparent),
    rgba(255, 255, 255, 0.48);
}

.workflow-step::before {
  content: "";
  grid-row: 1 / span 2;
  align-self: stretch;
  border-radius: 999px;
  background: rgba(82, 101, 130, 0.24);
}

.workflow-step.next::before,
.workflow-step.ready::before {
  background: var(--accent);
}

.workflow-step strong,
.workflow-step span {
  min-width: 0;
}

.workflow-step strong {
  color: var(--text);
  font-size: 0.82rem;
}

.workflow-step span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.32;
}

.workflow-route-primary {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 9px 10px;
}

.workflow-route-primary::before {
  grid-row: 1 / span 3;
}

.workflow-route-primary b {
  grid-column: 2;
  width: max-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(52, 120, 246, 0.11);
  color: var(--accent);
  font: 800 0.56rem "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-route-primary strong,
.workflow-route-primary span {
  grid-column: 2;
}

.workflow-route-then {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.workflow-route-then::-webkit-scrollbar {
  display: none;
}

.workflow-route-chip {
  width: auto;
  min-width: min(138px, 48%);
  grid-template-columns: 1fr;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.36);
}

.workflow-route-chip::before {
  display: none;
}

.workflow-route-chip span,
.workflow-route-chip strong {
  grid-column: 1;
}

.workflow-route-chip span {
  color: var(--dim);
  font: 800 0.56rem "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-route-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.workflow-path {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  gap: 5px;
  margin: 0 0 8px;
  padding: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.34);
  scrollbar-width: thin;
}

.workflow-path-step {
  min-width: 0;
  min-height: 50px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 7px 6px;
  border-radius: 8px;
  text-align: left;
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(82, 101, 130, 0.12);
  box-shadow: none;
}

.workflow-path-step small,
.workflow-path-step span {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-path-step small {
  color: var(--dim);
  font-size: 0.56rem;
}

.workflow-path-step strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-path-step span {
  color: var(--muted);
  font-size: 0.54rem;
}

.workflow-path-step.done {
  border-color: rgba(64, 161, 103, 0.28);
  background: rgba(64, 161, 103, 0.1);
}

.workflow-path-step.done span {
  color: var(--success);
}

.workflow-path-step.active {
  color: var(--accent-ink);
  border-color: rgba(52, 120, 246, 0.42);
  background: linear-gradient(135deg, rgba(52, 120, 246, 0.92), rgba(75, 146, 255, 0.76));
}

.workflow-path-step.active small,
.workflow-path-step.active strong,
.workflow-path-step.active span {
  color: inherit;
}

@media (max-width: 720px) {
  .workflow-path {
    grid-auto-columns: minmax(78px, 1fr);
  }
}

.workflow-proof {
  margin: 0 0 8px;
  border: 1px solid rgba(82, 101, 130, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.workflow-proof summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  cursor: pointer;
  list-style: none;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-proof summary::-webkit-details-marker {
  display: none;
}

.workflow-proof summary strong {
  color: var(--assist);
}

.workflow-proof-intro {
  margin: 0 8px 8px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.workflow-proof-next-action {
  width: calc(100% - 16px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  margin: 0 8px 8px;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 10px;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.62)));
  box-shadow: 0 12px 24px rgba(51, 99, 171, 0.08);
  cursor: pointer;
}

.workflow-proof-next-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(51, 99, 171, 0.12);
}

.workflow-proof-next-action b {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  min-width: 70px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workflow-proof-next-action.done b {
  background: var(--assist);
}

.workflow-proof-next-action strong,
.workflow-proof-next-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-proof-next-action strong {
  color: var(--text);
  font-size: 0.78rem;
}

.workflow-proof-next-action span {
  color: var(--muted);
  font-size: 0.68rem;
}

.workflow-proof.proof-focus {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.workflow-proof-list {
  display: grid;
  gap: 5px;
  padding: 0 8px 8px;
}

.workflow-proof-item {
  width: 100%;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 7px 8px;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 8px;
  text-align: left;
  background: rgba(255, 255, 255, 0.46);
}

.workflow-proof-item::before {
  content: "";
  grid-row: 1 / span 2;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(82, 101, 130, 0.3);
  box-shadow: 0 0 0 3px rgba(82, 101, 130, 0.08);
}

.workflow-proof-item.done::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 120, 246, 0.12);
}

.workflow-proof-item strong,
.workflow-proof-item span,
.workflow-proof-item small {
  min-width: 0;
}

.workflow-proof-item strong {
  color: var(--text);
  font-size: 0.76rem;
}

.workflow-proof-item span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.workflow-proof-item small {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(52, 120, 246, 0.1);
}

.workflow-proof-item.todo small {
  color: #fff;
  background: var(--accent);
}

.review-notes-import {
  margin: 0 0 8px;
  border: 1px solid rgba(82, 101, 130, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.review-notes-import summary {
  padding: 8px 9px;
  cursor: pointer;
  list-style: none;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-notes-hint {
  margin: 0 9px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.review-notes-import textarea {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  min-height: 74px;
  resize: vertical;
}

.review-notes-preview {
  display: grid;
  gap: 2px;
  margin: 0 8px 8px;
  padding: 8px 10px;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  line-height: 1.3;
}

.review-notes-preview strong {
  color: var(--text);
  font-size: 0.75rem;
}

.review-notes-preview[data-state="ready"] {
  border-color: rgba(39, 174, 96, 0.35);
  background: rgba(39, 174, 96, 0.1);
}

.review-notes-preview[data-state="warn"] {
  border-color: rgba(234, 179, 8, 0.38);
  background: rgba(234, 179, 8, 0.1);
}

.review-notes-preview[data-state="blocked"] {
  border-color: rgba(232, 87, 87, 0.36);
  background: rgba(232, 87, 87, 0.09);
}

.review-notes-preview[data-state="duplicate"] {
  border-color: rgba(234, 179, 8, 0.36);
  background: rgba(234, 179, 8, 0.1);
}

.review-notes-import button {
  margin: 0 8px 8px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
}

.review-notes-import button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(82, 101, 130, 0.12);
}

.selection-summary strong,
.clip-intelligence strong,
.render-engine-status strong,
.production-master-status strong,
.production-package-audit > strong {
  color: var(--text);
  font-size: 0.86rem;
}

.selection-summary span,
.clip-intelligence p,
.clip-intelligence small,
.render-engine-status span,
.production-master-status span,
.production-package-audit > span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.render-preflight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
  margin: 8px 0;
}

.render-profile-control {
  display: grid;
  grid-template-columns: auto minmax(170px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.36);
}

.render-profile-control span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.render-profile-control select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.render-profile-control small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

body[data-theme="dark"] .render-profile-control {
  background: rgba(255, 255, 255, 0.055);
}

body[data-theme="dark"] .render-profile-control select {
  background: rgba(255, 255, 255, 0.08);
}

.export-portability {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(43, 161, 110, 0.24);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(43, 161, 110, 0.1), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.42);
}

.export-portability.warn {
  border-color: rgba(196, 132, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(196, 132, 32, 0.12), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.export-portability.blocked {
  border-color: rgba(211, 70, 70, 0.34);
  background:
    linear-gradient(135deg, rgba(211, 70, 70, 0.1), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.export-portability strong {
  color: var(--text);
  font-size: 0.84rem;
}

.export-portability span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.preflight-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 8px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

body[data-theme="dark"] .preflight-item {
  background: rgba(255, 255, 255, 0.06);
}

.preflight-item strong,
.preflight-item span {
  display: block;
}

.preflight-item strong {
  font-size: 0.72rem;
}

.preflight-item span {
  grid-column: 1;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.preflight-fix {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: none;
}

.preflight-item.ready {
  border-color: rgba(43, 161, 110, 0.34);
}

.preflight-item.warn {
  border-color: rgba(196, 132, 32, 0.42);
}

.preflight-item.blocked {
  border-color: rgba(211, 70, 70, 0.4);
}

.render-engine-status.ready {
  border-color: rgba(43, 161, 110, 0.32);
  background:
    linear-gradient(135deg, rgba(43, 161, 110, 0.12), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.render-engine-status.fallback {
  border-color: rgba(196, 132, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(196, 132, 32, 0.12), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.render-engine-status.blocked {
  border-color: rgba(211, 70, 70, 0.28);
  background:
    linear-gradient(135deg, rgba(211, 70, 70, 0.1), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.production-master-status {
  border-color: rgba(82, 101, 130, 0.24);
  background:
    linear-gradient(135deg, rgba(82, 101, 130, 0.1), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.production-master-status.warn {
  border-color: rgba(196, 132, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(196, 132, 32, 0.1), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.production-master-status.blocked {
  border-color: rgba(211, 70, 70, 0.3);
  background:
    linear-gradient(135deg, rgba(211, 70, 70, 0.09), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
}

.production-output-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.production-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.production-command-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
  font-weight: 800;
}

.delivery-path-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.delivery-path-step {
  position: relative;
  min-height: 74px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.36);
}

.delivery-path-step b,
.delivery-path-step strong,
.delivery-path-step span {
  display: block;
}

.delivery-path-step b {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.delivery-path-step strong {
  margin-top: 4px;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.63rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.delivery-path-step span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.delivery-path-step.ready {
  border-color: rgba(43, 161, 110, 0.34);
}

.delivery-path-step.warn,
.delivery-path-step.next {
  border-color: rgba(196, 132, 32, 0.34);
  background:
    linear-gradient(135deg, rgba(196, 132, 32, 0.11), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
}

.delivery-path-step.blocked {
  border-color: rgba(211, 70, 70, 0.32);
}

.delivery-path-step.planned {
  border-color: rgba(52, 120, 246, 0.28);
}

.production-output {
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.production-output strong,
.production-output span {
  display: block;
}

.production-output strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.production-output span {
  margin-top: 4px;
  font-size: 0.68rem;
}

.production-output.relink-manifest {
  grid-column: 1 / -1;
}

.production-output.local-render-fallback {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.46)),
    rgba(255, 255, 255, 0.36);
}

.production-output.local-render-fallback ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.production-output.local-render-fallback li {
  display: grid;
  grid-template-columns: minmax(112px, 0.72fr) minmax(150px, 1.15fr) minmax(180px, 1.3fr);
  gap: 7px;
  align-items: start;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.production-output.local-render-fallback b,
.production-output.local-render-fallback small {
  display: block;
}

.production-output.local-render-fallback b {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.production-output.local-render-fallback small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.production-output.local-render-fallback code,
.production-output.relink-manifest code {
  display: block;
  margin-top: 7px;
  padding: 7px 9px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  line-height: 1.45;
  white-space: nowrap;
}

.production-output.local-render-fallback code {
  margin-top: 0;
  font-size: 0.61rem;
}

.production-output.relink-manifest ul {
  display: grid;
  gap: 3px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
}

.production-output.ready {
  border-color: rgba(43, 161, 110, 0.34);
}

.production-output.planned {
  border-color: rgba(52, 120, 246, 0.28);
}

.production-output.blocked {
  border-color: rgba(211, 70, 70, 0.34);
}

.production-package-audit {
  border-color: rgba(52, 120, 246, 0.2);
}

.production-package-audit.warn {
  border-color: rgba(196, 132, 32, 0.34);
}

.production-package-audit.blocked {
  border-color: rgba(211, 70, 70, 0.3);
}

.package-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.delivery-readiness {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(82, 101, 130, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.3);
}

.delivery-readiness.warn {
  border-color: rgba(196, 132, 32, 0.32);
}

.delivery-readiness.blocked {
  border-color: rgba(211, 70, 70, 0.3);
}

.delivery-readiness-head {
  display: grid;
  gap: 2px;
}

.delivery-readiness-head strong {
  color: var(--text);
  font-size: 0.78rem;
}

.delivery-readiness-head span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.32;
}

.delivery-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.delivery-lane {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.34);
}

.delivery-lane strong {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delivery-lane span {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.28;
}

.delivery-lane.ready {
  border-color: rgba(43, 161, 110, 0.32);
}

.delivery-lane.warn {
  border-color: rgba(196, 132, 32, 0.36);
}

.delivery-lane.blocked {
  border-color: rgba(211, 70, 70, 0.34);
}

.package-audit-item {
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
}

.package-audit-item strong,
.package-audit-item span {
  display: block;
}

.package-audit-item strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.package-audit-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.32;
}

.package-audit-item.ready {
  border-color: rgba(43, 161, 110, 0.34);
}

.package-audit-item.warn {
  border-color: rgba(196, 132, 32, 0.34);
}

.package-audit-item.blocked {
  border-color: rgba(211, 70, 70, 0.34);
}

.clip-intelligence {
  margin-bottom: 8px;
}

.intelligence-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.intelligence-head span {
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.intel-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.intel-meters span {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intel-meters span::after {
  content: "";
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--assist) var(--score), rgba(20, 25, 34, 0.12) var(--score)),
    rgba(20, 25, 34, 0.12);
}

.intel-meters b {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.context-action {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-color: rgba(52, 120, 246, 0.26);
  border-radius: 10px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.14), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.62);
}

.context-action strong {
  color: var(--text);
  font-size: 0.88rem;
}

.context-action span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.smart-toolbox {
  margin-top: 8px;
}

.smart-toolbox summary,
.inspector-section summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
}

.smart-toolbox summary::-webkit-details-marker,
.inspector-section summary::-webkit-details-marker {
  display: none;
}

.smart-toolbox summary::before,
.inspector-section summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--assist);
  background: rgba(255, 255, 255, 0.58);
  font-family: "IBM Plex Mono", monospace;
}

.smart-toolbox[open] summary::before,
.inspector-section[open] summary::before {
  content: "-";
}

.smart-toolbox .smart-actions {
  margin-top: 8px;
}

.smart-actions {
  display: grid;
  gap: 7px;
}

.smart-action {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 9px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.06), transparent),
    rgba(255, 255, 255, 0.5);
}

.smart-action strong {
  color: var(--text);
  font-size: 0.86rem;
}

.smart-action span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.effect-advice {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.42);
}

.effect-advice.recommended {
  border-color: rgba(52, 120, 246, 0.34);
  background: rgba(52, 120, 246, 0.08);
}

.effect-advice.caution {
  border-color: rgba(192, 132, 34, 0.28);
  background: rgba(192, 132, 34, 0.08);
}

.effect-advice strong {
  color: var(--text);
  font-size: 0.8rem;
}

.effect-advice span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.mosh-decision-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line-soft));
  border-radius: 9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(255, 255, 255, 0.32));
}

.mosh-decision-card span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mosh-decision-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.mosh-fit-meter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.mosh-fit-meter i {
  flex: 1 1 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

.mosh-fit-meter i::after {
  content: "";
  display: block;
  width: var(--mosh-fit-score, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78a7ff, #f59e0b 58%, #ff5f87);
}

.mosh-fit-meter small {
  padding: 3px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
  font-size: 0.68rem;
  font-weight: 800;
}

.mosh-window-map {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(52, 120, 246, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.1), rgba(255, 255, 255, 0.22)),
    rgba(255, 255, 255, 0.38);
}

.mosh-window-map strong {
  font-size: 0.72rem;
}

.mosh-window-map span {
  font-size: 0.7rem;
}

.mosh-window-map div {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

.mosh-window-map div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(52, 120, 246, 0.08), rgba(245, 158, 11, 0.2), rgba(255, 95, 135, 0.12));
}

.mosh-window-map i {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #3478f6;
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.18);
  transform: translate(-50%, -50%);
}

.mosh-audition-cue {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  color: #1f4fb8;
  background: rgba(52, 120, 246, 0.1);
  font-size: 0.68rem;
  font-weight: 800;
}

.effect-advice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.effect-advice-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1f4fb8;
  font-size: 0.74rem;
  font-weight: 800;
}

.effect-advice-actions button[hidden] {
  display: none;
}

.effect-advice-actions #preview-mosh-action {
  border-color: rgba(52, 120, 246, 0.26);
  color: #215bbf;
  background: rgba(52, 120, 246, 0.08);
}

.effect-advice-actions #preview-mosh-action:hover {
  background: rgba(52, 120, 246, 0.14);
}

.finish-panel {
  order: 5;
  overflow: visible;
}

.finish-form {
  display: grid;
  gap: 9px;
}

.finish-mode-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.finish-mode-rail button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.finish-mode-rail button.active,
.finish-mode-rail button[aria-selected="true"] {
  color: #173f9f;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.18), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(52, 120, 246, 0.08);
}

.finish-mode-copy {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.finish-control-group {
  display: grid;
  gap: 9px;
}

.finish-panel[data-finish-mode="color"] [data-finish-group]:not([data-finish-group="color"]),
.finish-panel[data-finish-mode="audio"] [data-finish-group]:not([data-finish-group="audio"]),
.finish-panel[data-finish-mode="performance"] [data-finish-group]:not([data-finish-group="performance"]),
.finish-panel[data-finish-mode="deliver"] [data-finish-group]:not([data-finish-group="deliver"]) {
  display: none !important;
}

.look-preset-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.look-preset-row button {
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.look-preset-row button.active,
.look-preset-row button[aria-pressed="true"] {
  border-color: rgba(52, 120, 246, 0.48);
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.18), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.72);
  color: #1f4fb8;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8);
}

.color-next-action {
  border-color: rgba(52, 120, 246, 0.3);
}

.audio-next-action {
  border-color: rgba(22, 143, 100, 0.3);
}

.deliver-next-action {
  border-color: rgba(52, 120, 246, 0.3);
}

.finish-smart-button,
.shot-match-button {
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(52, 120, 246, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(235, 242, 255, 0.62)),
    rgba(255, 255, 255, 0.58);
  color: #18335f;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
}

.finish-smart-button strong,
.shot-match-button strong {
  font-size: 0.78rem;
  font-weight: 900;
}

.finish-smart-button span,
.shot-match-button span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
}

.finish-smart-button:hover,
.shot-match-button:hover {
  border-color: rgba(52, 120, 246, 0.36);
  transform: translateY(-1px);
}

.performance-next-action {
  border-color: rgba(52, 120, 246, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(229, 239, 255, 0.72)),
    rgba(255, 255, 255, 0.66);
}

.performance-tool-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.performance-tool-strip button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  text-align: left;
}

.performance-tool-strip button strong {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-tool-strip button span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-tool-strip button[disabled] {
  opacity: 0.48;
}

.mix-balance-button {
  border-color: rgba(22, 143, 100, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(226, 248, 238, 0.62)),
    rgba(255, 255, 255, 0.58);
  color: #153f31;
}

.mix-balance-button:hover {
  border-color: rgba(22, 143, 100, 0.36);
}

.finish-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.finish-form input[type="range"] {
  width: 100%;
  accent-color: var(--assist);
}

.finish-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  padding: 7px 8px;
}

.delivery-prep-button {
  width: 100%;
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px;
  border-color: rgba(52, 120, 246, 0.28);
  border-radius: 9px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.12), rgba(255, 255, 255, 0.45)),
    rgba(255, 255, 255, 0.62);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.76),
    0 10px 24px rgba(52, 120, 246, 0.08);
}

.delivery-prep-button strong {
  color: var(--text);
  font-size: 0.86rem;
}

.delivery-prep-button span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.deliver-checklist {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.deliver-checklist li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.deliver-checklist li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dim);
}

.deliver-checklist li.done {
  color: var(--text);
}

.deliver-checklist li.done::before {
  background: var(--accent);
}

.empty-inspector {
  color: var(--dim);
  font-size: 0.86rem;
  line-height: 1.5;
}

.inspector-form {
  display: grid;
  gap: 8px;
}

.inspector-section {
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}

.inspector-section[open] {
  background: rgba(255, 255, 255, 0.48);
}

.inspector-section label {
  margin-top: 8px;
}

.inspector-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.inspector-form input[type="text"],
.inspector-form textarea,
.inspector-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  padding: 7px 8px;
  font-size: 0.86rem;
}

.inspector-form input[type="color"] {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.reframe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.reframe-actions button {
  min-height: 34px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.toggle-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.scopes-panel {
  order: 6;
  min-height: 168px;
}

.scopes-panel:not([open]) {
  min-height: 0;
}

.scope-stack {
  display: grid;
  gap: 10px;
}

.scope-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.scope-row strong {
  color: var(--text);
  font-size: 0.66rem;
  text-align: right;
}

.scope-row i {
  height: 8px;
  background:
    linear-gradient(90deg, var(--accent) var(--level), transparent var(--level)),
    rgba(20, 25, 34, 0.16);
  border: 1px solid var(--line-soft);
  border-radius: 99px;
}

.scope-readout {
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.35;
}

.scope-readout[data-scope-state="live"] {
  color: var(--muted);
}

.export-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 8, 12, 0.62);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  z-index: 20;
}

.export-dialog {
  --text: #181b20;
  --muted: #5e6876;
  --dim: #8993a0;
  --accent: #3478f6;
  --accent-ink: #ffffff;
  --assist: #0f6fff;
  --line: rgba(96, 109, 128, 0.28);
  --line-soft: rgba(110, 124, 145, 0.16);
  --surface-0: rgba(255, 255, 255, 0.52);
  --surface-1: rgba(250, 251, 253, 0.78);
  --surface-2: rgba(236, 240, 246, 0.9);
  width: min(720px, 100%);
  max-height: min(820px, calc(100svh - 28px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(82, 101, 130, 0.18);
  border-radius: 20px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 253, 0.84)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 34px 90px rgba(48, 63, 88, 0.22);
}

.export-dialog .panel-head {
  margin: -2px -2px 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.export-dialog h2,
.export-dialog strong {
  color: var(--text);
}

.export-dialog .panel-kicker,
.export-dialog span,
.export-dialog small,
.export-dialog p {
  color: var(--muted);
}

.export-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(52, 120, 246, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(52, 120, 246, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(234, 241, 251, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.export-next-step .primary-button {
  justify-self: start;
  min-height: 38px;
  padding-inline: 16px;
  border-color: #1f64da;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px rgba(32, 86, 176, 0.22);
}

.export-next-step.blocked {
  border-color: rgba(211, 70, 70, 0.24);
  background:
    radial-gradient(circle at 10% 0%, rgba(211, 70, 70, 0.11), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(252, 239, 239, 0.72));
}

.export-next-step.warn {
  border-color: rgba(196, 132, 32, 0.25);
  background:
    radial-gradient(circle at 10% 0%, rgba(196, 132, 32, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(252, 245, 229, 0.72));
}

.export-next-step.ready {
  border-color: rgba(43, 161, 110, 0.26);
  background:
    radial-gradient(circle at 10% 0%, rgba(43, 161, 110, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(230, 248, 238, 0.72));
}

.export-next-step span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.export-next-step strong {
  display: block;
  font-size: 1rem;
}

.export-next-step p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.export-next-route {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(82, 101, 130, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.export-next-route b {
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.export-next-route span {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-next-route.ready {
  border-color: rgba(43, 161, 110, 0.24);
  background: rgba(232, 248, 240, 0.66);
}

.export-next-route.warn,
.export-next-route.planned {
  border-color: rgba(196, 132, 32, 0.24);
  background: rgba(252, 245, 229, 0.66);
}

.export-next-route.blocked {
  border-color: rgba(211, 70, 70, 0.22);
  background: rgba(252, 239, 239, 0.66);
}

.export-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.export-metadata-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.export-metadata-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-metadata-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(82, 101, 130, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.export-stats article {
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 13px;
}

.export-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.export-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.export-delivery-route {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: -2px 0 12px;
  padding: 10px;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(236, 242, 250, 0.6)),
    rgba(255, 255, 255, 0.48);
}

.export-delivery-route.warn {
  border-color: rgba(196, 132, 32, 0.24);
}

.export-delivery-route.blocked {
  border-color: rgba(211, 70, 70, 0.22);
}

.export-delivery-route.ready {
  border-color: rgba(43, 161, 110, 0.24);
}

.delivery-route-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: start;
}

.delivery-route-head span {
  color: var(--dim);
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.delivery-route-head strong {
  color: var(--text);
  font-size: 0.92rem;
}

.delivery-route-head small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.delivery-route-lanes {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 6px;
}

.delivery-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.delivery-decision.ready {
  border-color: rgba(43, 161, 110, 0.28);
  background: rgba(232, 248, 240, 0.62);
}

.delivery-decision.warn {
  border-color: rgba(196, 132, 32, 0.26);
  background: rgba(252, 245, 229, 0.62);
}

.delivery-decision.blocked {
  border-color: rgba(211, 70, 70, 0.24);
  background: rgba(252, 239, 239, 0.62);
}

.delivery-decision b {
  grid-row: span 2;
  align-self: stretch;
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.66);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delivery-decision strong,
.delivery-decision span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-decision strong {
  color: var(--text);
  font-size: 0.84rem;
}

.delivery-decision span {
  color: var(--muted);
  font-size: 0.7rem;
}

.delivery-decision-action {
  grid-row: span 2;
  justify-self: end;
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2f6fcb);
  box-shadow: 0 12px 22px rgba(51, 99, 171, 0.16);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
}

.delivery-decision-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(51, 99, 171, 0.22);
}

.delivery-route-lane {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(82, 101, 130, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.delivery-route-lane.ready {
  border-color: rgba(43, 161, 110, 0.28);
  background: rgba(232, 248, 240, 0.58);
}

.delivery-route-lane.warn,
.delivery-route-lane.planned {
  border-color: rgba(196, 132, 32, 0.26);
  background: rgba(252, 245, 229, 0.58);
}

.delivery-route-lane.blocked {
  border-color: rgba(211, 70, 70, 0.24);
  background: rgba(252, 239, 239, 0.58);
}

.delivery-route-lane.recommended {
  border-color: rgba(51, 99, 171, 0.32);
  background:
    linear-gradient(135deg, rgba(51, 99, 171, 0.13), rgba(255, 255, 255, 0.66)),
    rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 10px 22px rgba(51, 99, 171, 0.08);
}

.delivery-route-lane b {
  flex: 0 0 auto;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--dim);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 900;
}

.delivery-route-lane strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-route-lane em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.58);
  font-family: var(--mono-font);
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.delivery-route-lane.recommended em {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2f6fcb);
}

.delivery-route-lane span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.export-check-summary {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.export-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.export-checklist li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 7px;
  padding: 8px;
  border: 1px solid rgba(211, 70, 70, 0.18);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
}

.export-checklist li::before {
  content: "";
  grid-row: 1 / span 2;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dim);
}

.export-checklist li strong,
.export-checklist li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-checklist li strong {
  color: var(--text);
  font-size: 0.76rem;
}

.export-checklist li span {
  color: var(--muted);
  font-size: 0.68rem;
}

.export-check-action {
  grid-column: 3;
  grid-row: 1 / span 2;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
}

.export-check-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(51, 99, 171, 0.16);
}

.export-checklist li.done {
  display: none;
  color: var(--muted);
}

.export-dialog .export-portability,
.export-dialog .render-engine-status,
.export-dialog .production-master-status {
  border-color: rgba(70, 185, 126, 0.26);
  background:
    linear-gradient(135deg, rgba(42, 177, 112, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.035);
}

.export-dialog .render-engine-status.fallback,
.export-dialog .export-portability.warn,
.export-dialog .production-master-status.warn {
  border-color: rgba(212, 153, 58, 0.34);
  background:
    linear-gradient(135deg, rgba(212, 153, 58, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.035);
}

.export-dialog .render-engine-status.blocked,
.export-dialog .export-portability.blocked,
.export-dialog .production-master-status.blocked {
  border-color: rgba(255, 107, 126, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 107, 126, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.035);
}

.export-dialog .render-profile-control {
  border-color: rgba(82, 101, 130, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.export-dialog .render-profile-control select {
  border-color: rgba(82, 101, 130, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.export-dialog .preflight-item {
  border-color: rgba(82, 101, 130, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.export-dialog .preflight-item.ready {
  display: none;
}

.export-dialog .delivery-readiness,
.export-dialog .delivery-lane {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.05);
}

.export-dialog .delivery-readiness.warn,
.export-dialog .delivery-lane.warn {
  border-color: rgba(212, 153, 58, 0.34);
}

.export-dialog .delivery-readiness.blocked,
.export-dialog .delivery-lane.blocked {
  border-color: rgba(255, 107, 126, 0.32);
}

.export-dialog .delivery-lane.ready {
  border-color: rgba(70, 185, 126, 0.3);
}

.export-advanced-panel {
  margin-top: 8px;
  border: 1px solid rgba(82, 101, 130, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.export-advanced-panel > summary {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.export-advanced-panel > summary::-webkit-details-marker {
  display: none;
}

.export-advanced-panel > summary::after {
  content: "Show";
  float: right;
  color: var(--assist);
  letter-spacing: 0;
  text-transform: none;
}

.export-advanced-panel[open] > summary::after {
  content: "Hide";
}

.export-advanced-panel > div {
  margin: 0 10px 10px;
}

.export-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
  margin-top: 10px;
}

.export-action-group {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.primary-export-group {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

#download-render-receipt:disabled {
  display: none;
}

.export-action-group > span,
.export-action-group > summary {
  grid-column: 1 / -1;
  color: #94a1b3;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  list-style: none;
  text-transform: uppercase;
}

.export-action-group > summary {
  cursor: pointer;
}

.export-action-group > summary::-webkit-details-marker {
  display: none;
}

.export-action-group > summary::after {
  content: "Show";
  float: right;
  color: #c4d3e8;
  letter-spacing: 0;
  text-transform: none;
}

.export-action-group[open] > summary::after {
  content: "Hide";
}

.export-action-group button {
  width: 100%;
  min-height: 34px;
  justify-content: center;
}

@media (max-width: 720px) {
  .export-actions {
    grid-template-columns: 1fr;
  }

  .primary-export-group {
    grid-template-columns: 1fr;
  }
}

.export-checklist li.done::before {
  background: var(--accent);
}

.render-status {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.help-dialog {
  width: min(520px, 100%);
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  align-items: center;
}

.shortcut-grid span {
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line-soft);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.shortcut-grid strong {
  color: var(--text);
  font-size: 0.86rem;
}

.command-modal {
  z-index: 90;
}

.command-dialog {
  width: min(660px, 100%);
  padding: 12px;
}

.command-search {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.command-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid rgba(52, 120, 246, 0.26);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
}

.command-search input:focus {
  border-color: rgba(52, 120, 246, 0.62);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
}

.command-category-bar {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 2px 2px 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.command-category-chip {
  flex: 0 0 auto;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: none;
}

.command-category-chip strong {
  color: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.command-category-chip span {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--assist);
  background: rgba(255, 255, 255, 0.1);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
}

.command-category-chip[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
}

.command-category-chip[aria-selected="true"] span {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.22);
}

.command-suggestions {
  display: flex;
  align-items: stretch;
  gap: 7px;
  margin: -2px 0 10px;
  padding: 3px 2px 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.command-suggestions-label {
  flex: 0 0 auto;
  align-self: center;
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-suggestion {
  flex: 0 0 clamp(172px, 30vw, 230px);
  min-height: 48px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 8px 10px;
  border-radius: 13px;
  text-align: left;
  scroll-snap-align: start;
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.1), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(52, 120, 246, 0.28);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.72),
    0 9px 20px rgba(34, 45, 62, 0.08);
}

.command-suggestion strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-suggestion small {
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.command-list {
  max-height: min(56vh, 430px);
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding-right: 3px;
}

.command-item {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.06), transparent),
    rgba(255, 255, 255, 0.56);
}

.command-item.suggested,
.command-item[aria-selected="true"] {
  border-color: rgba(52, 120, 246, 0.44);
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.14), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.72);
}

.command-item:disabled {
  cursor: not-allowed;
  opacity: 1;
  border-style: dashed;
  border-color: rgba(96, 109, 128, 0.28);
  background:
    linear-gradient(90deg, rgba(52, 120, 246, 0.035), transparent),
    rgba(255, 255, 255, 0.42);
}

.command-item:disabled > span {
  background: rgba(31, 36, 43, 0.07);
  color: #667180;
}

.command-item:disabled strong {
  color: #303846;
}

.command-item:disabled small {
  color: #667180;
}

.command-item > span {
  grid-row: span 2;
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(31, 36, 43, 0.08);
  color: var(--dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.command-item strong {
  color: var(--text);
  font-size: 0.9rem;
}

.command-item small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.command-item kbd {
  align-self: start;
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--assist);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.command-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
}

.command-empty strong {
  color: var(--text);
}

.command-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.hidden {
  display: none !important;
}

.mobile-jump-bar {
  display: none;
}

@media (max-width: 1180px) {
  .appbar {
    grid-template-columns: max-content max-content max-content;
    align-items: center;
    overflow-x: auto;
  }

  .workspace-tabs,
  .appbar-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: auto minmax(240px, auto);
  }

  .editor-column {
    order: -1;
  }

  .monitor-grid {
    grid-template-columns: minmax(210px, 0.8fr) minmax(340px, 1.2fr);
  }

  .right-rail {
    grid-template-rows: repeat(6, auto);
  }
}

@media (max-width: 720px) {
  html {
    background:
      radial-gradient(circle at 20% 0%, rgba(52, 120, 246, 0.16), transparent 28rem),
      var(--bg);
  }

  .app-shell {
    padding: 8px 8px 88px;
    display: block;
  }

  .app-shell.focus-editor .media-panel,
  .app-shell.focus-editor .source-monitor,
  .app-shell.focus-editor .status-strip,
  .app-shell.focus-editor .coach-strip,
  .app-shell.focus-editor .workflow-rail {
    display: none;
  }

  .app-shell.focus-editor .right-rail {
    display: block;
  }

  .app-shell.focus-editor .panel.drawer-active {
    display: grid;
    top: auto;
    right: 8px;
    bottom: 84px;
    left: 8px;
    width: auto;
    max-height: min(58svh, 520px);
    border-radius: 22px;
  }

  .app-shell.focus-editor.drawer-open .drawer-return-button {
    right: 18px;
    bottom: calc(84px + min(58svh, 520px) + 10px);
    min-height: 36px;
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .app-shell.focus-editor .editor-column {
    display: grid;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .appbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 9px;
    overflow: visible;
    border-radius: 12px;
    background: rgba(250, 251, 253, 0.88);
    backdrop-filter: blur(18px);
  }

  .workspace-tabs {
    display: none;
  }

  .appbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .appbar-actions > *,
  .appbar-actions > details > summary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .appbar-actions .tool-button,
  .appbar-actions .primary-button,
  .appbar-actions summary {
    min-height: 36px;
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .app-identity {
    min-width: 0;
  }

  .app-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .app-identity p {
    display: none;
  }

  .workspace-tabs,
  .appbar-actions,
  .timeline-tools,
  .bin-tabs,
  .workflow-rail,
  .template-strip,
  .inspector-actions {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .workspace-tabs::-webkit-scrollbar,
  .appbar-actions::-webkit-scrollbar,
  .timeline-tools::-webkit-scrollbar,
  .bin-tabs::-webkit-scrollbar,
  .workflow-rail::-webkit-scrollbar,
  .template-strip::-webkit-scrollbar,
  .inspector-actions::-webkit-scrollbar,
  .media-bin::-webkit-scrollbar,
  .smart-actions::-webkit-scrollbar,
  .status-strip::-webkit-scrollbar {
    display: none;
  }

  .tab-button,
  .tool-button,
  .icon-button,
  .danger-button,
  .bin-tab,
  .tool-chip,
  .import-button,
  .primary-button {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 9px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  button[data-tip]::after,
  label[data-tip]::after {
    display: none;
  }

  .status-strip {
    margin-top: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 9px;
    border-radius: 10px;
    scroll-snap-type: x proximity;
  }

  .status-strip span {
    min-width: max-content;
    padding: 7px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    scroll-snap-align: start;
  }

  .status-strip strong {
    margin-left: 4px;
  }

  .coach-strip {
    margin-top: 8px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
  }

  .coach-strip strong {
    font-size: 1.08rem;
  }

  .coach-strip p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .coach-button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .workflow-rail {
    margin-top: 8px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(136px, 42%);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    border-radius: 15px;
    scroll-snap-type: x mandatory;
  }

  .workflow-rail::before {
    content: "Mobile flow";
    position: sticky;
    left: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 92px;
    border-right: 1px solid var(--line-soft);
    color: var(--assist);
    background: rgba(250, 251, 253, 0.9);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .template-strip {
    margin-top: 8px;
    overflow-x: auto;
    border-radius: 12px;
    scroll-snap-type: x proximity;
  }

  .template-strip span,
  .template-strip button {
    min-width: max-content;
    scroll-snap-align: start;
  }

  .workflow-rail button {
    min-height: 58px;
    border-radius: 10px;
    scroll-snap-align: start;
  }

  .workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  .editor-column {
    order: -4;
    display: grid;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .monitor-grid {
    display: contents;
  }

  .program-monitor {
    order: 1;
  }

  .timeline-panel {
    order: 2;
  }

  .source-monitor {
    order: 3;
  }

  .panel {
    scroll-margin-top: 86px;
    padding: 11px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(59, 71, 91, 0.14);
  }

  .panel-head {
    align-items: center;
  }

  h2 {
    font-size: 1rem;
  }

  .preview-stage {
    --viewer-fit-height: clamp(180px, 30svh, 280px);
    width: min(100%, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    max-height: var(--viewer-fit-height);
    aspect-ratio: var(--sequence-aspect-ratio, 16 / 9);
    border-radius: 10px;
  }

  .sequence-format-control {
    justify-content: space-between;
    margin-bottom: 7px;
  }

  .canvas-preset-bar {
    justify-content: flex-start;
    margin-bottom: 8px;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .canvas-preset-bar button {
    min-height: 34px;
    padding-inline: 10px;
    scroll-snap-align: start;
  }

  .stage-topline {
    top: 7px;
    left: 7px;
    right: 7px;
  }

  .viewer-chip,
  .audio-pill {
    font-size: 0.58rem;
    padding: 4px 6px;
  }

  .text-overlay {
    padding: 8%;
    font-size: clamp(28px, 8vw, 44px) !important;
  }

  .audio-hud {
    width: 122px;
    right: 8px;
    bottom: 8px;
  }

  .transport {
    width: 100%;
    grid-template-columns: 42px 58px 70px 58px 42px minmax(92px, 1fr);
    gap: 6px;
    border-radius: 14px;
  }

  .transport input[type="range"] {
    min-height: 38px;
  }

  .source-monitor {
    min-height: 0;
  }

  .source-placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .source-actions {
    grid-template-columns: 1fr;
  }

  .source-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-range .tool-button {
    min-height: 38px;
  }

  .source-add-button {
    min-height: 42px;
    border-radius: 10px;
  }

  .timeline-panel {
    min-height: 332px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .timeline-panel .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .timeline-tools {
    justify-content: flex-start;
  }

  .timeline-legend {
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .timeline-status-bar {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    font-size: 0.64rem;
  }

  .marker-inline-editor {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .selection-meter {
    grid-column: 1 / -1;
    order: 2;
  }

  .timeline-quick-actions {
    position: static;
    grid-column: 1 / -1;
    translate: none;
    order: 4;
    width: 100%;
    padding: 1px 0;
  }

  .timeline-status-bar button {
    grid-column: 1 / -1;
    min-height: 36px;
  }

  .timeline-quick-actions button {
    grid-column: auto;
    min-height: 28px;
    border-radius: 7px;
  }

  #timeline-primary-action {
    grid-column: 1 / -1;
  }

  .timeline-scroll-shell {
    padding-bottom: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .timeline-body {
    grid-template-columns: 40px minmax(640px, 1fr);
  }

  .timeline-scale {
    padding-left: 40px;
  }

  .timeline-track-labels {
    width: 40px;
    gap: 5px;
  }

  .timeline-track-labels button,
  .track-row {
    min-height: 44px;
  }

  .timeline-track {
    gap: 5px;
  }

  .clip-chip {
    top: 5px;
    bottom: 5px;
    border-radius: 8px;
  }

  .clip-chip strong {
    font-size: 0.78rem;
  }

  .right-rail {
    order: -3;
    display: grid;
    grid-template-rows: repeat(6, auto);
    gap: 8px;
  }

  .transcript-panel {
    order: 1;
  }

  .smart-panel {
    order: 2;
  }

  .health-panel {
    order: 3;
  }

  .finish-panel {
    order: 4;
  }

  .inspector-panel {
    order: 5;
  }

  .scopes-panel {
    order: 6;
  }

  .smart-panel {
    overflow: hidden;
  }

  .transcript-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caption-timing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transcript-lines {
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82%);
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x mandatory;
  }

  .transcript-line {
    min-height: 104px;
    scroll-snap-align: start;
  }

  .smart-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(188px, 72%);
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 3px;
    scroll-snap-type: x mandatory;
  }

  .smart-action {
    min-height: 98px;
    padding: 12px;
    border-radius: 10px;
    scroll-snap-align: start;
  }

  .smart-action strong {
    font-size: 0.95rem;
  }

  .smart-action span {
    font-size: 0.82rem;
  }

  .inspector-panel {
    max-height: none;
  }

  .finish-panel {
    overflow: hidden;
  }

  .finish-form {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .finish-form select,
  .inspector-form input[type="text"],
  .inspector-form textarea {
    font-size: 16px;
  }

  .inspector-form {
    gap: 12px;
  }

  .inspector-form label {
    font-size: 0.84rem;
  }

  .inspector-form input[type="text"],
  .inspector-form textarea {
    min-height: 42px;
    border-radius: 8px;
  }

  .media-panel {
    order: -2;
  }

  .media-bin {
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82%);
    overflow-x: auto;
    gap: 8px;
    scroll-snap-type: x mandatory;
  }

  .media-card {
    min-height: 82px;
    grid-template-columns: 72px minmax(0, 1fr);
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .media-card .source-card-button,
  .media-card .add-clip-button {
    min-height: 34px;
  }

  .media-card .source-card-button {
    grid-column: 1 / 2;
  }

  .media-card .add-clip-button {
    grid-column: 2 / 3;
    justify-self: end;
  }

  .media-thumb {
    border-radius: 10px;
  }

  .scopes-panel {
    min-height: auto;
  }

  .scope-stack {
    gap: 8px;
  }

  .export-modal {
    align-items: end;
    padding: 10px;
  }

  .export-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-next-step {
    grid-template-columns: 1fr;
  }

  .export-next-step button {
    width: 100%;
  }

  .export-delivery-route {
    grid-template-columns: 1fr;
  }

  .delivery-decision {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .delivery-decision-action {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }

  .delivery-route-lanes {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 72%);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
  }

  .delivery-route-lane {
    scroll-snap-align: start;
  }

  .export-checklist {
    grid-template-columns: 1fr;
  }

  .render-preflight {
    grid-template-columns: 1fr;
  }

  .export-dialog {
    border-radius: 14px;
  }

  .shortcut-grid {
    grid-template-columns: 92px 1fr;
  }

  .command-dialog {
    max-height: calc(100svh - 20px);
    overflow: hidden;
  }

  .command-list {
    max-height: 50svh;
  }

  .command-category-bar {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .command-suggestions {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .command-suggestion {
    flex-basis: min(190px, 72vw);
  }

  .command-category-chip {
    min-height: 34px;
    padding-inline: 10px;
  }

  .command-item {
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
  }

  .command-item > span {
    grid-row: auto;
    grid-column: 1;
  }

  .command-item strong {
    grid-column: 1 / -1;
  }

  .command-item small {
    grid-column: 1 / -1;
  }

  .mobile-jump-bar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 40;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(58px, 1fr);
    grid-template-columns: none;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 6px;
    border: 1px solid rgba(52, 120, 246, 0.2);
    border-radius: 14px;
    background: rgba(250, 251, 253, 0.86);
    box-shadow: 0 18px 42px rgba(59, 71, 91, 0.22);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .mobile-jump-bar button {
    min-height: 42px;
    padding: 7px 2px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    scroll-snap-align: center;
  }

  .mobile-jump-bar button:focus-visible,
  .mobile-jump-bar button:hover,
  .mobile-jump-bar button.active {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: var(--accent);
  }
}

@media (min-width: 721px) {
  .app-shell.focus-editor.drawer-open .drawer-return-button {
    top: 78px;
    right: 20px;
    bottom: auto;
  }
}

/* Native editor pass: reduce web-card chrome and make the cut surface feel like one app. */
@media (min-width: 721px) {
  body {
    background:
      radial-gradient(circle at 16% -18%, rgba(255, 255, 255, 0.82), transparent 28rem),
      linear-gradient(145deg, #eef1f5 0%, #d7dde6 48%, #c5ccd6 100%);
  }

  body[data-theme="dark"] {
    background:
      radial-gradient(circle at 16% -18%, rgba(128, 153, 190, 0.18), transparent 28rem),
      linear-gradient(145deg, #242930 0%, #181d24 54%, #10141a 100%);
  }

  .appbar,
  .status-strip,
  .coach-strip,
  .workflow-rail,
  .panel {
    box-shadow: none;
  }

  .app-shell.focus-editor {
    grid-template-rows: 42px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    background:
      radial-gradient(circle at 22% -26%, rgba(255, 255, 255, 0.72), transparent 30rem),
      linear-gradient(135deg, #e8ebf0 0%, #cfd6df 100%);
  }

  body[data-theme="dark"] .app-shell.focus-editor {
    background:
      radial-gradient(circle at 24% -28%, rgba(140, 165, 202, 0.16), transparent 30rem),
      linear-gradient(135deg, #242a32 0%, #11161d 100%);
  }

  .app-shell.focus-editor .appbar {
    min-height: 42px;
    grid-template-columns: minmax(168px, auto) minmax(245px, 1fr) max-content;
    gap: 8px;
    padding: 5px 8px;
    border-width: 0 0 1px;
    border-color: rgba(86, 98, 116, 0.22);
    border-radius: 0;
    background: rgba(246, 248, 251, 0.76);
    color: #171b20;
    backdrop-filter: blur(22px) saturate(1.18);
    -webkit-backdrop-filter: blur(22px) saturate(1.18);
  }

  body[data-theme="dark"] .app-shell.focus-editor .appbar {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(28, 33, 41, 0.78);
    color: #edf2f7;
  }

  .app-shell.focus-editor .app-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border-color: rgba(58, 72, 92, 0.14);
    background: rgba(255, 255, 255, 0.52);
    color: #2859b8;
  }

  .app-shell.focus-editor h1 {
    color: inherit;
    font-size: 0.86rem;
    letter-spacing: -0.01em;
  }

  .app-shell.focus-editor .workspace-tabs {
    width: fit-content;
    justify-self: center;
    gap: 0;
    padding: 2px;
    border-color: rgba(80, 94, 116, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.46);
  }

  body[data-theme="dark"] .app-shell.focus-editor .workspace-tabs {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
  }

  .app-shell.focus-editor .tab-button {
    min-height: 26px;
    padding: 4px 12px;
    border-radius: 6px;
    color: #697484;
    font-size: 0.76rem;
    background: transparent;
  }

  .app-shell.focus-editor .tab-button.active {
    color: #11161c;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.7);
  }

  body[data-theme="dark"] .app-shell.focus-editor .tab-button.active {
    color: #f5f8fc;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .app-shell.focus-editor .appbar-actions {
    gap: 4px;
  }

  .app-shell.focus-editor #play-toggle {
    display: none;
  }

  .app-shell.focus-editor .appbar-actions .tool-button,
  .app-shell.focus-editor .appbar-actions .primary-button,
  .app-shell.focus-editor .appbar-actions .action-menu > summary {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 7px;
    border-color: rgba(82, 96, 118, 0.16);
    color: #29313b;
    background: rgba(255, 255, 255, 0.48);
    font-size: 0.76rem;
  }

  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .tool-button,
  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .primary-button,
  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .action-menu > summary {
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfd7e4;
    background: rgba(255, 255, 255, 0.07);
  }

  .app-shell.focus-editor .appbar-actions .primary-button {
    color: #ffffff;
    background: #256fe8;
    border-color: rgba(37, 111, 232, 0.5);
  }

  .app-shell.focus-editor .workspace {
    padding: 8px 8px 8px 58px;
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) 224px;
    gap: 0;
    border: 1px solid rgba(68, 80, 98, 0.24);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(252, 253, 255, 0.78) 0%, rgba(235, 239, 245, 0.82) 54%, rgba(220, 226, 235, 0.88) 100%);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.82),
      0 18px 54px rgba(39, 52, 72, 0.14);
  }

  body[data-theme="dark"] .app-shell.focus-editor .editor-column {
    border-color: rgba(255, 255, 255, 0.075);
    background:
      linear-gradient(180deg, #171c23 0%, #11161d 52%, #0b0f15 100%);
    box-shadow: none;
  }

  .app-shell.focus-editor .program-monitor {
    position: relative;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px 10px 7px;
    background:
      radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.58), transparent 30rem),
      transparent;
  }

  body[data-theme="dark"] .app-shell.focus-editor .program-monitor {
    background:
      radial-gradient(circle at 50% 12%, rgba(84, 106, 138, 0.2), transparent 32rem),
      transparent;
  }

  .app-shell.focus-editor .program-monitor h2,
  .app-shell.focus-editor .timeline-panel h2 {
    color: #151b23;
  }

  body[data-theme="dark"] .app-shell.focus-editor .program-monitor h2,
  body[data-theme="dark"] .app-shell.focus-editor .timeline-panel h2 {
    color: #f3f6fb;
  }

  .app-shell.focus-editor .program-monitor .panel-head {
    min-height: 30px;
    margin-bottom: 2px;
    padding-right: 150px;
  }

  .app-shell.focus-editor .sequence-format-control {
    position: absolute;
    top: 44px;
    right: 12px;
    z-index: 5;
    margin: 0;
    gap: 6px;
    color: #647084;
    font-size: 0.62rem;
  }

  body[data-theme="dark"] .app-shell.focus-editor .sequence-format-control {
    color: #9ba6b6;
  }

  .app-shell.focus-editor .sequence-format-control select {
    min-height: 26px;
    max-width: 126px;
    padding: 0 22px 0 7px;
    border-radius: 6px;
    border-color: rgba(86, 98, 116, 0.18);
    color: #1e2732;
    background: rgba(255, 255, 255, 0.68);
  }

  body[data-theme="dark"] .app-shell.focus-editor .sequence-format-control select {
    border-color: rgba(255, 255, 255, 0.1);
    color: #dbe4f0;
    background: rgba(10, 14, 20, 0.68);
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(220px, calc(100svh - 360px), 430px);
    border-radius: 8px;
    border-color: rgba(31, 42, 60, 0.16);
    background:
      linear-gradient(135deg, rgba(42, 54, 76, 0.92), rgba(22, 31, 44, 0.92)),
      #10141b;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.32),
      0 18px 42px rgba(28, 39, 56, 0.18);
  }

  body[data-theme="dark"] .app-shell.focus-editor .preview-stage {
    border-color: rgba(255, 255, 255, 0.12);
    background:
      linear-gradient(135deg, rgba(42, 54, 76, 0.92), rgba(22, 31, 44, 0.96)),
      #07090d;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.7),
      0 22px 60px rgba(0, 0, 0, 0.28);
  }

  .app-shell.focus-editor .transport {
    width: min(100%, 680px);
    height: 34px;
    max-height: 34px;
    grid-template-columns: 32px 44px 56px 44px 32px minmax(120px, 1fr);
    margin-top: 0;
    border-radius: 7px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(7, 10, 15, 0.64);
  }

  .app-shell.focus-editor .timeline-panel {
    padding: 5px 7px 7px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 34%),
      rgba(231, 236, 244, 0.74);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-panel {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
      #0b0f15;
  }

  .app-shell.focus-editor .timeline-panel .panel-head {
    min-height: 30px;
    margin-bottom: 3px;
  }

  .app-shell.focus-editor .timeline-status-bar {
    min-height: 30px;
    margin-bottom: 4px;
    padding: 3px 4px;
    border-color: rgba(75, 88, 108, 0.12);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.5);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-status-bar {
    border-color: rgba(255, 255, 255, 0.055);
    background: rgba(255, 255, 255, 0.035);
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 4px;
    border-color: rgba(75, 88, 108, 0.12);
    background: rgba(239, 243, 248, 0.74);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-scroll-shell {
    border-color: rgba(255, 255, 255, 0.055);
    background: #0a0e13;
  }

  .app-shell.focus-editor .timeline-body {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-scale {
    padding-left: 38px;
  }

  .app-shell.focus-editor .timeline-track-labels {
    width: 38px;
  }

  .app-shell.focus-editor .track-row,
  .app-shell.focus-editor .timeline-track-labels button {
    min-height: 27px;
  }

  .app-shell.focus-editor .track-row {
    border-color: rgba(75, 88, 108, 0.1);
    background:
      repeating-linear-gradient(90deg, transparent 0, transparent 51px, rgba(38, 54, 78, 0.042) 52px),
      rgba(255, 255, 255, 0.44);
  }

  body[data-theme="dark"] .app-shell.focus-editor .track-row {
    border-color: rgba(255, 255, 255, 0.045);
    background:
      repeating-linear-gradient(90deg, transparent 0, transparent 51px, rgba(255, 255, 255, 0.026) 52px),
      #11161d;
  }

  .app-shell.focus-editor .clip-chip {
    top: 2px;
    bottom: 2px;
    border-radius: 5px;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
  }

  .app-shell.focus-editor .clip-chip.video {
    background: linear-gradient(180deg, rgba(70, 122, 198, 0.82), rgba(42, 72, 116, 0.9));
  }

  .app-shell.focus-editor .clip-chip.title {
    background: linear-gradient(180deg, rgba(173, 124, 45, 0.86), rgba(108, 72, 25, 0.92));
  }

  .app-shell.focus-editor .clip-chip.caption {
    background: linear-gradient(180deg, rgba(72, 103, 188, 0.86), rgba(37, 58, 123, 0.92));
  }

  .app-shell.focus-editor .clip-chip.audio {
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 8px),
      linear-gradient(180deg, rgba(53, 148, 104, 0.78), rgba(27, 91, 68, 0.9));
    background-position: left 72%, left top;
    background-repeat: repeat-x, no-repeat;
    background-size: 100% 32%, 100% 100%;
  }

  .app-shell.focus-editor .timeline-empty-state {
    inset: 48px auto auto 108px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 10px;
    max-width: min(520px, calc(100vw - 180px));
    padding: 8px 10px;
    border-radius: 7px;
    color: #aeb8c6;
    background: rgba(230, 235, 242, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
  }

  .app-shell.focus-editor .timeline-empty-state strong {
    color: #eff4fb;
    font-size: 0.76rem;
  }

  .app-shell.focus-editor .timeline-empty-state span {
    grid-column: 1;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor .empty-timeline-actions {
    grid-row: 1 / span 2;
    grid-column: 2;
    flex-wrap: nowrap;
  }

  .app-shell.focus-editor .timeline-empty-state button {
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 0.66rem;
    white-space: nowrap;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 8px;
    width: 42px;
    padding: 3px;
    border-radius: 10px;
    border-color: rgba(75, 88, 108, 0.18);
    background: rgba(238, 242, 247, 0.78);
  }

  body[data-theme="dark"] .app-shell.focus-editor .mobile-jump-bar {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(21, 26, 34, 0.76);
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 36px;
    border-radius: 7px;
    color: #606b7a;
    background: transparent;
    font-size: 0.56rem;
    letter-spacing: -0.01em;
  }

  .app-shell.focus-editor .mobile-jump-bar button.active {
    color: #ffffff;
    background: #256fe8;
  }

  .app-shell.focus-editor .panel.drawer-active {
    top: 50px;
    right: 8px;
    bottom: 8px;
    max-height: calc(100svh - 58px);
    width: min(360px, calc(100vw - 24px));
    border-radius: 10px;
    border-color: rgba(83, 96, 116, 0.2);
    color: #18202a;
    background: rgba(246, 248, 251, 0.9);
    box-shadow: 0 24px 70px rgba(26, 35, 48, 0.22);
  }

  .app-shell.focus-editor .panel.drawer-active > .panel-head {
    border-bottom-color: rgba(76, 88, 108, 0.14);
    background: rgba(250, 251, 253, 0.88);
  }

  .app-shell.focus-editor .panel.drawer-active h2,
  .app-shell.focus-editor .panel.drawer-active strong,
  .app-shell.focus-editor .panel.drawer-active .empty-inspector::before {
    color: #171c22;
  }

  .app-shell.focus-editor .panel.drawer-active p,
  .app-shell.focus-editor .panel.drawer-active span,
  .app-shell.focus-editor .panel.drawer-active label,
  .app-shell.focus-editor .panel.drawer-active .field-value,
  .app-shell.focus-editor .panel.drawer-active .empty-inspector {
    color: #5c6878;
  }

  .app-shell.focus-editor .panel.drawer-active .empty-inspector,
  .app-shell.focus-editor .panel.drawer-active .selection-summary,
  .app-shell.focus-editor .panel.drawer-active .clip-intelligence,
  .app-shell.focus-editor .panel.drawer-active .render-engine-status,
  .app-shell.focus-editor .panel.drawer-active .workflow-step,
  .app-shell.focus-editor .panel.drawer-active .context-action,
  .app-shell.focus-editor .panel.drawer-active .smart-action,
  .app-shell.focus-editor .panel.drawer-active .effect-advice,
  .app-shell.focus-editor .panel.drawer-active .delivery-prep-button {
    border: 1px solid rgba(83, 96, 116, 0.12);
    background: rgba(255, 255, 255, 0.58);
  }

  body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active {
    border-color: rgba(255, 255, 255, 0.11);
    color: #edf3fb;
    background: rgba(24, 30, 39, 0.9);
    box-shadow: 0 28px 74px rgba(0, 0, 0, 0.42);
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor {
    padding: 0 0 76px;
    background:
      linear-gradient(180deg, rgba(238, 242, 247, 0.96), rgba(215, 222, 232, 0.98));
  }

  body[data-theme="dark"] .app-shell.focus-editor {
    background: linear-gradient(180deg, #20262e, #11161d);
  }

  .app-shell.focus-editor .appbar {
    border-radius: 0;
    border-width: 0 0 1px;
    box-shadow: none;
  }

  .app-shell.focus-editor .workspace {
    gap: 0;
    margin-top: 0;
  }

  .app-shell.focus-editor .program-monitor,
  .app-shell.focus-editor .timeline-panel {
    border-radius: 0;
    box-shadow: none;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(190px, 38svh, 330px);
    border-radius: 6px;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: 306px;
  }

  .production-output-list {
    grid-template-columns: 1fr;
  }

  .delivery-path-strip {
    grid-template-columns: 1fr;
  }

  .delivery-path-step {
    min-height: auto;
  }

  .production-output.local-render-fallback li {
    grid-template-columns: 1fr;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(34, 45, 62, 0.18);
  }
}

/* Final focus-mode polish pass: this sits last so desktop/mobile editor chrome stays native and compact. */
@media (min-width: 721px) {
  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) 214px;
    border-radius: 12px;
    border-color: rgba(70, 82, 102, 0.2);
    background:
      linear-gradient(180deg, rgba(248, 250, 253, 0.84), rgba(233, 237, 244, 0.86) 56%, rgba(217, 224, 234, 0.9)),
      rgba(239, 243, 249, 0.82);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.9),
      0 18px 48px rgba(34, 45, 62, 0.12);
  }

  body[data-theme="dark"] .app-shell.focus-editor .editor-column {
    border-color: rgba(255, 255, 255, 0.08);
    background:
      linear-gradient(180deg, #1b2028 0%, #141a22 56%, #0d1218 100%),
      #11161d;
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.045),
      0 20px 52px rgba(0, 0, 0, 0.24);
  }

  .app-shell.focus-editor .program-monitor {
    gap: 5px;
    padding: 7px 10px 6px;
    background:
      radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.5), transparent 26rem),
      linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 38%);
  }

  body[data-theme="dark"] .app-shell.focus-editor .program-monitor {
    background:
      radial-gradient(circle at 50% 4%, rgba(114, 139, 176, 0.14), transparent 30rem),
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(210px, calc(100svh - 348px), 390px);
    border-radius: 6px;
    border-color: rgba(25, 35, 50, 0.18);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.26),
      0 14px 34px rgba(25, 35, 50, 0.16);
  }

  body[data-theme="dark"] .app-shell.focus-editor .preview-stage {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.7),
      0 18px 46px rgba(0, 0, 0, 0.22);
  }

  .app-shell.focus-editor .transport {
    width: min(100%, 650px);
    height: 32px;
    max-height: 32px;
    grid-template-columns: 30px 42px 54px 42px 30px minmax(132px, 1fr);
    padding: 2px;
    border-radius: 6px;
  }

  .app-shell.focus-editor .transport button,
  .app-shell.focus-editor .transport .icon-button,
  .app-shell.focus-editor .transport .primary-button {
    min-height: 26px;
    border-radius: 4px;
  }

  .app-shell.focus-editor .timeline-panel {
    padding: 4px 6px 6px;
    border-top: 1px solid rgba(71, 84, 104, 0.14);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(221, 228, 238, 0.64)),
      rgba(228, 234, 242, 0.78);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-panel {
    border-top-color: rgba(255, 255, 255, 0.07);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012)),
      #0b1016;
  }

  .app-shell.focus-editor .timeline-tools .tool-chip,
  .app-shell.focus-editor .timeline-menu > summary {
    min-height: 25px;
    padding: 4px 7px;
    border-radius: 5px;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor .timeline-status-bar {
    grid-template-columns: minmax(120px, 1.1fr) minmax(180px, 1.5fr) max-content max-content max-content;
    min-height: 28px;
    gap: 5px;
    margin-bottom: 4px;
    padding: 3px 4px;
    border-radius: 5px;
    color: #4a5666;
    background: rgba(255, 255, 255, 0.42);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-status-bar {
    color: #9aa7b8;
    background: rgba(255, 255, 255, 0.035);
  }

  .app-shell.focus-editor .timeline-quick-actions {
    position: static;
    translate: none;
    min-height: 22px;
    overflow: hidden;
  }

  .app-shell.focus-editor .timeline-quick-actions button {
    min-height: 22px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #4c5a6d;
    background: rgba(255, 255, 255, 0.44);
    border-color: rgba(72, 86, 106, 0.12);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-quick-actions button {
    color: #c7d1de;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.07);
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 5px;
    border-color: rgba(71, 84, 104, 0.12);
  }

  .app-shell.focus-editor .track-row,
  .app-shell.focus-editor .timeline-track-labels button {
    min-height: 24px;
  }

  .app-shell.focus-editor .clip-chip {
    top: 1px;
    bottom: 1px;
    border-radius: 4px;
    font-size: 0.65rem;
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor .timeline-status-bar {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .app-shell.focus-editor .timeline-quick-actions,
  .app-shell.focus-editor #timeline-zoom-status {
    display: none;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: 288px;
  }
}

/* Native editor refinement: fewer blobs, stronger viewer/timeline hierarchy, calmer glass. */
.app-shell.focus-editor {
  color-scheme: light;
}

body[data-theme="dark"] .app-shell.focus-editor {
  color-scheme: dark;
}

@media (min-width: 721px) {
  .app-shell.focus-editor {
    background:
      radial-gradient(circle at 50% -18%, rgba(255, 255, 255, 0.72), transparent 26rem),
      linear-gradient(180deg, #edf1f6 0%, #dfe5ee 100%);
  }

  body[data-theme="dark"] .app-shell.focus-editor {
    background:
      radial-gradient(circle at 50% -18%, rgba(92, 118, 154, 0.18), transparent 28rem),
      linear-gradient(180deg, #171c23 0%, #0b0f15 100%);
  }

  .app-shell.focus-editor .appbar {
    min-height: 38px;
    border: 1px solid rgba(88, 102, 124, 0.16);
    border-radius: 10px;
    background: rgba(247, 250, 253, 0.68);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
  }

  body[data-theme="dark"] .app-shell.focus-editor .appbar {
    border-color: rgba(255, 255, 255, 0.075);
    background: rgba(17, 21, 28, 0.72);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
  }

  .app-shell.focus-editor h1,
  .app-shell.focus-editor .program-monitor h2,
  .app-shell.focus-editor .timeline-panel h2 {
    color: #1e2632;
  }

  body[data-theme="dark"] .app-shell.focus-editor h1,
  body[data-theme="dark"] .app-shell.focus-editor .program-monitor h2,
  body[data-theme="dark"] .app-shell.focus-editor .timeline-panel h2 {
    color: #eef4fb;
  }

  .app-shell.focus-editor .workspace-tabs,
  .app-shell.focus-editor .theme-menu {
    border-color: rgba(76, 90, 112, 0.14);
    background: rgba(255, 255, 255, 0.42);
  }

  body[data-theme="dark"] .app-shell.focus-editor .workspace-tabs,
  body[data-theme="dark"] .app-shell.focus-editor .theme-menu {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 12, 0.38);
  }

  .app-shell.focus-editor .tab-button {
    color: #697587;
  }

  .app-shell.focus-editor .tab-button.active {
    color: #172033;
    background: rgba(255, 255, 255, 0.68);
  }

  body[data-theme="dark"] .app-shell.focus-editor .tab-button {
    color: #8792a1;
  }

  body[data-theme="dark"] .app-shell.focus-editor .tab-button.active {
    color: #f7faff;
    background: rgba(255, 255, 255, 0.09);
  }

  .app-shell.focus-editor .appbar-actions .tool-button,
  .app-shell.focus-editor .appbar-actions .action-menu > summary {
    color: #425065;
    background: transparent;
    border-color: transparent;
  }

  .app-shell.focus-editor .appbar-actions .tool-button:hover,
  .app-shell.focus-editor .appbar-actions .action-menu > summary:hover {
    color: #182234;
    background: rgba(255, 255, 255, 0.46);
    border-color: rgba(73, 88, 110, 0.12);
    transform: none;
  }

  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .tool-button,
  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .action-menu > summary {
    color: #b7c2d0;
  }

  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .tool-button:hover,
  body[data-theme="dark"] .app-shell.focus-editor .appbar-actions .action-menu > summary:hover {
    color: #f5f8fd;
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) 206px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(250, 252, 255, 0.82), rgba(231, 237, 246, 0.84) 52%, rgba(213, 222, 234, 0.9)),
      rgba(239, 244, 250, 0.88);
  }

  body[data-theme="dark"] .app-shell.focus-editor .editor-column {
    background:
      linear-gradient(180deg, rgba(28, 34, 43, 0.95), rgba(16, 22, 30, 0.96) 52%, rgba(9, 13, 19, 0.98)),
      #10151d;
  }

  .app-shell.focus-editor .program-monitor {
    grid-template-rows: 26px minmax(0, 1fr) 34px;
    gap: 5px;
  }

  .app-shell.focus-editor .program-monitor .panel-head {
    min-height: 26px;
    margin: 0;
  }

  .app-shell.focus-editor .program-monitor .panel-kicker {
    display: none;
  }

  .app-shell.focus-editor .sequence-format-control {
    position: absolute;
    top: 42px;
    right: 18px;
    z-index: 8;
    min-height: 28px;
    padding: 4px 6px 4px 9px;
    border-radius: 7px;
    color: #273244;
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(73, 88, 110, 0.14);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
  }

  body[data-theme="dark"] .app-shell.focus-editor .sequence-format-control {
    color: #dce5f2;
    background: rgba(8, 12, 18, 0.58);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(240px, calc(100svh - 322px), 430px);
    width: min(100%, 920px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    justify-self: center;
    border-radius: 8px;
  }

  .app-shell.focus-editor .stage-topline {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .app-shell.focus-editor .viewer-chip {
    border-radius: 5px;
    background: rgba(12, 17, 25, 0.58);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
  }

  .app-shell.focus-editor .transport {
    width: min(100%, 600px);
    justify-self: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
  }

  body[data-theme="dark"] .app-shell.focus-editor .transport {
    background: rgba(5, 8, 12, 0.42);
  }

  .app-shell.focus-editor .timeline-panel {
    grid-template-rows: 26px 28px minmax(0, 1fr);
    padding: 4px 6px 6px;
  }

  .app-shell.focus-editor .timeline-panel .panel-head {
    min-height: 26px;
    margin: 0;
  }

  .app-shell.focus-editor .timeline-tools {
    gap: 2px;
  }

  .app-shell.focus-editor .timeline-status-bar {
    margin: 0 0 4px;
    border: 0;
    background: transparent;
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border: 0;
    border-radius: 8px;
    background:
      linear-gradient(90deg, rgba(22, 28, 37, 0.04) 1px, transparent 1px) 42px 0 / 54px 100%,
      rgba(244, 247, 251, 0.58);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-scroll-shell {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 42px 0 / 54px 100%,
      rgba(5, 8, 12, 0.55);
  }

  .app-shell.focus-editor .timeline-track-labels button {
    border: 0;
    background: transparent;
  }

  .app-shell.focus-editor .track-row {
    background: rgba(255, 255, 255, 0.18);
    border-top: 1px solid rgba(71, 84, 104, 0.08);
  }

  body[data-theme="dark"] .app-shell.focus-editor .track-row {
    background: rgba(255, 255, 255, 0.025);
    border-top-color: rgba(255, 255, 255, 0.045);
  }

  .app-shell.focus-editor .clip-chip {
    border-radius: 5px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.24);
  }

  .app-shell.focus-editor .panel.drawer-active {
    top: 56px;
    bottom: 10px;
    right: 10px;
    width: min(360px, calc(100vw - 24px));
    border-radius: 12px;
    border-color: rgba(87, 102, 124, 0.18);
    color: #1d2633;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(237, 242, 248, 0.86)),
      rgba(245, 248, 252, 0.84);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.86),
      0 24px 68px rgba(29, 39, 55, 0.22);
  }

  body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active {
    border-color: rgba(255, 255, 255, 0.1);
    color: #eef4fb;
    background:
      linear-gradient(180deg, rgba(29, 36, 47, 0.96), rgba(14, 19, 27, 0.94)),
      rgba(14, 18, 25, 0.9);
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.44);
  }

  .app-shell.focus-editor .panel.drawer-active > .panel-head {
    background: rgba(255, 255, 255, 0.48);
  }

  body[data-theme="dark"] .app-shell.focus-editor .panel.drawer-active > .panel-head {
    background: rgba(22, 28, 38, 0.82);
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor {
    background:
      radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.88), transparent 22rem),
      linear-gradient(180deg, #eef2f7, #dbe2eb);
  }

  body[data-theme="dark"] .app-shell.focus-editor {
    background:
      radial-gradient(circle at 50% -20%, rgba(100, 130, 172, 0.22), transparent 22rem),
      linear-gradient(180deg, #1b2129, #0d1218);
  }

  .app-shell.focus-editor .program-monitor {
    padding: 7px 8px 6px;
  }

  .app-shell.focus-editor .program-monitor .panel-head {
    margin-bottom: 4px;
  }

  .app-shell.focus-editor .sequence-format-control {
    position: static;
    align-self: stretch;
  }

  .app-shell.focus-editor .canvas-preset-bar {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(170px, 34svh, 280px);
    width: min(100%, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    margin-inline: auto;
  }

  .app-shell.focus-editor .transport {
    grid-template-columns: 32px 44px 58px 44px 32px;
  }

  .app-shell.focus-editor .transport input[type="range"] {
    grid-column: 1 / -1;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: clamp(260px, 42svh, 340px);
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 8px;
  }

  .app-shell.focus-editor .panel.drawer-active {
    top: 54px;
    bottom: 74px;
    width: calc(100vw - 16px);
    border-radius: 18px;
  }
}

/* Aspect-aware workbench sizing: the viewer should feel like a monitor, not a web hero card. */
@media (min-width: 721px) {
  .app-shell.focus-editor .program-monitor {
    --focus-viewer-fit-height: clamp(220px, calc(100svh - 330px), 410px);
    justify-items: stretch;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: var(--focus-viewer-fit-height);
    inline-size: min(100%, 900px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    block-size: min(var(--viewer-fit-height), calc(900px / var(--sequence-aspect-number, 1.777)));
    max-block-size: calc(100svh - 322px);
    min-block-size: 180px;
  }

  .app-shell.focus-editor .sequence-format-control {
    right: max(18px, calc((100% - min(100%, 900px, calc(var(--focus-viewer-fit-height) * var(--sequence-aspect-number, 1.777)))) / 2));
  }

  .app-shell.focus-editor .timeline-panel {
    grid-template-rows: 24px 26px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-track-labels button,
  .app-shell.focus-editor .track-row {
    min-height: 22px;
  }

  .app-shell.focus-editor .clip-chip strong {
    font-size: 0.68rem;
  }

  .app-shell.focus-editor .clip-chip span {
    font-size: 0.54rem;
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(168px, 33svh, 286px);
    inline-size: min(100%, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    block-size: min(var(--viewer-fit-height), calc((100vw - 16px) / var(--sequence-aspect-number, 1.777)));
    min-block-size: 164px;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: clamp(248px, 40svh, 324px);
  }
}

/* Seamless workstation pass: one editing surface, not stacked website cards. */
@media (min-width: 721px) {
  .app-shell.focus-editor {
    padding: 6px;
    gap: 6px;
    grid-template-rows: 36px minmax(0, 1fr);
  }

  .app-shell.focus-editor .appbar {
    min-height: 36px;
    padding: 4px 6px;
    border-radius: 9px;
  }

  .app-shell.focus-editor .workspace {
    padding-left: 50px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 7px;
    width: 36px;
    border-radius: 9px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 34px;
    padding-inline: 1px;
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) clamp(214px, 28svh, 258px);
    border-radius: 10px;
    border-color: rgba(70, 84, 104, 0.16);
    background:
      linear-gradient(180deg, rgba(248, 251, 255, 0.78), rgba(232, 238, 247, 0.8) 58%, rgba(215, 224, 236, 0.86)),
      rgba(238, 243, 249, 0.86);
  }

  body[data-theme="dark"] .app-shell.focus-editor .editor-column {
    border-color: rgba(255, 255, 255, 0.075);
    background:
      linear-gradient(180deg, rgba(24, 30, 39, 0.96), rgba(14, 20, 28, 0.98) 58%, rgba(7, 11, 17, 0.98)),
      #0f141b;
  }

  .app-shell.focus-editor .program-monitor,
  .app-shell.focus-editor .timeline-panel {
    background: transparent;
  }

  .app-shell.focus-editor .program-monitor {
    --focus-viewer-fit-height: clamp(196px, calc(100svh - 352px), 360px);
    grid-template-rows: 24px minmax(0, 1fr) 32px;
    padding: 6px 8px 5px;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: var(--focus-viewer-fit-height);
    inline-size: min(100%, 860px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    block-size: min(var(--viewer-fit-height), calc(860px / var(--sequence-aspect-number, 1.777)));
    max-block-size: calc(100svh - 340px);
    border-radius: 6px;
  }

  .app-shell.focus-editor .sequence-format-control {
    top: 38px;
    right: max(14px, calc((100% - min(100%, 860px, calc(var(--focus-viewer-fit-height) * var(--sequence-aspect-number, 1.777)))) / 2));
  }

  .app-shell.focus-editor .transport {
    height: 30px;
    max-height: 30px;
    width: min(100%, 560px);
  }

  .app-shell.focus-editor .viewer-action-dock {
    bottom: 8px;
    border-radius: 7px;
  }

  .app-shell.focus-editor .transport button,
  .app-shell.focus-editor .transport .icon-button,
  .app-shell.focus-editor .transport .primary-button {
    min-height: 24px;
    padding-block: 3px;
  }

  .app-shell.focus-editor .timeline-panel {
    grid-template-rows: 23px 24px minmax(0, 1fr);
    padding: 3px 5px 5px;
    border-top-color: rgba(70, 84, 104, 0.12);
  }

  body[data-theme="dark"] .app-shell.focus-editor .timeline-panel {
    border-top-color: rgba(255, 255, 255, 0.055);
  }

  .app-shell.focus-editor .timeline-status-bar {
    min-height: 24px;
    padding: 1px 3px;
  }

  .app-shell.focus-editor .marker-inline-editor {
    position: absolute;
    top: 57px;
    left: 58px;
    right: 8px;
    z-index: 24;
    grid-template-columns: max-content minmax(140px, 1fr) 86px max-content max-content max-content;
    margin-bottom: 3px;
    padding: 4px;
    box-shadow: 0 14px 34px rgba(8, 14, 24, 0.18);
  }

  .app-shell.focus-editor .marker-inline-editor input,
  .app-shell.focus-editor .marker-inline-editor button {
    min-height: 24px;
    padding: 3px 6px;
    font-size: 0.64rem;
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 6px;
  }

  .app-shell.focus-editor .timeline-track-labels button,
  .app-shell.focus-editor .track-row {
    min-height: 20px;
  }

  .app-shell.focus-editor .clip-chip {
    top: 1px;
    bottom: 1px;
    padding: 1px 5px;
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor {
    padding-bottom: 70px;
  }

  .app-shell.focus-editor .appbar {
    position: sticky;
    top: 0;
  }

  .app-shell.focus-editor .program-monitor {
    padding: 6px 7px 5px;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(156px, 30svh, 248px);
    min-block-size: 150px;
  }

  .app-shell.focus-editor .transport {
    gap: 4px;
    padding: 5px;
    border-radius: 10px;
  }

  .app-shell.focus-editor .viewer-action-dock {
    bottom: 7px;
    max-width: calc(100% - 14px);
  }

  .app-shell.focus-editor .viewer-action-dock button:not(.primary) {
    display: none;
  }

  .app-shell.focus-editor .viewer-action-dock button.mosh-proof {
    display: inline-flex;
    max-width: 134px;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: clamp(252px, 43svh, 336px);
    padding: 7px;
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 7px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    bottom: 7px;
    border-radius: 15px;
  }

  .package-audit-grid {
    grid-template-columns: 1fr;
  }

  .delivery-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .package-audit-item {
    min-height: auto;
  }
}

/* Compact timeline deck: focus mode should read like editor chrome, not website rows. */
.app-shell.focus-editor .timeline-legend {
  display: none;
}

.app-shell.focus-editor .timeline-panel {
  grid-template-rows: 23px 24px 12px minmax(0, 1fr);
}

.app-shell.focus-editor .timeline-overview {
  z-index: 1;
  min-height: 10px;
  margin: 0 3px 3px 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 25, 35, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28);
}

body[data-theme="dark"] .app-shell.focus-editor .timeline-overview {
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.app-shell.focus-editor .timeline-overview-window {
  top: 1px;
  bottom: 1px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.46);
}

body[data-theme="dark"] .app-shell.focus-editor .timeline-overview-window {
  background: rgba(255, 255, 255, 0.16);
}

.app-shell.focus-editor .timeline-overview-playhead {
  top: -2px;
  bottom: -2px;
}

.app-shell.focus-editor .overview-segment {
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
}

.app-shell.focus-editor .overview-marker {
  top: 0;
  bottom: 0;
}

.app-shell.focus-editor .timeline-status-bar {
  grid-template-columns: minmax(230px, 1.1fr) minmax(210px, 0.9fr) minmax(150px, 0.78fr) max-content minmax(150px, 0.72fr) max-content;
}

.app-shell.focus-editor #timeline-selection-status,
.app-shell.focus-editor #timeline-zoom-status {
  display: none;
}

.app-shell.focus-editor .timeline-quick-actions {
  position: static;
  translate: none;
  min-width: 0;
  justify-self: stretch;
}

.app-shell.focus-editor #timeline-primary-action {
  min-width: 104px;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .app-shell.focus-editor .timeline-panel {
    grid-template-rows: 24px 58px 12px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-status-bar {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-content: center;
    gap: 4px 6px;
    min-height: 54px;
  }

  .app-shell.focus-editor .marker-inline-editor {
    position: static;
    grid-template-columns: 1fr;
    margin-bottom: 4px;
  }

  .app-shell.focus-editor .selection-meter,
  .app-shell.focus-editor #timeline-playhead-status,
  .app-shell.focus-editor #timeline-edit-point-status,
  .app-shell.focus-editor #timeline-zoom-status {
    display: none;
  }

  .app-shell.focus-editor .timeline-action-hint {
    grid-column: 1 / -1;
    order: 2;
    font-size: 0.57rem;
  }

  .app-shell.focus-editor .timeline-quick-actions {
    display: flex;
    grid-column: 1 / -1;
    order: 3;
    min-height: 25px;
    overflow-x: auto;
    padding: 1px 0 2px;
    scrollbar-width: none;
  }

  .app-shell.focus-editor .timeline-quick-actions button {
    flex: 0 0 auto;
    min-height: 25px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.58rem;
  }

  .app-shell.focus-editor .timeline-quick-more > summary {
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.58rem;
  }

  .app-shell.focus-editor .timeline-quick-more-menu {
    right: auto;
    left: 0;
    min-width: 168px;
  }

  .app-shell.focus-editor .timeline-quick-actions kbd {
    min-height: 14px;
    font-size: 0.48rem;
  }

  .app-shell.focus-editor .timeline-overview {
    margin-left: 42px;
  }
}

/* Live panel dock: compact navigation should explain state, not become another module. */
.app-shell.focus-editor .mobile-jump-bar button {
  position: relative;
  display: grid;
  align-content: center;
  gap: 1px;
  overflow: hidden;
}

.app-shell.focus-editor .mobile-jump-bar button::before {
  content: attr(data-panel-label);
  display: block;
  max-width: 100%;
  overflow: hidden;
  line-height: 1.05;
  text-overflow: ellipsis;
}

.app-shell.focus-editor .mobile-jump-bar button::after {
  content: attr(data-badge);
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-family: var(--mono-font);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: ellipsis;
}

.app-shell.focus-editor .mobile-jump-bar button[aria-current="page"]::after {
  color: color-mix(in srgb, currentColor 88%, white 12%);
}

.app-shell.focus-editor .mobile-jump-bar button.active,
.app-shell.focus-editor .mobile-jump-bar button[aria-current="page"] {
  color: #ffffff;
}

@media (min-width: 721px) {
  .app-shell.focus-editor .mobile-jump-bar {
    width: 46px;
    padding: 4px;
    border-radius: 12px;
  }

  .app-shell.focus-editor .workspace {
    padding-left: 54px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 38px;
    padding: 4px 2px;
    font-size: 0;
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    content: attr(data-panel-icon);
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 7px;
    color: currentColor;
    background: color-mix(in srgb, currentColor 10%, transparent);
    font-family: var(--mono-font);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  .app-shell.focus-editor .mobile-jump-bar button::after {
    max-width: 36px;
    justify-self: center;
  }

  .app-shell.focus-editor #undo-action,
  .app-shell.focus-editor #redo-action {
    display: none;
  }
}

@media (max-width: 720px) {
  .source-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-next-step {
    grid-template-columns: 1fr;
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    content: attr(data-panel-label);
    font-size: 0.62rem;
    font-weight: 800;
  }

  .app-shell.focus-editor .mobile-jump-bar button::after {
    font-size: 0.56rem;
  }
}

/* Readable workbench dock: navigation should name the workflow, not hide behind mystery initials. */
@media (min-width: 721px) {
  .app-shell.focus-editor .workspace {
    padding-left: 84px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    width: 74px;
    gap: 4px;
    padding: 5px;
    border-radius: 16px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 45px;
    justify-items: stretch;
    gap: 3px;
    padding: 7px 6px 6px;
    border-radius: 12px;
    text-align: left;
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    content: attr(data-panel-label);
    width: auto;
    height: auto;
    display: block;
    justify-self: stretch;
    border-radius: 0;
    background: transparent;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
  }

  .app-shell.focus-editor .mobile-jump-bar button::after {
    max-width: none;
    justify-self: stretch;
    font-size: 0.52rem;
    letter-spacing: -0.02em;
  }
}

.app-shell.focus-editor .timeline-empty-state {
  inset: 42px auto auto 120px;
  max-width: min(440px, calc(100vw - 190px));
  padding: 9px 11px;
  border-radius: 10px;
  color: #58667a;
  background: rgba(244, 248, 253, 0.74);
  box-shadow: none;
}

body[data-theme="dark"] .app-shell.focus-editor .timeline-empty-state {
  color: #a7b4c6;
  background: rgba(13, 18, 26, 0.72);
}

.app-shell.focus-editor .timeline-empty-state strong {
  color: #17202b;
  font-size: 0.78rem;
}

body[data-theme="dark"] .app-shell.focus-editor .timeline-empty-state strong {
  color: #edf3fb;
}

.app-shell.focus-editor .timeline-empty-state span {
  font-size: 0.68rem;
}

.app-shell.focus-editor .empty-timeline-actions {
  gap: 6px;
}

.app-shell.focus-editor .timeline-empty-state.first-run {
  grid-template-columns: minmax(0, 1fr);
  max-width: min(380px, calc(100vw - 180px));
  border-style: dashed;
}

.app-shell.focus-editor .timeline-empty-state.first-run .empty-timeline-actions {
  display: none;
}

.app-shell.focus-editor .timeline-panel.blank-first-run {
  grid-template-rows: 23px minmax(0, 1fr);
}

.app-shell.focus-editor .timeline-panel.blank-first-run .timeline-tools,
.app-shell.focus-editor .timeline-panel.blank-first-run .timeline-status-bar,
.app-shell.focus-editor .timeline-panel.blank-first-run .review-issue-strip,
.app-shell.focus-editor .timeline-panel.blank-first-run .marker-inline-editor {
  display: none;
}

.app-shell.focus-editor .timeline-panel.blank-first-run .timeline-overview {
  min-height: 7px;
  margin-top: 4px;
  opacity: 0.42;
}

.app-shell.focus-editor .timeline-empty-state button {
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.66rem;
}

@media (max-width: 720px) {
  .app-shell.focus-editor .appbar-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-shell.focus-editor #undo-action,
  .app-shell.focus-editor #redo-action {
    display: none;
  }

  .app-shell.focus-editor .timeline-empty-state {
    inset: 48px 10px auto 52px;
    max-width: none;
  }

  .app-shell.focus-editor #timeline-primary-action {
    display: none;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    font-size: 0;
  }

  .app-shell.focus-editor .mobile-jump-bar button.active,
  .app-shell.focus-editor .mobile-jump-bar button[aria-current="page"] {
    color: #ffffff;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.38),
      0 10px 20px color-mix(in srgb, var(--accent) 18%, transparent);
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    color: inherit;
    font-size: 0.66rem;
    letter-spacing: -0.015em;
  }

  .app-shell.focus-editor .mobile-jump-bar button.active::before,
  .app-shell.focus-editor .mobile-jump-bar button[aria-current="page"]::before {
    color: #ffffff;
    font-size: 0.7rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
  }

  .app-shell.focus-editor .timeline-empty-state {
    inset: 66px 12px auto 12px;
    width: min(320px, calc(100vw - 84px));
    max-width: calc(100vw - 84px);
  }

  .app-shell.focus-editor .timeline-panel {
    grid-template-rows: 58px 48px 12px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-panel .panel-head {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .app-shell.focus-editor .timeline-panel .panel-kicker {
    font-size: 0.6rem;
  }

  .app-shell.focus-editor .timeline-panel h2 {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell.focus-editor .timeline-tools {
    min-width: 0;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .app-shell.focus-editor .timeline-tools::-webkit-scrollbar {
    display: none;
  }

  .app-shell.focus-editor .timeline-tools .tool-chip,
  .app-shell.focus-editor .timeline-menu > summary {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.64rem;
  }

  .app-shell.focus-editor .timeline-status-bar {
    min-height: 34px;
    align-content: center;
  }

  .app-shell.focus-editor #timeline-selection-status,
  .app-shell.focus-editor .timeline-action-hint {
    display: none;
  }
}

.app-shell.performance-mode .timeline-track::after {
  content: "Lean timeline detail";
  position: absolute;
  right: 10px;
  bottom: 7px;
  z-index: 4;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 76%, var(--text));
  background: color-mix(in srgb, var(--surface-1) 76%, transparent);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 800;
  pointer-events: none;
}

.timeline-track[data-detail-mode="auto-lean"]::after {
  content: "Auto lean window";
  position: absolute;
  right: 10px;
  bottom: 7px;
  z-index: 4;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--warning) 78%, var(--text));
  background: color-mix(in srgb, var(--surface-1) 78%, transparent);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 800;
  pointer-events: none;
}

/* Native inspector rack: drawers should feel like editor chrome, not stacked web cards. */
.app-shell.focus-editor .panel.drawer-active {
  scrollbar-gutter: stable;
}

.app-shell.focus-editor .panel.drawer-active > :not(.panel-head):not(summary) {
  margin-inline: 12px;
}

.app-shell.focus-editor .panel.drawer-active .selection-summary,
.app-shell.focus-editor .panel.drawer-active .clip-intelligence,
.app-shell.focus-editor .panel.drawer-active .render-engine-status,
.app-shell.focus-editor .panel.drawer-active .workflow-step,
.app-shell.focus-editor .panel.drawer-active .context-action,
.app-shell.focus-editor .panel.drawer-active .smart-action,
.app-shell.focus-editor .panel.drawer-active .effect-advice,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button,
.app-shell.focus-editor .panel.drawer-active .workflow-proof,
.app-shell.focus-editor .panel.drawer-active .smart-toolbox {
  border: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-0) 58%, transparent);
  box-shadow: none;
}

.app-shell.focus-editor .panel.drawer-active .workflow-step,
.app-shell.focus-editor .panel.drawer-active .context-action,
.app-shell.focus-editor .panel.drawer-active .smart-action,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 42px;
  padding: 9px 10px 9px 12px;
  text-align: left;
}

.app-shell.focus-editor .panel.drawer-active .workflow-route-primary {
  min-height: 48px;
  grid-template-columns: 1fr;
  padding: 9px 10px 9px 12px;
}

.app-shell.focus-editor .panel.drawer-active .workflow-route-primary b {
  grid-column: 1;
}

.app-shell.focus-editor .panel.drawer-active .workflow-route-then {
  gap: 5px;
}

.app-shell.focus-editor .panel.drawer-active .workflow-route-chip {
  min-height: 34px;
  min-width: min(136px, 50%);
  padding: 6px 8px;
}

.app-shell.focus-editor .panel.drawer-active .workflow-step::before,
.app-shell.focus-editor .panel.drawer-active .context-action::before,
.app-shell.focus-editor .panel.drawer-active .smart-action::before,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 6px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 72%, transparent);
}

.app-shell.focus-editor .panel.drawer-active .workflow-route-chip::before {
  display: none;
}

.app-shell.focus-editor .panel.drawer-active .smart-actions,
.app-shell.focus-editor .panel.drawer-active .context-actions,
.app-shell.focus-editor .panel.drawer-active .workflow-queue,
.app-shell.focus-editor .panel.drawer-active .transcript-actions,
.app-shell.focus-editor .panel.drawer-active .reframe-actions,
.app-shell.focus-editor .panel.drawer-active .inspector-actions {
  gap: 6px;
}

.app-shell.focus-editor .panel.drawer-active .smart-action strong,
.app-shell.focus-editor .panel.drawer-active .context-action strong,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button strong,
.app-shell.focus-editor .panel.drawer-active .workflow-step strong {
  grid-column: 1;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
}

.app-shell.focus-editor .panel.drawer-active .smart-action span,
.app-shell.focus-editor .panel.drawer-active .context-action span,
.app-shell.focus-editor .panel.drawer-active .delivery-prep-button span,
.app-shell.focus-editor .panel.drawer-active .workflow-step span {
  grid-column: 1;
  margin-top: 1px;
  font-size: 0.72rem;
  line-height: 1.28;
}

.app-shell.focus-editor .panel.drawer-active .workflow-proof,
.app-shell.focus-editor .panel.drawer-active .smart-toolbox,
.app-shell.focus-editor .panel.drawer-active .inspector-section,
.app-shell.focus-editor .panel.drawer-active .finish-form label,
.app-shell.focus-editor .panel.drawer-active .transcript-editor {
  border-inline: 0;
  border-radius: 0;
  background: transparent;
}

.app-shell.focus-editor .panel.drawer-active .workflow-proof summary,
.app-shell.focus-editor .panel.drawer-active .smart-toolbox summary,
.app-shell.focus-editor .panel.drawer-active .inspector-section summary {
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.focus-editor .panel.drawer-active .workflow-proof,
.app-shell.focus-editor .panel.drawer-active .smart-toolbox {
  padding-block: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
}

.app-shell.focus-editor .panel.drawer-active .workflow-proof-intro {
  margin: 2px 0 8px;
}

.app-shell.focus-editor .panel.drawer-active .workflow-card {
  padding-block: 9px;
  border-inline: 0;
  border-radius: 0;
  background: transparent;
}

.app-shell.focus-editor .panel.drawer-active .workflow-card:not([open]) {
  padding-block: 7px;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .workflow-card {
  display: none;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .media-bin {
  gap: 5px;
  margin-top: 7px;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .media-card {
  grid-template-columns: 44px minmax(0, 1fr) 50px 40px;
  min-height: 58px;
  gap: 6px;
  padding: 6px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.15;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .media-thumb {
  border-radius: 6px;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .media-meta h3 {
  font-size: 12px;
  line-height: 1.15;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .media-meta p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
}

.app-shell.focus-editor .media-panel.drawer-active.media-has-content .source-card-button,
.app-shell.focus-editor .media-panel.drawer-active.media-has-content .add-clip-button {
  min-height: 27px;
  padding-inline: 6px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-copy {
  margin: -2px 0 0;
  font-size: 0.68rem;
  line-height: 1.25;
}

.app-shell.focus-editor .transcript-panel.drawer-active .caption-health-action {
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 8px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .caption-health-action strong {
  font-size: 0.72rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active .caption-health-action span {
  font-size: 0.62rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-next-action {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 9px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-next-action strong {
  font-size: 0.76rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-next-action span {
  font-size: 0.62rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active:not(.transcript-has-caption) .caption-editor,
.app-shell.focus-editor .transcript-panel.drawer-active:not(.transcript-has-caption) .caption-timing {
  display: none;
}

.app-shell.focus-editor .transcript-panel.drawer-active:not(.transcript-has-source) .source-transcript-editor {
  display: none;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-editor textarea {
  min-height: 74px;
  resize: vertical;
}

.app-shell.focus-editor .transcript-panel.drawer-active .caption-editor textarea {
  min-height: 58px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-actions button,
.app-shell.focus-editor .transcript-panel.drawer-active .caption-import-button {
  min-height: 28px;
  padding: 5px 6px;
  border-radius: 7px;
  font-size: 0.62rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-lines {
  gap: 5px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-line {
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 42px;
  padding: 6px;
  border-radius: 8px;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-line span {
  font-size: 0.52rem;
}

.app-shell.focus-editor .transcript-panel.drawer-active .transcript-line strong {
  font-size: 0.68rem;
  line-height: 1.24;
}

.app-shell.focus-editor .panel.drawer-active .workflow-card p {
  margin-top: 6px;
}

/* Focused edit lanes should scan as clips first, details second. Full names stay in aria/tooltips. */
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 1px 5px;
  padding: 2px 6px;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: -0.018em;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip > strong {
  align-self: center;
  font-size: 10px !important;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip > span {
  display: none !important;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.selected > strong {
  align-self: center;
  padding-right: 24px;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.selected > span {
  display: none !important;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.caption > strong,
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.title > strong,
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.audio > strong {
  font-size: 9px !important;
  font-weight: 800;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip:not(.selected):not(:hover):not(:focus-visible) > strong {
  opacity: 0;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.video:not(.selected):not(:hover):not(:focus-visible) > strong {
  opacity: 0.72;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.caption:not(.selected):not(:hover):not(:focus-visible) > strong,
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.title:not(.selected):not(:hover):not(:focus-visible) > strong,
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.audio:not(.selected):not(:hover):not(:focus-visible) > strong {
  opacity: 0;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip:focus-visible > strong,
.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip:hover > strong {
  opacity: 1;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip.audio.selected > strong {
  max-width: calc(100% - 18px);
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip:not(.selected) .clip-status-badges {
  display: none;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip em {
  padding: 2px 5px;
  font-size: 0.46rem;
}

.app-shell.focus-editor .panel.drawer-active .inspector-form input[type="text"],
.app-shell.focus-editor .panel.drawer-active .inspector-form textarea,
.app-shell.focus-editor .panel.drawer-active .inspector-form select,
.app-shell.focus-editor .panel.drawer-active .caption-timing input,
.app-shell.focus-editor .panel.drawer-active .transcript-editor textarea,
.app-shell.focus-editor .panel.drawer-active .finish-form select {
  min-height: 32px;
  border-radius: 7px;
}

@media (min-width: 721px) {
  .app-shell.focus-editor .panel.drawer-active {
    width: min(344px, calc(100vw - 24px));
  }
}

.app-shell.focus-editor .stage-topline .sequence-format-control {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.app-shell.focus-editor .stage-topline .sequence-format-control select {
  display: none;
  min-height: 0;
  max-width: none;
  padding: 0;
}

.app-shell.focus-editor .canvas-menu[open] .canvas-preset-bar {
  display: grid;
}

.app-shell.focus-editor .canvas-menu > summary {
  min-width: 52px;
  justify-content: center;
  border-radius: 999px;
}

.app-shell.focus-editor .canvas-menu .canvas-preset-bar {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
}

@media (max-width: 720px) {
  .stage-topline {
    top: 7px;
    left: 7px;
    right: 7px;
    gap: 5px;
  }

  .stage-right-chrome {
    flex-wrap: wrap;
    gap: 4px;
  }

  .canvas-menu .canvas-preset-bar {
    right: 0;
    grid-template-columns: repeat(2, minmax(82px, 1fr));
  }
}

/* Mobile drawer switcher: keep the panel dock tappable even while a sheet is open. */
@media (max-width: 720px) {
  html.editor-drawer-open,
  body.editor-drawer-open {
    overscroll-behavior: none;
  }

  body.editor-drawer-open {
    touch-action: manipulation;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    z-index: 96;
    touch-action: manipulation;
  }

  .app-shell.focus-editor .panel.drawer-active {
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-height: calc(100svh - 132px - env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .app-shell.focus-editor.drawer-open .drawer-return-button {
    z-index: 97;
  }

  .app-shell.focus-editor.drawer-open .drawer-context-bar {
    left: 14px;
    right: auto;
    bottom: calc(76px + env(safe-area-inset-bottom));
    max-width: min(210px, calc(100vw - 120px));
    height: 32px;
  }
}

/* Editor-rack pass: drawers and timeline should feel like native editing chrome, not stacked web modules. */
.app-shell.focus-editor.drawer-open::before {
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(22, 30, 43, 0.025) 62%, rgba(22, 30, 43, 0.08) 100%);
}

body[data-theme="dark"] .app-shell.focus-editor.drawer-open::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.045) 62%, rgba(0, 0, 0, 0.18) 100%);
}

.app-shell.focus-editor.drawer-open .drawer-context-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(238px, calc(100vw - 140px));
  height: 34px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-0) 88%, transparent), color-mix(in srgb, var(--surface-1) 92%, transparent));
  color: var(--text);
  box-shadow: 0 12px 30px rgba(12, 18, 30, 0.16);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.drawer-context-bar span,
.drawer-context-bar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-context-bar span {
  color: var(--muted);
  font: 800 0.58rem "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-context-bar strong {
  color: var(--accent);
  font: 800 0.66rem "IBM Plex Mono", monospace;
}

body[data-theme="dark"] .drawer-context-bar {
  background:
    linear-gradient(180deg, rgba(35, 41, 52, 0.92), rgba(18, 23, 32, 0.9));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.app-shell.focus-editor .source-monitor.drawer-active {
  display: grid;
  grid-template-rows: auto minmax(112px, 0.5fr) auto auto auto;
  gap: 6px;
}

.app-shell.focus-editor .source-monitor.drawer-active #source-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.96rem;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-shell.focus-editor .source-monitor.drawer-active #source-meta {
  max-width: 112px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-placeholder {
  min-height: 112px;
  max-height: 174px;
  margin-top: 0;
  border-radius: 10px;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-placeholder video,
.app-shell.focus-editor .source-monitor.drawer-active .source-placeholder img {
  max-height: 158px;
  object-fit: contain;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding-block: 0;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-range label {
  margin: 0;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-range .tool-button,
.app-shell.focus-editor .source-monitor.drawer-active .source-add-button {
  min-height: 28px;
  border-radius: 8px;
  font-size: 0.7rem;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-range .tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0;
  white-space: nowrap;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-range .tool-button::before {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 850;
}

.app-shell.focus-editor .source-monitor.drawer-active #source-mark-in::before {
  content: "Mark In";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-mark-out::before {
  content: "Mark Out";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-clear-range::before {
  content: "Full";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-range-start::before {
  content: "First";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-range-middle::before {
  content: "Middle";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-range-motion::before {
  content: "Motion";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-play-range::before {
  content: "Play";
}

.app-shell.focus-editor .source-monitor.drawer-active #source-range-copy {
  grid-column: 1 / -1;
  padding: 0 2px;
  overflow: hidden;
  border: 0;
  color: color-mix(in srgb, var(--text) 64%, transparent);
  background: transparent;
  font-size: 0.62rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-next-step {
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 7px;
  margin-top: 0;
  min-height: 46px;
  padding: 6px 7px;
  border-radius: 9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 64%),
    color-mix(in srgb, var(--surface-0) 66%, transparent);
  box-shadow: none;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-next-step strong {
  display: block;
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-next-step div {
  min-width: 0;
  overflow: hidden;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-next-step span {
  display: block;
  overflow: hidden;
  font-size: 0.64rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-next-step .source-add-button {
  width: 100%;
  min-height: 30px;
  margin: 0;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-alt-edits {
  margin-top: 0;
  background: transparent;
}

.app-shell.focus-editor .source-monitor.drawer-active .source-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 7px 9px;
}

.app-shell.focus-editor .timeline-status-bar {
  overflow: hidden;
}

.app-shell.focus-editor .timeline-status-bar > span,
.app-shell.focus-editor .timeline-action-hint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Focused timeline chrome: keep pro controls readable instead of cramming every status into one row. */
.app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-status-bar {
  grid-template-columns: minmax(196px, 0.9fr) minmax(210px, 0.92fr) minmax(116px, 0.5fr) max-content;
  grid-auto-rows: minmax(26px, auto);
  align-items: center;
  min-height: 31px;
  gap: 3px 5px;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-selection-status {
  grid-column: 1;
  display: block;
  box-sizing: border-box;
  min-height: 22px;
  max-height: 24px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent),
    color-mix(in srgb, var(--surface-1) 74%, transparent);
  font-family: var(--mono-font);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .selection-meter:not(.hidden) {
  display: none;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-quick-actions {
  grid-column: 2;
  max-width: 100%;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-action-hint {
  grid-column: 3;
  color: rgba(217, 226, 239, 0.64);
  font-size: 0.58rem;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-playhead-status {
  grid-column: 4;
  justify-self: end;
  font-weight: 900;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-edit-point-status,
.app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-zoom-status,
.app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-primary-action {
  display: none;
}

.app-shell.focus-editor .timeline-panel.timeline-has-selection .timeline-status-bar {
  align-items: start;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-strip {
  min-height: 24px;
  padding: 1px 4px 3px;
  gap: 4px;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-chip,
.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-fix,
.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-next {
  min-height: 20px;
  padding: 1px 6px;
  font-size: 0.58rem;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-strip-label {
  font-size: 0.56rem;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-chip {
  max-width: min(176px, 24vw);
  flex-wrap: nowrap;
  gap: 4px;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .review-issue-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-quick-actions button {
  min-height: 22px;
  padding: 2px 6px;
  font-size: 0.58rem;
}

.app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-quick-actions kbd {
  display: none;
}

@media (min-width: 721px) {
  .app-shell.focus-editor .panel.drawer-active {
    top: 50px;
    right: 8px;
    bottom: 8px;
    width: min(332px, calc(100vw - 72px));
  }

  .app-shell.focus-editor.drawer-open .editor-column {
    margin-right: 342px;
    pointer-events: auto;
    transition: margin-right 180ms ease;
  }

  .app-shell.focus-editor.drawer-open .preview-stage {
    inline-size: min(100%, 720px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
  }

  .app-shell.focus-editor.drawer-open .timeline-status-bar {
    grid-template-columns: minmax(96px, 1fr) minmax(120px, 1.15fr) max-content;
  }

  .app-shell.focus-editor.drawer-open #timeline-playhead-status,
  .app-shell.focus-editor.drawer-open #timeline-edit-point-status,
  .app-shell.focus-editor.drawer-open #timeline-zoom-status,
  .app-shell.focus-editor.drawer-open #timeline-primary-action {
    display: none;
  }

  .app-shell.focus-editor .source-monitor.drawer-active .panel-head {
    min-height: 46px;
    padding-block: 9px;
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor .source-monitor.drawer-active {
    grid-template-rows: auto minmax(118px, auto) auto auto auto;
    gap: 7px;
  }

  .app-shell.focus-editor .source-monitor.drawer-active .source-placeholder {
    min-height: 118px;
    max-height: 188px;
  }

  .app-shell.focus-editor .source-monitor.drawer-active .source-actions,
  .app-shell.focus-editor .source-monitor.drawer-active .source-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.focus-editor.drawer-open .timeline-panel {
    min-height: clamp(220px, 36svh, 292px);
  }

  .app-shell.focus-editor.drawer-open .drawer-return-button {
    top: auto;
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(20, 30, 45, 0.18);
  }
}

@media (min-width: 721px) {
  .app-shell.focus-editor .timeline-panel.timeline-has-content {
    grid-template-rows: 34px 12px minmax(0, 1fr);
    padding-top: 7px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .panel-head {
    position: absolute;
    top: 7px;
    right: 8px;
    z-index: 8;
    display: flex;
    width: min(350px, 34%);
    min-height: 0;
    margin: 0;
    justify-content: flex-end;
    pointer-events: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .panel-head > div:first-child {
    display: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-tools {
    display: flex;
    pointer-events: auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    max-width: 100%;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 8px;
    background: rgba(8, 11, 16, 0.66);
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-tools .tool-chip,
  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-menu > summary {
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-menu > summary {
    width: 52px;
    font-size: 0;
    text-align: center;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-menu > summary::before {
    content: "Edit";
    color: inherit;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-status-bar {
    width: calc(100% - min(368px, 36%));
    margin: 0 0 3px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-overview {
    grid-row: 2;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-scroll-shell {
    grid-row: 3;
  }
}

/* Canonical workstation layer: one app surface, viewer-first, with tools living in menus/drawers. */
@media (min-width: 721px) {
  .app-shell.focus-editor {
    grid-template-rows: 34px minmax(0, 1fr);
    gap: 5px;
    padding: 5px;
  }

  .app-shell.focus-editor .appbar {
    min-height: 34px;
    grid-template-columns: minmax(150px, auto) minmax(220px, 1fr) max-content;
    padding: 3px 6px;
    border-radius: 10px;
  }

  .app-shell.focus-editor .app-mark {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor h1 {
    font-size: 0.8rem;
  }

  .app-shell.focus-editor .workspace-tabs {
    gap: 1px;
    padding: 2px;
  }

  .app-shell.focus-editor .tab-button {
    min-height: 24px;
    padding: 3px 11px;
    font-size: 0.72rem;
  }

  .app-shell.focus-editor #undo-action,
  .app-shell.focus-editor #redo-action,
  .app-shell.focus-editor #workflow-proof-chip-action {
    display: none;
  }

  .app-shell.focus-editor .appbar-actions .tool-button,
  .app-shell.focus-editor .appbar-actions .primary-button,
  .app-shell.focus-editor .appbar-actions .action-menu > summary {
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 0.72rem;
  }

  .app-shell.focus-editor .workspace {
    padding: 0 0 0 78px;
    gap: 0;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 5px;
    width: 68px;
    gap: 3px;
    padding: 4px;
    border-radius: 14px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 40px;
    padding: 6px 5px;
    border-radius: 10px;
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    font-size: 0.64rem;
  }

  .app-shell.focus-editor .mobile-jump-bar button::after {
    font-size: 0.5rem;
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) clamp(188px, 25svh, 236px);
    border-radius: 12px;
  }

  .app-shell.focus-editor .program-monitor {
    --focus-viewer-fit-height: clamp(210px, calc(100svh - 315px), 430px);
    grid-template-rows: 22px minmax(0, 1fr) 30px;
    gap: 5px;
    padding: 5px 7px 5px;
  }

  .app-shell.focus-editor .program-monitor .panel-head {
    min-height: 22px;
    margin: 0;
  }

  .app-shell.focus-editor .program-monitor .panel-kicker,
  .app-shell.focus-editor .program-monitor h2 {
    display: none;
  }

  .app-shell.focus-editor .timecode {
    margin-left: auto;
    font-size: 0.68rem;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: var(--focus-viewer-fit-height);
    inline-size: min(100%, 980px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    block-size: min(var(--viewer-fit-height), calc(980px / var(--sequence-aspect-number, 1.777)));
    max-block-size: calc(100svh - 286px);
    min-block-size: 176px;
    border-radius: 8px;
  }

  .app-shell.focus-editor .transport {
    width: min(100%, 520px);
    height: 28px;
    max-height: 28px;
    grid-template-columns: 30px 42px 54px 42px 30px minmax(110px, 1fr);
    padding: 2px;
  }

  .app-shell.focus-editor .transport button,
  .app-shell.focus-editor .transport .icon-button,
  .app-shell.focus-editor .transport .primary-button {
    min-height: 22px;
    padding: 2px 6px;
    font-size: 0.68rem;
  }

  .app-shell.focus-editor .stage-topline {
    top: 6px;
    left: 7px;
    right: 7px;
  }

  .app-shell.focus-editor .viewer-chip,
  .app-shell.focus-editor .canvas-menu > summary {
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.6rem;
  }

  .app-shell.focus-editor .timeline-panel {
    padding: 4px 5px 5px;
    border-top: 1px solid rgba(80, 96, 118, 0.14);
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content {
    grid-template-rows: 28px 9px minmax(0, 1fr);
    padding-top: 5px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .panel-head {
    top: 4px;
    right: 6px;
    width: min(314px, 32%);
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-status-bar {
    width: calc(100% - min(328px, 34%));
    min-height: 26px;
    grid-template-columns: minmax(148px, 0.95fr) minmax(160px, 1fr) max-content;
    gap: 3px;
    margin-bottom: 2px;
    padding: 2px 3px;
    border-radius: 7px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-action-hint {
    display: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-playhead-status {
    grid-column: 3;
    font-size: 0.58rem;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-selection-status {
    min-height: 20px;
    max-height: 22px;
    padding: 3px 7px;
    font-size: 0.55rem;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-tools {
    gap: 3px;
    padding: 2px;
    border-radius: 7px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-tools .tool-chip,
  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-menu > summary {
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 0.6rem;
  }

  .app-shell.focus-editor .timeline-scroll-shell {
    border-radius: 7px;
  }

  .app-shell.focus-editor .timeline-body {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-track-labels {
    width: 34px;
  }

  .app-shell.focus-editor .timeline-track-labels button,
  .app-shell.focus-editor .track-row {
    min-height: 20px;
  }

  .app-shell.focus-editor .clip-chip {
    top: 1px;
    bottom: 1px;
    min-height: 0;
    border-radius: 5px;
    box-shadow: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip {
    padding: 1px 5px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .clip-chip > strong {
    font-size: 9px !important;
  }

  .app-shell.focus-editor.drawer-open .editor-column {
    margin-right: 332px;
  }

  .app-shell.focus-editor .panel.drawer-active {
    top: 45px;
    right: 5px;
    bottom: 5px;
    width: min(322px, calc(100vw - 88px));
    border-radius: 12px;
  }

  .app-shell.focus-editor.drawer-open .preview-stage {
    inline-size: min(100%, 720px, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
  }
}

@media (max-width: 720px) {
  .app-shell.focus-editor {
    padding: 6px 6px calc(76px + env(safe-area-inset-bottom));
  }

  .app-shell.focus-editor .appbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px;
    border-radius: 13px;
  }

  .app-shell.focus-editor .app-identity {
    min-width: 0;
  }

  .app-shell.focus-editor h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .app-shell.focus-editor .appbar-actions {
    display: flex;
    gap: 5px;
    width: auto;
  }

  .app-shell.focus-editor #undo-action,
  .app-shell.focus-editor #redo-action,
  .app-shell.focus-editor #play-toggle,
  .app-shell.focus-editor #workflow-proof-chip-action {
    display: none;
  }

  .app-shell.focus-editor .appbar-actions .tool-button,
  .app-shell.focus-editor .appbar-actions .primary-button,
  .app-shell.focus-editor .appbar-actions summary {
    min-height: 34px;
    width: auto;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 0.74rem;
  }

  .app-shell.focus-editor .workspace {
    gap: 7px;
    margin-top: 7px;
  }

  .app-shell.focus-editor .editor-column {
    gap: 7px;
  }

  .app-shell.focus-editor .program-monitor {
    grid-template-rows: 20px minmax(0, auto) 32px;
    padding: 7px;
  }

  .app-shell.focus-editor .program-monitor .panel-kicker,
  .app-shell.focus-editor .program-monitor h2 {
    display: none;
  }

  .app-shell.focus-editor .preview-stage {
    --viewer-fit-height: clamp(156px, 31svh, 260px);
    inline-size: min(100%, calc(var(--viewer-fit-height) * var(--sequence-aspect-number, 1.777)));
    block-size: min(var(--viewer-fit-height), calc((100vw - 12px) / var(--sequence-aspect-number, 1.777)));
    min-block-size: 144px;
    border-radius: 9px;
  }

  .app-shell.focus-editor .transport {
    height: 32px;
    max-height: 32px;
    grid-template-columns: 32px 44px 54px 44px 32px minmax(90px, 1fr);
    gap: 2px;
    padding: 2px;
  }

  .app-shell.focus-editor .transport button,
  .app-shell.focus-editor .transport .icon-button,
  .app-shell.focus-editor .transport .primary-button {
    min-height: 26px;
    padding: 3px 5px;
    font-size: 0.66rem;
  }

  .app-shell.focus-editor .timeline-panel {
    min-height: clamp(228px, 38svh, 306px);
    padding: 6px;
    border-radius: 12px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content {
    grid-template-rows: 40px 30px 8px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .panel-head {
    min-height: 38px;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-status-bar {
    min-height: 28px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-status-bar::-webkit-scrollbar {
    display: none;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-selection-status,
  .app-shell.focus-editor .timeline-panel.timeline-has-content #timeline-playhead-status,
  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-quick-actions {
    flex: 0 0 auto;
  }

  .app-shell.focus-editor .timeline-panel.timeline-has-content .timeline-action-hint {
    display: none;
  }

  .app-shell.focus-editor .timeline-body {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .app-shell.focus-editor .timeline-track-labels {
    width: 32px;
  }

  .app-shell.focus-editor .timeline-track-labels button,
  .app-shell.focus-editor .track-row {
    min-height: 22px;
  }

  .app-shell.focus-editor .clip-chip {
    top: 1px;
    bottom: 1px;
    border-radius: 5px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    grid-auto-flow: column;
    grid-auto-columns: minmax(58px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    min-height: 58px;
    padding: 5px;
    border-radius: 18px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 46px;
    padding: 5px 2px;
    border-radius: 13px;
  }

  .app-shell.focus-editor .panel.drawer-active {
    right: 6px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    left: 6px;
    max-height: calc(100svh - 132px - env(safe-area-inset-bottom));
    border-radius: 18px;
  }
}

/* Native pro rail: desktop keeps panel access compact while labels stay in aria/tooltips. */
@media (min-width: 721px) {
  .app-shell.focus-editor {
    grid-template-rows: 32px minmax(0, 1fr);
    padding: 4px;
  }

  .app-shell.focus-editor .appbar {
    min-height: 32px;
    grid-template-columns: minmax(128px, auto) minmax(220px, 1fr) max-content;
    padding: 2px 5px;
  }

  .app-shell.focus-editor .app-identity {
    gap: 6px;
  }

  .app-shell.focus-editor .app-identity p {
    display: none;
  }

  .app-shell.focus-editor .app-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .app-shell.focus-editor h1 {
    font-size: 0.76rem;
  }

  .app-shell.focus-editor .tab-button {
    min-height: 23px;
    padding: 3px 10px;
  }

  .app-shell.focus-editor .appbar-actions .tool-button,
  .app-shell.focus-editor .appbar-actions .primary-button,
  .app-shell.focus-editor .appbar-actions .action-menu > summary {
    min-height: 24px;
    padding: 3px 8px;
  }

  .app-shell.focus-editor .workspace {
    padding-left: 56px;
  }

  .app-shell.focus-editor .mobile-jump-bar {
    left: 6px;
    width: 44px;
    gap: 4px;
    padding: 4px;
    border-radius: 15px;
  }

  .app-shell.focus-editor .mobile-jump-bar button {
    min-height: 40px;
    justify-items: center;
    padding: 5px 2px;
    border-radius: 12px;
    text-align: center;
  }

  .app-shell.focus-editor .mobile-jump-bar button::before {
    content: attr(data-panel-icon);
    width: 25px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, currentColor 9%, transparent);
    font-family: var(--mono-font);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
  }

  .app-shell.focus-editor .mobile-jump-bar button::after {
    content: attr(data-badge);
    max-width: 34px;
    justify-self: center;
    padding-top: 1px;
    font-size: 0.47rem;
    line-height: 1;
    text-align: center;
  }

  .app-shell.focus-editor .mobile-jump-bar button:hover,
  .app-shell.focus-editor .mobile-jump-bar button:focus-visible {
    transform: translateX(1px);
  }

  .app-shell.focus-editor .editor-column {
    grid-template-rows: minmax(0, 1fr) clamp(184px, 24svh, 228px);
  }

  .app-shell.focus-editor .program-monitor {
    --focus-viewer-fit-height: clamp(204px, calc(100svh - 300px), 430px);
  }

  .app-shell.focus-editor .panel.drawer-active {
    top: 41px;
    right: 4px;
    bottom: 4px;
    width: min(312px, calc(100vw - 74px));
  }

  .app-shell.focus-editor.drawer-open .editor-column {
    margin-right: 320px;
  }
}

/* Desktop rail de-bloat: keep mobile's full workflow dock, but make desktop a compact panel rail. */
@media (min-width: 721px) {
  .app-shell.focus-editor .mobile-jump-bar {
    align-content: start;
  }

  .app-shell.focus-editor .mobile-jump-bar button[data-jump-phase="color"],
  .app-shell.focus-editor .mobile-jump-bar button[data-jump-phase="mix"],
  .app-shell.focus-editor .mobile-jump-bar button[data-jump-phase="performance"] {
    display: none;
  }

  .app-shell.focus-editor .mobile-jump-bar button[data-jump-phase="deliver"]::before {
    content: "FN";
  }

  .app-shell.focus-editor .mobile-jump-bar button[data-jump-phase="deliver"]::after {
    content: "Finish";
  }

  .app-shell.focus-editor[data-dock-phase="color"] .mobile-jump-bar button[data-jump-phase="deliver"],
  .app-shell.focus-editor[data-dock-phase="mix"] .mobile-jump-bar button[data-jump-phase="deliver"],
  .app-shell.focus-editor[data-dock-phase="performance"] .mobile-jump-bar button[data-jump-phase="deliver"],
  .app-shell.focus-editor[data-dock-phase="deliver"] .mobile-jump-bar button[data-jump-phase="deliver"] {
    color: #172033;
    border-color: rgba(52, 86, 142, 0.24);
    background: rgba(255, 255, 255, 0.72);
  }

  body[data-theme="dark"] .app-shell.focus-editor[data-dock-phase="color"] .mobile-jump-bar button[data-jump-phase="deliver"],
  body[data-theme="dark"] .app-shell.focus-editor[data-dock-phase="mix"] .mobile-jump-bar button[data-jump-phase="deliver"],
  body[data-theme="dark"] .app-shell.focus-editor[data-dock-phase="performance"] .mobile-jump-bar button[data-jump-phase="deliver"],
  body[data-theme="dark"] .app-shell.focus-editor[data-dock-phase="deliver"] .mobile-jump-bar button[data-jump-phase="deliver"] {
    color: #f7faff;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
  }
}
