/* ─────────────────────────────────────────────────────────────
   Kutly App — Workflow / Product UI
   Dark-theme app shell + form controls. Requires
   colors_and_type.css with [data-theme="dark"] applied to <html>.
   ───────────────────────────────────────────────────────────── */

/* ── SHELL ─────────────────────────────────────────────────── */
body { margin: 0; }
.app-root {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100vh; height: 100dvh;
  overflow: hidden;   /* app shell: the page never scrolls — only inner regions do */
  background: var(--bg);
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.app-sidebar {
  height: 100vh; height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;   /* the sidebar owns its own scroll — wheel here never scrolls the content */
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
}
.sb-logo {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 28px;
  text-decoration: none;
  color: var(--fg-1);
  align-self: flex-start;
}
.sb-wordmark { height: 28px; width: auto; display: block; }

.sb-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 18px 8px 10px;
}

.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  position: relative;
  cursor: pointer;
}
.sb-item:hover {
  background: var(--bg-muted);
  color: var(--fg-1);
}
.sb-item.is-active {
  background: var(--bg-card);
  color: var(--fg-1);
}
.sb-item.is-active::before {
  content: ''; position: absolute;
  left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.sb-item.is-disabled {
  color: var(--fg-3);
  cursor: default;
}
.sb-item.is-disabled:hover { background: transparent; color: var(--fg-3); }
.sb-item .sb-icon { flex: 0 0 18px; opacity: 0.85; }
/* Active nav row paints its icon with the brand accent. Driven purely off the
   NavLink's `is-active` state via the design-system `.ico` hook — no caller
   passes a cosmetic class. Mirrors the account-menu treatment below. */
.sb-item.is-active .sb-icon { opacity: 1; }
.sb-item.is-active .ico { color: var(--accent); }
.sb-item .sb-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

.sb-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.sb-credit {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.sb-credit .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.sb-credit .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  line-height: 1;
}
.sb-credit .sub {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-2);
}

.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--fg-1);
  text-decoration: none;
  transition: background 0.15s;
}
.sb-user:hover { background: var(--bg-muted); }
.sb-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.sb-user .name { font-size: 13.5px; font-weight: 500; line-height: 1.2; }
.sb-user .plan { font-size: 11px; color: var(--fg-3); font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
/* Layout rhythm owned by the sidebar, not by inline call-site styles */
.sb-credit .btn-app { margin-top: 6px; }
.sb-user-text { min-width: 0; }

/* ── MAIN ──────────────────────────────────────────────────── */
.app-main {
  min-width: 0;
  min-height: 0;   /* allow the inner scroll area to shrink + scroll within 100vh */
  display: flex; flex-direction: column;
}

.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.app-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  line-height: 1;
}
.app-title .sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}

.app-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;   /* the only content scroll container */
}

.app-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 36px 96px;
}
@media (max-width: 1100px) { .app-content { grid-template-columns: 1fr; } }

.app-content-full {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 36px 96px;
}

/* ── SECTION (settings group) ──────────────────────────────── */
.field {
  margin-bottom: 28px;
}
.field-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.field-label {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: normal;
  font-weight: 600;
  color: var(--fg-1);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.field-hint {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: normal;
}

/* ── MODE SWITCH (Idea / Voiceover / Reference) ────────────────
   Segmented switcher with a sliding accent "glider" that springs
   between the three inputs. Each segment's icon chip also fills
   with accent when active. */
.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 12px;
}

/* The sliding highlight. Width = one segment; slides between the
   three slots by animating `left`. One step = segment width + gap. */
.mode-glider {
  position: absolute;
  top: 6px; bottom: 6px;
  left: 6px;
  width: calc((100% - 28px) / 3);
  border-radius: 10px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--accent) 20%, transparent),
      color-mix(in srgb, var(--accent) 9%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent),
    0 10px 26px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: transform 0.44s cubic-bezier(0.34, 1.32, 0.5, 1);
  z-index: 0;
  pointer-events: none;
}
.mode-switch[data-mode="idea"]      .mode-glider { transform: translateX(0); }
.mode-switch[data-mode="voiceover"] .mode-glider { transform: translateX(calc(100% + 8px)); }
.mode-switch[data-mode="reference"] .mode-glider { transform: translateX(calc(200% + 16px)); }

.mode-seg {
  position: relative;
  z-index: 1;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--fg-2);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: color 0.22s ease;
}
.mode-seg.is-active { color: var(--fg-1); }
.mode-seg:not(.is-active):hover { color: var(--fg-1); }

.ms-chip {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--fg-3);
  transition: background 0.28s ease, color 0.28s ease,
              border-color 0.28s ease, box-shadow 0.28s ease;
}
.mode-seg:not(.is-active):hover .ms-chip { color: var(--fg-1); }
.mode-seg.is-active .ms-chip {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

.ms-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ms-title { font-size: 13.5px; font-weight: 500; line-height: 1.1; }
.ms-sub {
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  line-height: 1;
  transition: color 0.22s ease;
}
.mode-seg.is-active .ms-sub { color: color-mix(in srgb, var(--accent) 75%, var(--fg-1)); }

/* ── INPUT SURFACES (textarea, dropzone, link input) ───────── */
.input-surface {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.input-surface:focus-within { border-color: var(--accent); }
.input-surface .textarea {
  width: 100%;
  min-height: 120px;
  background: transparent;
  border: 0;
  outline: 0;
  resize: vertical;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
}
.input-surface .textarea::placeholder { color: var(--fg-3); }
.input-surface .input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
}
.input-surface .input::placeholder { color: var(--fg-3); }
.input-surface .input-icon { color: var(--fg-3); flex-shrink: 0; }
.input-surface .input-row { display: flex; align-items: center; gap: 12px; }
/* Visually-hidden native file input (kept functional, triggered via button) */
.hidden-input { display: none; }

.input-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}

/* Dropzone for voiceover upload */
.dropzone {
  background: var(--bg-card);
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--bg-muted); }
.dropzone .dz-icon {
  width: 40px; height: 40px;
  margin: 0 auto 14px;
  border-radius: 10px;
  background: var(--bg-muted);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2);
}
.dropzone .dz-title { font-size: 15px; font-weight: 500; color: var(--fg-1); margin-bottom: 4px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--fg-3); font-family: var(--font-mono); letter-spacing: 0.04em; }
.dropzone .dz-pick { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dropzone.is-dragging { border-color: var(--accent); background: rgba(217,72,46,0.06); }

/* Compact dropzone used inline below option grids (e.g. Music · Upload) */
.dropzone-sm {
  margin-top: 12px;
  padding: 22px 20px;
  border-radius: 10px;
}
.dropzone-sm .dz-icon { width: 32px; height: 32px; margin-bottom: 10px; }
.dropzone-sm .dz-title { font-size: 13.5px; }
.dropzone-sm .dz-sub { font-size: 11.5px; }

/* Uploaded music file row */
.music-file {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.music-file .mf-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-2);
  flex-shrink: 0;
}
.music-file .mf-info { flex: 1; min-width: 0; }
.music-file .mf-name {
  font-size: 13.5px; font-weight: 500; color: var(--fg-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-file .mf-meta {
  font-size: 11px; color: var(--fg-3); margin-top: 3px;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}
.music-file .mf-remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-3);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.music-file .mf-remove:hover { color: var(--accent); border-color: var(--accent); }

/* ── OPTION CARDS (for Format, Length, Music, Style packs) ─── */
.option-grid {
  display: grid;
  gap: 10px;
}
.option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.option-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.option-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.opt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--fg-1);
  transition: border-color 0.15s, background 0.15s;
}
.opt-card:hover:not(.is-disabled) {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}
.opt-card.is-selected {
  background: var(--bg-muted);
  border-color: var(--accent);
}
.opt-card.is-selected::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  pointer-events: none;
}
.opt-card.is-disabled { opacity: 0.55; cursor: default; }

.opt-card .opt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.opt-card .opt-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}
.opt-card .opt-sub {
  font-size: 12.5px;
  color: var(--fg-3);
  line-height: 1.4;
}
.opt-card .opt-price {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  padding: 3px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
}
.opt-card.is-selected .opt-price {
  background: rgba(217,72,46,0.10);
  color: var(--accent-hover);
  border-color: rgba(217,72,46,0.30);
}
.opt-soon {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.opt-x2 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  padding: 2px 6px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.opt-card.is-selected .opt-x2 {
  background: rgba(217,72,46,0.10);
  color: var(--accent-hover);
  border-color: rgba(217,72,46,0.30);
}

/* Picker trigger (Voice, Style Pack) */
.picker-trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-sans);
  color: var(--fg-1);
  transition: border-color 0.15s, background 0.15s;
}
.picker-trigger:hover { border-color: var(--border-strong); background: var(--bg-muted); }
.picker-trigger .pt-left {
  display: flex; align-items: center; gap: 14px;
}
.picker-trigger .pt-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--bg-muted);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2);
  flex-shrink: 0;
}
.picker-trigger .pt-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.picker-trigger .pt-meta { font-size: 12px; color: var(--fg-3); margin-top: 4px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.picker-trigger .pt-chev { color: var(--fg-3); flex-shrink: 0; display: inline-flex; }
/* The New-Video "Music" field stacks a 3-card grid then a conditional sub-control; the
   field gives no inter-child gap, so the "Choose a pack" trigger would sit flush against
   the cards. Match the breathing room the upload dropzone already has. */
.option-grid + .picker-trigger { margin-top: 12px; }

/* ── TOGGLE (iOS-ish, dark-theme) ──────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
/* Visually hidden but still focusable + clickable (was display:none → invisible to
   keyboard and AT). Overlays the whole control; the opaque track/knob paint over it. */
.toggle input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0;
  cursor: pointer;
}
.toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.toggle-knob {
  position: absolute;
  top: 50%; left: 3px;
  width: 16px; height: 16px;
  margin-top: -8px;
  background: var(--fg-2);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.2s, background 0.2s;
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle input:checked + .toggle-track + .toggle-knob {
  transform: translateX(16px);
  background: #fff;
}

/* Extra row (Generate Title, Generate Thumbnail) */
.extra-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.extra-row.is-on {
  background: var(--bg-muted);
  border-color: rgba(217,72,46,0.30);
}
.extra-row.is-clickable { cursor: pointer; user-select: none; }
.extra-row.is-clickable:hover { border-color: var(--border-strong); }
.extra-row.is-clickable.is-on:hover { border-color: rgba(217,72,46,0.45); }
.extra-row.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.extra-row .ex-toggle-wrap { display: inline-flex; align-items: center; flex-shrink: 0; }
.extra-row .ex-info { flex: 1; min-width: 0; }
.extra-row .ex-title { font-size: 14px; font-weight: 500; color: var(--fg-1); line-height: 1.2; }
.ex-title-suffix { color: var(--fg-2); font-weight: 400; }
.extra-row .ex-desc { font-size: 12.5px; color: var(--fg-3); margin-top: 4px; line-height: 1.4; }
.extra-row .ex-cost {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
}
.extra-row.is-on .ex-cost {
  background: rgba(217,72,46,0.10);
  color: var(--accent-hover);
  border-color: rgba(217,72,46,0.30);
}
.extra-row .ex-action,
.music-file .ex-action {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
.extra-row .ex-action:hover,
.music-file .ex-action:hover { color: var(--fg-1); border-color: var(--accent); }

/* ── COLLAPSIBLE (Advanced) ────────────────────────────────── */
.advanced {
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.advanced-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
  /* now a <button>: reset native chrome + fill the row */
  width: 100%; border: 0; background: transparent;
  font: inherit; color: inherit; text-align: left;
  -webkit-appearance: none; appearance: none;
}
.advanced-head:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.advanced-head .adv-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.advanced-head .adv-icon { color: var(--fg-3); flex-shrink: 0; }
.advanced-head .adv-label { line-height: 1; }
.advanced-head .adv-caption {
  margin-left: auto;
  margin-right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  font-weight: 400;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.advanced-head .adv-chev { color: var(--fg-3); transition: transform 0.2s; }
.advanced.is-open .adv-chev { transform: rotate(180deg); }
/* Subtitles sub-settings: vertical rhythm owned here, not via inline margins */
.adv-subtitles { display: flex; flex-direction: column; gap: 16px; }
.adv-subtitles .extra-row { margin-bottom: 0; }
.adv-group-label { margin-bottom: 10px; }
.advanced-body {
  padding: 22px 18px 20px;
  border-top: 1px solid var(--border);
}

/* ── RIGHT RAIL (Summary + Generate) ───────────────────────── */
.rail-stack {
  position: sticky;
  top: 16px; /* inner-scroll: 16px breathing room below the content top */
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 116px);
  max-height: calc(100dvh - 116px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.rail-stack::-webkit-scrollbar { width: 6px; }
.rail-stack::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.rail-stack::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.summary-card .sc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.sc-rows {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}
.sc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.sc-row .k { color: var(--fg-2); }
.sc-row .v { font-family: var(--font-mono); color: var(--fg-1); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sc-row.is-muted .k, .sc-row.is-muted .v { color: var(--fg-3); }
.sc-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 16px;
  margin-bottom: 18px;
  border-top: 1px solid var(--border);
}
.sc-total .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.sc-total .v {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
}
.sc-total .v .unit {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--fg-2);
  margin-left: 6px;
}

/* ── BUTTONS (app-flavor) ──────────────────────────────────── */
.btn-app {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn-app:not(:disabled):active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:not(:disabled):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary.is-large { padding: 14px 22px; font-size: 15px; font-weight: 600; }
/* Small app-button size — for dense spots like the sidebar credit card */
.btn-app.is-small { padding: 8px 12px; font-size: 12.5px; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--fg-1);
  border-color: var(--border-strong);
}
.btn-secondary:not(:disabled):hover { background: var(--bg-muted); border-color: var(--fg-3); }

.btn-ghost-app {
  background: transparent;
  color: var(--fg-2);
  border-color: transparent;
}
.btn-ghost-app:not(:disabled):hover { color: var(--fg-1); background: var(--bg-muted); }

/* ── BIG GENERATE BUTTON — with the grainy gradient ───────── */
.generate-btn {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 18px 20px;
  color: var(--fg-1);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition:
    transform 0.18s ease,
    box-shadow 0.35s ease,
    border-color 0.3s ease,
    color 0.25s ease;
  text-decoration: none;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.generate-btn::before,
.generate-btn::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.generate-btn::before {
  background:
    radial-gradient(ellipse 100% 80% at 80% 20% in oklab, #FF7E5F 0%, rgba(217,72,46,0.85) 22%, rgba(217,72,46,0.40) 50%, transparent 75%),
    radial-gradient(ellipse 90% 90% at 20% 90% in oklab, #4F6FA0 0%, rgba(79,111,160,0.65) 22%, rgba(79,111,160,0.30) 50%, transparent 78%),
    linear-gradient(135deg in oklab, #D9482E 0%, #B23922 100%);
}
.generate-btn::after {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.85 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='560' height='560'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 280px 280px, 560px 560px;
  mix-blend-mode: overlay;
}
.generate-btn > * { position: relative; z-index: 2; }
.generate-btn .gb-arrow {
  display: inline-flex;
  margin-left: 2px;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.generate-btn:not(:disabled):hover {
  color: #fff;
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 14px 40px rgba(217,72,46,0.40),
    0 2px 6px rgba(0,0,0,0.45);
}
.generate-btn:not(:disabled):hover::before { opacity: 1; }
.generate-btn:not(:disabled):hover::after  { opacity: 0.55; }
.generate-btn:not(:disabled):hover .gb-arrow { transform: translateX(3px); opacity: 1; }
.generate-btn:not(:disabled):active { transform: translateY(0); }

/* ── PRESET BAR (top of New Video) ─────────────────────────── */
.preset-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.preset-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.preset-chip:hover { color: var(--fg-1); border-color: var(--border-strong); }
.preset-chip.is-active { color: var(--fg-1); border-color: var(--accent); background: rgba(217,72,46,0.06); }
.preset-chip .x { color: var(--fg-3); font-size: 11px; padding: 2px; }
.preset-chip .x:hover { color: var(--accent); }

/* ── PRESET SWITCHER (topbar trigger + popover) ────────────── */
.preset-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ps-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  max-width: 360px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ps-trigger:hover { border-color: var(--border-strong); background: var(--bg-muted); }
.preset-switch.is-open .ps-trigger {
  border-color: var(--accent);
  background: rgba(217,72,46,0.06);
}
.preset-switch.is-open .ps-caret { transform: rotate(180deg); }

.ps-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ps-divider {
  width: 1px; height: 14px;
  background: var(--border);
}
.ps-name {
  font-weight: 500;
  letter-spacing: -0.005em;
  max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-trigger:not(.is-applied) .ps-name { color: var(--fg-3); font-weight: 400; }
.ps-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.ps-caret { color: var(--fg-3); transition: transform 0.2s ease; }

.ps-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ps-clear:hover { color: var(--fg-1); border-color: var(--border-strong); background: var(--bg-card); }

.ps-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  max-width: calc(100vw - 32px);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 60px rgba(0,0,0,0.55),
    0 4px 12px rgba(0,0,0,0.35);
  z-index: 50;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: psPopIn 0.16s ease-out;
}
@keyframes psPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ps-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-3);
}
.ps-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 13px;
}
.ps-search input::placeholder { color: var(--fg-3); }
.ps-search-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border: none; background: var(--bg-card);
  border-radius: 50%;
  color: var(--fg-2);
  cursor: pointer;
}
.ps-search-x:hover { color: var(--fg-1); background: var(--border); }

.ps-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 6px 8px;
}
.ps-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--fg-3);
}
.ps-empty span { color: var(--fg-2); }
/* Compact inline note variant — shown above the built-in list when 0 saved */
.ps-empty.is-note { padding: 14px 12px; margin-bottom: 4px; }

.ps-group { padding: 4px 0; }
.ps-group + .ps-group { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.ps-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.ps-check {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 16px;
  width: 16px; height: 16px;
  color: var(--accent);
}

.ps-item-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.ps-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-1);
  letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-item-desc {
  font-size: 11.5px;
  color: var(--fg-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ps-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.ps-foot-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ps-foot-btn:hover { color: var(--fg-1); border-color: var(--border-strong); }
.ps-foot-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  text-decoration: none;
  padding: 6px 8px;
}
.ps-foot-link:hover { color: var(--fg-1); }

/* ── PRESET BANNER (wide, top-of-content variant) ──────────── */
.preset-banner {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.preset-banner:hover { border-color: var(--border-strong); }
.preset-banner.is-open { border-color: var(--accent); }

.pb-trigger {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  min-width: 0;
}
.pb-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.pb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: rgba(217,72,46,0.10);
  border: 1px solid rgba(217,72,46,0.22);
  border-radius: 6px;
  color: var(--accent);
}
.preset-banner.is-empty .pb-icon {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--fg-3);
}

.pb-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pb-name {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-banner.is-empty .pb-name { color: var(--fg-2); font-weight: 500; }
.pb-desc {
  font-size: 11.5px;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-caret {
  color: var(--fg-3);
  flex: 0 0 auto;
  margin-left: 4px;
  transition: transform 0.2s ease;
}
.preset-banner.is-open .pb-caret { transform: rotate(180deg); color: var(--accent); }

.pb-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  margin: 8px 8px 8px 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pb-clear:hover { color: var(--fg-1); border-color: var(--border-strong); background: var(--bg-card); }

/* Anchor the existing popover to the banner */
.preset-banner .ps-pop {
  right: auto;
  left: 0;
  width: 520px;
  top: calc(100% + 8px);
}

/* ── Item row + per-row management actions ─────────────────── */
.ps-item-row {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 8px;
}
.ps-item-row:hover { background: var(--bg-card); }
.ps-item-row.is-active { background: rgba(217,72,46,0.08); }
.ps-item-row.is-active .ps-item-name { color: var(--accent); }
.ps-item-row.is-editing { background: var(--bg-card); }

.ps-item-row .ps-item {
  flex: 1;
  background: transparent;
  border-radius: 8px;
}
.ps-item-row:hover .ps-item,
.ps-item-row.is-active .ps-item { background: transparent; }

.ps-item-actions {
  display: none;
  align-items: center;
  gap: 2px;
  padding-right: 6px;
}
.ps-item-row:hover .ps-item-actions,
.ps-item-row:focus-within .ps-item-actions { display: flex; }

.ps-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.ps-act:hover { color: var(--fg-1); background: var(--bg-deep); border-color: var(--border); }
.ps-act-danger:hover { color: var(--accent); border-color: rgba(217,72,46,0.4); background: rgba(217,72,46,0.08); }

/* Rename inline form */
.ps-rename {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
}
.ps-rename input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}
.ps-rename-ok,
.ps-rename-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg-2);
}
.ps-rename-ok { color: var(--accent); border-color: rgba(217,72,46,0.4); background: rgba(217,72,46,0.08); }
.ps-rename-ok:hover { background: rgba(217,72,46,0.15); }
.ps-rename-cancel:hover { color: var(--fg-1); }

/* Footer: save-current action + inline save form */
.ps-foot {
  /* tweak: full-width footer for save action */
  padding: 8px;
}
.ps-foot-save {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ps-foot-save:hover { color: var(--accent); border-color: var(--accent); border-style: solid; background: rgba(217,72,46,0.06); }

.ps-save-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.ps-save-icon { color: var(--accent); margin-left: 6px; flex: 0 0 auto; }
.ps-save-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 6px 4px;
  min-width: 0;
}
.ps-save-form input::placeholder { color: var(--fg-3); }
.ps-save-cancel {
  background: transparent;
  border: none;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
}
.ps-save-cancel:hover { color: var(--fg-1); }
.ps-save-go {
  padding: 8px 14px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.ps-save-go:disabled { opacity: 0.4; cursor: default; }

/* ── ICON UTILITY ──────────────────────────────────────────── */
.ico {
  display: inline-flex;
  flex-shrink: 0;
}

/* Project card failed-state + empty/loading placeholder (real-data wiring). */
.pt-status.is-failed { color: var(--fg-3); }
.project-empty {
  grid-column: 1 / -1;
  padding: 28px 4px;
  color: var(--fg-2);
  font-size: 14px;
}

/* ── HOME ───────────────────────────────────────────────────── */
.home-pad { padding-top: 40px; }
.home-section-label { margin-bottom: 16px; }
.home-section-label .field-hint { margin-left: auto; }
/* Clickable caption-link: pointer + the brand's secondary→primary hover */
.hover-link { cursor: pointer; transition: color 0.15s; color: var(--fg-3); text-decoration: none; }
.hover-link:hover { color: var(--fg-1); }
/* The inline "Top up" upsell sits on an accent-red error line — keep it accent
   (the base .hover-link grey would mute it against that line). */
.sc-error .hover-link { color: var(--accent); }
.sc-error .hover-link:hover { color: var(--accent-hover); }
.home-recent-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 14px;
}

/* HERO — signature grainy gradient band */
.home-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  min-height: 252px;
  display: flex;
  margin-bottom: 16px;
}
.home-hero .hero-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(102deg, rgba(10,7,5,0.80) 0%, rgba(10,7,5,0.50) 34%, rgba(10,7,5,0.08) 60%, transparent 100%),
    linear-gradient(0deg, rgba(10,7,5,0.40), transparent 42%);
}
.hero-inner {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 36px; width: 100%;
  padding: 38px 40px;
}
.hero-lead { max-width: 580px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom: 18px;
}
.hero-greet {
  font-family: var(--font-serif);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.04;
  font-size: 44px; color: #fff;
  margin: 0 0 14px;
}
.hero-sub {
  font-size: 15px; line-height: 1.5;
  color: rgba(255,255,255,0.84);
  margin: 0 0 26px; max-width: 44ch; text-wrap: pretty;
}
.hero-sub strong { color: #fff; font-weight: 600; }
.hero-cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #FAFAF7; color: #1A0E0A; border: none; border-radius: 10px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  padding: 11px 18px; cursor: pointer; min-height: 42px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.30);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(0,0,0,0.38); }
.hero-btn svg { color: var(--accent); }
.hero-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(255,255,255,0.10); color: #fff;
  border: 1px solid rgba(255,255,255,0.30); border-radius: 10px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; cursor: pointer; min-height: 42px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.hero-btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.48); }

/* Frosted "rendering now" card inside the hero */
.hero-render {
  display: block;
  width: 300px; flex-shrink: 0;
  background: rgba(18,11,8,0.42);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px; padding: 18px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 44px rgba(0,0,0,0.38);
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.hero-render:hover { border-color: rgba(255,255,255,0.30); transform: translateY(-2px); }
.hr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hr-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #FFB59E; font-weight: 500;
}
.hr-live .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #FF7E5F;
  animation: livePulse 1.6s ease-in-out infinite;
}
.hr-eta { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255,255,255,0.70); letter-spacing: 0.06em; }
.hr-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  color: #fff; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.01em;
}
.hr-bar {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,0.16);
  overflow: hidden; margin-bottom: 12px;
}
.hr-bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FF9670, #FF7E5F);
  box-shadow: 0 0 14px rgba(255,126,95,0.6);
}
.hr-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.62);
}
.hr-pct { color: rgba(255,255,255,0.9); }

@media (max-width: 920px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-render { width: 100%; }
  .hero-greet { font-size: 36px; }
}

/* METRIC STRIP */
.metric-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 40px;
}
.metric { padding: 18px 22px; }
.metric + .metric { border-left: 1px solid var(--border); }
.m-val {
  font-family: var(--font-display); font-size: 30px; font-weight: 600;
  letter-spacing: -0.025em; color: var(--fg-1); line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.m-unit { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.04em; font-weight: 400; }
.m-lbl {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-top: 10px;
}
@media (max-width: 900px) {
  .metric-strip { grid-template-columns: 1fr; }
  .metric + .metric { border-left: none; border-top: 1px solid var(--border); }
}

/* ── QUICK START CARDS (home) ──────────────────────────────── */
.qs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .qs-grid { grid-template-columns: 1fr; } }

.qs-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 16px 18px;
  min-height: 148px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg-1);
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.qs-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 80% at 100% 0%, rgba(217,72,46,0.10), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.qs-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.qs-card:hover::before { opacity: 1; }

.qs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.qs-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.qs-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  background: var(--bg);
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.18s;
}
.qs-arrow svg { transition: transform 0.25s ease; }
.qs-card:hover .qs-arrow {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217,72,46,0.08);
}
.qs-card:hover .qs-arrow svg { transform: translateX(2px); }

.qs-card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(217,72,46,0.16), rgba(217,72,46,0.04));
  color: var(--accent);
  border: 1px solid rgba(217,72,46,0.24);
  position: relative; z-index: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.qs-card:hover .qs-card-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(217,72,46,0.40);
}

.qs-card-body { position: relative; z-index: 1; }
.qs-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg-1);
  margin-bottom: 8px;
}
.qs-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-3);
  text-wrap: pretty;
  max-width: 32ch;
}

/* "Soon" badge + inert card (e.g. the "From a reference" quick-start). */
.qs-soon {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
}
.qs-card.is-soon { cursor: default; opacity: 0.55; }
.qs-card.is-soon:hover { border-color: var(--border); transform: none; }
.qs-card.is-soon:hover::before { opacity: 0; }

/* Home "Show all projects" button under the recents preview. */
.home-recent-more {
  display: flex; justify-content: center;
  margin-top: 22px;
}

/* ── PROJECTS LIST ─────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--fg-1);
  display: block;
}
.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong));
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.project-thumb {
  aspect-ratio: 16/9;
  background: #0A0807;
  position: relative;
  overflow: hidden;
}
/* Generated-thumbnail <img> or video-frame <video> poster — fills the thumb under
   the grain/vignette/play overlays, layered OVER the gradient .pt-poster base.
   Intentionally NO background: while the img is unloaded or a browser hasn't painted
   the video's #t= frame, the element stays transparent so the gradient base shows
   through (never a black box). pointer-events:none so the card click still navigates. */
.project-thumb .pt-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
.project-thumb .pt-dur {
  position: absolute; bottom: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--fg-1);
}
/* Hidden metadata-only <video> that reports a finished clip's REAL length for the
   duration badge (CardDuration). Kept in layout so metadata loads, but invisible. */
.project-thumb .pt-dur-probe {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.project-thumb .pt-status {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.project-thumb .pt-status.is-ready {
  background: rgba(255,255,255,0.10);
  color: var(--fg-1);
  border: 1px solid rgba(255,255,255,0.16);
}
.project-thumb .pt-status.is-rendering {
  background: rgba(217,72,46,0.18);
  color: var(--accent-hover);
  border: 1px solid rgba(217,72,46,0.30);
}
.project-thumb .pt-status .live-dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: livePulse 1.6s ease-in-out infinite;
}
.project-thumb .pt-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.45; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 280px 280px;
}
.project-thumb .pt-vig {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 95% at 50% -10%, transparent 42%, rgba(0,0,0,0.34) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.30), transparent 28%, transparent 60%, rgba(0,0,0,0.34));
}
.project-thumb .pt-status, .project-thumb .pt-dur { z-index: 3; }
.project-thumb .pt-play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.project-card:hover .pt-play { opacity: 1; }
.pt-play > span {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(250,250,247,0.94); color: #1A0E0A;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  transition: transform 0.2s ease;
}
.project-card:hover .pt-play > span { transform: scale(1.06); }
.pt-play svg { margin-left: 2px; }
.project-meta {
  padding: 14px 16px;
}
.project-meta .pm-title { font-size: 14.5px; font-weight: 500; color: var(--fg-1); line-height: 1.3; margin-bottom: 6px; }
.project-meta .pm-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}

/* ── OVERLAY / SHEET (Voice + Style Pack pickers) ──────────── */
.overlay-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  animation: backdropIn 0.18s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
/* Project-card overflow (⋯) menu + the small deletion confirm modal. */
.card-menu { position: absolute; top: 8px; right: 8px; z-index: 5; }
.card-menu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: var(--radius-pill); background: rgba(10, 8, 7, 0.55); border: 1px solid var(--border);
  color: var(--fg-1); cursor: pointer; backdrop-filter: blur(4px);
}
.card-menu-btn:hover { border-color: var(--border-strong); background: rgba(10, 8, 7, 0.78); }
.card-menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 41; min-width: 150px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-card-hover); padding: 5px;
}
.card-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0;
  background: transparent; color: var(--fg-1); font: inherit; font-size: 13px; text-align: left;
  border-radius: 7px; cursor: pointer;
}
.card-menu-item:hover { background: var(--bg-muted); }
.card-menu-item.is-danger { color: rgb(217, 72, 46); }
.card-menu-item.is-danger:hover { background: rgba(217, 72, 46, 0.12); }
.overlay-sheet.overlay-sheet-sm { width: min(440px, 92vw); max-width: 440px; height: auto; max-height: min(90vh, 360px); }

.overlay-sheet {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, calc(100vw - 48px));
  height: min(780px, calc(100vh - 48px));
  height: min(780px, calc(100dvh - 48px));
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  z-index: 101;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: sheetIn 0.2s ease;
}
/* Compact sheet — single-column pickers (e.g. thumbnail style) */
.overlay-sheet.is-compact {
  width: min(680px, calc(100vw - 48px));
  height: min(560px, calc(100vh - 48px));
  height: min(560px, calc(100dvh - 48px));
}
@keyframes sheetIn {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.overlay-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.overlay-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  line-height: 1;
}
.overlay-close {
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border);
  color: var(--fg-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.overlay-close:hover { background: var(--bg-muted); color: var(--fg-1); border-color: var(--border-strong); }

.overlay-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  min-height: 0;
}
/* Single-column body: pickers with no left rail (e.g. the Gemini voice list). */
.overlay-body.is-single {
  grid-template-columns: 1fr;
}
.overlay-rail {
  border-right: 1px solid var(--border);
  padding: 16px 8px;
  overflow-y: auto;
}
.overlay-rail .rail-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px; color: var(--fg-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  /* element-agnostic: now a <button> */
  width: 100%; border: 0; background: transparent;
  font-family: inherit; text-align: left;
  -webkit-appearance: none; appearance: none;
}
.overlay-rail .rail-item:hover { color: var(--fg-1); background: var(--bg-muted); }
.overlay-rail .rail-item.is-active { color: var(--fg-1); background: var(--bg-card); }
.overlay-rail .rail-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-3);
}
.overlay-rail .rail-divider {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 14px 12px 6px;
}
.overlay-content {
  overflow-y: auto;
  padding: 22px 28px 28px;
}

/* ── VOICE LIST ROWS ───────────────────────────────────────── */
.voice-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.voice-row:hover { background: var(--bg-muted); border-color: var(--border-strong); }
.voice-row.is-selected { border-color: var(--accent); background: rgba(217,72,46,0.05); }
.voice-row .vr-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-1);
  flex-shrink: 0;
}
.voice-row.is-selected .vr-play {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.voice-row .vr-play:disabled {
  opacity: 0.4;
  cursor: default;
}
/* The select half of the row — a real button, reset to inherit the row's look. */
.voice-row .vr-select {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: transparent; border: 0; padding: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.voice-row .vr-info { flex: 1; min-width: 0; }
.voice-row .vr-name { font-size: 14px; font-weight: 500; color: var(--fg-1); line-height: 1.2; }
.voice-row .vr-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
/* Selected-row badge — an accent check at the end of the chosen voice. */
.voice-row .vr-selected-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

/* Search */
.overlay-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.overlay-search input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--fg-1); font-size: 13.5px; font-family: var(--font-sans);
}
.overlay-search input::placeholder { color: var(--fg-3); }
.overlay-search .so-ico { color: var(--fg-3); flex-shrink: 0; }

/* Modal footer + shared empty / section-label bits (used across pickers) */
/* ── MUSIC PACK PICKER ─────────────────────────────────────── */
.mpp-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 16px;
}
/* "Now playing" bar: a recessed strip above the footer holding the custom Scrubber. */
.mpp-now {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.mpp-now-play { flex-shrink: 0; }
.mpp-now-body { flex: 1; min-width: 0; }
.mpp-now-name { font-size: 12.5px; font-weight: 500; color: var(--fg-1); margin-bottom: 8px; }

/* Custom seek bar (Scrubber.tsx) — replaces the default <audio controls>. */
.scrubber { display: flex; align-items: center; gap: 9px; }
.scrub-time { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); min-width: 32px; }
.scrub-time.is-cur { color: var(--fg-2); }
/* The track is a generous 18px-tall HIT area (was a 5px line — too fiddly to grab); the
   visible rail is a thin bar centered inside it, so a click anywhere in the band seeks. */
.scrub-track {
  flex: 1; height: 18px;
  position: relative;
  display: flex; align-items: center;
  cursor: pointer; touch-action: none;
}
.scrub-track.is-disabled { cursor: default; opacity: 0.5; }
.scrub-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 99px; }
.scrub-rail {
  position: relative; width: 100%; height: 6px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  transition: height 0.12s ease, background 0.12s ease;
}
.scrub-track:not(.is-disabled):hover .scrub-rail { height: 8px; background: rgba(255, 255, 255, 0.24); }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.scrub-thumb {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: width 0.12s ease, height 0.12s ease;
}
.scrub-track:not(.is-disabled):hover .scrub-thumb,
.scrub-track:not(.is-disabled):active .scrub-thumb { width: 16px; height: 16px; }

.overlay-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.overlay-foot-actions { display: flex; gap: 8px; }
.overlay-empty { padding: 40px; text-align: center; color: var(--fg-3); }
.overlay-head .field-hint { margin-top: 6px; }
.overlay-section-label { margin-bottom: 10px; }
.overlay-section-label.is-stacked { margin-top: 24px; }
.overlay-foot.is-end { justify-content: flex-end; gap: 8px; }
.overlay-simple-body { padding: 24px; overflow-y: auto; flex: 1; }
.overlay-rail .rail-note { padding: 8px 12px; font-size: 12px; line-height: 1.5; color: var(--fg-3); }
.overlay-rail .rail-note strong { color: var(--fg-2); }

/* ── STYLE PACK GRID ───────────────────────────────────────── */
.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .pack-grid { grid-template-columns: 1fr; } }
.pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  /* element-agnostic: renders identically now that it's a <button> */
  width: 100%; padding: 0; text-align: left; font: inherit; color: inherit;
  -webkit-appearance: none; appearance: none;
}
.pack-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pack-card.is-selected { border-color: var(--accent); }
.pack-card.is-selected::after {
  content: ''; position: absolute; inset: -1px;
  border: 1.5px solid var(--accent); border-radius: 12px;
  pointer-events: none;
}
.pack-strip {
  display: flex;
  height: 132px;
  background: #0A0807;
}
.pack-strip .frame { flex: 1; position: relative; overflow: hidden; }
.pack-strip .frame + .frame { border-left: 1px solid var(--border); }
.pack-strip .frame svg { width: 100%; height: 100%; display: block; }
.pack-meta {
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.pack-meta .pk-name { font-size: 14px; font-weight: 500; color: var(--fg-1); line-height: 1.2; }
.pack-meta .pk-desc { font-size: 12px; color: var(--fg-3); margin-top: 4px; line-height: 1.4; }
.pack-meta .pk-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--fg-3);
}
.pack-meta .pk-tag.is-premium {
  color: var(--accent-hover);
  background: rgba(217,72,46,0.10);
  border-color: rgba(217,72,46,0.30);
}
/* Coming-soon pack: greyed out and non-interactive (the <button> is disabled). */
.pack-card.is-soon { cursor: not-allowed; opacity: 0.55; filter: grayscale(1); }
.pack-card.is-soon:hover { border-color: var(--border); transform: none; box-shadow: none; }
.pack-meta .pk-tag.is-soon { color: var(--fg-3); background: var(--bg-muted); border-color: var(--border-strong); }


/* Lock background scroll while any full-screen overlay/modal is mounted.
   Covers Voice picker, Style Pack picker, and the Preset browse modal. */
body:has(.overlay-backdrop),
body:has(.ps-modal-overlay) {
  overflow: hidden;
}

/* ── PRESET RAIL — compact card in right rail (under Estimate) ── */
.preset-rail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 12px;
}

.pr-head {
  display: flex; align-items: center; justify-content: space-between;
}
.pr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.pr-browse-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: none;
  padding: 4px 0 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.15s ease;
}
.pr-browse-link:hover { color: var(--fg-1); }
.pr-browse-link svg { opacity: 0.7; }
.pr-browse-link:hover svg { opacity: 1; }

/* Current preset block */
.pr-current {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.preset-rail.is-applied .pr-current {
  background: rgba(217,72,46,0.06);
  border-color: rgba(217,72,46,0.28);
}
/* Dirty = preset applied but user changed something. Subtler treatment
   than is-applied: a muted amber edge to signal "drift". */
.preset-rail.is-dirty .pr-current {
  background: rgba(217,72,46,0.03);
  border-color: rgba(217,72,46,0.18);
  border-style: dashed;
}
.pr-modified {
  font-style: italic;
  font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 0.01em;
}
.ps-modified-tag {
  font-style: italic;
  font-weight: 400;
  color: var(--fg-3);
}
.pr-current-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-3);
}
.preset-rail.is-applied .pr-current-icon {
  background: rgba(217,72,46,0.12);
  border-color: rgba(217,72,46,0.30);
  color: var(--accent);
}
.preset-rail.is-dirty .pr-current-icon {
  background: rgba(217,72,46,0.06);
  border-color: rgba(217,72,46,0.20);
  color: var(--accent);
  opacity: 0.7;
}
.pr-current-main { flex: 1; min-width: 0; padding-top: 1px; }
.pr-current-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg-1);
  line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.preset-rail.is-empty .pr-current-name {
  color: var(--fg-2);
  font-weight: 500;
}
.pr-current-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-current-clear {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.pr-current-clear:hover {
  color: var(--accent);
  background: rgba(217,72,46,0.10);
  border-color: rgba(217,72,46,0.30);
}

/* Recents */
.pr-recents {
  display: flex; flex-direction: column; gap: 6px;
}
.pr-recents-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 2px;
}
.pr-recents-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.pr-recents-list li + li { border-top: 1px dashed var(--border); }
.pr-recent {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: background 0.12s ease;
}
.pr-recent:hover { background: var(--bg-deep); }
.pr-recent-dot {
  flex: 0 0 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-3);
  opacity: 0.6;
  transition: background 0.15s, opacity 0.15s;
}
.pr-recent:hover .pr-recent-dot {
  background: var(--accent);
  opacity: 1;
}
.pr-recent-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.pr-recent-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-1);
  line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pr-recent-desc {
  font-size: 10.5px;
  color: var(--fg-3);
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Save current button (inline at bottom of rail card) */
.pr-save-trigger {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.pr-save-trigger:hover {
  color: var(--accent);
  border-color: var(--accent);
  border-style: solid;
  background: rgba(217,72,46,0.06);
}

/* Inline save form (replaces the trigger when active) */
.pr-save-form {
  display: flex; align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.pr-save-icon { color: var(--accent); flex: 0 0 auto; }
.pr-save-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 12.5px;
  padding: 6px 2px;
  min-width: 0;
}
.pr-save-form input::placeholder { color: var(--fg-3); }
.pr-save-cancel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--fg-3);
  cursor: pointer;
}
.pr-save-cancel:hover { color: var(--fg-1); background: var(--bg-card); }
.pr-save-go {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.pr-save-go:hover { background: var(--accent-hover); }
.pr-save-go:disabled { opacity: 0.45; cursor: default; }

/* ── BROWSE MODAL — full preset library ─────────────────────── */
.ps-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 6, 5, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: psOverlayIn 0.18s ease-out;
}
@keyframes psOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.ps-modal {
  width: min(560px, 100%);
  max-height: min(680px, calc(100vh - 64px));
  max-height: min(680px, calc(100dvh - 64px));
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 24px 80px rgba(0,0,0,0.65),
    0 4px 12px rgba(0,0,0,0.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: psModalIn 0.2s ease-out;
}
@keyframes psModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ps-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.ps-modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  line-height: 1.15;
}
.ps-modal-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ps-modal-x:hover { color: var(--fg-1); border-color: var(--border-strong); background: var(--bg-card); }

/* Reuse the existing .ps-search inside the modal */
.ps-modal .ps-search {
  border-top: none;
  padding: 12px 18px;
}
.ps-modal .ps-list {
  max-height: none;
  flex: 1;
  padding: 8px 12px 12px;
}

.ps-modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.ps-modal-hint {
  font-size: 11.5px;
  color: var(--fg-3);
  letter-spacing: -0.005em;
}
.ps-modal-save {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ps-modal-save:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Modal-scoped save form chrome */
.ps-modal-foot .ps-save-form {
  margin: 0;
  flex: 1;
}
.ps-modal-foot .ps-save-go {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ps-modal-foot .ps-save-go:hover { background: var(--accent-hover); }
.ps-modal-foot .ps-save-go:disabled { opacity: 0.45; cursor: default; }

/* ── GENERATING SCREEN ─────────────────────────────────────── */
.gen-wrap { max-width: 1000px; }
.gen-progress-card { padding: 32px 32px 28px; margin-bottom: 28px; }
.gen-chat-card { padding: 0; }

.gen-lead { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.gen-lead-who { display: flex; gap: 16px; align-items: center; }

/* Crew avatar — three sizes/tones via modifier */
.gen-avatar {
  flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
}
.gen-avatar.is-lead { width: 52px; height: 52px; font-size: 18px; letter-spacing: 0.01em; background: var(--accent); color: #fff; }
.gen-avatar.is-msg  { width: 34px; height: 34px; font-size: 12px; background: var(--bg-muted); color: var(--fg-1); }
.gen-avatar.is-crew { width: 34px; height: 34px; font-size: 12px; background: var(--accent); color: #fff; }

.gen-lead-role { margin-bottom: 6px; }
.gen-lead-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.gen-lead-title .dim { color: var(--fg-3); }
.gen-step { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); letter-spacing: 0.06em; flex-shrink: 0; padding-left: 16px; }

.gen-bars { display: flex; gap: 6px; margin-bottom: 8px; }
.gen-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-muted); position: relative; overflow: hidden; }
.gen-bar.is-done { background: var(--accent); }
.gen-bar.is-active::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: genShimmer 1.8s linear infinite;
}
@keyframes genShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.gen-stages { display: flex; gap: 6px; margin-bottom: 22px; }
.gen-stage { flex: 1; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--fg-3); opacity: 0.5; text-align: left; }
.gen-stage.is-done { color: var(--fg-2); opacity: 1; }
.gen-stage.is-active { color: var(--accent-hover); opacity: 1; }

.gen-eta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.06em; }

.gen-chat-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.gen-working { display: inline-flex; align-items: center; gap: 7px; }
.gen-working-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

.gen-chat-scroll { max-height: 320px; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.gen-msg { display: flex; gap: 12px; align-items: flex-start; }
.gen-msg-body { min-width: 0; }
.gen-msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.gen-msg-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--fg-1); }
.gen-msg-time { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.04em; }
.gen-msg-text { font-size: 14px; color: var(--fg-2); line-height: 1.5; text-wrap: pretty; }

.gen-typing { display: flex; gap: 12px; align-items: center; opacity: 0.7; }
.gen-typing-text { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); letter-spacing: 0.03em; }
.gen-typing-dots { color: var(--accent); animation: caretBlink 1s steps(1) infinite; }

/* ── FINISHED SCREEN ───────────────────────────────────────── */
.fin-wrap { max-width: 1080px; }
.app-topbar-actions { display: flex; gap: 8px; }
.copy-btn { flex-shrink: 0; }
.btn-app.is-block { width: 100%; }

/* Brag strip */
.fin-brag {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); padding: 12px 16px; margin-bottom: 24px;
}
.fin-brag-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(217,72,46,0.14); color: var(--accent-hover);
  display: inline-flex; align-items: center; justify-content: center;
}
.fin-brag-text { font-size: 13.5px; color: var(--fg-2); line-height: 1.4; }
.fin-brag-text strong { color: var(--fg-1); font-weight: 600; }

/* Player + side info */
.fin-player-grid { display: grid; grid-template-columns: 1fr 240px; gap: 24px; margin-bottom: 20px; align-items: start; }
/* Compact side column — the player gets the width back. */
.fin-output-card { padding: 18px; }
.fin-output-card .sc-label { margin-bottom: 12px; }
.fin-video { position: relative; aspect-ratio: 16/9; background: #0A0807; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.fin-video-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fin-play {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: #0A0807;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6); cursor: pointer;
}
.fin-scrub {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.85); letter-spacing: 0.06em;
}
.fin-scrub-track { flex: 1; height: 3px; background: rgba(255,255,255,0.18); border-radius: 2px; position: relative; }
.fin-scrub-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* Thumbnail panel — full width, below the player row. */
.fin-thumb-card { padding: 0; margin-top: 0; margin-bottom: 18px; }
.fin-thumb-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
/* Demo / empty-state body (single illustrative poster + note). */
.fin-thumb-body { padding: 18px; display: flex; gap: 16px; align-items: stretch; }
.fin-thumb-img { position: relative; width: 232px; flex-shrink: 0; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #0A0807; }
.fin-thumb-info { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.fin-thumb-note { font-size: 13.5px; color: var(--fg-2); line-height: 1.5; }
.fin-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Real-render variant grid — all thumbnails, equal size, click to expand. */
.fin-thumb-grid { padding: 18px; display: grid; gap: 14px; }
.fin-thumb-cell { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #0A0807; }
.fin-thumb-open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.fin-thumb-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fin-thumb-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, rgba(10,8,7,0) 0%, rgba(10,8,7,0.55) 100%);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  opacity: 0; transition: opacity 0.14s ease;
}
.fin-thumb-cell:hover .fin-thumb-hint, .fin-thumb-open:focus-visible .fin-thumb-hint { opacity: 1; }
.fin-thumb-dl {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 30px; height: 30px; padding: 0; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(10,8,7,0.6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity 0.14s ease, background 0.14s ease;
}
.fin-thumb-cell:hover .fin-thumb-dl { opacity: 1; }
.fin-thumb-dl:hover { background: rgba(10,8,7,0.85); }
.fin-thumb-dl:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }

/* Title / Description / Tags card */
.fin-meta-card { padding: 0; margin-bottom: 18px; }
.fin-meta-head { padding: 16px 24px; border-bottom: 1px solid var(--border); }
.fin-meta-body { padding: 28px 24px; display: flex; flex-direction: column; gap: 32px; }
.fin-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.field-label.is-sm { font-size: 11.5px; }
.fin-title-text { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--fg-1); line-height: 1.25; text-wrap: pretty; }
.fin-desc-text { color: var(--fg-2); font-size: 14.5px; line-height: 1.65; text-wrap: pretty; }
.fin-tags { display: flex; flex-wrap: wrap; gap: 6px; }
/* Tag pill — realizes the intended .opt-price look (was mis-scoped standalone) */
.fin-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--fg-2); padding: 4px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; }
.fin-chapters-label { margin-bottom: 12px; }
.fin-chapters { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-2); line-height: 1.9; }

.fin-cta { text-align: center; padding-top: 8px; padding-bottom: 24px; }

/* ── YOUTUBE THUMBNAIL PREVIEW (lightbox) ──────────────────────
   Replicates YouTube's own chrome (Roboto, the duration badge, card
   metrics) so the creator sees exactly how the thumbnail lands on phone,
   desktop, and TV. Colours are YouTube's, not the app theme's — that's the
   point. `.yt-ui` pins Roboto for everything inside a mockup. */
.yt-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,4,3,0.78); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: yt-fade 0.16s ease;
}
@keyframes yt-fade { from { opacity: 0; } to { opacity: 1; } }
.yt-modal {
  width: 100%; max-width: 1160px; max-height: 92vh; overflow: auto;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
}
.yt-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.yt-modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--fg-1); }
.yt-modal-sub { font-size: 13px; color: var(--fg-2); margin-top: 3px; line-height: 1.4; }
.yt-close {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; padding: 0;
  border: 1px solid var(--border); background: var(--bg-muted); color: var(--fg-1);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.12s ease;
}
.yt-close:hover { background: var(--bg-card); }
.yt-modal-body { padding: 28px 24px; }
.yt-devices { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: flex-start; }
.yt-device { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.yt-device-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3);
}
.yt-ui { font-family: 'Roboto', 'Inter', system-ui, Arial, sans-serif; }

/* Shared thumbnail + duration badge (YouTube exact) */
.yt-thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-badge {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,0.5); color: #fff;
  font: 500 10px/10px 'Roboto', Arial, sans-serif;
  padding: 3px 5px; border-radius: 4px;
}
/* Channel avatar (Kutly logomark on black) + 3-dot menu — shared by both cards */
.yt-av { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: #000; display: grid; place-items: center; }
.yt-kebab { flex-shrink: 0; display: flex; flex-direction: column; padding: 6px 2px; }
.yt-kebab i { border-radius: 50%; display: block; }

/* Phone — YouTube mobile (dark theme, SHARP thumbnail corners) */
.ytm-phone { width: 400px; max-width: 100%; background: #0f0f0f; border-radius: 16px; padding: 16px; border: 1px solid rgba(255,255,255,0.07); }
.ytm-phone .yt-thumb { border-radius: 0; }
.ytm-meta { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
.ytm-meta .yt-av { border: 1px solid rgba(255,255,255,0.09); margin-top: 1px; }
.ytm-text { flex: 1; min-width: 0; }
.ytm-title { font-size: 16px; line-height: 22px; font-weight: 500; color: #f1f1f1; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ytm-byline { margin-top: 4px; font-size: 13px; line-height: 18px; color: #aaa; }
.ytm-meta .yt-kebab { gap: 3.5px; margin-top: 1px; }
.ytm-meta .yt-kebab i { width: 4px; height: 4px; background: #aaa; }

/* Computer — YouTube desktop (light theme, rounded thumbnail) */
.ytd-pc { width: 400px; max-width: 100%; background: #fff; border-radius: 12px; padding: 18px; }
.ytd-meta { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
.ytd-text { flex: 1; min-width: 0; }
.ytd-title { font-size: 15px; line-height: 20px; font-weight: 500; color: #0f0f0f; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ytd-chan { font-size: 12px; line-height: 18px; color: #606060; margin-top: 6px; }
.ytd-stats { font-size: 12px; line-height: 18px; color: #606060; }
.ytd-meta .yt-kebab { gap: 3px; margin-top: -2px; }
.ytd-meta .yt-kebab i { width: 3.5px; height: 3.5px; background: #606060; }

/* Footer — variant switcher + download */
.yt-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 24px; border-top: 1px solid var(--border);
}
.yt-variants { display: flex; gap: 8px; flex-wrap: wrap; }
.yt-variant {
  width: 64px; aspect-ratio: 16/9; padding: 0; border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; background: #0A0807; cursor: pointer; opacity: 0.65;
  transition: border-color 0.12s ease, opacity 0.12s ease;
}
.yt-variant img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-variant:hover { opacity: 1; }
.yt-variant.is-sel { border-color: var(--accent); opacity: 1; }

@media (max-width: 720px) {
  .yt-modal-body { padding: 20px 16px; }
}

/* ── ACCOUNT SCREEN (migrated from the retired v2.css) ─────── */
.k2-title-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg-1);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  padding: 4px 0 2px;
  margin-bottom: 2px;
}
.k2-title-input::placeholder { color: var(--fg-3); }

.k2-fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.k2-fld-lbl {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: normal;
  font-weight: 600;
  color: var(--fg-1);
}
.k2-fld-lbl .name { color: var(--fg-1); }
.k2-fld-lbl .hint { margin-left: auto; letter-spacing: normal; color: var(--fg-3); font-size: 11.5px; font-weight: 400; }

.k2-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s, color 0.12s;
  white-space: nowrap;
  min-height: 32px;
}
.k2-btn:active { transform: translateY(1px); }
.k2-btn.is-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.k2-btn.is-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.k2-btn.is-secondary { background: var(--bg-card); color: var(--fg-1); border-color: var(--border-strong); }
.k2-btn.is-secondary:hover { background: var(--bg-muted); border-color: var(--fg-3); }
.k2-btn.is-ghost { background: transparent; color: var(--fg-2); }
.k2-btn.is-ghost:hover { color: var(--fg-1); background: var(--bg-muted); }

.k2-account {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}
@media (max-width: 820px) { .k2-account { grid-template-columns: 1fr; gap: 18px; } }

.k2-acc-nav { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 16px; align-self: start; }
.k2-acc-nav .lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-3); padding: 10px 12px 6px; }
.k2-acc-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 32px; padding: 7px 12px; border-radius: 7px;
  font-size: 12.5px; line-height: 1.3; color: var(--fg-2);
  cursor: pointer; position: relative;
  /* element-agnostic: renders identically as <a> (nav) or <button> (sign out) */
  border: 0; background: transparent; font-family: inherit;
  text-align: left; text-decoration: none;
  -webkit-appearance: none; appearance: none;
}
.k2-acc-item:hover { color: var(--fg-1); background: var(--bg-muted); }
.k2-acc-item.is-active { color: var(--fg-1); background: var(--bg-card); }
.k2-acc-item.is-active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); border-radius: 0 2px 2px 0; }
.k2-acc-item .ico { color: var(--fg-3); flex-shrink: 0; }
.k2-acc-item.is-active .ico { color: var(--accent); }
.k2-acc-item.is-danger { color: var(--fg-3); margin-top: 12px; }
.k2-acc-item.is-danger:hover { color: var(--accent-hover); }

.k2-acc-body { min-width: 0; }
.k2-acc-h1 { font-family: var(--font-serif); font-size: 24px; font-weight: 600; letter-spacing: -0.005em; color: var(--fg-1); margin: 0 0 4px; line-height: 1.1; }
.k2-acc-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--fg-3); margin: 0 0 22px; }
.k2-acc-section { margin-bottom: 28px; }
.k2-acc-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center;
}
.k2-acc-row .k { font-size: 12.5px; color: var(--fg-2); }
.k2-acc-row .v { font-size: 13px; color: var(--fg-1); }
.k2-acc-row.tall { align-items: start; padding: 16px 0; }

.k2-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
@media (max-width: 800px) { .k2-stat-grid { grid-template-columns: 1fr 1fr; } }
.k2-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.k2-stat .l { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 8px; }
.k2-stat .v { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; color: var(--fg-1); line-height: 1; font-variant-numeric: tabular-nums; }
.k2-stat .s { font-size: 11.5px; color: var(--fg-3); margin-top: 6px; }
.k2-stat.is-accent { background: linear-gradient(135deg, rgba(217,72,46,0.10), rgba(217,72,46,0.02)); border-color: rgba(217,72,46,0.25); }
.k2-stat.is-accent .v { color: var(--accent-hover); }

/* Account screen — inline styles lifted into owned classes */
.k2-title-input.is-field { font-size: 14px; font-weight: 500; font-family: var(--font-sans); max-width: 320px; }
.k2-btn.is-icon { padding: 6px 8px; min-height: 28px; }
.k2-btn.is-wide { min-width: 88px; }
.k2-stat .v.is-text { font-size: 18px; }
.k2-acc-row .v.is-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.k2-fld.is-spaced { margin: 24px 0 12px; }

.acc-projects-bar { margin-bottom: 22px; }
.acc-load-more { text-align: center; margin-top: 28px; }
.acc-btn-row { display: flex; gap: 8px; }
.acc-btn-row.is-spaced { margin: 16px 0 22px; }
.acc-h2 { font: 600 16px/1.2 var(--font-display); letter-spacing: -0.02em; margin: 0 0 12px; }
.acc-strong { font-weight: 500; }
.acc-id { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-left: 10px; letter-spacing: 0.06em; }

/* Savings hero stat */
.acc-savings { padding: 22px; margin-bottom: 18px; }
.acc-savings .v { font-size: 44px; margin-top: 6px; }
.acc-savings .s { font-size: 12.5px; margin-top: 8px; }

/* Bordered list container (invoices, notifications) */
.acc-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* Invoices */
.acc-invoice { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.acc-invoice:last-child { border-bottom: 0; }
.acc-invoice-desc { font-size: 13px; color: var(--fg-1); font-weight: 500; }
.acc-invoice-date { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); margin-top: 4px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.acc-invoice-right { display: flex; align-items: center; gap: 12px; }
.acc-invoice-amt { font-family: var(--font-mono); font-size: 12px; color: var(--fg-1); font-variant-numeric: tabular-nums; }

/* Notifications table */
.acc-notif-head { display: grid; grid-template-columns: 1fr 70px 70px 90px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-3); }
.acc-notif-row { display: grid; grid-template-columns: 1fr 70px 70px 90px; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.acc-notif-row:last-child { border-bottom: 0; }
.acc-notif-col { text-align: center; }
.acc-notif-title { font-size: 13px; font-weight: 500; color: var(--fg-1); }
.acc-notif-desc { font-size: 11.5px; color: var(--fg-3); margin-top: 3px; }
.acc-note { margin-top: 18px; font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }
.acc-note strong { color: var(--fg-2); }

/* Integrations */
.acc-integrations { display: flex; flex-direction: column; gap: 8px; }
.acc-integration { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.acc-integration-icon { width: 32px; height: 32px; border-radius: 7px; background: var(--bg-muted); display: flex; align-items: center; justify-content: center; color: var(--fg-2); flex-shrink: 0; }
.acc-integration-info { flex: 1; min-width: 0; }
.acc-integration-name { font-size: 13.5px; font-weight: 500; }
.acc-integration-desc { font-size: 12px; color: var(--fg-3); margin-top: 3px; }
.acc-status { font-family: var(--font-mono); font-size: 9.5px; padding: 4px 8px; border-radius: 4px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); background: rgba(255,255,255,0.03); }
.acc-status.is-connected { color: #6BCF8F; background: rgba(74,222,128,0.08); }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────
   Fixed, bottom-centre, screen-reader announced (region/aria-live
   live on the container in Toast.tsx). Sits above every overlay
   (sheets z101, yt-modal z1000) so confirmations are never hidden. */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card-hover);
  color: var(--fg-1);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  max-width: 100%;
  animation: toastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.toast.is-success .toast-ico { color: #6BCF8F; background: rgba(74, 222, 128, 0.12); }
.toast.is-error .toast-ico { color: var(--accent-hover); background: rgba(217, 72, 46, 0.14); }
.toast-msg { min-width: 0; }
.toast-x {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 24px; height: 24px;
  flex-shrink: 0;
  border: 0; border-radius: var(--radius-pill);
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.toast-x:hover { color: var(--fg-1); background: var(--bg-muted); }

/* Keep scroll momentum contained inside open dialogs — pairs with useDialog's
   scroll-lock on .app-scroll so the page behind never chains/moves. */
.overlay-content,
.overlay-rail,
.overlay-simple-body,
.ps-list,
.yt-modal-body { overscroll-behavior: contain; }

/* ── LOADING SKELETONS (project grid) ────────────────────────
   Shimmering placeholders while the first list load is in flight (was the
   plain "Loading…" empty-state text). The reduced-motion rule in effects.css
   neutralises the shimmer to a static muted block. */
.skeleton-box,
.skeleton-line {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-card) 37%, var(--bg-muted) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skeletonShimmer {
  from { background-position: 100% 50%; }
  to   { background-position: 0 50%; }
}
.project-card.is-skeleton {
  cursor: default;
  pointer-events: none;
  border-color: var(--border);
}
.project-card.is-skeleton:hover { transform: none; border-color: var(--border); box-shadow: none; }
.project-card.is-skeleton .project-meta { padding: 12px 14px 14px; }
.skeleton-line { height: 12px; margin-top: 8px; }
.skeleton-line.is-sm { height: 10px; }

/* ── UPGRADE MODALS (insufficient credits / concurrency cap) ──
   Built on the overlay-sheet-sm primitive (RecentProjects delete) + useDialog. */
.overlay-sheet.upgrade-sheet { max-height: min(90vh, 560px); }
.upgrade-body {
  padding: 8px 20px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
}
.upgrade-lead {
  margin: 0 0 16px;
  font-size: 14px; line-height: 1.55; color: var(--fg-1);
}
.upgrade-lead strong { font-weight: 600; }
.upgrade-summary {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 12px 16px;
}
.upgrade-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 13.5px; padding: 4px 0;
}
.upgrade-row .k { color: var(--fg-3); }
.upgrade-row .v { color: var(--fg-1); font-weight: 500; font-variant-numeric: tabular-nums; }
/* Per-tier comparison rows (concurrency modal): dim tier names, with the caller's current tier brightened. */
.upgrade-tier-name { color: var(--fg-2); }
.upgrade-tier-tag { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--fg-3); }
.upgrade-row.is-current .upgrade-tier-name { color: var(--fg-1); font-weight: 600; }
.upgrade-row.is-current .v { color: var(--fg-1); font-weight: 600; }
.upgrade-fineprint {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.5; color: var(--fg-3);
}
.upgrade-note { font-size: 14px; line-height: 1.55; color: var(--fg-1); }

/* ── TOOLTIP (themed replacement for native title=) ──────────
   Portal-rendered (escapes overflow:hidden), positioned in JS (Tooltip.tsx). */
.tooltip-pop {
  position: fixed;
  z-index: 3000;
  background: var(--bg-elev);
  color: var(--fg-1);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-card-hover);
  animation: tooltipIn 0.12s ease;
}
.tooltip-pop.is-top { transform: translate(-50%, calc(-100% - 8px)); }
.tooltip-pop.is-bottom { transform: translate(-50%, 8px); }
@keyframes tooltipIn { from { opacity: 0; } to { opacity: 1; } }

/* ── CREDIT LEDGER (Account → Credits) ───────────────────────── */
.acc-ledger {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}
.acc-ledger-head {
  display: grid; grid-template-columns: 70px 1fr 110px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3);
}
.acc-ledger-head .amt { text-align: right; }
.acc-ledger-row {
  display: grid; grid-template-columns: 70px 1fr 110px; gap: 10px;
  align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.acc-ledger-row:last-child { border-bottom: 0; }
.acc-ledger-row .dt {
  display: flex; flex-direction: column; gap: 1px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.acc-ledger-row .dt .d { font-size: 12.5px; color: var(--fg-2); }
.acc-ledger-row .dt .t { font-size: 11px; color: var(--fg-3); }
.acc-ledger-row .act { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-ledger-row .act .lbl { font-size: 13.5px; color: var(--fg-1); font-weight: 500; }
.acc-ledger-row .act .vid {
  font-size: 12px; color: var(--fg-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-ledger-row .amt {
  text-align: right; font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.acc-ledger-row .amt.is-pos { color: #6BCF8F; }
.acc-ledger-row .amt.is-neg { color: var(--fg-2); }

/* ─────────────────────────────────────────────────────────────
   Component-ownership primitives. Rules the React primitives in
   src/components own (Button, TextLink, the boot splash) so screens
   never hand-roll these cosmetics via inline style.
   ───────────────────────────────────────────────────────────── */
/* Disabled = dimmed + non-interactive, owned by Button (was inline opacity per screen). */
.btn-app:disabled, .generate-btn:disabled { opacity: 0.5; cursor: default; }
/* Generate button "not ready yet" state: still disabled, but it explains what's
   missing (see GenerateButton `hint`) instead of sitting as a silent grey block.
   Overrides the 0.5 :disabled dim so the instruction stays legible (must come AFTER
   that rule — equal specificity, source order wins), drops the CTA glow, and reads as
   a calm waiting state rather than a live button. */
.generate-btn.is-hint {
  opacity: 1;
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--fg-2);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: default;
}
.generate-btn.is-hint .gb-label { line-height: 1.25; }
/* Underlined TextLink variant + link-styled action button reset. */
.hover-link.is-underline { text-decoration: underline; }
button.hover-link { border: 0; background: none; padding: 0; font: inherit; text-align: inherit; }
/* Full-viewport splash painted in the page colour while Clerk hydrates (RootLayout). */
.boot-splash { min-height: 100dvh; background: var(--bg); }
/* Accent-tinted status/error line in the generating progress card (owned by GenProgressCard). */
.gen-error { color: var(--accent); }
/* Inline accent error line (owned by InlineError — was inline style in NewVideoScreen). */
.inline-error { color: var(--accent); font-size: 12px; line-height: 1.4; margin: 6px 0 10px; }
/* A link inside an inline error stays accent (mirrors the old .sc-error .hover-link). */
.inline-error .hover-link { color: var(--accent); }
.inline-error .hover-link:hover { color: var(--accent-hover); }
/* The disabled SOON input-mode tab keeps its dim (was an inline opacity in NewVideoScreen). */
.mode-seg:disabled, .mode-seg.is-disabled { opacity: 0.55; cursor: default; }
/* Finished player (owned by FinVideoState / the video element — were inline styles). */
.fin-video-state {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; color: var(--fg-2); font-size: 14px; line-height: 1.5;
}
.fin-video-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Retention tooltip body (owned by RetentionTooltipBody — were inline styles in RecentProjects). */
.retention-tip { display: block; white-space: normal; width: 200px; font-weight: 400; line-height: 1.45; text-align: left; }
.retention-tip-sub { display: block; margin-top: 4px; color: var(--fg-3); }
/* Standard padded body for a simple confirm ModalSheet (was an inline-styled div). */
.modal-body { padding: 6px 20px 18px; color: var(--fg-1); font-size: 14px; line-height: 1.5; }
