:root {
  color-scheme: dark;
  --bg: #07050f;
  --bg-2: #0f0a1a;
  --panel: #12101c;
  --panel-2: #1a1528;
  --line: rgba(168, 130, 255, 0.18);
  --text: #f8f6ff;
  --muted: #9b93b0;
  --accent: #a855f7;
  --accent-2: #7c3aed;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --gold: #c4b5fd;
  --blue: #a78bfa;
  --playhead: #9333ea;
  --green: #34d399;
  --danger: #fb7185;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-premiere: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-premiere: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-premiere: cubic-bezier(0.4, 0, 1, 1);
  --dur-fast: 120ms;
  --dur-med: 200ms;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-border-soft: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(48px) saturate(200%);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.vg-page.setup-body,
body.vg-page.configure-body {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  display: block;
}

body.vg-page.studio-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Soft animated mesh behind glass — very subtle drift */
body.vg-page::before,
body.vg-page::after {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

body.vg-page::before {
  background:
    radial-gradient(circle 420px at 18% 22%, rgba(168, 85, 247, 0.42), transparent 68%),
    radial-gradient(circle 380px at 82% 18%, rgba(124, 58, 237, 0.34), transparent 65%);
  animation: ambient-drift-a 32s ease-in-out infinite;
}

body.vg-page::after {
  background:
    radial-gradient(circle 400px at 68% 78%, rgba(99, 102, 241, 0.28), transparent 68%),
    radial-gradient(circle 340px at 22% 82%, rgba(168, 85, 247, 0.22), transparent 65%);
  animation: ambient-drift-b 38s ease-in-out infinite;
}

@keyframes ambient-drift-a {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(2.5%, 1.5%) scale(1.03);
  }
  66% {
    transform: translate(-1.5%, 2%) scale(0.98);
  }
}

@keyframes ambient-drift-b {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-2%, -1.5%) scale(1.02);
  }
  75% {
    transform: translate(1.5%, -2%) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.vg-page::before,
  body.vg-page::after {
    animation: none;
  }
}

body.vg-page > * {
  position: relative;
  z-index: 1;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border-soft);
  color: var(--text);
  cursor: pointer;
  transition: filter 0.15s var(--ease), transform 0.12s var(--ease), box-shadow 0.15s var(--ease);
  box-shadow: var(--glass-highlight);
}

button:hover {
  filter: brightness(1.12);
}

button.primary {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 32px var(--accent-glow);
}

button.primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 12px 40px var(--accent-glow);
}

button.ghost {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

select,
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e121a;
  color: var(--text);
  padding: 10px;
}

.app-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.vg-page.studio-body .app-shell {
  flex: 1;
  min-height: 0;
}

.studio-shell.app-shell {
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  grid-template-rows: minmax(0, 1fr) minmax(250px, 40vh);
  grid-template-areas:
    "left monitor right"
    "left timeline right";
  background: transparent;
}

.vg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  min-height: 68px;
  border-bottom: 1px solid var(--glass-border-soft);
  background: rgba(7, 5, 15, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight);
  position: relative;
  flex-shrink: 0;
  z-index: 50;
}

.vg-nav-studio {
  gap: 12px;
  padding: 8px 16px;
  min-height: 54px;
}

.vg-nav-studio .vg-nav-crumb {
  flex: 0 0 auto;
  margin-right: 4px;
}

.vg-nav-seq {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: #cfc8e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vg-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.vg-nav-actions .toolbar-btn {
  padding: 6px 11px;
  font-size: 12px;
  white-space: nowrap;
}

.editing-mode-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
  white-space: nowrap;
}

.editing-mode-badge.mode-ai {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.22);
  color: #f5e9ff;
}

.stop-fetch-btn {
  border-color: rgba(255, 95, 112, 0.45) !important;
  color: #ff9aa5 !important;
  background: rgba(255, 95, 112, 0.12) !important;
}

.stop-fetch-btn:hover:not(:disabled) {
  background: rgba(255, 95, 112, 0.22) !important;
}

.vg-nav-actions .toolbar-select select {
  padding: 5px 8px;
  font-size: 11px;
  max-width: 148px;
}

.vg-nav-crumb {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.vg-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.vidzylo-logo-header {
  display: block;
  height: 46px;
  width: auto;
  max-width: min(300px, 74vw);
  object-fit: contain;
}

.vidzylo-logo-header-lg {
  height: 49px;
  max-width: min(320px, 78vw);
}

.vidzylo-logo-header-sm {
  height: 38px;
  max-width: min(260px, 68vw);
}

.vidzylo-logo-header-studio {
  height: 39px;
  max-width: min(280px, 36vw);
}

.vg-brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(124, 58, 237, 0.45));
}

.vidzylo-wordmark {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: #f8f6ff;
  line-height: 1;
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.12);
}

.vidzylo-wordmark-lg {
  font-size: 1.45rem;
}

.vidzylo-i {
  position: relative;
  display: inline-block;
  font-style: normal;
}

.vidzylo-i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.05em;
  width: 0.34em;
  height: 0.34em;
  margin-left: -0.17em;
  border-radius: 50%;
  background: linear-gradient(145deg, #d8b4fe 0%, #9333ea 100%);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.55);
}

.vg-brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: #f8f6ff;
}

.vg-brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 12px;
  color: #fff;
}

.vg-nav-link {
  text-decoration: none;
  font-size: 13px;
  padding: 8px 14px;
}

.vg-main {
  width: min(920px, 100%);
  padding: 32px 24px 48px;
}

.vg-hero {
  text-align: center;
  margin-bottom: 36px;
}

.vg-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(168, 85, 247, 0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.vg-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.vg-gradient-text {
  display: block;
  background: linear-gradient(90deg, #c084fc, #a855f7, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vg-subtitle {
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.vg-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.vg-tags li {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.vg-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.setup-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.drop-icon {
  font-size: 28px;
  line-height: 1;
}

.drop-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.drop-hint {
  font-size: 12px;
  color: var(--muted);
}

.vg-cta {
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 12px;
}

.mode-chip input {
  accent-color: var(--accent);
}

.project-history {
  margin-top: 24px;
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.project-list-item:hover {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.08);
}

.project-list-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #090b10;
  padding: 22px;
  overflow-y: auto;
  min-height: 0;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(280px, 38vh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.premiere-workspace {
  grid-template-rows: minmax(0, 1fr) minmax(210px, 34vh);
  background: #08080a;
}

.vg-page .app-shell {
  margin-top: 0;
}

.bin-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: rgba(14, 10, 28, 0.52);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
  border-style: solid;
  box-shadow: var(--glass-shadow);
}

.bin-left {
  grid-area: left;
  border-right-width: 1px;
  padding: 0;
  overflow: hidden;
}

.bin-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 12px;
}

.bin-right {
  grid-area: right;
  border-left-width: 1px;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.media-pool-tall {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin-top: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

.bin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  flex-shrink: 0;
  box-shadow: var(--glass-highlight);
}

.bin-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bin-header h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8a3b8;
}

.bin-section {
  margin-bottom: 14px;
}

.bin-section h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.studio-monitor-area {
  grid-area: monitor;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.studio-timeline-area {
  grid-area: timeline;
  min-height: 0;
  overflow: hidden;
}

.studio-timeline-area.timeline-panel.premiere-timeline {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr);
  gap: 6px;
  min-height: 0;
  padding: 6px 12px 10px;
}

.studio-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  height: 42px;
  flex-shrink: 0;
  background: rgba(22, 22, 28, 0.5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-highlight);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-center {
  min-width: 0;
  text-align: center;
}

.toolbar-tab {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.toolbar-tab.is-active {
  color: #fff;
  border-bottom-color: #4da3ff;
}

.toolbar-tab.muted-tab {
  opacity: 0.45;
  cursor: default;
}

.toolbar-seq {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #e8e4f4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.toolbar-select select {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  background: #1a1a22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.monitor-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  padding: 8px 12px 6px;
  background: rgba(6, 6, 8, 0.35);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  overflow: hidden;
  gap: 0;
}

.dual-monitor-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.monitor-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.monitor-pane-label {
  flex-shrink: 0;
  padding: 2px 4px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9b93b0;
}

.monitor-pane-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 0;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.monitor-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #8a849c;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 8px 8px;
  cursor: pointer;
}

.monitor-tab.is-active {
  color: #ece8ff;
  box-shadow: inset 0 -2px 0 #a78bfa;
}

.source-tab-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.effects-panel {
  overflow: auto;
  padding: 8px 6px 12px;
  background: rgba(10, 10, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.effects-empty { margin: 12px 4px; }
.effects-clip-name {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 650;
  color: #ddd7f0;
}
.effects-section-label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b83a3;
}
.fx-row {
  display: grid;
  grid-template-columns: 78px 1fr 58px 26px;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px;
}
.fx-row label { font-size: 11px; color: #c5bfd8; }
.fx-row input[type="range"] { width: 100%; }
.fx-row input[type="number"] {
  width: 58px;
  background: #16161c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eee;
  border-radius: 4px;
  font-size: 11px;
  padding: 3px 4px;
}
.fx-key {
  border: 0;
  background: transparent;
  color: #5c566e;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.fx-key.is-on { color: #e8c35a; }
.fx-key.has-key { color: #a78bfa; }
.effects-hint { margin: 10px 0 0; }

.monitor-viewport-wrap {
  flex: 1;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--glass-shadow);
}

.monitor-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  margin: auto;
}

.monitor-frame.ratio-9x16 {
  aspect-ratio: 9 / 16;
  width: auto;
  height: 100%;
  max-width: 100%;
}

.monitor-frame.ratio-1x1 {
  aspect-ratio: 1 / 1;
  width: auto;
  height: min(100%, 100%);
  max-width: 100%;
}

.monitor-frame .preview-stage {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.monitor-frame .empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}

.monitor-transport-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 10px;
  background: rgba(24, 24, 31, 0.55);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--glass-border-soft);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
  z-index: 5;
  box-shadow: var(--glass-highlight);
}

.monitor-transport-bar.program-transport {
  display: grid;
  grid-template-columns: minmax(72px, auto) auto minmax(0, 1fr) auto;
  justify-content: initial;
  gap: 8px;
}

.monitor-transport-bar.program-transport .transport-label {
  display: none;
}

.monitor-transport-bar.program-transport .transport-btn-end {
  justify-self: end;
}

.source-transport {
  grid-template-columns: minmax(72px, auto) auto minmax(0, 1fr) auto;
}

.source-transport .transport-btn-end {
  justify-self: end;
}

.source-scrubber,
.program-scrubber {
  width: 100%;
  min-width: 0;
  height: 4px;
  margin: 0;
  accent-color: #a78bfa;
  cursor: pointer;
}

.source-scrubber:disabled,
.program-scrubber:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.monitor-transport-bar .timecode {
  justify-self: start;
  white-space: nowrap;
  font-size: 11px;
}

.transport-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: center;
}

.transport-btn-end {
  justify-self: end;
}

.monitor-toast {
  margin: 0;
  min-height: 0;
  padding: 0 12px;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  color: #8f89a3;
  background: #0e0e12;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.monitor-toast:not(:empty) {
  padding: 5px 12px 7px;
  min-height: 26px;
}

.monitor-frame #previewVideo,
.monitor-frame #previewImage,
.monitor-frame #sourceVideo,
.monitor-frame #sourceImage {
  object-fit: contain;
}

.media-pool-tall {
  flex: 1;
  max-height: none;
  margin-top: 0;
  padding: 10px 12px 14px;
  overflow-y: auto;
  align-content: start;
}

.studio-sidebar {
  padding: 14px 16px;
}

.studio-sidebar header,
.studio-sidebar section {
  margin-bottom: 14px;
}

.studio-sidebar h1 {
  font-size: 20px;
}

.studio-sidebar h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.monitor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
}

.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #121218;
  border-bottom: 1px solid var(--line);
}

.monitor-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.monitor-tab {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.monitor-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.monitor-seq-title {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monitor-viewport {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #000;
}

.monitor-viewport .preview-stage {
  height: 100%;
  width: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  align-self: stretch;
  justify-self: stretch;
  border: 0;
  border-radius: 0;
}

.premiere-transport {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #121218;
  border-top: 1px solid var(--line);
}

.transport-left,
.transport-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.transport-right {
  justify-content: flex-end;
}

.transport-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.transport-btn {
  width: 34px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #22222c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.transport-btn-play {
  width: auto;
  min-width: 88px;
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.transport-label {
  letter-spacing: 0.03em;
}

.timecode {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #d6d2e6;
}

.monitor-status {
  margin: 0;
  padding: 0;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  max-width: min(100%, calc((100vh - 56px - 34vh - 120px) * 16 / 9));
}

.premiere-timeline {
  padding: 8px 14px 10px;
  gap: 6px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.premiere-timeline .timeline-header {
  padding: 0;
  border: 0;
}

.premiere-timeline .timeline-header h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inline-control.compact {
  gap: 4px;
  font-size: 11px;
}

.tiny {
  font-size: 11px;
}

#scrubber {
  width: min(220px, 100%);
  flex: 1;
}

header,
section {
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
}

h2 {
  font-size: 16px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.muted,
.status-text {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.upload-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 16px;
}

.upload-card label,
.inline-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-title,
.topbar,
.timeline-header,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar,
.preview-panel,
.timeline-panel {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

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

.timeline-header {
  justify-content: flex-start;
}

.timeline-header > div:first-child {
  margin-right: auto;
}

.timeline-header .primary {
  box-shadow: 0 0 24px rgba(242, 184, 75, 0.24);
}

.voiceover-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-top: 10px;
}

.media-pool {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.media-pool::-webkit-scrollbar {
  width: 8px;
}

.media-pool::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

.media-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--glass-border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glass-highlight);
  padding: 8px;
  cursor: grab;
}

.media-card:active {
  cursor: grabbing;
}

.media-card.is-previewing {
  border-color: rgba(168, 140, 255, 0.55);
  background: rgba(120, 90, 220, 0.14);
  box-shadow: 0 0 0 1px rgba(168, 140, 255, 0.25), var(--glass-highlight);
}

.media-card .thumb {
  position: relative;
}

.media-play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(8, 6, 18, 0.38);
  pointer-events: none;
  opacity: 0.85;
}

.media-card.is-previewing .media-play-badge {
  background: rgba(90, 60, 200, 0.45);
}

.delete-media,
.delete-voiceover {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 95, 112, 0.28);
  border-radius: 9px;
  background: rgba(255, 95, 112, 0.08);
  color: #ff9aa5;
  padding: 0;
  cursor: pointer;
}

.delete-voiceover {
  width: 42px;
  height: 42px;
}

.delete-media:hover,
.delete-voiceover:hover {
  background: rgba(255, 95, 112, 0.18);
}

.delete-media:disabled,
.delete-voiceover:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: none;
}

.delete-media svg,
.delete-voiceover svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: #05070b;
  color: var(--muted);
  font-size: 11px;
}

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

.thumb video {
  pointer-events: none;
}

.media-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.media-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.preview-panel {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  height: min(100%, 54vh);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #020306;
}

.preview-stage.explained-canvas {
  background: #f4f1ea;
}

.monitor-frame .preview-stage.explained-canvas #previewImage,
.preview-stage.explained-canvas #previewImage {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
  filter: none;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.monitor-frame .preview-stage.explained-canvas #previewVideo,
.monitor-frame .preview-stage.explained-canvas #previewVideoB,
.preview-stage.explained-canvas #previewVideo,
.preview-stage.explained-canvas #previewVideoB {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: 75%;
  height: 75%;
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
  filter: none;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: transparent;
  z-index: 2;
  opacity: 1;
  visibility: visible;
}

.preview-stage.explained-canvas #previewImage.is-animated {
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1), linear;
  animation-fill-mode: forwards;
}

@keyframes explainedKenBurns {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.07); }
}

@keyframes explainedEnterLeft {
  0% { transform: translate(calc(-50% - 28px), -50%) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.07); }
}
@keyframes explainedEnterRight {
  0% { transform: translate(calc(-50% + 28px), -50%) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.07); }
}
@keyframes explainedEnterTop {
  0% { transform: translate(-50%, calc(-50% - 22px)) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.07); }
}
@keyframes explainedEnterBottom {
  0% { transform: translate(-50%, calc(-50% + 22px)) scale(1); }
  14% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.07); }
}

@keyframes explainedSlideLeft {
  from { transform: translate(calc(-50% - 28px), -50%); }
  to { transform: translate(-50%, -50%); }
}
@keyframes explainedSlideRight {
  from { transform: translate(calc(-50% + 28px), -50%); }
  to { transform: translate(-50%, -50%); }
}
@keyframes explainedSlideTop {
  from { transform: translate(-50%, calc(-50% - 22px)); }
  to { transform: translate(-50%, -50%); }
}
@keyframes explainedSlideBottom {
  from { transform: translate(-50%, calc(-50% + 22px)); }
  to { transform: translate(-50%, -50%); }
}

.explained-title {
  position: absolute;
  top: 4.5%;
  left: 8%;
  right: 8%;
  z-index: 4;
  margin: 0;
  text-align: center;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(22px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #161616;
  pointer-events: none;
  line-height: 1.1;
}

.monitor-viewport .preview-stage {
  height: 100%;
  max-height: none;
  border-radius: 0;
  border: 0;
}

.monitor-viewport #previewVideo,
.monitor-viewport #previewImage {
  object-fit: contain;
}

.ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.ratio-9x16 {
  aspect-ratio: 9 / 16;
}

.ratio-1x1 {
  aspect-ratio: 1 / 1;
}

/* When the preview is full-screen, fill the whole screen and letterbox the
   media instead of cropping it. */
.preview-stage:fullscreen {
  height: 100%;
  width: 100%;
  max-width: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #000;
}

.preview-stage:fullscreen #previewVideo,
.preview-stage:fullscreen #previewImage,
.preview-stage:fullscreen #sourceVideo,
.preview-stage:fullscreen #sourceImage {
  object-fit: contain;
}

#fullscreenButton,
#sourceFullscreenButton {
  display: grid;
  place-items: center;
  padding: 8px 10px;
}

#previewVideo,
#previewVideoB,
#previewImage,
#sourceVideo,
#sourceImage {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}

#previewVideo,
#previewVideoB {
  display: block;
  opacity: 0;
  z-index: 1;
  background: #000;
}

#previewVideo.is-active,
#previewVideoB.is-active {
  opacity: 1;
  z-index: 2;
}

@keyframes kenBurnsPreview {
  from {
    transform: scale(1) translateY(0);
  }
  to {
    transform: scale(1.1) translateY(-1.5%);
  }
}

.empty-preview {
  color: var(--muted);
}

.transport {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 10px;
  align-items: center;
}

#scrubber {
  width: 100%;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 2px;
}

.timeline-toolbar-left,
.timeline-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-tool-btn {
  min-width: 34px;
  padding: 6px 10px;
}

.timeline-play-btn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.timeline-timecode {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #d4d4d8;
  min-width: 140px;
}

.timeline-zoom {
  font-size: 11px;
}

.studio-timeline-area .timeline-scroller {
  min-height: 150px;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

.timeline-panel:not(.premiere-timeline) {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.timeline-scroller {
  position: relative;
  overflow: auto;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(10, 13, 20, 0.45);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  scroll-behavior: smooth;
}

.timeline-inner {
  position: relative;
  min-width: 100%;
}

.track-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ruler {
  position: relative;
  height: 36px;
  min-width: 100%;
  margin-left: 72px;
  border-bottom: 1px solid var(--line);
  background-color: #0c1018;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  cursor: pointer;
}

.ruler-mark {
  position: absolute;
  top: 8px;
  color: var(--muted);
  font-size: 11px;
  transform: translateX(4px);
}

.track-label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.25);
  border-right: 1px solid var(--line);
}

.track {
  position: relative;
  min-width: 0;
  border-top: none;
  border-bottom: none;
}

.video-track {
  height: 58px;
  background: rgba(104, 163, 255, 0.05);
}

.gfx-track {
  height: 44px;
  background: rgba(192, 132, 252, 0.08);
}

.timeline-clip.overlay-clip {
  top: 6px;
  height: 32px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.95), rgba(129, 140, 248, 0.88));
  border-color: rgba(216, 180, 254, 0.45);
  cursor: grab;
}

.timeline-clip.overlay-clip.selected {
  outline: 2px solid rgba(216, 180, 254, 0.9);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.4);
}

.timeline-clip.overlay-clip .clip-title {
  font-size: 11px;
  font-weight: 700;
}

.media-pool-studio {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 10px;
}

.inspector-panel {
  flex-shrink: 0;
  border-top: 1px solid var(--glass-border-soft);
  background: rgba(12, 10, 22, 0.55);
  max-height: 42%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inspector-header {
  padding: 8px 12px;
}

.inspector-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px 12px;
}

.inspector-empty {
  margin: 0;
}

.inspector-field {
  margin-bottom: 12px;
}

.inspector-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.inspector-field input[type="range"] {
  width: 100%;
}

.inspector-field select,
.inspector-field input[type="text"],
.inspector-field textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 12px;
}

.inspector-field textarea {
  min-height: 52px;
  resize: vertical;
  line-height: 1.35;
  font-family: inherit;
}

.inspector-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.inspector-clip-name {
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 10px;
  word-break: break-word;
}

.preview-gfx-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 8% 6%;
  pointer-events: none;
}

.preview-gfx-overlay .gfx-primary {
  font-size: clamp(18px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.preview-gfx-overlay .gfx-secondary {
  font-size: clamp(11px, 1.6vw, 20px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 6px;
}

.preview-gfx-overlay.kinetic-center {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.preview-gfx-overlay.kinetic-center .gfx-primary {
  font-size: clamp(28px, 5vw, 64px);
}

.preview-gfx-overlay.gfx-pos-center {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.preview-gfx-overlay.gfx-pos-bottom {
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding-bottom: 10%;
}

.preview-gfx-overlay .gfx-card {
  max-width: 86%;
}

.preview-gfx-overlay .gfx-primary {
  font-family: var(--gfx-font, Inter, sans-serif);
  font-size: clamp(16px, 2.8vw, var(--gfx-size, 48px));
  color: var(--gfx-text, #fff);
}

.preview-gfx-overlay.gfx-KineticPop .gfx-primary {
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 24px var(--gfx-highlight, #ff0055);
  animation: gfxPop 420ms cubic-bezier(0.2, 1.4, 0.3, 1);
}

.preview-gfx-overlay.gfx-HighlightBox .gfx-primary {
  display: inline-block;
  padding: 0.18em 0.45em;
  color: var(--gfx-text, #111);
  background: linear-gradient(90deg, var(--gfx-highlight, #f5c518) 0%, var(--gfx-highlight, #f5c518) 100%);
  box-decoration-break: clone;
  animation: gfxWipe 500ms ease-out;
}

.preview-gfx-overlay.gfx-MinimalCard .gfx-card {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(12, 16, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  animation: gfxRise 480ms ease-out;
}

.preview-gfx-overlay.gfx-TypewriterGlow .gfx-primary {
  font-family: "Courier New", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px var(--gfx-highlight, #39ff14), 0 0 28px var(--gfx-highlight, #39ff14);
  animation: gfxGlow 1.2s ease-in-out infinite alternate;
}

.preview-gfx-overlay.gfx-NewsTicker {
  align-items: flex-end;
  justify-content: stretch;
  padding: 0 0 6%;
}

.preview-gfx-overlay.gfx-NewsTicker .gfx-card {
  max-width: 100%;
  width: 100%;
  padding: 10px 4%;
  background: var(--gfx-highlight, #ff2a2a);
  animation: gfxSlide 400ms ease-out;
}

.preview-gfx-overlay.gfx-NewsTicker .gfx-primary {
  font-size: clamp(14px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes gfxPop {
  from { transform: scale(0.55); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes gfxWipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes gfxRise {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes gfxGlow {
  from { opacity: 0.82; filter: brightness(1); }
  to { opacity: 1; filter: brightness(1.25); }
}

@keyframes gfxSlide {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.preview-gfx-overlay.gfx-DoubleImageAnnotation,
.preview-gfx-overlay.gfx-ThreeImageReveal {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.preview-gfx-overlay .gfx-image-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-gfx-overlay .gfx-image-dim {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.42) center / cover no-repeat;
  filter: blur(22px);
  transform: scale(1.18);
  animation: gfxDimIn 550ms ease-out both;
}

.preview-gfx-title-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-gfx-title-layer.over-images {
  align-items: flex-end;
  padding-bottom: 12%;
}

.preview-gfx-title-layer[data-gfx-anim] {
  animation: gfxTitleSettle 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.preview-gfx-overlay.gfx-DoubleImageAnnotation .gfx-image-dim::after,
.preview-gfx-overlay.gfx-ThreeImageReveal .gfx-image-dim::after,
.preview-gfx-overlay.gfx-PersonCutout .gfx-image-dim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.45);
}

.preview-gfx-overlay .gfx-cutout-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.preview-gfx-overlay .gfx-person-cutout {
  position: absolute;
  left: 1.5%;
  bottom: 0;
  height: 96%;
  width: auto;
  max-width: 48%;
  object-fit: contain;
  object-position: left bottom;
  z-index: 2;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
  animation: gfxRise 280ms ease-out;
}

.preview-gfx-overlay .gfx-cutout-copy {
  position: absolute;
  left: 50%;
  top: 36%;
  z-index: 3;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
  animation: gfxRise 320ms ease-out;
}

.preview-gfx-overlay .gfx-cutout-name {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.preview-gfx-overlay .gfx-cutout-role {
  margin-top: 8px;
  font-size: clamp(14px, 1.7vw, 22px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.preview-gfx-overlay .gfx-cutout-arrow {
  position: absolute;
  left: 18%;
  bottom: 8%;
  width: 46%;
  height: 28%;
  z-index: 2;
  pointer-events: none;
}

.preview-gfx-overlay .gfx-portrait-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3.5%;
  width: 72%;
  animation: gfxRise 260ms ease-out;
}

.preview-gfx-overlay .gfx-portrait {
  margin: 0;
  width: 46%;
  max-width: 280px;
}

.preview-gfx-overlay .gfx-portrait img,
.preview-gfx-overlay .gfx-portrait-empty {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.preview-gfx-overlay .gfx-portrait-empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-gfx-overlay .gfx-portrait figcaption {
  margin-top: 10px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.preview-gfx-overlay .gfx-float-card {
  position: absolute;
  margin: 0;
  width: 30%;
  z-index: 1;
}

.preview-gfx-overlay .gfx-float-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.preview-gfx-overlay .gfx-float-a {
  left: 12%;
  top: 18%;
  animation: gfxFloatInA 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.preview-gfx-overlay .gfx-float-b {
  right: 12%;
  bottom: 18%;
  animation: gfxFloatInB 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gfxDimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gfxFloatInA {
  from { opacity: 0; transform: translate(-12%, 14%) rotate(-16deg); }
  to { opacity: 1; transform: translate(0, 0) rotate(-6deg); }
}

@keyframes gfxFloatInB {
  from { opacity: 0; transform: translate(12%, 14%) rotate(16deg); }
  to { opacity: 1; transform: translate(0, 0) rotate(6deg); }
}

@keyframes gfxTitleSettle {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.activity-feed {
  max-height: 120px;
}

.script-track {
  height: 34px;
  background: rgba(255, 255, 255, 0.02);
}

.music-track {
  height: 56px;
  background: rgba(251, 146, 60, 0.08);
}

.sfx-track {
  height: 40px;
  background: rgba(56, 189, 248, 0.08);
}

.audio-track {
  height: 52px;
  background: rgba(251, 191, 36, 0.06);
}

.transition-track {
  height: 44px;
  background: rgba(255, 170, 90, 0.06);
}

.timeline-clip.transition-clip {
  top: 8px;
  height: 28px;
  background: linear-gradient(135deg, rgba(255, 186, 120, 0.95), rgba(255, 130, 170, 0.88));
  border-color: rgba(255, 220, 180, 0.45);
  cursor: pointer;
  min-width: 18px;
}

.timeline-clip.transition-clip.selected {
  box-shadow: 0 0 0 2px rgba(255, 200, 120, 0.85), 0 6px 18px rgba(255, 140, 80, 0.35);
}

.timeline-clip.transition-clip .clip-title {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-leak-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.06s linear;
}

.preview-stage {
  position: relative;
}

.audio-bar {
  position: absolute;
  top: 10px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(64, 211, 155, 0.5), rgba(64, 211, 155, 0.2));
  color: #d7fff0;
  padding: 6px 10px;
  font-size: 12px;
}

.music-bar {
  position: absolute;
  top: 10px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(168, 120, 255, 0.55), rgba(120, 88, 220, 0.25));
  color: #efe6ff;
  padding: 6px 10px;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline-clip.music-clip {
  top: 6px;
  height: 40px;
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.55), rgba(67, 28, 8, 0.72));
  border-color: rgba(251, 191, 36, 0.45);
  overflow: hidden;
}

.timeline-clip.music-clip.selected {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.9), 0 8px 22px rgba(251, 146, 60, 0.28);
}

.music-waveform-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.music-clip-label {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.timeline-clip.music-clip .clip-subtitle {
  position: relative;
  z-index: 2;
}

.timeline-clip.sfx-clip {
  top: 6px;
  height: 28px;
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.9), rgba(12, 74, 110, 0.85));
  border-color: rgba(56, 189, 248, 0.5);
  min-width: 18px;
}

.timeline-clip.sfx-clip.selected {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.85);
}

.sfx-clip-label {
  font-size: 10px;
  font-weight: 700;
  padding: 6px 8px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}
  font-size: 9px;
  opacity: 0.92;
  pointer-events: none;
}

.music-pool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.music-card {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}

.music-card-icon {
  font-size: 16px;
  opacity: 0.85;
}

.music-hint {
  margin: 0 0 8px;
}

.music-card .media-name {
  font-size: 12px;
  line-height: 1.3;
}

.music-card .media-meta {
  font-size: 11px;
  color: var(--muted);
}

.timeline-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.timeline-clip {
  position: absolute;
  top: 13px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(94, 179, 255, 0.92), rgba(52, 98, 178, 0.92));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  color: white;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s var(--ease), transform 0.12s var(--ease);
}

.timeline-clip.has-thumb {
  background-color: #1a2744;
  background-size: cover;
  background-position: center;
}

.timeline-clip.has-thumb .clip-title,
.timeline-clip.has-thumb .clip-subtitle {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.timeline-clip.has-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.script-segment {
  position: absolute;
  top: 5px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d8;
  font-size: 10px;
  line-height: 24px;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: auto;
  cursor: text;
}

.script-segment.selected {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(167, 139, 250, 0.18);
}

.waveform-bar {
  position: absolute;
  top: 8px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.waveform-bar-vo {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(251, 191, 36, 0.15) 0 2px,
      rgba(251, 191, 36, 0.55) 2px 3px,
      rgba(251, 191, 36, 0.2) 3px 5px
    ),
    linear-gradient(180deg, rgba(251, 191, 36, 0.35), rgba(217, 119, 6, 0.25));
}

.waveform-bar-music {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(251, 146, 60, 0.12) 0 2px,
      rgba(251, 146, 60, 0.5) 2px 3px,
      rgba(251, 146, 60, 0.18) 3px 4px
    ),
    linear-gradient(180deg, rgba(251, 146, 60, 0.32), rgba(234, 88, 12, 0.22));
  cursor: pointer;
}

.waveform-bar.selected {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.85);
}

/* Snap indicator — yellow vertical line shown during drag near a snap point */
.snap-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fbbf24;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
  border-radius: 1px;
}

/* Snap toggle button in the toolbar */
.snap-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.snap-btn:hover { background: rgba(255,255,255,0.13); }
.snap-btn.active {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.waveform-label {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-clip:hover {
  box-shadow: 0 6px 20px rgba(77, 163, 255, 0.25);
}

.timeline-scroller.scrubbing {
  cursor: ew-resize;
}

.timeline-scroller.scrubbing .timeline-clip {
  cursor: ew-resize;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 72px;
  width: 0;
  z-index: 30;
  pointer-events: none;
  transform: translateX(0);
  will-change: transform;
}

.playhead-head {
  position: absolute;
  top: 0;
  left: -7px;
  width: 14px;
  height: 14px;
  background: var(--playhead);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(77, 163, 255, 0.45);
  cursor: ew-resize;
  pointer-events: auto;
}

.playhead-line {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--playhead);
  box-shadow: 0 0 8px rgba(77, 163, 255, 0.65);
  pointer-events: auto;
  cursor: ew-resize;
}

.timeline-clip.image {
  background: linear-gradient(135deg, rgba(242, 184, 75, 0.9), rgba(182, 105, 36, 0.9));
}

.clip-title {
  pointer-events: none;
  padding: 9px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.clip-subtitle {
  pointer-events: none;
  padding: 0 12px;
  font-size: 11px;
  opacity: 0.82;
}

.timeline-clip.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  z-index: 5;
}

.clip-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}

.timeline-clip:hover .clip-delete,
.timeline-clip.selected .clip-delete {
  opacity: 1;
}

.clip-delete:hover {
  background: rgba(220, 60, 60, 0.9);
}

.trim-handle {
  position: absolute;
  top: 0;
  width: 9px;
  height: 100%;
  background: rgba(255, 255, 255, 0.34);
  cursor: ew-resize;
}

.trim-left {
  left: 0;
}

.trim-right {
  right: 0;
}

.download-link {
  color: var(--gold);
  font-weight: 800;
}

.fetch-progress {
  margin: 12px 0 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.fetch-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fetch-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.fetch-step::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.fetch-step.active {
  color: var(--text);
  border-color: var(--gold);
}

.fetch-step.active::before {
  background: transparent;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  animation: fetchSpin 0.8s linear infinite;
}

.fetch-step.done {
  color: var(--green);
  border-color: rgba(64, 211, 155, 0.5);
}

.fetch-step.done::before {
  background: var(--green);
}

.fetch-status {
  margin-top: 10px;
  color: var(--text);
  font-size: 13px;
  min-height: 16px;
}

@keyframes fetchSpin {
  to {
    transform: rotate(360deg);
  }
}

.editing-modes-card {
  margin-bottom: 18px;
}

.editing-modes-card h2 {
  margin-bottom: 6px;
}

.editing-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mode-pill.active {
  color: #111;
  border-color: var(--gold);
  background: linear-gradient(135deg, #f8cb66, #df9633);
}

.mode-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mode-pill:disabled:hover {
  filter: none;
}

.mode-soon {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.mode-pill.active .mode-soon {
  color: rgba(0, 0, 0, 0.55);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .studio-shell.app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "left"
      "monitor"
      "timeline"
      "right";
    height: auto;
    overflow: visible;
  }

  .bin-left,
  .bin-right {
    overflow-y: visible;
    max-height: none;
  }

  .dual-monitor-row {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(160px, 1fr) minmax(160px, 1fr);
  }

  .monitor-frame {
    width: 100%;
    max-height: none;
  }

  .monitor-transport-bar {
    width: 100%;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-y: visible;
  }

  .workspace {
    height: auto;
    overflow: visible;
    grid-template-rows: auto auto auto;
  }

  .preview-panel {
    overflow-y: visible;
  }

  .media-pool,
  .media-pool-tall {
    max-height: 40vh;
  }
}

.setup-body {
  min-height: 100vh;
  display: block;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

.setup-card {
  background: rgba(18, 16, 28, 0.45);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 26px;
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(168, 85, 247, 0.06) inset;
}

.wizard-card {
  display: grid;
  gap: 18px;
}

.wizard-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px 16px;
}

.wizard-head-copy h2 {
  margin: 0 0 4px;
}

.wizard-back {
  align-self: start;
  padding: 8px 12px;
  font-size: 13px;
}

.wizard-steps {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
}

.wizard-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.wizard-step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.18);
  transform: scale(1.15);
}

.wizard-step-dot.done {
  background: rgba(168, 85, 247, 0.55);
}

.wizard-panel {
  animation: wizardFadeIn 0.28s ease;
}

@keyframes wizardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.type-grid-center {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.type-grid-center-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  justify-content: stretch;
}

.type-grid-center-pair .type-card-review {
  max-width: none;
  width: 100%;
}

.type-card-review {
  width: 100%;
  max-width: calc(50% - 7px);
  min-width: min(100%, 320px);
}

.review-dashboard {
  max-width: 720px;
  margin: 0 auto;
}

.review-intro {
  margin-bottom: 1rem;
}

.review-form textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
  resize: vertical;
}

.review-form input[type="url"],
.review-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
}

.review-progress {
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(124, 58, 237, 0.08);
}

.review-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.review-progress-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
  font-variant-numeric: tabular-nums;
}

.review-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

.review-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
  transition: width 0.35s ease;
}

.review-output {
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 6, 14, 0.55);
}

.script-run-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.review-output pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.type-grid-bottom {
  margin-top: 14px;
}

.type-card-coming-soon {
  cursor: not-allowed;
  opacity: 0.72;
}

.type-card-coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(168, 85, 247, 0.22);
}

.type-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.script-setup-form {
  display: grid;
  gap: 16px;
}

.script-field {
  display: grid;
  gap: 8px;
}

.script-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.script-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.script-row input[type="url"],
.script-setup-form input[type="url"],
.script-setup-form select,
.script-setup-form input[type="time"] {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
}

.script-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.script-check input {
  margin-top: 3px;
}

.script-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.script-run-progress {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(10, 8, 18, 0.55);
  display: grid;
  gap: 10px;
}

.script-run-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.script-run-progress-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.discord-block {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.discord-block legend.script-label {
  padding: 0 4px;
}

.discord-optional {
  opacity: 0.98;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.script-run-progress-head strong {
  font-size: 0.92rem;
}

.script-run-progress-pct {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

.script-run-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.script-run-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22c55e);
  transition: width 0.45s ease;
}

.script-run-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.script-run-progress-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}

.script-run-progress-steps li.is-active {
  color: rgba(255, 255, 255, 0.95);
}

.script-run-progress-steps li.is-done {
  color: rgba(134, 239, 172, 0.92);
}

.script-run-progress-steps li.is-error {
  color: #fca5a5;
}

.script-run-progress-steps .step-icon {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
}

.script-run-progress-steps .step-detail {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.script-ref-preview,
.script-preview-panel {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(10, 8, 18, 0.45);
}

.script-sample-list,
.script-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.script-sample-list li {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
}

.script-preview-list li {
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(12, 10, 20, 0.55);
}

.script-preview-list li.script-preview-item {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.script-preview-list li.script-preview-item:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(124, 58, 237, 0.08);
}

.script-preview-list li.is-pick {
  border-color: rgba(168, 85, 247, 0.75);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.script-preview-list li.is-selected {
  border-color: rgba(34, 197, 94, 0.75);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.script-preview-list li.is-pick.is-selected {
  border-color: rgba(34, 197, 94, 0.85);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.script-preview-list .score {
  font-size: 0.75rem;
  color: #c4b5fd;
  font-weight: 600;
}

.script-preview-list .reasons {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

.script-context strong {
  color: #e9d5ff;
}

.script-dashboard {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  min-height: 420px;
}

.script-global-advanced {
  margin-top: 0.35rem;
}

.script-global-advanced summary {
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.script-global-settings {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.5rem;
}

.script-global-settings .wide {
  width: 100%;
}

.voice-picker-field,
.feed-picker-field {
  position: relative;
}

.voice-picker,
.feed-picker {
  position: relative;
}

.feed-picker-trigger {
  width: 100%;
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.feed-picker-trigger:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.feed-picker-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  background: rgba(10, 8, 18, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 10px;
}

.feed-picker-search {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
}

.feed-picker-status {
  margin: 8px 2px 4px;
}

.feed-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}

.feed-picker-list li button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.feed-picker-list .feed-title {
  display: block;
  font-weight: 600;
}

.feed-picker-list .meta {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}

.feed-picker-list li button:hover,
.feed-picker-list li button.is-selected {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(167, 139, 250, 0.35);
}

.feed-picker-empty {
  padding: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.voice-picker-field {
  position: relative;
}

.voice-picker {
  position: relative;
}

.voice-picker-trigger {
  width: 100%;
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.voice-picker-trigger:hover {
  border-color: rgba(167, 139, 250, 0.45);
}

.voice-picker-panel {
  position: absolute;
  z-index: 120;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(12, 10, 20, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 8px;
}

.voice-picker-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(8, 6, 14, 0.85);
  color: #fff;
  font: inherit;
  margin-bottom: 6px;
}

.voice-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow: auto;
}

.voice-picker-list li button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
}

.voice-picker-list .voice-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.voice-picker-list .voice-title {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  flex: 1;
}

.voice-picker-list .voice-tag {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: rgba(196, 181, 253, 0.95);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: 1px;
}

.voice-picker-list .meta {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  line-height: 1.4;
}

.voice-picker-list li button:hover,
.voice-picker-list li button.is-selected {
  background: rgba(124, 58, 237, 0.22);
}

.voice-picker-empty {
  padding: 10px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.script-setup-form textarea,
.script-wizard-body textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
  resize: vertical;
}

.script-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 1rem;
  min-height: 520px;
}

.script-new-btn {
  width: 100%;
  border: 1px dashed rgba(167, 139, 250, 0.55);
  background: rgba(124, 58, 237, 0.08);
  color: #c4b5fd;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.script-new-btn:hover {
  background: rgba(124, 58, 237, 0.16);
}

.script-project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.script-project-list li button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
}

.script-project-list li button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.script-project-list li button.is-active {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(124, 58, 237, 0.14);
}

.script-project-list .meta {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}

.script-project-list .badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  margin-left: 0.35rem;
}

.script-main {
  min-width: 0;
}

.script-wizard-panel {
  display: grid;
  gap: 1rem;
}

.script-wizard-panel .script-wizard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.script-wizard-panel .script-wizard-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.script-wizard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.script-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 360px;
  padding: 1rem 0.25rem;
}

.script-empty[hidden],
.script-project-panel[hidden],
.script-wizard-panel[hidden] {
  display: none !important;
}

.script-empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.script-project-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.script-field-inline {
  flex: 1;
}

.script-field-inline input[type="text"] {
  width: 100%;
  border: 1px solid var(--glass-border);
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.danger-text {
  color: #fca5a5;
}

.script-days-field {
  border: none;
  margin: 0;
  padding: 0;
}

.script-days-field legend {
  padding: 0;
  margin-bottom: 0.35rem;
}

.script-days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.script-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.script-day-chip input {
  accent-color: #a78bfa;
}

.script-wizard-card {
  width: min(560px, 100%);
}

.script-wizard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.script-wizard-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.script-wizard-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 4px;
}

.script-wizard-body input[type="text"],
.script-wizard-body input[type="url"],
.script-wizard-body input[type="time"],
.script-wizard-body select {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(8, 6, 14, 0.65);
  color: #fff;
  font: inherit;
}

@media (max-width: 720px) {
  .script-dashboard {
    grid-template-columns: 1fr;
  }

  .script-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .type-grid {
    grid-template-columns: 1fr;
  }
}

.type-card,
.picker-card {
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 18px 16px;
  background: rgba(12, 10, 20, 0.55);
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-picker-card {
  display: grid;
}

.type-card:hover,
.picker-card:hover {
  border-color: rgba(168, 85, 247, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.type-card:focus-visible,
.picker-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.type-icon,
.niche-icon {
  font-size: 28px;
  line-height: 1;
}

.picker-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

@media (max-width: 820px) {
  .picker-layout {
    grid-template-columns: 1fr;
  }
}

.picker-grid {
  display: grid;
  gap: 10px;
}

.theme-picker-grid {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.niche-picker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .niche-picker-grid {
    grid-template-columns: 1fr;
  }
}

.picker-swatch {
  display: block;
  height: 44px;
  border-radius: 10px;
  border: 2px solid transparent;
}

.picker-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
}

.picker-card.soon {
  opacity: 0.72;
}

.picker-card.soon:hover {
  transform: none;
  box-shadow: none;
}

.picker-badge {
  display: inline-flex;
  align-self: start;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.14);
  color: #ddd6fe;
}

.picker-preview {
  position: sticky;
  top: 12px;
  align-self: start;
}

.picker-preview-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.picker-preview-card {
  min-height: 180px;
  border: 1px dashed rgba(168, 85, 247, 0.35);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.picker-preview-accent {
  display: block;
  height: 4px;
  width: 56px;
  border-radius: 999px;
}

.niche-context,
.upload-context,
.coming-soon-hint {
  margin: 0 0 12px;
}

.setup-toast {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 13px;
  animation: wizardFadeIn 0.2s ease;
}

body.modal-open {
  overflow: hidden;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-root[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 14, 0.72);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.setup-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 24px;
  animation: wizardFadeIn 0.24s ease;
}

.recent-modal-card .project-list {
  max-height: 52vh;
  overflow: auto;
}

.modal-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-row.single {
  grid-template-columns: 1fr;
}

.modal-actions-row .ghost,
.modal-actions-row .primary {
  width: 100%;
  padding: 12px 16px;
}

.setup-footer {
  margin-top: 14px;
}

button.purple-outline {
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.12);
  color: #e9d5ff;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button.purple-outline:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.85);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.18);
}

.type-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(168, 85, 247, 0.22);
  background: linear-gradient(145deg, rgba(18, 14, 30, 0.92), rgba(10, 8, 18, 0.88));
}

.type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.16), transparent 55%);
  pointer-events: none;
}

.type-card .type-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.theme-picker-card {
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-color: rgba(168, 85, 247, 0.16);
  background: linear-gradient(135deg, rgba(14, 12, 22, 0.95), rgba(8, 6, 14, 0.92));
}

.theme-picker-card:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 55%, #a855f7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px color-mix(in srgb, var(--theme-accent) 35%, transparent);
}

.theme-picker-card.selected {
  border-color: color-mix(in srgb, var(--theme-accent) 70%, #a855f7);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-accent) 45%, #a855f7), 0 14px 36px rgba(168, 85, 247, 0.14);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(14, 12, 22, 0.95));
}

.theme-card-visual {
  position: relative;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--theme-bg), rgba(0, 0, 0, 0.45));
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, transparent);
  display: grid;
  place-items: center;
}

.theme-card-icon {
  font-size: 28px;
  z-index: 1;
}

.theme-card-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, color-mix(in srgb, var(--theme-accent) 55%, transparent), transparent);
}

.theme-card-copy {
  display: grid;
  gap: 4px;
}

.niche-picker-card.ready {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.08), rgba(12, 10, 20, 0.92));
}

.niche-picker-card.ready:hover {
  border-color: rgba(168, 85, 247, 0.65);
}

.niche-picker-card .niche-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.picker-badge.ready-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(124, 58, 237, 0.35));
  color: #f5f3ff;
}

.picker-badge.soon-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.drop-zone {
  display: grid;
  gap: 4px;
  padding: 22px 18px;
  margin-bottom: 12px;
  border: 1px dashed var(--glass-border);
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glass-highlight);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.1);
}

.drop-zone input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.setup-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

.setup-form input[type="text"],
.setup-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e121a;
  color: var(--text);
  padding: 10px 12px;
}

button.wide {
  width: 100%;
  margin-top: 8px;
}

.mode-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 8px;
  margin: 0 0 16px;
}

.mode-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.error-text {
  color: var(--danger);
}

.tiny {
  font-size: 12px;
}

.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.small-link {
  font-size: 12px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.small-link:hover {
  color: var(--text);
}

.tiny-btn {
  padding: 4px 8px;
  font-size: 11px;
}

.tools-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border-soft);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: var(--glass-highlight);
  width: 100%;
  max-width: 100%;
}

.tools-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  width: 36px;
}

.tool-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #c8c2d8;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tool-btn svg {
  width: 16px;
  height: 16px;
}

.tool-letter {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.tool-btn:hover {
  border-color: rgba(168, 140, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tool-btn.is-active {
  border-color: rgba(90, 150, 255, 0.55);
  background: rgba(60, 110, 220, 0.32);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(90, 150, 255, 0.18);
}

.tools-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tools-extra-btn {
  padding: 4px 8px;
  font-size: 11px;
}

.tools-extra-btn.active {
  border-color: rgba(255, 160, 80, 0.55);
  color: #ffb86c;
}

.tools-zoom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 100%;
  font-size: 10px;
  color: var(--muted);
}

.tools-zoom input {
  width: 100%;
  accent-color: #a78bfa;
}

.tools-hint {
  margin: 8px 0 0;
}

.timeline-scroller.tool-razor,
.timeline-scroller.tool-razor .timeline-clip,
.timeline-scroller.tool-razor .track,
.timeline-scroller.tool-razor .trim-handle {
  cursor: url("/cursors/razor.svg") 8 20, url("/cursors/razor.svg") 8 20, crosshair;
}

.timeline-scroller.tool-type {
  cursor: text;
}

.timeline-scroller.tool-type .track.gfx-track {
  outline: 1px dashed rgba(168, 140, 255, 0.25);
  outline-offset: -2px;
}

.activity-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border-soft);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  min-height: 140px;
  box-shadow: var(--glass-highlight);
}

.badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
}

.activity-feed {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 8px;
  align-items: center;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #0c1018;
  border: 1px solid rgba(42, 51, 68, 0.8);
}

.activity-kind {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.activity-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-kw {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}

.premiere-topbar {
  background: linear-gradient(180deg, rgba(26, 21, 40, 0.95), rgba(15, 10, 26, 0.9));
  border-bottom: 1px solid var(--line);
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 8px 4px 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.mode-chip input {
  accent-color: var(--gold);
}

.configure-body {
  min-height: 100vh;
}

.configure-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.configure-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.wizard-steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  flex-wrap: wrap;
}

.wizard-steps li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.wizard-steps li.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.15);
}

.wizard-steps li.done {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.35);
}

.configure-panel {
  margin-top: 22px;
  padding: 22px;
}

.panel-head h2 {
  margin: 0 0 6px;
}

.panel-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}

.review-banner {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.review-banner.ok {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.review-banner.warn {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(239, 68, 68, 0.08));
}

.warning-list {
  display: grid;
  gap: 12px;
}

.warning-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.warning-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.warning-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.fix-tip {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--gold);
}

.warning-quote {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 13px;
}

.theme-layout,
.blocklist-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 16px;
}

@media (max-width: 820px) {
  .theme-layout,
  .blocklist-layout {
    grid-template-columns: 1fr;
  }
}

.theme-grid,
.template-grid,
.transition-grid {
  display: grid;
  gap: 10px;
}

.theme-grid {
  grid-template-columns: 1fr;
}

.template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.theme-card,
.template-card,
.transition-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
  display: grid;
  gap: 6px;
}

.theme-card.selected,
.transition-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.template-card.blocked {
  opacity: 0.55;
  border-color: rgba(251, 113, 133, 0.45);
}

.theme-swatch {
  display: block;
  height: 42px;
  border-radius: 8px;
  border: 2px solid transparent;
}

.theme-preview-box h3,
.selected-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.theme-preview-canvas {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.preview-accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.template-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.toggle-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.toggle-row input {
  width: auto;
  accent-color: var(--accent);
}

.selected-panel,
.blocked-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.blocked-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.blocked-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blocked-list li:last-child {
  border-bottom: 0;
}

/* ─── Premiere Pro workspace ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.premiere-appbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  height: 44px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--premiere-border);
  background: var(--premiere-panel);
  z-index: 60;
}

.appbar-left,
.appbar-center,
.appbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.appbar-center {
  justify-content: center;
}

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

.appbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.appbar-brand-text {
  letter-spacing: -0.02em;
}

.appbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.appbar-seq {
  font-size: 13px;
  font-weight: 600;
  color: #d8d4e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar-select {
  min-width: 140px;
  max-width: 200px;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #14121c;
  color: var(--text);
}

.appbar-meta {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.appbar-btn {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
}

.appbar-btn-accent {
  font-weight: 600;
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.appbar-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.premiere-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  grid-template-rows: minmax(0, 1fr) minmax(240px, 42vh);
  grid-template-areas:
    "project program effects"
    "timeline timeline timeline";
  gap: 1px;
  background: var(--premiere-border);
}

.premiere-panel {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--premiere-panel);
  display: flex;
  flex-direction: column;
}

.premiere-project {
  grid-area: project;
}

.premiere-program {
  grid-area: program;
}

.premiere-effects {
  grid-area: effects;
}

.premiere-timeline-wrap {
  grid-area: timeline;
}

.panel-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.panel-chrome-min {
  padding: 5px 10px;
}

.panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9d98ae;
}

.panel-timecode {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.panel-actions {
  display: flex;
  gap: 4px;
}

.panel-icon-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #c8c4d8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-premiere), border-color var(--dur-fast) var(--ease-premiere);
}

.panel-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.panel-icon-danger:hover {
  border-color: rgba(255, 95, 112, 0.4);
  color: #ff9aa5;
}

.premiere-bin {
  flex: 1;
  min-height: 0;
  margin: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.premiere-bin .media-card {
  transition: transform var(--dur-fast) var(--ease-out-premiere),
    border-color var(--dur-fast) var(--ease-premiere),
    box-shadow var(--dur-fast) var(--ease-premiere);
  content-visibility: auto;
  contain-intrinsic-size: 58px;
}

.premiere-bin .media-card:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 160, 255, 0.35);
}

.program-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px 10px;
  gap: 8px;
  background: var(--premiere-bg);
}

.program-body .monitor-frame {
  max-height: 100%;
  background: #000;
  border: 1px solid var(--premiere-border);
}

.program-body .empty-preview {
  background: #0a0a0e;
  color: var(--muted);
}

.program-body .preview-stage {
  background: #000;
}

.program-body .monitor-viewport-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--premiere-bg);
}

.program-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.program-transport .transport-btn-play {
  min-width: 44px;
}

.program-transport .transport-label {
  display: none;
}

.program-status {
  margin: 0;
  font-size: 11px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  min-height: 16px;
}

.fetch-progress-compact {
  width: 100%;
  max-width: 520px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fetch-progress-compact .fetch-steps {
  gap: 4px;
}

.fetch-progress-compact .fetch-step {
  font-size: 9px;
  padding: 3px 6px;
}

.fetch-progress-compact .fetch-status {
  font-size: 10px;
  margin-top: 4px;
}

.premiere-inspector {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 14px;
}

.premiere-effects.has-selection {
  box-shadow: inset 0 0 0 1px rgba(120, 160, 255, 0.2);
}

.premiere-scroller {
  flex: 1;
  min-height: 0;
  scroll-behavior: auto;
}

.premiere-scroller:not(.scrubbing) {
  scroll-behavior: smooth;
}

.premiere-timeline-wrap .timeline-toolbar {
  padding: 4px 8px;
  flex-shrink: 0;
}

/* Smooth clip interactions (Premiere-style ease) */
.timeline-clip {
  transition: box-shadow var(--dur-fast) var(--ease-premiere),
    outline var(--dur-fast) var(--ease-premiere),
    filter var(--dur-fast) var(--ease-premiere);
  will-change: left, width;
}

.timeline-scroller.dragging .timeline-clip {
  transition: none !important;
}

.timeline-scroller:not(.scrubbing) .timeline-clip {
  transition: box-shadow var(--dur-fast) var(--ease-premiere),
    outline var(--dur-fast) var(--ease-premiere),
    filter var(--dur-fast) var(--ease-premiere);
}

.timeline-scroller.scrubbing .timeline-clip {
  transition: none;
}

.playhead {
  transition: transform 0.04s linear;
}

.playhead-head {
  transition: transform var(--dur-fast) var(--ease-out-premiere);
}

.playhead-head:hover {
  transform: scale(1.08);
}

.inspector-field input[type="range"] {
  accent-color: #6ea8ff;
}

@media (max-width: 1100px) {
  .premiere-workspace {
    grid-template-columns: 200px minmax(0, 1fr) 220px;
  }
}

@media (max-width: 900px) {
  .premiere-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(220px, 45vh);
    grid-template-areas:
      "program"
      "project"
      "effects"
      "timeline";
  }

  .premiere-appbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px 10px;
    gap: 8px;
  }

  .appbar-center {
    justify-content: flex-start;
  }
}

/* ─── Pro chrome ───────────────────────────────────────────────────────────
   An NLE reads as professional when the shell recedes and the brand colour
   is spent only on state: playhead, selection, primary action. Everything
   below moves the panels to neutral graphite so footage is the brightest
   thing on screen, and trades wide glass blur for crisp 1px separators.
   ------------------------------------------------------------------------ */
:root {
  --bg: #08080b;
  --bg-2: #0b0b10;
  --panel: #101017;
  --panel-2: #16161f;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #8a8798;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-soft: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  --glass-highlight: none;
  /* Track identity colours, muted enough to sit under white type. */
  --clip-video: #6d5bd0;
  --clip-gfx: #a855f7;
  --clip-audio: #d0a24a;
  --clip-fx: #4a9dd0;
}

.studio-body {
  background: var(--bg);
}

/* Panels: flat graphite, hairline separators, no blur haze. */
.bin-panel,
.timeline-scroller {
  background: var(--panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-color: var(--line);
}

.timeline-scroller {
  border-radius: 6px;
}

.vg-nav-studio {
  background: #0c0c12;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.bin-header {
  padding: 0 12px;
  height: 34px;
  background: #14141c;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

.bin-header h2 {
  font-size: 10px;
  letter-spacing: 0.11em;
  color: #7d7a8c;
}

.studio-shell.app-shell {
  gap: 6px;
  padding: 6px;
  background: var(--bg);
}

.bin-panel {
  border-radius: 6px;
  border-width: 1px;
}

.vg-brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.vg-brand {
  font-size: 15px;
}

/* Monitors: black surround so the picture is the only lit surface. */
.monitor-pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.monitor-pane-label {
  padding: 0 10px;
  height: 26px;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7d7a8c;
  background: #14141c;
  border-bottom: 1px solid var(--line);
}

.monitor-frame {
  background: #000;
  border-radius: 0;
  border: none;
}

.monitor-transport-bar {
  background: #14141c;
  border-top: 1px solid var(--line);
}

.timecode {
  font-family: "SF Mono", ui-monospace, "Roboto Mono", Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #b9b5c8;
}

/* Timeline: Premiere-style header column with per-track identity. */
.track-row {
  grid-template-columns: 84px minmax(0, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ruler {
  margin-left: 84px;
  height: 28px;
  background-color: #0d0d13;
  border-bottom: 1px solid var(--line);
}

.ruler-mark {
  top: 6px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #6f6c7e;
}

.track-label {
  position: relative;
  padding-left: 12px;
  font-size: 10px;
  letter-spacing: 0.09em;
  color: #8a8798;
  background: #14141c;
  border-right: 1px solid var(--line);
}

/* Colour chip marks what each track carries, as in a real NLE header. */
.track-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--clip-video);
}

.track-row-script .track-label::before {
  background: #4b4859;
}

.track-row-gfx .track-label::before {
  background: var(--clip-gfx);
}

.video-track,
.gfx-track,
.audio-track,
.music-track,
.sfx-track,
.transition-track,
.script-track {
  background: #0b0b11;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

/* Clips sit inside the track with a little air, so the lane reads as a
   container rather than something the clip spills out of. */
.video-track {
  height: 66px;
}

.timeline-clip {
  top: 5px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-left: 3px solid var(--clip-video);
  border-radius: 4px;
  background: linear-gradient(180deg, #2b2740, #211e33);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.timeline-clip.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 10px rgba(168, 85, 247, 0.3);
}

.timeline-clip.has-thumb {
  background-color: #16141f;
}

.timeline-clip.has-thumb::after {
  background: linear-gradient(180deg, rgba(8, 6, 14, 0.25), rgba(8, 6, 14, 0.8));
}

.clip-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.clip-subtitle {
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.timeline-clip.overlay-clip {
  border-left-color: var(--clip-gfx);
  background: linear-gradient(180deg, #35244a, #281a3a);
}

.timeline-clip.transition-clip {
  border-left-color: var(--clip-fx);
  background: linear-gradient(180deg, #23384a, #1b2b3a);
}

.audio-clip,
.music-clip {
  border-left-color: var(--clip-audio);
}

/* Playhead stays the loudest purple on screen — it is the one thing the eye
   must find instantly. */
.playhead-line {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.55);
}

.playhead-head {
  background: var(--accent);
  border-radius: 2px;
}

/* Media pool: tighter rows, thumbnail-forward. */
.media-pool-tall {
  padding: 6px;
}

.thumb {
  width: 62px;
  height: 35px;
  border-radius: 4px;
  background: #000;
}

.media-name {
  font-size: 12px;
  font-weight: 600;
}

.media-meta {
  font-size: 10.5px;
}

/* ─── Progress panel ──────────────────────────────────────────────────────
   A vertical stepper in the left rail: each stage is a dot on a spine, the
   current one is lit, finished ones are ticked. Reading top-to-bottom suits a
   sequence of stages far better than a row of pills did.
   ------------------------------------------------------------------------ */
.progress-card {
  padding: 2px 0;
}

/* :not([hidden]) so this display value cannot outrank the hidden attribute. */
.fetch-progress:not([hidden]) {
  display: block;
}

.fetch-progress {
  background: none;
  border: none;
  padding: 0;
}

.progress-head h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.progress-percent {
  margin: 0 0 14px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.fetch-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: none;
  background: none;
}

.fetch-step {
  position: relative;
  display: block;
  padding: 0 0 16px 24px;
  border: none;
  background: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #56536a;
  transition: color var(--dur-med) var(--ease-premiere);
}

.fetch-step:last-child {
  padding-bottom: 0;
}

/* The spine, drawn between one dot and the next. */
.fetch-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 2px;
  width: 1.5px;
  background: #2a2836;
}

.fetch-step::after {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid #33313f;
  background: var(--panel);
  box-sizing: border-box;
}

.fetch-step.done {
  color: #6f6c80;
}

.fetch-step.done::after {
  border-color: var(--accent);
  background: var(--accent);
  /* Tick drawn with a clip-path so no icon font is needed. */
  background-image: linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%);
}

.fetch-step.done:not(:last-child)::before {
  background: var(--accent-2);
}

.fetch-step.active {
  color: var(--text);
  font-weight: 700;
}

.fetch-step.active::after {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.18);
}

.fetch-status {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.45;
  color: #a9a5b8;
}

.progress-note {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: #5f5c70;
}

/* ─── Monitors fill their frame ────────────────────────────────────────────
   Fit the picture (VidRush-style) so faces are not cropped. A blurred copy
   of the same clip fills any leftover edges.
   ------------------------------------------------------------------------ */
.program-blur-bg {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(28px) brightness(0.62) saturate(0.8);
  transform: scale(1.12);
  z-index: 0;
  pointer-events: none;
  display: none;
}

.monitor-frame #previewVideo,
.monitor-frame #previewVideoB,
.monitor-frame #previewImage,
.monitor-frame #sourceVideo,
.monitor-frame #sourceImage {
  object-fit: contain;
  width: 100%;
  height: 100%;
  background: transparent;
}

.monitor-frame #previewVideo,
.monitor-frame #previewVideoB {
  z-index: 2;
}

.monitor-frame .preview-stage.explained-canvas #previewImage {
  width: auto;
  height: auto;
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
}

.monitor-frame .preview-stage.explained-canvas #previewVideo,
.monitor-frame .preview-stage.explained-canvas #previewVideoB {
  width: 75%;
  height: 75%;
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
}

/* ─── Monitors sized from the picture ─────────────────────────────────────
   The panes used to stretch to whatever height was left over, so a 16:9 frame
   sat inside a taller box and the surround showed as black bands above and
   below the image. Now each pane is itself a true 16:9 box: the image meets all
   four edges, nothing is letterboxed and nothing is cropped, and the timeline
   takes the height that is left.
   ------------------------------------------------------------------------ */
.studio-shell.app-shell {
  grid-template-rows: auto minmax(190px, 1fr);
}

.monitor-stack {
  flex: 0 0 auto;
}

.dual-monitor-row {
  flex: 0 0 auto;
  align-items: start;
  width: 100%;
  /* On a short window, narrow the row rather than letterbox the picture: this
     is the widest two 16:9 panes plus their chrome can be and still fit. */
  max-width: calc((58vh - 70px) * 32 / 9);
  margin: 0 auto;
}

.monitor-viewport-wrap {
  /* No grow, so the box never stretches past 16:9; shrink allowed, so on a
     cramped window it gives height back instead of pushing the transport bar
     out of the pane. */
  flex: 0 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  background: #000;
}

.monitor-frame.ratio-16x9 {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  max-height: none;
}

/* The scroller is now the only child here; the old two-row split left an empty
   band under the tracks. */
.studio-timeline-area.timeline-panel.premiere-timeline {
  grid-template-rows: minmax(0, 1fr);
}

.render-status {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #a9a5b8;
}

.render-status:empty {
  display: none;
}

/* Tool palette: a compact row, the way an NLE presents its tools, instead of
   a tall stack that leaves the card mostly empty. */
.tools-card {
  background: #14141c;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  padding: 8px;
}

.tools-card .tools-rail {
  display: flex;
  flex-direction: row;
  align-items: center;
  /* The stock rail is 36px wide, which forces a horizontal row to wrap. */
  width: auto;
  gap: 4px;
  margin-top: 4px;
}

.tools-card .tool-btn {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #1b1b25;
}

.tools-card .tool-btn svg {
  width: 15px;
  height: 15px;
}

.tools-card .tool-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tools-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tools-extra-btn {
  padding: 4px 8px;
  font-size: 10.5px;
}

.tools-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tools-zoom input {
  flex: 1;
  min-width: 0;
}

.bin-section h3 {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #7d7a8c;
}

/* ─── Timeline fits vertically ─────────────────────────────────────────────
   Scrubbing is a horizontal act, so time scrolls sideways while every track
   stays in view. The lane scale below keeps a full stack (ruler, script, four
   video tracks, GFX, FX and two audio tracks) inside the panel, which is what
   removes the vertical scrollbar rather than merely hiding it.
   ------------------------------------------------------------------------ */
/* The monitors keep their original share; with only the lanes that are in use
   drawn, the timeline no longer needs to borrow height from them. */
.studio-shell.app-shell {
  grid-template-rows: minmax(0, 1fr) minmax(230px, 34vh);
}

/* Matches the specificity of the stock .studio-timeline-area rule, which
   otherwise keeps overflow-y on auto. */
.studio-timeline-area .timeline-scroller {
  overflow-x: auto;
  overflow-y: hidden;
}

.ruler {
  height: 24px;
  margin-left: 84px;
}

.ruler-mark {
  top: 5px;
}

.script-track {
  height: 26px;
}

.video-track {
  height: 62px;
}

.timeline-clip {
  top: 4px;
  height: 54px;
}

.timeline-clip .clip-title {
  font-size: 11px;
  line-height: 1.25;
}

.gfx-track {
  height: 26px;
}

.timeline-clip.overlay-clip {
  top: 3px;
  height: 20px;
}

.timeline-clip.overlay-clip .clip-title {
  font-size: 9.5px;
}

.transition-track {
  height: 22px;
}

.timeline-clip.transition-clip {
  top: 3px;
  height: 16px;
}

.audio-track,
.music-track {
  height: 40px;
}

/* .track-row sets display:grid, which outranks the browser's [hidden] rule and
   left hidden lanes still occupying their height. */
.track-row[hidden] {
  display: none;
}

/* If a project really does fill every lane, scrolling beats clipping the
   voiceover out of view. */
.studio-timeline-area .timeline-scroller {
  overflow-y: auto;
}
