.lc-lite {
  min-height: 100dvh;
  width: 100%;
  background: #0b100e;
  color: #eaf2ec;
  padding: 24px;
  overflow: auto;
  box-sizing: border-box;
}

.lc-lite * {
  box-sizing: border-box;
}

.lc-lite-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: auto;
}

.lc-lite button,
.lc-lite-primary {
  border: 1px solid #345141;
  border-radius: 10px;
  background: #1a2921;
  color: #eaf2ec;
  padding: 13px 18px;
  cursor: pointer;
  font: inherit;
  text-align: center;
  text-decoration: none;
}

.lc-lite button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.lc-lite .lc-lite-primary {
  background: #a9e889;
  color: #102014;
  border: 0;
  font-weight: 700;
  display: block;
  width: 100%;
}

.lc-lite-hero {
  text-align: center;
  padding: 65px 0 40px;
}

.lc-lite h1 {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.1;
  margin: 18px 0;
}

.lc-lite-tag {
  color: #a9e889;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
}

.lc-engine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 850px;
  margin: auto;
}

.lc-engine-card,
.lc-lite-studio {
  background: #131e18;
  border: 1px solid #293e32;
  border-radius: 20px;
  padding: 28px;
  display: grid;
  gap: 18px;
}

.lc-desktop-card {
  border-color: #61934f;
}

.lc-engine-card li {
  margin: 12px 0;
  color: #b6c9ba;
}

.lc-lite footer {
  margin-top: 40px;
  text-align: center;
  color: #83988b;
}

.lc-lite-studio {
  max-width: 760px;
  margin: 30px auto;
}

.lc-lite-upload {
  border: 1px dashed #52795f;
  border-radius: 14px;
  padding: 24px;
  display: grid;
  gap: 12px;
  text-align: center;
}

.lc-lite video {
  width: 100%;
  max-height: 480px;
  background: black;
  border-radius: 12px;
}

.lc-lite-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lc-lite-range label {
  display: grid;
  gap: 8px;
}

.lc-lite input {
  width: 100%;
  padding: 12px;
  background: #0b100e;
  color: white;
  border: 1px solid #345141;
  border-radius: 8px;
}

.lc-lite progress {
  width: 100%;
  accent-color: #a9e889;
}

.lc-lite-result {
  display: grid;
  gap: 18px;
}

.lc-lite-muted,
.lc-lite small {
  color: #83988b;
}

@media (max-width: 650px) {
  .lc-lite {
    padding: 16px;
  }

  .lc-engine-grid {
    grid-template-columns: 1fr;
  }

  .lc-lite-hero {
    padding: 36px 0 24px;
  }

  .lc-engine-card,
  .lc-lite-studio {
    padding: 20px;
  }
}

/* Shared Create Clips layout - Lite Engine */

.lc-lite-workspace {
  min-height: 100dvh;
  width: 100%;
  overflow: auto;
}

.lc-lite-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-bottom: 1px solid #293e32;
  background: #101713;
  gap: 12px;
}

.lc-lite-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lc-engine-badge {
  color: #a9e889;
  background: #182b20;
  border: 1px solid #345141;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.lc-source-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  background: black;
}

.lc-lite-sidebar {
  display: grid;
  align-self: start;
  gap: 12px;
  min-width: 0;
}

.lc-lite-workspace .lc-lite-sidebar > .lsm-pipeline {
  padding: 14px;
  border-radius: 14px;
}

.lc-lite-sidebar .lsm-pipeline h2 {
  margin-bottom: 8px;
  font-size: 16px;
}

.lc-lite-sidebar .lsm-pipeline > .lc-preview-note {
  margin-top: 6px;
}

.lc-empty-clips p {
  margin: 4px 0 0;
}

.lc-lite-format {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.lc-generated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.lc-generated-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #293e32;
  border-radius: 12px;
  background: #131e18;
}

.lc-generated-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
}

.lc-clip-info {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lc-empty-clips {
  text-align: center;
  padding: 14px;
  border: 1px dashed #345141;
  border-radius: 12px;
  color: #83988b;
}

.lc-lite-workspace progress {
  width: 100%;
  accent-color: #a9e889;
}

@media (max-width: 650px) {
  .lc-lite-topbar {
    padding: 12px;
  }
}

.lc-lite-workspace {
  height: 100dvh;
  overflow-y: auto;
}

.lc-lite-range[hidden] {
  display: none !important;
}


.lc-lite-workspace {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: #131e18;
  --text: #eaf2ec;
  --border: #345141;
}

.lc-lite-workspace .page,
.lc-lite-workspace .ez-create {
  background: transparent;
  color: #eaf2ec;
}

.lc-lite-workspace :is(.lsm-import-panel, .lsm-pipeline, .ez-import-presets, .lc-caption-editor, details.card) {
  background: #131e18;
  color: #eaf2ec;
  border-color: #293e32;
}

.lc-lite-workspace :is(.ez-drop, .input, option) {
  background: #101713;
  color: #eaf2ec;
  border-color: #345141;
}

.lc-lite-workspace .lc-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-checkbox input {
  accent-color: #a9e889;
}

.lc-subtitle-settings {
  margin-block: 14px;
}

.lc-job-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lc-processing-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-inline-start: 2px solid #dfbc75;
  background: #201e17;
  color: #f1dfb8;
  border-radius: 6px;
}

.lc-caption-editor {
  padding: 16px;
  border: 1px solid;
  border-radius: 12px;
}

.lc-caption-words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  margin-block: 12px;
}

.lc-caption-words input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 420px) {
  .lc-lite-workspace .lc-lite-topbar {
    flex-wrap: wrap;
  }
}

.lc-lite-workspace .btn-primary {
  background: #a9e889;
  color: #102014;
}

.lc-lite-workspace .muted {
  color: #97ae9f;
}

@media (max-width: 650px) {
  .lc-lite-workspace .lc-lite-range {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lc-lite {
  color-scheme: dark;
  background:
    radial-gradient(ellipse at 50% 12%, #1b3324 0%, transparent 52%),
    #090e0b;
  padding: 24px clamp(16px, 5vw, 64px) 48px;
  height: 100dvh;
}

.lc-entry-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
}

.lc-entry-mark,
.lc-engine-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #233e2d;
  color: #b7eea0;
}

.lc-entry-mark {
  width: 38px;
  height: 38px;
}

.lc-engine-icon {
  width: 46px;
  height: 46px;
}

.lc-lite-hero {
  padding: clamp(34px, 7vh, 80px) 0 36px;
}

.lc-lite-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.lc-lite-hero em {
  color: #b7eea0;
  font-style: normal;
}

.lc-lite-hero p,
.lc-engine-card p {
  color: #b7c7bc;
  line-height: 1.55;
}

.lc-engine-grid {
  max-width: 920px;
}

.lc-engine-card {
  grid-template-rows: auto auto 1fr auto auto;
  gap: 14px;
  background: #131e18;
  border-color: #3e5948;
  box-shadow: 0 16px 40px #0003;
}

.lc-engine-card h2,
.lc-engine-card p {
  margin: 0;
}

.lc-engine-card h2 + p {
  margin-top: 6px;
}

.lc-engine-card ul {
  margin: 0;
  padding-inline-start: 1.15rem;
}

.lc-engine-card li {
  margin: 5px 0;
}

.lc-engine-card li::marker {
  color: #a9e889;
}

.lc-engine-card .lc-engine-local {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-top: 1px solid #314338;
  padding-top: 12px;
  font-size: 0.875rem;
  color: #d6e5d9;
}

.lc-engine-local svg {
  flex: none;
  margin-top: 2px;
  color: #a9e889;
}

.lc-desktop-card .lc-lite-primary {
  color: #eaf2ec;
  background: #23382b;
  border: 1px solid #5c8065;
}

.lc-lite button:hover {
  filter: brightness(1.12);
}

.lc-lite button:focus-visible {
  outline: 2px solid #c8f9b4;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .lc-engine-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lc-engine-card {
    padding: 20px;
  }
}
.lc-engine-downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.85rem;
}
/* LocalClipMaker UI - design tokens + components.
   Logical properties (inline-start/end) everywhere so Arabic RTL mirrors cleanly. */

:root {
  --font-ui: "Geist", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-display: "Instrument Serif", "Noto Serif", Georgia, "Noto Sans Arabic", "Songti SC",
    serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
  --gap: 16px;
  --topbar-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1020;
  --surface: #111a2e;
  --surface-2: #18233b;
  --surface-3: #1d2944;
  --border: #25324f;
  --border-strong: #34446a;
  --text: #eef2f8;
  --strong: #ffffff; /* headings, key numbers */
  --muted: #aeb7ca;
  --gold: #d9b56a;
  --gold-text: #d9b56a;
  --gold-soft: rgba(217, 181, 106, 0.13);
  --gold-line: rgba(217, 181, 106, 0.45);
  --chip-bg: #1e2d50;
  --chip-text: #c9d6f2;
  --success: #5fc79a;
  --success-soft: rgba(95, 199, 154, 0.13);
  --danger: #f2948a;
  --danger-soft: rgba(242, 148, 138, 0.12);
  --primary-bg: #ffffff; /* white fill, navy text */
  --primary-text: #0a1020;
  --primary-hover: #e6ecf7;
  --btn-bg: transparent; /* secondary buttons: white outline */
  --btn-border: rgba(255, 255, 255, 0.34);
  --btn-border-hover: #ffffff;
  --btn-hover-bg: rgba(255, 255, 255, 0.06);
  --mark-tile: #0e1a33;
  --mark-tile-border: #2b3e66;
  --mark-fin: #9cecaf;
  --mark-wave: #5b9bff;
  --bar: #2b3a5e;
  --bar-cand: #5d74a8;
  --track: #22304d;
  --overlay: rgba(4, 8, 18, 0.72);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 24px 64px -16px rgba(0, 0, 0, 0.7);
  --focus: 0 0 0 3px rgba(217, 181, 106, 0.35);
  --warn: #f0b45a;
  --warn-soft: rgba(240, 180, 90, 0.14);
  --series-ours: #a8873a;
  --series-other: #5b7fd1;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f9fafc;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --surface-3: #eceff5;
  --border: #e4e8f0;
  --border-strong: #cdd4e1;
  --text: #0e1a33;
  --strong: #0b1530;
  --muted: #55617a;
  --gold: #d4ae5c;
  --gold-text: #806027;
  --gold-soft: rgba(212, 174, 92, 0.16);
  --gold-line: rgba(212, 174, 92, 0.6);
  --chip-bg: #eaf0fb;
  --chip-text: #1d3461;
  --success: #1a724c;
  --success-soft: rgba(29, 122, 82, 0.1);
  --danger: #b3261e;
  --danger-soft: rgba(179, 38, 30, 0.08);
  --primary-bg: #0e1a33;
  --primary-text: #ffffff;
  --primary-hover: #1d3461;
  --btn-bg: #ffffff;
  --btn-border: #d5dbe6;
  --btn-border-hover: #0e1a33;
  --btn-hover-bg: #f7f9fc;
  --mark-tile: #ffffff;
  --mark-tile-border: #d5e1f5;
  --mark-fin: #267047;
  --mark-wave: #1f6fe5;
  --bar: #dde3ee;
  --bar-cand: #8e9fc4;
  --track: #e9edf4;
  --overlay: rgba(14, 26, 51, 0.45);
  --shadow: 0 1px 2px rgba(14, 26, 51, 0.04), 0 8px 24px -12px rgba(14, 26, 51, 0.12);
  --shadow-pop: 0 24px 64px -16px rgba(14, 26, 51, 0.3);
  --focus: 0 0 0 3px rgba(212, 174, 92, 0.45);
  --warn: #9a5b00;
  --warn-soft: rgba(154, 91, 0, 0.1);
  --series-ours: #b08a3a;
  --series-other: #4f72c4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

body {
  min-height: 100vh;
  transition: background-color 0.2s var(--ease);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  font-variant-numeric: inherit;
}

a {
  color: inherit;
}

::selection {
  background: var(--gold-soft);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.mono,
.tc {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}

/* timecodes always read left-to-right, even inside Arabic text */
.tc {
  direction: ltr;
  unicode-bidi: isolate;
}

.muted {
  color: var(--muted);
}

.gold {
  color: var(--gold-text);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ shell */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-inline-end: 12px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--mark-tile); /* navy tile + white fin (dark), white tile + blue fin (light) */
  display: grid;
  place-items: center;
  border: 1px solid var(--mark-tile-border);
}

.brand-name {
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 2px;
  /* the nav gives up its room first (it scrolls); the buttons on the right shrink only after it.
     With an even shrink (1.2.40) the buttons overflowed their box by ~20 px at 1024 px in Turkish
     and the page scrolled sideways */
  flex: 0 1000 auto;
  min-width: 0;
  overflow-x: auto; /* too narrow for every link: the nav scrolls, the page never does */
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: none;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.topbar-spacer {
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* the job pill shrinks (ellipsis) instead of pushing the page wider */
}

.topbar-actions > * {
  flex-shrink: 0;
}

.topbar-actions > .job-pill {
  flex-shrink: 1;
  min-width: 44px;
}

.job-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-pill b {
  color: var(--text);
  font-weight: 500;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.page-narrow {
  max-width: 880px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.display {
  color: var(--strong);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

.display em {
  font-style: italic;
  color: var(--gold-text);
}

.lede {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 15px;
  max-width: 60ch;
}

h2.section-title,
h3.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

:lang(ar) h2.section-title,
:lang(ar) h3.section-title,
:lang(zh) h2.section-title,
:lang(zh) h3.section-title {
  letter-spacing: 0;
  font-size: 13px;
}

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--strong);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, opacity 0.15s;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--btn-hover-bg);
  border-color: var(--btn-border-hover);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-bg);
  color: var(--primary-text);
  border-color: transparent;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: transparent;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  border-radius: var(--r-lg);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 36px;
  padding: 0;
}

.icon-btn.btn-sm {
  width: 30px;
}

.btn svg,
.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

[dir="rtl"] .flip-rtl {
  transform: scaleX(-1);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  height: auto;
  min-height: 140px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold-line);
  box-shadow: var(--focus);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

[dir="rtl"] .select {
  background-position: 12px 16px, 17px 16px;
}

.select-sm {
  height: 32px;
  font-size: 13px;
  background-position: calc(100% - 17px) 13px, calc(100% - 12px) 13px;
}

[dir="rtl"] .select-sm {
  background-position: 12px 13px, 17px 13px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
}

.field-hint {
  font-size: 12.5px;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"],
.segmented button[role="radio"][aria-checked="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--border);
}

.segmented.block {
  display: flex;
  width: 100%;
}

.segmented.block button {
  flex: 1;
}

/* phones: long labels (Turkish, German) wrap inside a full-width choice instead of being cut off */
@media (max-width: 520px) {
  .segmented.block button {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    height: auto;
    min-height: 30px;
    padding: 4px 8px;
    line-height: 1.2;
  }
}

.toggle {
  --w: 38px;
  position: relative;
  width: var(--w);
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--track);
  cursor: pointer;
  padding: 0;
  flex: none;
  transition: background 0.18s var(--ease), border-color 0.18s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s var(--ease), background 0.18s;
}

.toggle[aria-checked="true"] {
  background: var(--gold);
  border-color: var(--gold);
}

.toggle[aria-checked="true"]::after {
  transform: translateX(16px);
  background: #0e1a33;
}

[dir="rtl"] .toggle[aria-checked="true"]::after {
  transform: translateX(-16px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.chip-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.chip-gold {
  background: var(--gold-soft);
  color: var(--gold-text);
}

.chip-success {
  background: var(--success-soft);
  color: var(--success);
}

.chip-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip .dot.pulse {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

.progress {
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}

.progress.indeterminate > span {
  width: 35% !important;
  animation: indet 1.3s ease-in-out infinite;
}

@keyframes indet {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}

[dir="rtl"] .progress.indeterminate > span {
  animation-name: indet-rtl;
}

@keyframes indet-rtl {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-300%);
  }
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}

:root[data-theme="light"] .panel {
  padding: 20px;
}

:root[data-theme="light"] .page {
  padding-top: 36px;
}

:root[data-theme="light"] .page-head {
  margin-bottom: 32px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 24px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 56px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-xl);
  color: var(--muted);
}

.empty .display {
  color: var(--text);
  font-size: 32px;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.notice-danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.notice-danger .notice-title {
  color: var(--danger);
}

.notice-title {
  font-weight: 600;
}

/* ------------------------------------------------------------------ modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--overlay);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade 0.15s var(--ease);
  backdrop-filter: blur(3px);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal-backdrop.modal-top {
  z-index: 60;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  animation: rise 0.2s var(--ease);
}

.modal-wide {
  width: min(980px, 100%);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 6px;
}

.modal-head h2 {
  color: var(--strong);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  margin: 0;
}

.modal-body {
  padding: 14px 22px 22px;
  display: grid;
  gap: 18px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ toast */

.toasts {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 60;
  display: grid;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  animation: rise 0.2s var(--ease);
  font-size: 13.5px;
}

.toast-ok .icon {
  color: var(--success);
}

.toast-err .icon {
  color: var(--danger);
}

/* ---------------------------------------------------------------- library */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.pcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s var(--ease), border-color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}

.pcard:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.pcard-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}

.pcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}

.pcard:hover .pcard-thumb img {
  transform: scale(1.025);
}

.pcard-thumb .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.pcard-duration {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 10, 20, 0.78);
  color: #f3f2ee;
  font-size: 12px;
}

.pcard-mode {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
}

.pcard-mode .chip {
  background: rgba(6, 10, 20, 0.72);
  color: #f3f2ee;
  backdrop-filter: blur(6px);
}

.pcard-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
  flex: 1;
  align-content: start;
}

.pcard-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard-source {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  min-width: 0;
}

.pcard-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
}

.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-ready .dot {
  background: var(--success);
}

.status-ready {
  color: var(--success);
}

.status-running .dot {
  background: var(--gold);
  animation: pulse 1.4s infinite;
}

.status-error {
  color: var(--danger);
}

.status-error .dot {
  background: var(--danger);
}

.new-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-xl);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  font-weight: 500;
}

.new-card:hover {
  border-color: var(--gold-line);
  color: var(--text);
  background: var(--gold-soft);
}

.new-card .plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
  padding: 28px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone.drag,
.dropzone:hover {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.dropzone strong {
  color: var(--text);
  font-weight: 500;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mode-opt {
  text-align: start;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s;
}

.mode-opt:hover {
  border-color: var(--border-strong);
}

.mode-opt[aria-pressed="true"] {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.mode-opt b {
  font-weight: 600;
  font-size: 13.5px;
}

.mode-opt span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------------------------------------------------------------- project */

.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.proj-head .display {
  font-size: 30px;
  line-height: 1.1;
  max-width: 34ch;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
}

.crumbs:hover {
  color: var(--text);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.proj-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.proj-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  align-items: start;
}

.proj-main {
  display: grid;
  /* 1.2.23: a sized track, so no child (a long transcript word) can stretch the player and,
     through it, the 9:16 preview */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.proj-main > * {
  min-width: 0;
}

.proj-side {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 32px);
  min-height: 420px;
  /* the list and the settings scroll by themselves; if their minimums ever don't fit (a very
     short window, a wrapped tab row) the whole panel scrolls instead of cutting anything off */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
}

.player {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.player-bar .tc {
  color: var(--muted);
  font-size: 13px;
}

.vprev {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.vprev-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #05080f;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.vprev-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.vprev-label {
  font-size: 11.5px;
  color: var(--muted);
}

.stage-left {
  min-width: 0;
}

.stage-right {
  display: flex;
  flex-direction: column;
}

.stage-right .vprev-frame {
  flex: none;
}

/* Hype map */

.hype {
  position: relative;
}

.hype canvas {
  width: 100%;
  height: 132px;
  display: block;
  cursor: pointer;
  touch-action: pan-y;
}

.hype-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  direction: ltr;
}

.hype-tip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  font-size: 11.5px;
  white-space: nowrap;
  z-index: 2;
}

.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 6px;
  vertical-align: -1px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

/* Signal stats */

.sig-list {
  display: grid;
  gap: 12px;
}

.sig {
  display: grid;
  gap: 6px;
}

.sig-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.sig-top .val {
  font-family: var(--font-mono);
  color: var(--muted);
}

.sig-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.sig-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--chip-text);
  opacity: 0.75;
  transition: width 0.35s var(--ease);
}

.sig-bar span.hot {
  opacity: 1;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  text-align: end;
}

/* Publish package */

.pub-grid {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.score-ring {
  position: relative;
  width: 116px;
  height: 116px;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring .center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 0;
}

.score-ring .num {
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
}

.score-ring .den {
  font-size: 11px;
  color: var(--muted);
}

.pub-block {
  display: grid;
  gap: 8px;
}

.pub-block + .pub-block {
  margin-top: 14px;
}

.pub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sugg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.sugg span {
  flex: 1;
  min-width: 0;
}

.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 2.4s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  color: var(--gold-text);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pub-soon-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 10px 0 0;
}

.prompt-box {
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.desc-box {
  font-size: 13.5px;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Publish package: one clear state instead of empty boxes */
.pub-state {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
}

.pub-state-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--gold-text);
}

.pub-state-text {
  display: grid;
  gap: 3px;
  flex: 1 1 220px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.pub-state-text b {
  color: var(--strong);
  font-size: 14px;
  font-weight: 600;
}

.pub-state-paused .pub-state-icon {
  color: var(--warn, var(--gold-text));
}

.pub-state-error {
  border-style: solid;
  border-color: var(--danger-line, var(--border-strong));
}

.pub-state-error .pub-state-icon {
  color: var(--danger);
}

.pub-missing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

/* Candidate list */

.side-tabs {
  display: flex;
  flex: none;
  flex-wrap: wrap; /* long labels (Turkish, German): the chip moves down instead of covering a tab */
  align-items: center;
  gap: 4px 6px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--border);
}

.side-tablist {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.side-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 10px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.side-tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.side-tabs .count {
  font-size: 11.5px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 18px;
}

.side-scroll {
  /* the list always keeps a real height; the render settings below give way first */
  flex: 1 1 auto;
  min-height: min(300px, 38vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.cand {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 10px 10px 8px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cand + .cand {
  margin-top: 2px;
}

.cand:hover {
  background: var(--surface-2);
}

.cand[aria-current="true"] {
  background: var(--surface-2);
  border-color: var(--gold-line);
}

.cand-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
}

.cand[aria-current="true"] .cand-rank {
  color: var(--gold-text);
}

.cand-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cand-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.cand-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.cand-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cand .cand-reasons {
  flex-wrap: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(to right, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
}

[dir="rtl"] .cand .cand-reasons {
  mask-image: linear-gradient(to left, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to left, #000 85%, transparent);
}

.cand .chip {
  height: 20px;
  font-size: 11.5px;
  padding: 0 6px;
}

.cand-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cand-line .cand-meta {
  flex: none;
}

.cand-score {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.cand-score .bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.cand-score .bar span {
  display: block;
  height: 100%;
  background: var(--bar-cand);
  border-radius: inherit;
}

.cand[aria-current="true"] .cand-score .bar span {
  background: var(--gold);
}

.cand-score .n {
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 24px;
  text-align: end;
}

.cand-accept {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.cand-accept .ok {
  color: var(--success);
}

/* Render panel */

.render-panel {
  border-top: 1px solid var(--border);
  padding: 14px 16px 0;
  display: grid;
  gap: 12px;
  background: var(--surface);
  /* short screens: the settings scroll inside the panel, the buttons stay pinned below */
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.render-panel {
  min-height: min(260px, 34vh); /* a few settings rows stay visible above the buttons */
}

/* the narrow side panel: segmented choices fit without a hidden sideways scroll */
.render-panel .segmented {
  display: flex;
}

.render-panel .segmented button {
  flex: 1 1 auto;
  padding: 0 8px;
  min-width: 0;
}

.render-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  margin: 0 -16px;
  padding: 10px 16px 16px;
  background: var(--surface);
  box-shadow: 0 -10px 12px -10px color-mix(in srgb, var(--text) 18%, transparent);
}

.render-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.render-row > label {
  color: var(--muted);
}

.hook-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.facecam-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Finished clips */

.clips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 4px;
}

.clip-card {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.clip-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  background: #000;
  object-fit: cover;
}

/* narrow clip cards: a long status chip ("YouTube · Private · 0 views") wraps, never spills out */
.clip-card .chip {
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 22px;
  flex-wrap: wrap;
  row-gap: 0;
  white-space: normal;
  padding-block: 2px;
}

.clip-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  font-size: 12px;
}

/* Facecam editor */

.fc-stage {
  position: relative;
  user-select: none;
  touch-action: none;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.fc-stage img {
  width: 100%;
  display: block;
  pointer-events: none;
}

.fc-rect {
  position: absolute;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(5, 8, 16, 0.55);
  cursor: move;
  border-radius: 4px;
}

.fc-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border: 2px solid #0e1a33;
  border-radius: 50%;
}

.fc-handle[data-h="nw"] {
  left: -10px;
  top: -10px;
  cursor: nwse-resize;
}

.fc-handle[data-h="ne"] {
  right: -10px;
  top: -10px;
  cursor: nesw-resize;
}

.fc-handle[data-h="sw"] {
  left: -10px;
  bottom: -10px;
  cursor: nesw-resize;
}

.fc-handle[data-h="se"] {
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}

.fc-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  line-height: 1.4;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--gold);
  color: #0e1a33;
  font-size: 11.5px;
  font-weight: 600;
}

/* Settings */

.settings-list {
  display: grid;
  gap: 16px;
}

.settings-list > * {
  min-width: 0; /* a long path (music folder) ends in "…" instead of widening the page */
}

.setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: 22px;
}

.setting h2,
.setting h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.setting p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.lang-tabs button {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-tabs button[aria-pressed="true"] {
  border-color: var(--gold-line);
  color: var(--text);
  background: var(--gold-soft);
}

.lang-tabs .n {
  font-size: 11px;
  color: var(--muted);
}

.save-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12.5px;
}

.lang-option {
  display: flex;
  justify-content: space-between;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1360px) {
  .proj-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 1360px) {
  /* laptops at 125-150 % scaling: room for the nav (7 links since 1.2.40), the pill and the buttons */
  .gov-state {
    display: none;
  }
  .brand-name {
    display: none;
  }
  .brand {
    margin-inline-end: 0;
  }
}

@media (max-width: 1180px) {
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1020px) {
  /* one column: player, hype map, then the candidates, then stats + publish */
  .proj-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .proj-main {
    display: contents;
  }
  .proj-main > :nth-child(1) {
    order: 1;
  }
  .proj-main > :nth-child(2) {
    order: 2;
  }
  .proj-side {
    order: 3;
  }
  .proj-main > :nth-child(3) {
    order: 4;
  }
  .proj-side {
    position: static;
    max-height: none;
    min-height: 0;
  }
  .side-scroll {
    max-height: 560px;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-h: 56px;
  }
  .topbar {
    padding: 0 16px;
    gap: 8px;
  }
  .brand-name {
    display: none;
  }
  .brand {
    margin-inline-end: 0;
  }
  .nav a {
    padding: 7px 9px;
  }
  .job-pill {
    display: none;
  }
  .page {
    padding: 20px 16px 48px;
  }
  .display {
    font-size: 34px;
  }
  .proj-head .display {
    font-size: 26px;
  }
  .stage {
    grid-template-columns: 1fr;
  }
  .stage-right .vprev-frame {
    width: min(62vw, 260px);
    height: auto;
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .pub-grid {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .setting {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }
  .modal-head h2 {
    font-size: 26px;
  }
  .toasts {
    inset-inline: 16px;
    max-width: none;
  }
  .hype canvas {
    height: 110px;
  }
  .render-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .render-row .segmented {
    display: flex;
  }
  .render-row .segmented button {
    flex: 1;
  }
}

/* Reduced motion: see the 1.2.2 motion block at the end (data-motion on <html>, set from the
   Settings choice and the OS preference). */

/* Phase 3B: viral score on cards, AI group, hook mode, title votes, chat stats */

.cand-viral {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cand-viral .v-num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-text);
}

.cand-viral .v-den {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.v-pill {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--chip-bg);
  color: var(--chip-text);
}

.v-pill.v-very_high {
  background: var(--gold);
  color: #1a1404;
}

.v-pill.v-high {
  background: var(--gold-soft);
  color: var(--gold-text);
}

.v-pill.v-low {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cand-score .lbl {
  font-size: 11px;
  color: var(--muted);
}

.cand-score.secondary .bar {
  height: 3px;
  opacity: 0.75;
}

.cand-score.secondary .n {
  font-size: 11px;
  color: var(--muted);
}

.ai-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-group .select {
  width: auto;
}

.btn-gold {
  background: var(--gold-soft);
  color: var(--gold-text);
  border-color: var(--gold-line);
}

.btn-gold:hover:not(:disabled) {
  background: var(--gold-soft);
  border-color: var(--gold);
}

@media (min-width: 721px) {
  .render-row .segmented {
    justify-self: start;
  }
}

.hook-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.hook-badge.ai {
  color: var(--gold-text);
}

.render-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.sugg .vote {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.sugg .vote[aria-pressed="true"].vote-up {
  color: var(--success);
}

.sugg .vote[aria-pressed="true"].vote-down {
  color: var(--danger);
}

.sugg .vote[aria-pressed="true"] svg {
  fill: currentColor;
  fill-opacity: 0.22;
}

.chat-stats {
  display: grid;
  gap: 10px;
}

.chat-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

/* ===================================================================== Phase 6 */

.ok-text { color: var(--success); }
.danger-text { color: var(--danger); }
.section-title .count,
.btn .count,
.nav-count {
  display: inline-block;
  font-size: 11px;
  padding: 0 6px;
  margin-inline-start: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 18px;
  font-weight: 500;
  vertical-align: 1px;
}
.nav-count { background: var(--gold-soft); color: var(--gold-text); }
.btn .count { margin-inline-start: 2px; background: var(--surface-3); }

/* ---------- shutdown countdown */
.shutdown-banner {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--gold-soft);
  border-bottom: 1px solid var(--gold-line);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.shutdown-banner .icon { color: var(--gold-text); }

/* ---------- queue */
.q-top { display: grid; gap: 12px; margin-bottom: 28px; }
.q-card { padding: 18px 20px; }
.q-card-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.q-card-desc { margin: 4px 0 0; font-size: 13px; }
.q-total { display: grid; justify-items: end; gap: 2px; font-size: 12.5px; }
.q-total b { font-size: 22px; font-weight: 500; color: var(--text); }
.q-section { margin-bottom: 28px; }
.q-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.q-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.btn-danger-text { color: var(--danger); }
.q-paused {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px;
  font-size: 13px; color: var(--text); background: var(--gold-soft); border: 1px solid var(--gold-line);
}
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-row {
  display: grid;
  grid-template-columns: 28px 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s;
}
.q-row[draggable="true"] { cursor: grab; }
.q-row.running { border-color: var(--gold-line); background: linear-gradient(90deg, var(--gold-soft), transparent 60%), var(--surface); }
.q-row.drag-over { border-color: var(--gold); box-shadow: 0 -2px 0 var(--gold) inset; }
.q-grip { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.q-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.q-main { min-width: 0; }
.q-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.q-title a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.q-title a:hover { text-decoration: underline; }
.q-tag { height: 18px; font-size: 10.5px; flex: none; }
.q-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-progress { display: grid; grid-template-columns: minmax(80px, 1fr) auto; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; }
.q-eta { font-size: 12.5px; text-align: end; white-space: nowrap; }
.q-actions { display: flex; align-items: center; gap: 2px; }
.q-empty { display: flex; align-items: center; gap: 8px; padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.q-hint { font-size: 12px; margin: 8px 2px 0; }
.q-state { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; }
.q-state.q-done { background: var(--success-soft); color: var(--success); }
.q-state.q-error { background: var(--danger-soft); color: var(--danger); }
.q-state.q-cancelled { background: var(--surface-2); color: var(--muted); }
.status-word.s-done { color: var(--success); }
.status-word.s-error { color: var(--danger); }
.q-error { margin-top: 6px; font-size: 12.5px; color: var(--danger); white-space: normal; }
.batch-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.batch-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.batch-item input { accent-color: var(--gold); width: 16px; height: 16px; }
.batch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.batch-meta { font-size: 12.5px; white-space: nowrap; }
.batch-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .q-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .q-row .q-icon { display: none; }
  .q-row .q-eta { grid-column: 2; text-align: start; }
  .q-row .q-actions { grid-column: 3; grid-row: 1 / span 2; }
  .batch-item { grid-template-columns: auto minmax(0, 1fr); }
  .batch-meta { grid-column: 2; }
}

/* ---------- best-of */
.bestof-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; margin-bottom: 32px; }
.bestof-list { padding: 18px 20px; }
.bestof-side { padding: 18px 20px; display: grid; gap: 14px; position: sticky; top: calc(var(--topbar-h) + 16px); }
@media (max-width: 900px) {
  .bestof-layout { grid-template-columns: 1fr; }
  .bestof-side { position: static; }
}
.bo-topn { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bo-topn .input { width: 64px; height: 32px; }
.bo-note { font-size: 12.5px; margin: 0 0 12px; }
.bo-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bo-item {
  display: grid;
  grid-template-columns: 18px 24px 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: grab;
  user-select: none;
}
.bo-item.dragging { opacity: 0.45; }
.bo-item.drag-over { border-color: var(--gold); box-shadow: 0 -2px 0 var(--gold) inset; }
.bo-grip { color: var(--muted); display: grid; place-items: center; }
.bo-pos { color: var(--gold-text); font-size: 12.5px; }
.bo-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; display: block; }
.bo-main { min-width: 0; }
.bo-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-meta { font-size: 12px; }
.bo-score { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-text); font-size: 13px; }
.bo-actions { display: flex; }
@media (max-width: 640px) {
  .bo-item { grid-template-columns: 24px 72px minmax(0, 1fr) auto; }
  .bo-grip, .bo-score { display: none; }
  .bo-thumb { width: 72px; }
}
.bo-more { margin-top: 14px; }
.bo-more summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.bo-rest { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; max-height: 280px; overflow: auto; }
.bo-add {
  width: 100%;
  display: grid;
  grid-template-columns: 16px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  text-align: start;
  cursor: pointer;
  font-size: 13px;
}
.bo-add:hover:not(:disabled) { background: var(--surface-2); }
.bo-summary { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); margin: 0; }
.exports { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.export-card { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 20px; padding: 16px; }
@media (max-width: 900px) { .export-card { grid-template-columns: minmax(0, 1fr); } .export-head { flex-wrap: wrap; } }
.export-media video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); background: #000; display: block; }
.export-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.export-title { color: var(--strong); margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.export-meta { font-size: 12px; margin-top: 4px; }
.export-actions { display: flex; gap: 4px; flex: none; }
.export-text { white-space: pre-wrap; max-height: 220px; overflow: auto; }

/* ---------- calibration / stats */
.v-pill.v-cal { background: var(--gold-soft); color: var(--gold-text); box-shadow: inset 0 0 0 1px var(--gold-line); }
.cal-box { display: grid; justify-items: center; gap: 4px; font-size: 12px; text-align: center; }
.cal-hint { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 8px 8px 0; border-radius: var(--r-sm); background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.cal-hint span { flex: 1; }
.cal-hint a { color: var(--gold-text); }
.perf-line {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-align: start;
}
.perf-line:hover { background: var(--surface-3); color: var(--text); }
.perf-line.has { color: var(--text); }
.perf-line.has .icon { color: var(--gold-text); }
.perf-form { display: grid; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.perf-form label { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted); }
.perf-form .input { height: 30px; font-size: 13px; padding: 0 8px; min-width: 0; width: 100%; }
.perf-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cal-chip { height: 28px; padding: 0 12px; }
.cal-status { padding: 20px; margin-bottom: 16px; }
.cal-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
@media (max-width: 640px) { .cal-progress { grid-template-columns: 1fr; } }
.cal-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .cal-grid { grid-template-columns: 1fr; } }
.cal-big { color: var(--strong); font-size: 32px; line-height: 1.1; margin-top: 4px; }
.drivers { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.drivers li { display: flex; justify-content: space-between; gap: 8px; }
.stats-page .card + .card,
.stats-page .stat-groups + .card { margin-top: 16px; }
.stat-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.stat-group { padding: 18px 20px; }
.stat-group h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.best-chip { height: 18px; font-size: 10.5px; margin-inline-start: 6px; padding: 0 6px; }
.scatter { position: relative; width: 100%; }
.scatter svg { display: block; overflow: visible; }
.scatter .grid { stroke: var(--border); stroke-width: 1; }
.scatter .ideal { stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.scatter .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.scatter .axis-title { fill: var(--muted); font-size: 12px; }
.scatter .dot { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.scatter g[tabindex]:focus { outline: none; }
.scatter g[tabindex]:focus .dot { stroke: var(--text); }
.chart-tip {
  position: absolute;
  pointer-events: none;
  width: 220px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  display: grid;
  gap: 2px;
}
.tip-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: start; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table .num { text-align: end; white-space: nowrap; }
.cell-title { text-decoration: none; font-weight: 500; display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-title:hover { text-decoration: underline; }
.cell-sub { font-size: 11.5px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- settings: fast analysis */
.fast-box { display: grid; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.speed-box .pub-row { margin-bottom: 8px; }

/* ---------- phone: four nav links fit (language picker lives in Settings) */
@media (max-width: 720px) {
  .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .topbar-spacer { display: none; }
  .topbar-actions .select { display: none; }
  .topbar-actions { flex-shrink: 0; min-width: auto; }
}
.export-body .pub-row { flex-wrap: wrap; gap: 4px; }
.export-body .pub-row > div { flex-wrap: wrap; }

/* ---------- game awareness */
.chip-game { background: var(--gold-soft); color: var(--gold-text); box-shadow: inset 0 0 0 1px var(--gold-line); }
.game-select { width: auto; }
.gd-head { padding: 16px 20px; display: grid; gap: 10px; margin-bottom: 16px; }
.gd-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-pick .select { width: auto; min-width: 220px; }
.gd-why { font-size: 13px; }
.gd-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gd-stats { font-size: 12px; }
.gd-warn { margin: 0; font-size: 13px; color: var(--gold-text); }
.gd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-bottom: 32px; }
.gd-side { display: grid; gap: 16px; }
.gd-side .card, .gd-frame-card { padding: 16px 18px; }
@media (max-width: 1100px) { .gd-layout { grid-template-columns: minmax(0, 1fr); } }
.gd-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.gd-frame { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.gd-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.gd-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.gd-box rect { fill: rgba(217, 181, 106, 0.06); stroke: #d9b56a; stroke-width: 1.5; cursor: pointer; }
.gd-box text { fill: #d9b56a; font: 600 22px var(--font-ui); paint-order: stroke; stroke: rgba(0, 0, 0, 0.75); stroke-width: 4px; }
.gd-box.on rect { fill: rgba(95, 199, 154, 0.12); stroke: #5fc79a; stroke-width: 2.5; }
.gd-box.on text { fill: #5fc79a; }
.gd-probe { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.gd-probe li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.gd-reads { margin-top: 14px; }
.gd-reads ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.gd-reads li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gd-reads li .mono:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.gd-counts { margin-bottom: 10px; }
.gd-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow: auto; }
.gd-event {
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  text-align: start;
  cursor: pointer;
  font-size: 13px;
}
.gd-event:hover { background: var(--surface-2); }
.gd-event.on { background: var(--surface-3); }
.gd-event .chip { justify-self: start; }
.gd-src { font-size: 11px; }
.gd-note { font-size: 12.5px; margin: 4px 0 10px; }
.gd-path { font-size: 12px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.gd-regions { display: grid; gap: 8px; }
.gd-region { padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); display: grid; gap: 8px; }
.gd-region.on { border-color: var(--success); }
.gd-region-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.gd-region-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gd-region-inputs label { display: grid; gap: 2px; font-size: 11px; }
.gd-region-inputs .input { height: 30px; padding: 0 6px; font-size: 12.5px; min-width: 0; width: 100%; }
.gd-region-actions { display: flex; gap: 4px; }


/* ---------- resource governor: top-bar pill + monitor panel */
.gov { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
.gov-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.gov-pill:hover, .gov-pill[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface-3); }
.gov-mode { color: var(--text); font-weight: 550; }
.gov-state { overflow: hidden; text-overflow: ellipsis; }
.gov-nums { display: inline-flex; gap: 10px; padding-inline-start: 10px; border-inline-start: 1px solid var(--border); font-size: 12px; }
.gov-nums .is-warn, .gov-ram .is-warn { color: var(--warn); font-weight: 600; }
.gov-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.gov-dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
.gov-wait .gov-dot { background: var(--gold); }
.gov-warn .gov-dot { background: var(--warn); }
.gov-wait.gov-pill .gov-state { color: var(--gold-text); }
.gov-warn.gov-pill .gov-state { color: var(--warn); }
.gov-resume { height: 32px; border-radius: 999px; }

.gov-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 40; width: min(560px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); padding: 16px; display: grid; gap: 12px;
}
.gov-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gov-title { color: var(--strong); font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.gov-status { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-weight: 500; }
.gov-modes button { flex: 1; }
.gov-desc { margin: -4px 0 0; font-size: 13px; }
.gov-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.gov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }
.sw-ours { background: var(--series-ours); }
.sw-other { background: var(--series-other); }
.gov-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gov-chart { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.gov-chart.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.gov-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.gov-chart-title { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 550; }
.gov-chart.is-warn .gov-chart-title { color: var(--warn); }
.gov-chart-now { font-size: 13px; color: var(--text); }
.gov-chart-plot { position: relative; height: 64px; }
.gov-chart-plot svg { width: 100%; height: 100%; display: block; overflow: visible; cursor: crosshair; touch-action: none; }
.gov-axis { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gov-area-ours { fill: var(--series-ours); }
.gov-area-other { fill: var(--series-other); opacity: 0.55; }
.gov-line-total { fill: none; stroke: var(--series-other); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.gov-line-single { fill: none; stroke: var(--series-other); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.gov-line-single.is-warn { stroke: var(--warn); }
.gov-limit { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: 0.8; }
.gov-cross { stroke: var(--text); stroke-width: 1; opacity: 0.45; vector-effect: non-scaling-stroke; }
.gov-tip {
  position: absolute; top: -6px; transform: translateY(-100%); pointer-events: none; z-index: 2;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 6px 8px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; display: grid; gap: 2px;
}
.gov-tip b { font-weight: 600; margin-inline-start: 4px; }
.gov-chart-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; margin-top: 6px; }
.gov-limit-key::before { content: ""; display: inline-block; width: 14px; border-top: 1px dashed var(--muted); vertical-align: middle; margin-inline-end: 5px; }
.gov-ram { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 2px 0; }
.gov-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.gov-foot a { color: var(--gold-text); text-decoration: none; white-space: nowrap; }
.perf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.perf-grid label { display: grid; gap: 6px; }
.textarea.mono { font-family: var(--font-mono); font-size: 13px; }

@media (max-width: 1560px) { .gov-nums { display: none; } }
@media (max-width: 960px) { .gov-mode { display: none; } }
@media (max-width: 720px) {
  .gov-state, .gov-resume { display: none; }
  .gov-pill { padding: 0 10px; }
  .gov-panel { position: fixed; top: calc(var(--topbar-h) + 8px); inset-inline: 16px; width: auto; max-height: calc(100vh - var(--topbar-h) - 24px); overflow-y: auto; }
  .gov-charts, .perf-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- 1.2.1: brand, splash, onboarding, shell */

.brand-svg { display: block; }

/* "Under construction" (dev flag) - slim, on every screen */
.dev-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12.5px;
  line-height: 1.4;
  background: var(--warn-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  color: var(--text);
  text-align: center;
}
.dev-banner svg { color: var(--warn); flex: none; }
.dev-banner b { font-weight: 600; }
.dev-banner-task, .dev-banner-time { color: var(--muted); }
.stale-bar { flex-wrap: wrap; }

/* 1.2.50: Instagram Manual mode (bar on every screen, list, guide) */
.igm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12.5px;
  line-height: 1.4;
  background: var(--surface-2, var(--warn-soft));
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: center;
}
.igm-bar-due { background: var(--warn-soft); border-bottom-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.igm-bar svg { color: var(--warn); flex: none; }
.igm-bar .btn { flex: none; }
.igm-bar-text { min-width: 0; overflow-wrap: anywhere; }
.igm-sec { margin-top: 14px; }
.igm-sec h3 { font-size: 13px; margin: 0 0 6px; }
.igm-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.igm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.igm-row-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.igm-row-main b, .igm-row-main span { overflow-wrap: anywhere; }
.igm-row-act { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.igm-copy { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.igm-copy .btn { flex: 1 1 140px; }
.igm-done svg { color: var(--ok, var(--accent)); }
.stale-bar .btn { flex: none; }

/* Footer: version + What's new */
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 16px 28px;
  font-size: 12px;
  color: var(--muted);
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}
.link-btn:hover { color: var(--strong); }

/* What's new (CHANGELOG.md rendered) */
.md { display: grid; gap: 10px; font-size: 14px; line-height: 1.6; }
.md h3,
.md h4 { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.md p { margin: 0; }
.md ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.md ul ul { margin-top: 6px; }
.md strong { color: var(--strong); font-weight: 600; }
.md code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 4px; }
.md a { color: var(--gold-text); }
.whatsnew { max-height: min(60vh, 560px); overflow: auto; padding-inline-end: 4px; }

/* Splash: blue & white in both themes */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #0e1a33;
  cursor: default;
  transition: opacity 0.3s var(--ease);
}
.splash-out { opacity: 0; pointer-events: none; }
.splash-stage { display: grid; justify-items: center; gap: 22px; padding: 24px; text-align: center; }
.splash-logo { width: min(260px, 64vw); height: auto; overflow: visible; }
.splash-name {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.01em;
  animation: logo-rise 0.6s 0.35s var(--ease) both;
}
.splash-slogan {
  margin: -8px 0 0;
  font-size: 16px;
  color: #52607d;
  animation: logo-rise 0.6s 0.55s var(--ease) both;
}
.splash-hint { position: fixed; bottom: 24px; inset-inline: 0; text-align: center; font-size: 12px; color: #6b7894; }
.splash-handover .splash-name, .splash-handover .splash-slogan { animation: none; }
.logo-fin { animation: logo-glide 0.95s var(--ease) both; }
.logo-waves { animation: logo-drift 2.4s linear infinite; }
@keyframes logo-glide {
  from { transform: translateX(-46px); opacity: 0; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes logo-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-12px); }
}
@keyframes logo-rise {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Onboarding: first launch only, blue & white, lots of room */
.welcome {
  --w-navy: #0e1a33;
  --w-ocean: #1f6fe5;
  --w-ocean-dark: #1650c8;
  --w-muted: #52607d;
  --w-line: #e3e9f3;
  --w-soft: #f4f7fd;
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: #ffffff;
  color: var(--w-navy);
  animation: fade 0.3s var(--ease);
}
.welcome-card { width: min(760px, 100%); display: grid; gap: 36px; }
.welcome-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.welcome-logo { width: 96px; height: auto; flex: none; }
.welcome-steps { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex: 1; flex-wrap: wrap; }
.welcome-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--w-muted); }
.welcome-step-dot {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--w-line); font-size: 12px; font-weight: 600; background: #ffffff;
}
.welcome-steps li.on { color: var(--w-navy); font-weight: 600; }
.welcome-steps li.on .welcome-step-dot { background: var(--w-navy); border-color: var(--w-navy); color: #ffffff; }
.welcome-steps li.done .welcome-step-dot { background: var(--w-soft); border-color: #c9d9f4; color: var(--w-ocean-dark); }
.welcome-skip {
  background: none; border: 0; color: var(--w-muted); font-size: 13px; cursor: pointer; padding: 6px 2px;
  text-decoration: underline; text-underline-offset: 3px;
}
.welcome-skip:hover { color: var(--w-navy); }
.welcome-body { display: grid; gap: 14px; animation: logo-rise 0.35s var(--ease) both; }
.welcome-title:focus-visible {
  box-shadow: none; /* focus moves here for screen readers on every step; no ring needed */
}
.welcome-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  outline: none;
}
.welcome-lede { margin: 0 0 14px; font-size: 16px; color: var(--w-muted); max-width: 56ch; line-height: 1.55; }
.welcome-grid { display: grid; gap: 12px; }
.welcome-grid-lang { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.welcome-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.welcome-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--w-line);
  background: #ffffff;
  color: var(--w-navy);
  text-align: start;
  cursor: pointer;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.welcome-option:hover { border-color: #b9cdf0; background: var(--w-soft); }
.welcome-option.on { border-color: var(--w-ocean); box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.14); }
.welcome-option.on > svg { color: var(--w-ocean-dark); }
.welcome-option b { font-weight: 600; }
.welcome-option:focus-visible, .welcome-btn:focus-visible, .welcome-skip:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.35);
}
.welcome-option-tall { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 168px; padding: 20px; }
.welcome-option-tall > span:not(.welcome-option-icon):not(.welcome-check) { font-size: 13.5px; color: var(--w-muted); line-height: 1.5; }
.welcome-option-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--w-soft); color: var(--w-ocean-dark); margin-bottom: 6px;
}
.welcome-check {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--w-line); display: grid; place-items: center; color: #ffffff;
}
.welcome-option.on .welcome-check { background: var(--w-ocean); border-color: var(--w-ocean); }
.welcome-modes { display: grid; gap: 10px; }
.welcome-mode { justify-content: flex-start; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.welcome-mode-text { display: grid; gap: 4px; }
.welcome-mode-text b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.welcome-mode-text > span { font-size: 13.5px; color: var(--w-muted); line-height: 1.5; }
.welcome-radio {
  width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1.5px solid #b5c3db; flex: none; background: #ffffff;
}
.welcome-mode.on .welcome-radio { border: 5px solid var(--w-ocean); }
.welcome-badge {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 8px; border-radius: 999px;
  background: var(--w-soft); color: var(--w-ocean-dark); border: 1px solid #c9d9f4;
}
.welcome-hw { margin-top: 8px; padding: 18px 20px; border-radius: 14px; background: var(--w-soft); border: 1px solid var(--w-line); }
.welcome-hw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.welcome-hw-head b { font-size: 14px; }
.welcome-verdict { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--w-muted); }
.welcome-verdict.v-great, .welcome-verdict.v-good { color: #17694a; }
.welcome-verdict.v-cpu { color: #8a5300; }
.welcome-hw dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.welcome-hw dt { font-size: 11.5px; color: var(--w-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.welcome-hw dd { margin: 2px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
.welcome .spinner { border-color: #d5e1f5; border-top-color: var(--w-ocean); }
.welcome-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.welcome-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px;
  font-size: 15px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
}
.welcome-btn-primary { background: var(--w-navy); color: #ffffff; }
.welcome-btn-primary:hover:not(:disabled) { background: #1d3461; }
.welcome-btn-ghost { background: #ffffff; border-color: var(--w-line); color: var(--w-navy); }
.welcome-btn-ghost:hover:not(:disabled) { border-color: var(--w-navy); }
.welcome-btn:disabled { opacity: 0.6; cursor: default; }
.welcome-btn svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .welcome-card { gap: 26px; }
  .welcome-grid-3 { grid-template-columns: 1fr; }
  .welcome-option-tall { min-height: 0; }
  .welcome-hw dl { grid-template-columns: 1fr; }
  .welcome-step-label { display: none; }
  .welcome-logo { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-fin, .splash-name, .splash-slogan, .welcome-body { animation: fade 0.3s both; }
  .logo-waves { animation: none; }
  .splash { transition-duration: 0.1s; }
}


/* splash:begin */
/* ------------------------------------------------------- 1.2.2: launch sequence
   Same CSS in backend/localshortsmaker/web/splash.html (keep in sync). Theme colors: dark navy with
   a white fin, light white with the blue fin. */

.launch {
  --l-bg: #0b100e; --l-text: #ffffff; --l-muted: #9bad9e; --l-water: #94c97c;
  --l-fin-a: #ffffff; --l-fin-b: #9de1a9; --l-cut: #b1ef8d; --l-fin-solid: var(--mark-fin, #ffffff);
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--l-bg); color: var(--l-text); cursor: default; overflow: hidden;
  font-family: var(--font-ui, "Geist", system-ui, sans-serif);
}
:root[data-theme="light"] .launch {
  --l-bg: #ffffff; --l-text: #0e1a33; --l-muted: #52607d; --l-water: #a9c6f3;
  --l-fin-a: #316632; --l-fin-b: #254e26; --l-cut: #316632;
}
.launch-stage { display: grid; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.launch-mark-wrap { position: relative; width: 112px; height: 112px; }
.launch-mark { position: relative; width: 112px; height: 112px; overflow: visible; display: block; transform-origin: center; will-change: transform; }
.launch-water {
  position: absolute; top: 84.6%; left: 50%; width: 100vw; height: 12px; margin: -6px 0 0 -50vw;
  overflow: visible; pointer-events: none;
  animation: l-reveal 0.55s cubic-bezier(0.45, 0, 0.2, 1) both;
}
.launch-water path { fill: none; stroke: var(--l-water); stroke-width: 2.4px; stroke-linecap: round; }
.launch-fin-a { stop-color: var(--l-fin-a); }
.launch-fin-b { stop-color: var(--l-fin-b); }
.launch-fin-solid { fill: var(--l-fin-solid); opacity: 0; }
.launch-fin { animation: l-rise 0.8s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.launch-wake {
  fill: none; stroke: var(--l-water); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 1; opacity: 0;
  animation: l-wake 0.9s 0.55s ease-out both;
}
.launch-mini-wave {
  fill: none; stroke: var(--l-water); stroke-width: 3.4; stroke-linecap: round; opacity: 0;
  /* only during the flight into the header (Launch.tsx), where it becomes the logo's wave */
}
.launch-word { position: relative; line-height: 1; padding: 0 6px; }
.launch-word-text {
  display: inline-block; font-family: var(--font-display, "Instrument Serif", Georgia, serif);
  font-size: 44px; letter-spacing: -0.01em; color: var(--l-text); transform-origin: center; will-change: transform;
  clip-path: inset(0 0 0 0); animation: l-reveal 0.36s 1s cubic-bezier(0.6, 0, 0.2, 1) both;
}
.launch-slash {
  position: absolute; top: -18%; bottom: -18%; left: 0; width: 3px; border-radius: 2px;
  background: var(--l-cut); box-shadow: 0 0 14px var(--l-cut); transform: skewX(-18deg); opacity: 0;
  animation: l-slash 0.42s 0.98s cubic-bezier(0.6, 0, 0.2, 1) both;
}
.launch-slogan { margin: -4px 0 0; font-size: 16px; color: var(--l-muted); animation: l-up 0.45s 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.launch-hint { position: fixed; bottom: 24px; inset-inline: 0; text-align: center; font-size: 12px; color: var(--l-muted); opacity: 0.75; }

@keyframes l-rise {
  0% { transform: translate(-18px, 40px); }
  70% { transform: translate(-1.5px, -1.2px); }
  100% { transform: translate(0, 0); }
}
@keyframes l-wake {
  0% { opacity: 0; stroke-dashoffset: 1; }
  30% { opacity: 0.9; }
  100% { opacity: 0; stroke-dashoffset: 0; transform: translateX(-6px); }
}
@keyframes l-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes l-slash {
  0% { left: -4%; opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}
@keyframes l-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes l-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Last frame right away: skipped, handed over from the launcher, or reduced motion */
.launch-static *, [data-motion="reduced"] .launch *, [data-motion="off"] .launch * {
  animation-delay: 0s !important; animation-duration: 0s !important;
}
.launch-static .launch-wake, .launch-static .launch-slash,
[data-motion="reduced"] .launch-wake, [data-motion="reduced"] .launch-slash { display: none; }
[data-motion="reduced"] .launch-stage { animation: l-fade-in 0.25s ease-out both !important; }


.launch-water, .launch-wake, .launch-mini-wave { display: none; }
.launch-word-text { font-family: var(--font-ui, system-ui, sans-serif); font-weight: 700; font-size: clamp(24px, 6vw, 42px); letter-spacing: -.045em; }
/* splash:end */

/* The header logo hides while the launch logo flies into its place */
.launch-handoff .topbar .brand { visibility: hidden; }
.app-enter .topbar > :not(.brand) { animation: m-rise 0.45s 0.18s var(--ease) both; }
.app-enter .page-fx { animation: m-rise 0.5s 0.26s var(--ease) both; }

/* index.html's copy of the last frame (after the launcher's splash page) */
#boot-launch { display: none; }
.boot-handover #boot-launch { display: grid; }

/* ------------------------------------------------------- 1.2.2: motion polish
   data-motion on <html>: full | reduced (simple fades) | off (Settings > Animations; the OS
   "reduce motion" setting caps it at reduced). */

@keyframes m-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* page transitions */
.page-fx { animation: m-rise 0.32s var(--ease) both; }

/* cards and lists stagger in (only when they first appear) */
.grid-cards > *, .side-scroll[role="list"] > .cand, .clips-grid > *, .settings-list > *,
.q-list > *, .exports-list > * {
  animation: m-rise 0.42s var(--ease) both;
}
.grid-cards > :nth-child(2), .side-scroll[role="list"] > .cand:nth-child(2), .clips-grid > :nth-child(2),
.settings-list > :nth-child(2), .q-list > :nth-child(2), .exports-list > :nth-child(2) { animation-delay: 35ms; }
.grid-cards > :nth-child(3), .side-scroll[role="list"] > .cand:nth-child(3), .clips-grid > :nth-child(3),
.settings-list > :nth-child(3), .q-list > :nth-child(3), .exports-list > :nth-child(3) { animation-delay: 70ms; }
.grid-cards > :nth-child(4), .side-scroll[role="list"] > .cand:nth-child(4), .clips-grid > :nth-child(4),
.settings-list > :nth-child(4), .q-list > :nth-child(4), .exports-list > :nth-child(4) { animation-delay: 105ms; }
.grid-cards > :nth-child(5), .side-scroll[role="list"] > .cand:nth-child(5), .clips-grid > :nth-child(5),
.settings-list > :nth-child(5), .q-list > :nth-child(5), .exports-list > :nth-child(5) { animation-delay: 140ms; }
.grid-cards > :nth-child(6), .side-scroll[role="list"] > .cand:nth-child(6), .clips-grid > :nth-child(6),
.settings-list > :nth-child(6), .q-list > :nth-child(6), .exports-list > :nth-child(6) { animation-delay: 175ms; }
.grid-cards > :nth-child(7), .side-scroll[role="list"] > .cand:nth-child(7), .clips-grid > :nth-child(7),
.settings-list > :nth-child(7), .q-list > :nth-child(7), .exports-list > :nth-child(7) { animation-delay: 210ms; }
.grid-cards > :nth-child(n+8), .side-scroll[role="list"] > .cand:nth-child(n+8), .clips-grid > :nth-child(n+8),
.settings-list > :nth-child(n+8), .q-list > :nth-child(n+8), .exports-list > :nth-child(n+8) { animation-delay: 245ms; }

/* score bars fill from zero, the viral ring draws */
.cand-score .bar span, .bars .bar-fill { transform-origin: left center; animation: m-grow-x 0.7s 0.15s var(--ease) both; }
[dir="rtl"] .cand-score .bar span, [dir="rtl"] .bars .bar-fill { transform-origin: right center; }
.score-ring circle + circle { transition: stroke-dasharray 0.7s var(--ease); }

/* gentle press states */
.btn:active:not(:disabled) { transform: scale(0.97); }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.pcard:active { transform: translateY(-1px) scale(0.995); }

/* skeleton blocks (instead of spinners) */
.skeleton-fill { position: absolute; inset: 0; border-radius: inherit; }
.skeleton-lines { display: grid; gap: 10px; padding: 4px 0; }
.skeleton-lines .skeleton { height: 12px; }

/* Reduced: simple fades only, no movement */
[data-motion="reduced"] .page-fx, [data-motion="reduced"] .grid-cards > *, [data-motion="reduced"] .cand,
[data-motion="reduced"] .clips-grid > *, [data-motion="reduced"] .settings-list > *, [data-motion="reduced"] .q-list > *,
[data-motion="reduced"] .exports-list > *, [data-motion="reduced"].app-enter .topbar > :not(.brand) {
  animation-name: m-fade !important; animation-delay: 0s !important; animation-duration: 0.2s !important;
}
[data-motion="reduced"] .cand-score .bar span, [data-motion="reduced"] .bars .bar-fill { animation: none; }
[data-motion="reduced"] .skeleton { animation: none; }
[data-motion="reduced"] .btn:active, [data-motion="reduced"] .icon-btn:active,
[data-motion="reduced"] .pcard:hover, [data-motion="reduced"] .pcard:active { transform: none; }
/* Off: nothing moves at all (spinners too) */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation: none !important; transition: none !important;
}

/* ------------------------------------------------------- 1.2.2: export & publishing */

.export-dialog { display: grid; gap: 22px; }
.export-dialog section { display: grid; gap: 10px; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.export-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.export-two > div { display: grid; gap: 8px; align-content: start; }
.export-clips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px;
  border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 12.5px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.chip-toggle:hover { border-color: var(--border-strong); }
.chip-toggle.on { border-color: var(--gold-line); background: var(--gold-soft); }
.chip-toggle.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.chip-toggle:active { transform: scale(0.96); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.preset, .format {
  position: relative; display: grid; gap: 3px; align-content: start; text-align: start; padding: 11px 12px;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.08s;
}
.preset b, .format b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--strong); }
.preset span, .format span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.preset:hover:not(:disabled), .format:hover:not(:disabled) { border-color: var(--border-strong); }
.preset.on, .format.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.preset:active:not(:disabled), .format:active:not(:disabled) { transform: scale(0.985); }
.preset:disabled, .format:disabled { opacity: 0.45; cursor: not-allowed; }
.preset-shape { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; opacity: 0.7; flex: none; }
.preset-shape.vertical { width: 8px; height: 14px; }
.preset-shape.wide { width: 14px; height: 8px; }
.format .format-hw {
  position: absolute; top: 9px; inset-inline-end: 9px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 99px; background: var(--success-soft); color: var(--success);
}
.format .format-hw.off { background: var(--surface-3); color: var(--muted); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.inline-field .input { width: 110px; height: 32px; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); }
.check-row .select { width: auto; }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice-warn svg { color: var(--warn); }
.warn-text { color: var(--warn); }
.export-sum { flex: 1; display: flex; align-items: center; font-size: 13px; min-width: 0; }

.clip-pub { display: flex; gap: 4px; padding: 0 10px; flex-wrap: wrap; }
.uploads-line { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 0; }
.uploads-line .chip { font-size: 11.5px; text-decoration: none; }
.exports-block { display: grid; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }
.exports-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.export-row {
  display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface-2);
}
.export-main { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.export-rank { color: var(--muted); font-size: 12px; }
.export-name { font-size: 13px; font-weight: 550; color: var(--strong); }
.export-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; }
.export-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.export-actions .btn { height: 28px; font-size: 12px; }

.thumb-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.thumb-preview { width: 192px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }

.yt-account { display: flex; align-items: center; gap: 12px; }
.yt-account img { width: 36px; height: 36px; border-radius: 50%; }
.yt-quota { display: grid; gap: 6px; font-size: 12.5px; }
.yt-quota .bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.yt-quota .bar span { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width 0.4s var(--ease); }
.yt-guide { margin: 0; padding-inline-start: 20px; display: grid; gap: 12px; font-size: 13px; line-height: 1.5; }
.yt-guide li { display: grid; gap: 2px; }
.yt-legal { font-size: 12px; line-height: 1.5; }
.yt-legal p { margin: 0; }
.yt-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.yt-guide li span { color: var(--muted); }
.yt-guide li a { color: var(--gold-text); font-size: 12.5px; width: fit-content; }
.yt-guide .yt-guide-note { list-style: none; margin-inline-start: -20px; display: block; color: var(--muted); font-size: 12.5px; }

@media (max-width: 720px) {
  .export-two { grid-template-columns: 1fr; }
  .preset-grid, .format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.preset.on, .format.on { border-color: var(--gold) !important; }
.clip-pub { flex-wrap: nowrap; }
.clip-pub .btn { flex: 1; justify-content: center; padding: 0 6px; }

/* ------------------------------------------------------------------ 1.2.4 editing tools */

:root, :root[data-theme="dark"] { --mark: #5ec8e5; --bleep: #f2948a; --auto-cut: #e8a85c; }
:root[data-theme="light"] { --mark: #1c8fb0; --bleep: #c4483b; --auto-cut: #b06a12; }
.flip-x { transform: scaleX(-1); }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
  font: 500 11px/1 "Geist Mono", ui-monospace, monospace; color: var(--text); background: var(--surface-2);
}

/* render panel */
.edit-tools { display: grid; gap: 10px; padding-top: 2px; }
.edit-cell { display: grid; gap: 5px; min-width: 0; }
.edit-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.edit-line .select { flex: 1; min-width: 0; }
.edit-note { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
a.edit-note { color: var(--gold-text); text-decoration: none; }
a.edit-note:hover { text-decoration: underline; }
.edit-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.edit-check input { accent-color: var(--gold); }

/* candidates */
.cand.rejected { opacity: 0.55; }
.cand.rejected:hover, .cand.rejected[aria-selected="true"] { opacity: 0.85; }
.cand-flag { color: var(--gold-text); display: inline-flex; }

/* manual clip marks */
.mark-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--mark) 45%, transparent); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--mark) 9%, transparent); font-size: 13px;
}
.mark-bar > .icon { color: var(--mark); }

/* transcript editor */
.transcript .panel-head { flex-wrap: wrap; }
.tx-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tx-tools .tc { margin-inline-end: 6px; font-size: 12.5px; }
.tx-words {
  font-size: 15px; line-height: 2.05; max-height: 220px; overflow-y: auto; padding: 4px 2px;
  overflow-wrap: anywhere; /* one endless "word" must wrap, never widen the page (1.2.23) */
  user-select: none; -webkit-user-select: none;
}
.tx-w { padding: 2px 3px; border-radius: 5px; cursor: pointer; transition: background 0.12s; }
.tx-w:hover { background: var(--surface-3); }
.tx-w.out { color: var(--muted); }
.tx-w.del { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--danger); background: var(--danger-soft); }
.tx-w.auto-filler, .tx-w.auto-silence { text-decoration: line-through dashed; text-decoration-color: var(--auto-cut); color: var(--auto-cut); }
.tx-w.bleep { color: var(--bleep); font-weight: 600; }
.tx-w.sel { background: color-mix(in srgb, var(--mark) 26%, transparent); color: var(--text); }
.tx-w.now { box-shadow: inset 0 -2px 0 var(--gold); }
.tx-handle {
  display: inline-block; padding: 0 3px; margin: 0 1px; border-radius: 4px; cursor: ew-resize;
  color: var(--gold-text); font-weight: 700; font-size: 18px; line-height: 1; background: var(--gold-soft);
  touch-action: none;
}
.tx-handle:hover { background: var(--gold-line); }
.tx-words.dragging, .tx-words.dragging .tx-w { cursor: ew-resize; }
.tx-gap {
  display: inline-block; font-size: 10.5px; padding: 0 5px; margin: 0 2px; border-radius: 9px; line-height: 1.6;
  color: var(--auto-cut); border: 1px dashed var(--auto-cut); vertical-align: 1px;
}
.tx-help { margin: 8px 0 0; font-size: 12px; }

/* keyboard cheat sheet */
.keys-list { display: grid; gap: 8px; }
.keys-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; font-size: 13.5px; }
.keys-k { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* fast review */
.fast {
  position: fixed; inset: 0; z-index: 55; display: grid; grid-template-rows: auto 1fr; gap: 8px;
  padding: 14px 18px 18px; background: color-mix(in srgb, var(--bg) 94%, black); overflow: auto;
}
.fast:focus { outline: none; }
.fast-top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.fast-stage { display: flex; align-items: center; justify-content: center; gap: 36px; min-height: 0; flex-wrap: wrap; }
.fast-card { position: relative; touch-action: pan-y; cursor: grab; user-select: none; transition: transform 0.18s ease-out; }
.fast-card:active { cursor: grabbing; transition: none; }
.fast-card.flying { transition: transform 0.23s ease-in; }
.fast-frame {
  height: min(78vh, 860px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); background: #05080f;
}
.fast-frame canvas { width: 100%; height: 100%; display: block; }
.fast-stamp {
  position: absolute; top: 26px; padding: 6px 14px; border: 3px solid; border-radius: 10px;
  font: 800 26px/1 Geist, Arial, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none;
}
.fast-stamp.keep { left: 22px; color: var(--success); transform: rotate(-12deg); }
.fast-stamp.skip { right: 22px; color: var(--danger); transform: rotate(12deg); }
.fast-play {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0, transparent 30%);
}
.fast-info { width: min(420px, 100%); display: grid; gap: 14px; }
.fast-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; }
.fast-title { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.3; }
.fast-actions { display: flex; gap: 18px; align-items: center; }
.fast-btn {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: transform 0.12s, background 0.12s;
}
.fast-btn:hover { transform: scale(1.06); }
.fast-btn.keep { border-color: var(--success); color: var(--success); }
.fast-btn.skip { border-color: var(--danger); color: var(--danger); }
.fast-btn.undo { width: 48px; height: 48px; }
.fast-hint { margin: 0; font-size: 12.5px; }
.fast-done { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--success-soft); }
[data-motion="reduced"] .fast-card, [data-motion="off"] .fast-card { transition: none !important; }

/* studio */
.studio-tabs { margin-bottom: 18px; padding-top: 0; }
.studio-tabs a {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 500;
  padding: 8px 12px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.studio-tabs a:hover { color: var(--text); }
.studio-tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.studio-folder { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-drop { transition: border-color 0.15s, background 0.15s; }
.studio-drop.over { border-color: var(--gold-line); background: var(--gold-soft); }
.studio-tracks { overflow: hidden; }
.track {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.track:first-child { border-top: 0; }
.track-main { display: grid; gap: 3px; min-width: 0; }
.track-names { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.input-plain { height: 28px; border-color: transparent; background: transparent; padding: 0 6px; }
.input-plain:hover { border-color: var(--border); }
.track-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding-inline-start: 6px; }
.mood-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.mood {
  height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: 12px; cursor: pointer;
}
.mood[aria-pressed="true"] { color: var(--text); }
.mood-hype[aria-pressed="true"] { border-color: #e8795c; background: rgba(232, 121, 92, 0.15); }
.mood-chill[aria-pressed="true"] { border-color: #5ec8e5; background: rgba(94, 200, 229, 0.13); }
.mood-sad[aria-pressed="true"] { border-color: #8e9fc4; background: rgba(142, 159, 196, 0.16); }
.mood-funny[aria-pressed="true"] { border-color: #d9b56a; background: rgba(217, 181, 106, 0.16); }
.brand-presets { margin-bottom: 0; }
.brand-editor { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; padding: 22px; }
.brand-form { display: grid; gap: 16px; align-content: start; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.brand-grid label, .brand-form > label { display: grid; gap: 6px; }
.brand-grid input[type="range"] { accent-color: var(--gold); width: 100%; }
.brand-card-row { display: grid; gap: 8px; }
.brand-card-fields { display: flex; gap: 10px; align-items: center; }
.brand-card-fields > .input { flex: 1; min-width: 0; }
.brand-card-fields .edit-line { flex: none; }
.brand-field { display: grid; gap: 6px; justify-items: start; }
.brand-logo-thumb { height: 40px; max-width: 120px; object-fit: contain; border-radius: 6px; background: var(--surface-2); padding: 3px; }
.color-field input[type="color"] { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); padding: 2px; cursor: pointer; }
.brand-side { display: grid; gap: 8px; align-content: start; }
.brand-mock {
  position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #24365e, #0b1222 55%, #1b2a48);
}
.brand-mock-corner { position: absolute; display: flex; gap: 4px; }
.brand-mock-corner img { max-height: 90px; object-fit: contain; }
.brand-mock-logo { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--gold); }
.brand-mock-handle { font: 800 10px/1 Geist, Arial, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.brand-mock-cap {
  position: absolute; left: 8px; right: 8px; top: 70%; text-align: center;
  font: 900 15px/1.2 Geist, Arial, sans-serif; paint-order: stroke fill;
}
.words-area { min-height: 180px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; }
.words-area.short { min-height: 90px; }

@media (max-width: 720px) {
  .track { grid-template-columns: auto minmax(0, 1fr) auto; }
  .track .mood-chips { grid-column: 2 / -1; }
  .track-names { grid-template-columns: 1fr; }
  .brand-editor { grid-template-columns: 1fr; }
  .brand-side { max-width: 220px; }
  .fast-stage { gap: 16px; }
  .fast-frame { height: min(62vh, 700px); }
  .keys-row { grid-template-columns: 120px 1fr; }
}

/* ------------------------------------------------------------------ 1.2.5 retention features */
.loop-chip { margin-top: 4px; width: fit-content; gap: 4px; font-size: 11px; }
.clip-pub { flex-wrap: wrap; }

/* A/B hooks */
.ab-dialog { display: grid; gap: 14px; }
.ab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ab-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.ab-card.ab-win { border-color: var(--gold-line); box-shadow: 0 0 0 1px var(--gold-line) inset; }
.ab-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-label { font-size: 18px; font-weight: 700; color: var(--strong); }
.ab-style { font-weight: 550; }
.ab-score { margin-inline-start: auto; font-size: 20px; font-weight: 700; color: var(--strong); }
.ab-card video { width: 100%; max-height: 420px; aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: var(--r-md); }
.ab-hook { margin: 0; font-weight: 550; }
.ab-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.ab-reasons li { display: flex; justify-content: space-between; gap: 10px; }
.ab-why { margin: 0; font-size: 12px; }
@media (max-width: 720px) { .ab-grid { grid-template-columns: 1fr; } }

/* stories */
.story-list { display: grid; gap: 18px; }
.story-card { padding: 18px; display: grid; gap: 14px; }
.story-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.story-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.story-title { margin: 0; font-size: 20px; color: var(--strong); }
.story-pitch { margin: 4px 0 0; }
.story-segs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.story-seg-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.story-thumb { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); background: var(--track); }
.story-seg-body { min-width: 0; display: grid; gap: 3px; }
.story-seg-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.story-seg-text { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-seg-actions { display: flex; gap: 2px; }
.story-cardtext { font-size: 12px; color: var(--gold-text); margin: 0 0 4px 124px; display: flex; gap: 4px; align-items: center; }
.story-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.story-result { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 14px; align-items: start; }
.story-result video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: var(--r-md); }
.story-result-body { display: grid; gap: 8px; justify-items: start; }
.story-details summary { cursor: pointer; font-weight: 550; }
.story-transcript { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 13px; }
.story-pub { display: grid; gap: 6px; margin-top: 8px; }
.story-titles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.story-titles li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.story-desc { margin: 0; font-size: 13px; white-space: pre-wrap; }
@media (max-width: 720px) {
  .story-seg-row { grid-template-columns: 80px minmax(0, 1fr); }
  .story-thumb { width: 80px; }
  .story-seg-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .story-cardtext { margin-inline-start: 0; }
  .story-result { grid-template-columns: 1fr; }
}

/* hook styles (stats) */
.hook-stats { display: grid; margin-bottom: 18px; }
.hook-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hook-table th { text-align: start; font-weight: 550; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.hook-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.hook-table .num { text-align: end; }
.ci-bar { position: relative; height: 8px; border-radius: 4px; background: var(--track); min-width: 120px; }
.ci-bar span { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.ci-bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--gold); transform: translateX(-1px); }

/* ------------------------------------------------------------------ LAN access PIN */
.lan-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.lan-login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  text-align: center;
}
.lan-login-card .field {
  text-align: start;
}
.lan-login-card h1 {
  margin: 0;
  font-size: 34px;
}
.lan-login-card p {
  margin: 0;
}
.lan-login-mark {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--mark-tile);
  border: 1px solid var(--mark-tile-border);
}
.lan-login-error {
  color: var(--danger);
  font-size: 13.5px;
}
.lan-pin,
.lan-pin-form {
  display: grid;
  gap: 8px;
}
.lan-pin-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.lan-pin-row .input {
  flex: 1;
  min-width: 160px;
}

/* ------------------------------------------------------------------ 1.2.7 publishing: Library, setup, calendar */

.err-text { color: var(--danger); }
.inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-row > .input { flex: 1; min-width: 160px; }
.input-sm { padding: 5px 8px; font-size: 13px; }

.lock-banner { align-items: flex-start; }
.lock-banner p { margin: 4px 0 6px; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.checklist label > span { display: grid; gap: 2px; }
.checklist input { margin-top: 3px; accent-color: var(--gold); }
.verify-doc { margin-top: 12px; max-height: 46vh; overflow: auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }

.pub-setup { display: grid; gap: 14px; }
.pub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pub-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.pub-col fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pub-col legend { padding: 0; margin-bottom: 6px; }
.title-picks { display: grid; gap: 4px; margin-bottom: 8px; }
.title-pick { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--border); cursor: pointer; font-size: 13.5px; }
.title-pick.on { border-color: var(--gold-line); background: var(--gold-soft); }
.title-pick input { margin-top: 2px; accent-color: var(--gold); }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.cover-studio { display: grid; gap: 8px; margin-top: 8px; justify-items: start; }
.cover-ai-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.cover-ai-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cover-ai-grid .cover-img { aspect-ratio: 9 / 16; }
.cover-ai-grid.wide .cover-img { aspect-ratio: 16 / 9; }
@media (max-width: 520px) { .cover-ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cover-opt { display: grid; gap: 4px; cursor: pointer; font-size: 12px; text-align: center; position: relative; }
.cover-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cover-opt .cover-img { aspect-ratio: 9 / 16; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-sm); border: 2px solid var(--border); background: var(--surface-2); color: var(--muted); }
.cover-grid.wide .cover-img { aspect-ratio: 16 / 9; }
.cover-opt .cover-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-opt.on .cover-img { border-color: var(--gold); box-shadow: var(--focus); }
.cover-opt input:focus-visible + .cover-img { box-shadow: var(--focus); }
.cover-opt.off { opacity: 0.45; cursor: not-allowed; }
.cover-name { line-height: 1.25; }
.plan-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.plan-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.plan-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lib-summary { display: flex; align-items: center; gap: 22px; padding: 12px 16px; }
.lib-summary > div { display: grid; gap: 1px; }
.lib-summary b { font-size: 22px; color: var(--strong); font-weight: 500; }
.lib-summary span { font-size: 12px; }
.lib-page > .notice { margin-bottom: 12px; }
.lib-toolbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.lib-tabs { padding: 0; margin-bottom: 8px; flex-wrap: wrap; }
.lib-selbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 5; }
.lib-selbar.on { border-color: var(--gold-line); background: var(--gold-soft); }
.lib-selbar input { accent-color: var(--gold); }
.lib-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lib-row { display: grid; grid-template-columns: 24px 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.lib-row.selected { border-color: var(--gold-line); }
.lib-check input { accent-color: var(--gold); width: 16px; height: 16px; }
.lib-thumb { width: 112px; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-main { min-width: 0; display: grid; gap: 4px; }
.lib-title { font-weight: 500; color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.lib-meta a { color: inherit; }
.lib-step { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12.5px; }
.lib-step .progress { flex-basis: 100%; max-width: 320px; }
.lib-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.lib-cal { padding: 14px; }
.lib-cal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.lib-cal-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; font-size: 12px; color: var(--muted); padding: 0 4px 4px; }
.lib-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lib-day { min-height: 92px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); min-width: 0; }
.lib-cal-grid.week .lib-day { min-height: 260px; }
.lib-day.today { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px var(--gold-line); }
.lib-day.past { background: transparent; border-style: dashed; }
.lib-day.out { background: transparent; border-color: transparent; }
.lib-day.over { border-color: var(--gold); background: var(--gold-soft); }
.lib-day.full.over { border-color: var(--danger); background: var(--danger-soft); }
.lib-day-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.lib-day-count { font-size: 11px; padding: 0 5px; border-radius: 99px; background: var(--surface-3); }
.lib-day-count.full { background: var(--gold-soft); color: var(--gold-text); }
.lib-chip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; text-align: start; font: inherit; font-size: 12px; padding: 4px 6px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.lib-chip[draggable="true"] { cursor: grab; }
.lib-chip.s-scheduled { border-color: var(--gold-line); }
.lib-chip.s-published { border-color: color-mix(in srgb, var(--success) 50%, transparent); }
.lib-chip.s-locked { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.lib-chip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-more { font-size: 11.5px; }

@media (max-width: 900px) {
  .pub-cols { grid-template-columns: 1fr; }
  .lib-row { grid-template-columns: 24px 88px minmax(0, 1fr); }
  .lib-thumb { width: 88px; }
  .lib-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .lib-cal-grid.week { grid-template-columns: 1fr; }
  .lib-cal-grid.week .lib-day { min-height: 0; }
}
@media (max-width: 640px) {
  .cover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lib-summary { width: 100%; justify-content: space-between; }
  .lib-cal-grid.month, .lib-cal-wd { gap: 3px; }
  .lib-cal-grid.month .lib-day { min-height: 64px; padding: 3px; }
  .lib-cal-grid.month .lib-chip-title { display: none; }
}
.pub-col .segmented { max-width: 100%; flex-wrap: wrap; }

/* ------------------------------------------------------- 1.2.8: Connect with Google */

/* The Google sign-in button look (light: white with a grey outline; dark: near-black) */
.gbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 16px 0 4px;
  padding-inline: 4px 16px;
  border-radius: 999px;
  border: 1px solid #747775;
  background: #ffffff;
  color: #1f1f1f;
  font: 500 14px/1.2 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  max-width: 100%;
  transition: background 0.15s, box-shadow 0.15s;
}
.gbtn-g { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #ffffff; flex: none; }
.gbtn:hover:not(:disabled) { background: #f2f6fc; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3); }
.gbtn:focus-visible { outline: none; box-shadow: var(--focus); }
.gbtn:disabled { opacity: 0.55; cursor: not-allowed; }
.gbtn-big { min-height: 52px; font-size: 16px; padding-inline-end: 22px; gap: 14px; }
.gbtn-big .gbtn-g { width: 42px; height: 42px; }
:root[data-theme="dark"] .gbtn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
:root[data-theme="dark"] .gbtn:hover:not(:disabled) { background: #1f2023; }
:root[data-theme="dark"] .welcome .gbtn { background: #ffffff; color: #1f1f1f; border-color: #747775; }
:root[data-theme="dark"] .welcome .gbtn:hover:not(:disabled) { background: #f2f6fc; }

.ytc { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ytc-sub { margin: 0; font-size: 12.5px; line-height: 1.5; }
.ytc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ytc-result { width: 100%; }
.ytc-result > span { flex: 1; }
.ytc-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytc-avatar-ph { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); flex: none; display: inline-block; }
.yt-account { flex-wrap: wrap; }

.ytc-wait { width: 100%; display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); }
.ytc-wait-head { display: flex; gap: 12px; align-items: flex-start; }
.ytc-wait-head .spinner { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.ytc-wait-head p { margin: 2px 0 0; font-size: 13px; }
.ytc-wait-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ytc-stuck { font-size: 13px; }
.ytc-stuck summary { cursor: pointer; color: var(--muted); }
.ytc-stuck ul { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; line-height: 1.5; }

.ytc-modal-layer .modal-backdrop { z-index: 95; } /* above the onboarding (90) */
.ytc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ytc-check input { width: 16px; height: 16px; accent-color: var(--gold); }

/* the drawing of the Google warning screen */
.ytc-ill { margin: 12px 0 0; display: grid; gap: 6px; }
.ytc-ill svg, .ytw-sketch { width: 100%; height: auto; display: block; max-width: 460px; }
.ytc-ill figcaption { font-size: 12px; }
.ill-frame { fill: var(--surface); stroke: var(--border-strong); }
.ill-bar { fill: var(--surface-3); }
.ill-dot { fill: var(--border-strong); }
.ill-warn { fill: #f9ab00; }
.ill-warn-mark { stroke: #202124; stroke-width: 2; stroke-linecap: round; fill: none; }
.ill-h { font: 600 13px system-ui, sans-serif; fill: var(--text); }
.ill-line { fill: var(--surface-3); }
.ill-link { font: 600 12px system-ui, sans-serif; fill: #1a73e8; }
:root[data-theme="dark"] .ill-link { fill: #8ab4f8; }
.ill-ring { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 5 3; }
.ill-num { fill: var(--gold); }
.ill-num-t { font: 700 12px system-ui, sans-serif; fill: #0a1020; }
.ill-btn { fill: #1a73e8; }
.ill-btn-t { font: 600 10px system-ui, sans-serif; fill: #ffffff; }
@media (prefers-reduced-motion: no-preference) {
  .ill-ring { animation: ill-pulse 1.6s ease-in-out infinite; }
  @keyframes ill-pulse { 50% { stroke-opacity: 0.35; } }
}

/* channel picker / no channel */
.ytc-channels { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; margin: 0; display: grid; gap: 6px; min-width: 0; }
.ytc-channels legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.ytc-channel { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; min-width: 0; }
.ytc-channel.on { background: var(--gold-soft); }
.ytc-channel img, .ytc-channel .ytc-avatar-ph { width: 28px; height: 28px; border-radius: 50%; }
.ytc-channel input { accent-color: var(--gold); }
.ytc-channel span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytc-nochannel > div { min-width: 0; }

/* "Connect YouTube to publish" in the publish dialogs */
.ytc-prompt { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; padding: 14px; border-radius: var(--r-md); border: 1px dashed var(--gold-line); background: var(--gold-soft); }
.ytc-prompt-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; font-size: 13.5px; }

/* Google review status (built-in client) */
.ytc-verif { font-size: 13px; display: grid; gap: 4px; }
.ytc-verif-row { display: flex; align-items: baseline; gap: 8px; line-height: 1.5; }
.ytc-verif-row > span:last-child { min-width: 0; }
.ytc-verif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; transform: translateY(-1px); }
.ytc-verif.v-verified .ytc-verif-dot { background: var(--success); }
.ytc-verif.v-in_review .ytc-verif-dot { background: var(--mark-wave); }

/* signed-out banner (every screen) */
.yt-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; padding: 6px 16px; font-size: 13px; background: var(--danger-soft); border-bottom: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); color: var(--text); text-align: center; }
.yt-banner > svg { color: var(--danger); flex: none; }
.yt-banner .icon-btn { padding: 4px; }

/* Advanced: own Google project wizard */
.ytc-adv { border-top: 1px solid var(--border); padding-top: 10px; min-width: 0; }
.ytc-adv > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ytc-adv > .ytc-sub { margin: 6px 0 10px; }
.ytw { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.ytw-top { display: flex; align-items: center; justify-content: space-between; }
.ytw-count { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.ytw-bar { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.ytw-bar span { display: block; height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.3s var(--ease); }
.ytw-title { margin: 0; font-size: 17px; outline: none; }
.ytw-body { margin: 0; line-height: 1.55; }
.ytw-check { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); }
.ytw-check svg { color: var(--success); flex: none; margin-top: 2px; }
.ytw-check.ok { color: var(--text); }
.ytw-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ytw-load { display: grid; gap: 10px; min-width: 0; }
.ytw-drop { display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 2px dashed var(--border-strong); border-radius: var(--r-md); text-align: center; transition: border-color 0.15s, background 0.15s; }
.ytw-drop.drag { border-color: var(--gold); background: var(--gold-soft); }
.ytw-drop.ok { border-color: var(--success); border-style: solid; }
.ytw-drop.bad { border-color: var(--warn); }
.ytw-load textarea { width: 100%; font-size: 12px; resize: vertical; }
.sk-h { font: 600 12px system-ui, sans-serif; fill: var(--text); }
.sk-label { font: 500 9px system-ui, sans-serif; fill: var(--muted); }
.sk-val { font: 500 10px system-ui, sans-serif; fill: var(--text); }
.sk-field { fill: var(--surface-2); stroke: var(--border-strong); }
.sk-btn { fill: #1a73e8; }
.sk-btn-t { font: 600 10px system-ui, sans-serif; fill: #ffffff; }
.sk-yt { fill: #ff0033; }
.sk-yt-play { fill: #ffffff; }
.sk-file { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.sk-file-fold { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.sk-file-t { font: 700 10px system-ui, sans-serif; fill: var(--muted); }
.sk-arrow { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sk-app { fill: var(--mark-tile); stroke: var(--mark-tile-border); }
.sk-fin { fill: var(--mark-fin); }

/* onboarding step 4 (the onboarding is always light) */
.welcome {
  --text: var(--w-navy); --strong: var(--w-navy); --muted: var(--w-muted); --surface: #ffffff; --surface-2: var(--w-soft);
  --surface-3: #e9eef7; --border: var(--w-line); --border-strong: #c9d4e6; --warn-soft: #fff4e0; --warn: #9a5b00;
  --gold: #1f6fe5; --gold-soft: rgba(31, 111, 229, 0.08); --gold-line: rgba(31, 111, 229, 0.4); --success: #17694a;
  --primary-bg: #1f6fe5; --primary-text: #ffffff; --primary-hover: #1650c8; --btn-border: #c9d4e6; --btn-border-hover: #1f6fe5;
  --btn-hover-bg: #f4f7fd; --focus: 0 0 0 3px rgba(31, 111, 229, 0.3); --track: #e3e9f3; --danger-soft: #fdecea; --danger: #a3341f;
  --mark-wave: #1f6fe5; --overlay: rgba(14, 26, 51, 0.45);
}
.welcome-yt { display: grid; gap: 14px; justify-items: start; }
.welcome-yt-done { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--w-soft); border: 1px solid var(--w-line); color: var(--w-navy); }
.welcome-yt-done img { width: 40px; height: 40px; border-radius: 50%; }
.welcome-yt-done svg { color: #17694a; }
.welcome-note { margin: 0; font-size: 13px; color: var(--w-muted); }

@media (max-width: 640px) {
  .gbtn-big { width: 100%; }
  .ytc { justify-items: stretch; }
  .yt-account > .ytc-row { width: 100%; }
  .ytw { padding: 12px; }
}

/* 1.2.15: facecam picker, voices, swear review, speaker colours */
:root, :root[data-theme="dark"] { --spk-f1: #7fd6ff; --spk-f2: #ff9ed8; --spk-f3: #b8f27a; --spk-f4: #ffc46b; }
:root[data-theme="light"] { --spk-f1: #0a6590; --spk-f2: #982a6b; --spk-f3: #33680e; --spk-f4: #7c4900; } /* 1.2.41: >= 4.5:1 on the chip tint (axe) */
.warn-text { color: var(--warn); font-weight: 600; }
.small { font-size: 12px; }
.fc-cand { position: absolute; z-index: 2; border: 2px dashed var(--mark); background: color-mix(in srgb, var(--mark) 12%, transparent); border-radius: 4px; cursor: pointer; padding: 0; }
.fc-cand:hover, .fc-cand:focus-visible { background: color-mix(in srgb, var(--mark) 26%, transparent); outline: none; }
.fc-cand.on { pointer-events: none; border-style: solid; border-color: var(--gold); background: transparent; }
.fc-cand-tag { position: absolute; bottom: 4px; left: 4px; padding: 1px 6px; border-radius: 5px; background: var(--mark); color: #0e1a33; font-size: 11px; font-weight: 600; white-space: nowrap; }
.voices-panel { display: grid; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); min-width: 0; }
.voices-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); }
.voices-tracks, .voices-speakers { display: grid; gap: 6px; min-width: 0; }
.voices-track, .voices-speaker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.voices-speaker { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.voices-merge { max-width: 110px; }
.voices-track-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voices-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spk-chip { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--surface-3); color: var(--text); }
.spk-chip.spk-f1 { background: color-mix(in srgb, var(--spk-f1) 22%, transparent); color: var(--spk-f1); }
.spk-chip.spk-f2 { background: color-mix(in srgb, var(--spk-f2) 22%, transparent); color: var(--spk-f2); }
.spk-chip.spk-f3 { background: color-mix(in srgb, var(--spk-f3) 22%, transparent); color: var(--spk-f3); }
.spk-chip.spk-f4 { background: color-mix(in srgb, var(--spk-f4) 22%, transparent); color: var(--spk-f4); }
.tx-words .spk-chip { margin-inline-end: 4px; vertical-align: 1px; }
.tx-w.spk-f1:not(.bleep):not(.del) { color: var(--spk-f1); }
.tx-w.spk-f2:not(.bleep):not(.del) { color: var(--spk-f2); }
.tx-w.spk-f3:not(.bleep):not(.del) { color: var(--spk-f3); }
.tx-w.spk-f4:not(.bleep):not(.del) { color: var(--spk-f4); }
.tx-w.maybe { text-decoration: underline wavy var(--bleep); text-underline-offset: 3px; }
.swear-review { display: grid; gap: 10px; }
.swear-wave { position: relative; height: 56px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; }
.swear-wave:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.swear-bars { position: absolute; inset: 4px 0; display: flex; align-items: center; pointer-events: none; overflow: hidden; }
.swear-bars i { flex: 1 1 0; min-width: 0; background: color-mix(in srgb, var(--muted) 55%, transparent); border-inline: 0.5px solid var(--surface-2); }
.swear-mark { position: absolute; top: 0; bottom: 0; min-width: 3px; background: color-mix(in srgb, var(--bleep) 45%, transparent); border-inline: 1px solid var(--bleep); pointer-events: auto; cursor: pointer; }
/* 1.2.45 bleep editor: the render's real ranges under the marks, a word label, draggable edges */
.swear-real { position: absolute; bottom: 0; height: 5px; background: var(--bleep); pointer-events: none; }
.swear-mark.maybe { pointer-events: none; }
.swear-mark.picked { box-shadow: inset 0 0 0 2px var(--text); z-index: 2; }
.swear-label { position: absolute; top: 2px; inset-inline-start: 3px; max-width: calc(100% - 6px); font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.swear-edge { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; touch-action: none; }
.swear-edge.l { inset-inline-start: -4px; }
.swear-edge.r { inset-inline-end: -4px; }
.swear-edge:hover, .swear-mark.picked .swear-edge { background: color-mix(in srgb, var(--text) 35%, transparent); }
.swear-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--bleep) 8%, transparent); }
.swear-pick > .muted.small { flex-basis: 100%; }
.swear-type { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swear-mark.manual { background: color-mix(in srgb, var(--gold) 45%, transparent); border-color: var(--gold); }
.swear-mark.maybe { background: transparent; border: 1px dashed var(--bleep); }
.swear-sel { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--mark) 30%, transparent); border-inline: 2px solid var(--mark); pointer-events: none; }
.swear-wave-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 30px; }
.swear-wave-actions > .muted { flex: 1; min-width: 140px; }
.swear-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.swear-list li { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 13px; }
.swear-list li.on { background: color-mix(in srgb, var(--bleep) 8%, transparent); }
.swear-word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.badge.swear-sure, .badge.swear-maybe, .badge.swear-manual { font-size: 11px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.badge.swear-sure { background: color-mix(in srgb, var(--bleep) 18%, transparent); color: var(--bleep); }
:root[data-theme="light"] .badge.swear-sure { color: #962a20; } /* AA contrast on the tinted row */
.badge.swear-maybe { background: var(--warn-soft); color: var(--warn); }
.badge.swear-manual { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.swear-switch { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.swear-switch input { accent-color: var(--bleep); }
.bleep-sound .select { flex: 0 1 auto; }
@media (max-width: 560px) {
  .swear-list li { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .swear-list li .tc, .swear-list li .badge { display: none; }
}

/* ---------------------------------------------------------------- swear check (1.2.21) */
.swear-warn { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.swear-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swear-scan > .muted { flex: 1; min-width: 160px; }
.edit-line.swear-strict { gap: 8px; }
.learned-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; }
.learned-list li { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--surface-2, color-mix(in srgb, var(--text) 6%, transparent)); font-size: 13px; max-width: 100%; }
.learned-list li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.swear-check .select { margin-top: 10px; max-width: 100%; }
.swear-check-list { max-height: 420px; }
.swear-check-list li { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; }
.seg-mini { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.seg-mini .btn[aria-pressed="true"] { background: var(--gold); color: #111; border-color: var(--gold); }
@media (max-width: 640px) {
  .swear-check-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .swear-check-list li .tc, .swear-check-list li .badge, .swear-check-list li > .icon-btn + .icon-btn { display: none; }
  .seg-mini { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- automation + live + phone (1.2.17) */
.auto-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.auto-recent li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  min-width: 0;
}
.auto-recent li .mono {
  overflow-wrap: anywhere;
  min-width: 0;
}
.phone-steps {
  margin: 0;
  padding-inline-start: 22px;
  display: grid;
  gap: 14px;
}
.phone-steps li {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 0;
}
.phone-steps li > * {
  max-width: 100%;
}
.phone-steps li.done::marker {
  color: var(--success);
}
.phone-steps .lan-pin-row {
  width: 100%;
}
.phone-steps .lan-pin-row .input {
  flex: 1;
  min-width: 0;
}
.phone-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.phone-wait .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: phone-pulse 1.4s ease-in-out infinite;
}
@keyframes phone-pulse {
  50% {
    opacity: 0.25;
  }
}
:root[data-motion="off"] .phone-wait .dot,
:root[data-motion="reduced"] .phone-wait .dot {
  animation: none;
}
.phone-guide summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
}
.phone-guide ol {
  margin: 8px 0;
  padding-inline-start: 20px;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
}
.phone-guide p {
  margin: 0;
  font-size: 12.5px;
}

/* the phone approval page (#/approve) */
.approve {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.approve-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.approve-head .brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.approve-head h1 {
  font-size: 20px;
  margin: 0;
  flex: 1;
  color: var(--strong);
}
.approve-note {
  margin: 0;
}
.approve-empty {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.approve-empty h2 {
  margin: 0;
  color: var(--strong);
}
.approve-stack {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
}
.approve-card {
  grid-area: 1 / 1;
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  touch-action: pan-y;
  user-select: none;
  max-height: calc(100dvh - 230px);
  aspect-ratio: 9 / 16;
  justify-self: center;
  width: 100%;
  max-width: calc((100dvh - 230px) * 9 / 16);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease), box-shadow 0.15s;
}
.approve-card.leaving {
  opacity: 0;
}
.approve-card.hint-upload {
  box-shadow: 0 0 0 3px var(--success);
}
.approve-card.hint-skip {
  box-shadow: 0 0 0 3px var(--danger);
}
.approve-under {
  transform: scale(0.96) translateY(8px);
  opacity: 0.5;
  background: var(--surface-2);
}
.approve-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.approve-sound {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.approve-stamp {
  position: absolute;
  top: 18px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  border: 3px solid;
  background: rgba(0, 0, 0, 0.5);
  transform: rotate(-8deg);
}
.approve-stamp.upload {
  color: var(--success);
}
.approve-stamp.skip {
  color: var(--danger);
}
.approve-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  color: #fff;
}
.approve-info h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.3;
  color: #fff;
}
.approve-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
}
.approve-meta .muted {
  color: rgba(255, 255, 255, 0.78);
}
.approve-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.approve-actions .btn {
  justify-content: center;
  padding-inline: 6px;
  min-width: 0;
}
.approve-skip {
  color: var(--danger);
}
.approve-tip {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
}
:root[data-motion="off"] .approve-card {
  transition: none;
}

/* settings cards (1.2.17): a switch with a title and a hint under it */
.card.setting .toggle-line {
  justify-content: space-between;
}
.card.setting .toggle-line > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.card.setting .toggle-line .ez-hint {
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* 1.2.18: TikTok / Reels setup */
.platform-block { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.platform-block:last-child { border-bottom: 0; padding-bottom: 0; }
.platform-block h3 { margin: 0; font-size: 15px; }
.platform-guide ol { display: grid; gap: 10px; padding-inline-start: 20px; margin: 10px 0; }
.platform-guide li { display: grid; gap: 6px; }
.platform-guide .sugg, .platform-guide .inline-row { flex-wrap: wrap; }
.platform-guide .sugg .mono { overflow-wrap: anywhere; min-width: 0; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
/* 1.2.18: my-voice dubbing */
.dub-box { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.voice-script { margin: 0; padding: 10px 14px; border-inline-start: 3px solid var(--gold); background: var(--surface-2); border-radius: var(--r-sm); line-height: 1.5; }

/* 1.2.19: model credit lines, About & licenses, the AI-voice switches of a dubbed upload */
.license-list { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13px; }
.license-list li { overflow-wrap: anywhere; }
.license-change { display: block; font-size: 12px; }
.ai-voice-box { gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.ai-voice-line { overflow-wrap: anywhere; font-style: italic; }
.ai-remind { display: flex; gap: 6px; align-items: flex-start; margin: 0; color: var(--warn, inherit); }

/* 1.2.25 Brand kit > Channel text, Studio > Games */
.channel-text .channel-preview {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius, 10px);
  background: var(--surface-2, rgba(127, 127, 127, 0.08));
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.channel-text .channel-heads > summary { cursor: pointer; font-size: 13px; color: var(--muted, inherit); margin-bottom: 8px; }
.games-json { min-height: 420px; font-size: 12px; white-space: pre; overflow: auto; tab-size: 2; }
.field-error { color: var(--danger); font-size: 13px; margin: 6px 0 0; }

/* 1.2.28 Brand kit > My style, project > Full video texts */
.my-style .channel-heads > summary { cursor: pointer; font-size: 13px; color: var(--muted, inherit); margin-bottom: 8px; }
.empty-inline { display: grid; gap: 10px; }
.style-examples { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; min-width: 0; }
.style-examples > li { border: 1px solid var(--border); border-radius: var(--r-sm, 8px); background: var(--surface-2, transparent); min-width: 0; }
.style-ex-head {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 8px 10px;
  background: none; border: 0; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.style-ex-head .chip { flex: none; }
.style-ex-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.style-ex-body { display: grid; gap: 10px; padding: 4px 10px 12px; min-width: 0; }
.style-rules { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 13px; }
.long-titles { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.long-titles > li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.long-titles > li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.modal .channel-preview {
  margin: 6px 0 0; padding: 10px 12px; border-radius: var(--radius, 10px); background: var(--surface-2, rgba(127, 127, 127, 0.08));
  border: 1px solid var(--border); font-family: inherit; font-size: 13px; line-height: 1.5; white-space: pre-wrap;
  overflow-wrap: anywhere; max-height: 40vh; overflow: auto;
}
.my-style, .my-style > div { min-width: 0; }
.my-style p, .my-style .field-hint, .my-style .toggle-line > span { overflow-wrap: anywhere; }
.my-style .brand-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }

/* ================================================================ 1.2.36 multi-platform publishing */
.pf-accent-youtube { --pf: #ff0033; }
.pf-accent-tiktok { --pf: #fe2c55; }
.pf-accent-reels { --pf: #d62976; }
.pf-icon { flex: none; display: inline-block; vertical-align: -3px; }
.pf-icon-tt { --pf-tt-ink: var(--strong); }
.spinner-xs { width: 11px; height: 11px; border-width: 1.5px; }

/* switches */
.mp-switches { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-switch {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.mp-switch .pf-icon { opacity: .45; filter: grayscale(1); transition: opacity .15s, filter .15s; }
.mp-switch.on { color: var(--strong); border-color: color-mix(in srgb, var(--pf) 60%, var(--border-strong)); background: color-mix(in srgb, var(--pf) 9%, var(--surface)); }
.mp-switch.on .pf-icon { opacity: 1; filter: none; }
.mp-switch:focus-visible { outline: none; box-shadow: var(--focus); }
.mp-switch-warn { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; }
.mp-switches.compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-switches.compact .mp-switch { justify-content: center; padding: 0 6px; min-width: 0; min-height: 40px; border-radius: 12px; position: relative; }
.mp-switches.compact .mp-switch > svg:not(.pf-icon), .mp-switches.compact .mp-switch-warn { position: absolute; top: 3px; right: 5px; }
.mp-switches.compact .mp-switch.on > svg:not(.pf-icon) { color: var(--success); }

/* status badges */
.mp-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.mp-badge {
  display: inline-flex; align-items: center; gap: 2px; height: 26px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); max-width: 100%;
}
.mp-badge > a, .mp-badge > span { display: inline-flex; align-items: center; gap: 5px; padding: 0 9px 0 6px; color: inherit; text-decoration: none; min-width: 0; height: 100%; }
.mp-badge > a:hover { text-decoration: underline; }
.mp-badge-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-st-published { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.mp-st-published svg:not(.pf-icon) { color: var(--success); }
.mp-st-failed { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: var(--danger-soft); }
.mp-st-failed svg:not(.pf-icon) { color: var(--danger); }
.mp-st-scheduled { border-color: var(--gold-line); }
.mp-st-idle { color: var(--muted); }
.mp-badge-act { border: 0; background: transparent; color: inherit; height: 24px; width: 26px; border-left: 1px solid var(--border); cursor: pointer; display: grid; place-items: center; border-radius: 0 999px 999px 0; }
.mp-badge-act:hover { background: var(--btn-hover-bg); }
.mp-everywhere { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--success-soft); color: var(--success); }
.mp-total { font-size: 12px; color: var(--muted); }
.mp-make-public { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text); }
.mp-fail-line { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--danger); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }

/* Easy card block */
.mp-block { display: grid; gap: 8px; min-width: 0; }
.mp-go { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 6px; }
.mp-go-n { font-weight: 500; opacity: .75; }
.mp-preview-btn { width: 52px; padding: 0; }
.mp-declare { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; flex-basis: 100%; }
.mp-declare a { color: var(--text); }
.modal-foot .mp-declare { order: -1; text-align: end; }

/* dialog */
.mp-title { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mp-title-clip { font-weight: 400; color: var(--muted); font-size: 14px; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-when { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 14px 0 4px; }
.mp-when .input { width: auto; min-width: 0; max-width: 100%; }
.mp-pc-on { flex-basis: 100%; margin: 0; }
.mp-problems { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.mp-problem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: 13px; margin: 0; }
.mp-problem-text { flex: 1 1 220px; min-width: 0; color: var(--text); }
.mp-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.mp-preview { display: grid; gap: 10px; align-content: start; padding: 12px; border: 1px solid var(--border); border-top: 3px solid var(--pf); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.mp-preview-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-chip { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: var(--success-soft); color: var(--success); }
.mp-chip.bad { background: var(--danger-soft); color: var(--danger); }
.mp-count { font-family: var(--mono, ui-monospace, monospace); font-size: 11.5px; color: var(--muted); font-weight: 400; margin-inline-start: 4px; }
.mp-count.over { color: var(--danger); font-weight: 600; }
.mp-count-sep { color: var(--muted); }
.mp-fields { display: grid; gap: 8px; min-width: 0; }
.mp-fields textarea { resize: vertical; min-height: 64px; font-size: 13px; line-height: 1.45; }
.mp-full summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.mp-full pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 12px; max-height: 180px; overflow: auto; padding: 8px; background: var(--surface-2); border-radius: var(--r-sm); margin: 6px 0 0; }

/* phone frame */
.mp-phone { justify-self: center; width: min(170px, 100%); aspect-ratio: 9 / 16; border-radius: 22px; padding: 6px; background: #0b0f19; box-shadow: 0 0 0 1px var(--border-strong), 0 10px 26px -12px rgba(0, 0, 0, .5); }
.mp-screen { position: relative; width: 100%; height: 100%; border-radius: 17px; overflow: hidden; background: #111; }
.mp-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-screen-ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, #1d2944, #0b0f19); }
.mp-ui { position: absolute; inset: 0; color: #fff; font-size: 9.5px; line-height: 1.3; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.mp-ui-top { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-weight: 600; font-size: 10px; }
.mp-ui-rail { position: absolute; right: 6px; bottom: 54px; display: grid; gap: 9px; }
.mp-ui-rail span { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.mp-ui-bottom { position: absolute; left: 8px; right: 28px; bottom: 10px; display: grid; gap: 2px; padding-top: 18px; }
.mp-ui-cap { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.mp-ui-youtube .mp-ui-cap { font-weight: 600; font-size: 10.5px; -webkit-line-clamp: 2; }

/* TikTok post screen */
.mp-tt { border: 1px solid var(--border); border-left: 3px solid #fe2c55; border-radius: var(--r-lg); padding: 10px 14px 14px; margin: 14px 0 0; display: grid; gap: 10px; min-width: 0; }
.mp-tt legend { padding: 0 6px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mp-tt-who { margin: 0; font-size: 13px; }
.mp-tt-allow { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.mp-tt-allow .field-label { flex-basis: 100%; }
.mp-check { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 13px; cursor: pointer; }
.mp-check input { width: 16px; height: 16px; accent-color: var(--gold); margin: 1px 0 0; flex: none; }
.mp-check.disabled { cursor: not-allowed; }
.mp-tt-disclose { display: grid; gap: 8px; }
.mp-tt-brand { display: grid; gap: 8px; padding-inline-start: 4px; }
.mp-tt-label { margin: 0; font-weight: 500; color: var(--text); }

/* Library */
.lib-side { display: grid; gap: 6px; justify-items: end; min-width: 0; }
.lib-side-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; }
.lib-side .mp-badges { justify-content: flex-end; }
.lib-pf-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.mp-filter { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.mp-filter[aria-pressed="true"] { color: var(--strong); border-color: var(--gold-line); background: var(--gold-soft); }
.mp-filter .count { font-size: 11px; }
.mp-mini-icons { display: inline-flex; gap: 2px; margin-inline-end: 2px; }
.ez-lib-item .mp-badges { padding: 6px 4px 0; }

/* accounts */
.acc-section { grid-template-columns: 1fr; }
.acc-brand-title { display: flex; align-items: center; gap: 8px; }
.cloud-reconnect-status { padding: 8px 16px; text-align: center; background: var(--surface); color: var(--text); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; align-items: start; }
.acc-grid-one { grid-template-columns: 1fr; }
.acc-card { padding: 14px 16px; display: grid; gap: 10px; border-top: 3px solid var(--pf); min-width: 0; }
.acc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-head h3 { margin: 0; font-size: 15px; }
.acc-pill { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.acc-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.acc-pill-ok { background: var(--success-soft); color: var(--success); }
.acc-pill-attention { background: var(--warn-soft); color: var(--warn); }
.acc-pill-signed_out { background: var(--danger-soft); color: var(--danger); }
.acc-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.acc-who-text { display: grid; gap: 1px; min-width: 0; font-size: 13px; }
.acc-who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); }
.acc-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.acc-avatar-ph { display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--pf, #5b7fd1); }
.pf-bg-youtube { --pf: #b8002a; } .pf-bg-tiktok { --pf: #b51b3d; } .pf-bg-reels { --pf: #a8195b; }
.acc-meta, .acc-quota { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.acc-note { margin: 0; font-size: 12.5px; display: flex; gap: 6px; align-items: flex-start; color: var(--muted); }
.acc-note-warn { color: var(--warn); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-audit { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.acc-audit input { accent-color: var(--gold); margin-top: 2px; }
.acc-setup { display: grid; gap: 10px; min-width: 0; }
.acc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.45; }
.acc-step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.acc-hint { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.acc-code { display: block; margin-top: 4px; padding: 5px 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 11.5px; overflow-wrap: anywhere; word-break: break-all; }
.acc-copy { display: flex; gap: 6px; align-items: center; min-width: 0; }
.acc-copy .acc-code { flex: 1; min-width: 0; margin: 0; }
.acc-link { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.acc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px; }
.acc-adv summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.acc-adv[open] { display: grid; gap: 8px; }
.ez-set-accounts .acc-grid { margin-top: 4px; }

@media (max-width: 640px) {
  .lib-side { grid-column: 1 / -1; justify-items: start; }
  .lib-side .mp-badges, .lib-side-acts { justify-content: flex-start; }
  .mp-previews { grid-template-columns: 1fr; }
  .mp-title-clip { max-width: 100%; }
  .modal-foot .mp-declare { text-align: start; }
}

/* 1.2.39: by hand ("post it yourself") */
.mp-chip.mp-mode-semi, .mp-chip.mp-mode-api { margin-inline-start: 0; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.mp-chip.mp-mode-api { color: var(--success); background: var(--success-soft); border-color: transparent; }
.mp-st-ready { border-color: var(--gold-line); }
.mp-badge-go { color: var(--gold, inherit); }
.ho-intro { margin: 0 0 12px; }
.ho-track { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ho-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; color: var(--muted); max-width: 100%; }
.ho-pill.ho-now { color: var(--strong); border-color: color-mix(in srgb, var(--pf, var(--gold-line)) 60%, var(--border-strong)); background: color-mix(in srgb, var(--pf, transparent) 9%, var(--surface)); font-weight: 600; }
.ho-pill.ho-done { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.ho-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-size: 11px; font-weight: 700; }
.ho-done .ho-num { background: var(--success-soft); border-color: transparent; color: var(--success); }
.ho-pill-st { font-weight: 400; color: var(--muted); font-size: 12px; }
.ho-pill-st::before { content: "·"; margin-inline-end: 6px; }
.ho-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg, 14px); border: 1px solid color-mix(in srgb, var(--pf, var(--border)) 40%, var(--border)); background: var(--surface); min-width: 0; }
.ho-card-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.ho-making, .ho-fail, .ho-ready { display: grid; gap: 10px; min-width: 0; }
.ho-line { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ho-fail .ho-line { color: var(--danger); }
.ho-ready .field-hint, .ho-making .field-hint { margin: 0; }
.ho-go { width: 100%; }
.ho-copied { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); }
.ho-copied > b { display: flex; align-items: center; gap: 8px; color: var(--success); font-size: 16px; }
.ho-copied.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.ho-copied.warn > b { color: var(--warn); }
.ho-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; font-size: 14px; color: var(--text); }
.ho-file { font-weight: 600; overflow-wrap: anywhere; }
.ho-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ho-caption summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ho-caption textarea { margin-top: 6px; width: 100%; }
.ho-all { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--r-md); background: var(--success-soft); color: var(--success); font-size: 15px; }

/* 1.2.40: publish queue (Claude in Chrome) */
.pq-page { max-width: 1100px; }
.pq-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 16px; min-width: 0; }
.pq-progress { flex-basis: 100%; display: grid; gap: 4px; min-width: 0; }
.pq-actions .mp-problem { flex-basis: 100%; }
.pq-result { margin-top: 14px; padding: 14px 16px; display: grid; gap: 8px; border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.pq-result header { display: flex; align-items: center; gap: 8px; color: var(--success); }
.pq-result-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 2px; font-size: 13.5px; }
.pq-section { margin-top: 24px; min-width: 0; }
.pq-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.pq-section-head h2 { margin: 0; font-size: 18px; color: var(--strong); }
.pq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pq-row { padding: 10px 12px; min-width: 0; }
.pq-row.picked { border-color: var(--gold-line); }
.pq-row-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.pq-pick { padding-top: 3px; }
.pq-pick input { width: 18px; height: 18px; }
.pq-row-main { display: grid; gap: 3px; min-width: 0; }
.pq-row-title { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.pq-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; max-width: 100%; }
.pq-chip.pq-scheduled { color: var(--success); background: var(--success-soft); border-color: transparent; }
.pq-chip.pq-failed { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.pq-chip.pq-skipped_duplicate { color: var(--muted); }
.pq-chip.pq-published { color: var(--success); background: var(--success-soft); border-color: var(--success); }
.pq-chip.pq-overdue { color: var(--gold-text); border-color: var(--gold-line); background: transparent; }
.pq-status-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pq-mark { width: auto; max-width: 140px; }
.pq-overdue { display: grid; gap: 8px; padding: 12px 14px; margin-bottom: 12px; border-color: var(--gold-line); }
.pq-overdue p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pq-chip.pq-plan { border-style: dashed; color: var(--muted); }
.pq-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 10px; min-width: 0; }
.pq-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.pq-plats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.pq-plat { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.pq-plat.off { opacity: .7; }
.pq-time .input { width: 100%; min-width: 0; }
.pq-empty { padding: 16px; color: var(--muted); margin: 0; }
.pq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pq-table th, .pq-table td { text-align: start; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pq-table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.pq-settings { margin-top: 24px; padding: 12px 16px; }
.pq-settings summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--strong); }
.pq-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; margin-top: 10px; }
.pq-set { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 8px; min-width: 0; margin: 0; }
.pq-set legend { padding: 0 4px; }
.pq-brand { margin-top: 10px; max-width: 320px; }
.pq-import { width: 100%; font-size: 12.5px; }

/* ---------- 1.2.41: delete + trash */
.btn-danger { background: #b3261e; color: #ffffff; border-color: transparent; } /* 6.5:1 in every theme (Easy dark has its own --bg) */
.btn-danger:hover:not(:disabled) { background: #9c2019; color: #ffffff; }
.pcard-wrap { position: relative; display: flex; min-width: 0; }
.pcard-wrap > .pcard { flex: 1; min-width: 0; }
.pcard-del {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.15s;
}
.pcard-wrap:hover .pcard-del, .pcard-del:focus-visible { opacity: 1; }
@media (hover: none) { .pcard-del { opacity: 1; } }
.pcard-size { font-size: 11.5px; color: var(--muted); margin-inline-start: auto; }
.chip-btn { cursor: pointer; font: inherit; font-size: 12px; }
.chip-btn:hover { color: var(--danger); border-color: var(--danger); }
.cand-pick { display: flex; align-items: center; padding-inline-end: 4px; }
.cand-pick input { width: 16px; height: 16px; accent-color: var(--gold); }
.cand.picked { border-color: var(--gold-line); background: var(--gold-soft); }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.trash-dialog { display: grid; gap: 10px; }
.trash-dialog p { margin: 0; }
.trash-opt { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
.trash-opt > span { display: grid; gap: 3px; min-width: 0; }
.trash-opt.danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.trash-path { overflow-wrap: anywhere; font-family: var(--font-mono, monospace); }
.trash-posts { margin: 4px 0 0; padding-inline-start: 18px; font-size: 12.5px; }
.trash-posts a { overflow-wrap: anywhere; }
/* 1.2.47: planned posts that aren't on the platform yet; the trash card in Settings */
.trash-pending { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--border));
  border-radius: var(--r-md); background: var(--warn-soft); min-width: 0; }
.trash-pending > p:first-child { display: flex; gap: 6px; align-items: flex-start; color: var(--warn); }
.trash-pending > p:first-child b { color: var(--text); }
.trash-pending .trash-posts li { overflow-wrap: anywhere; }
.trash-pending-opts { display: grid; gap: 6px; }
.trash-pending-opts .trash-opt { background: var(--surface); }
.trash-opt.disabled { opacity: 0.6; }
.trash-zero { color: var(--danger); }
.trash-card { display: grid; gap: 14px; align-content: start; min-width: 0; }
.trash-card-use { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.trash-card-size { font-size: 22px; font-weight: 700; }
.trash-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.trash-card-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trash-card-days .input { width: 96px; }
.trash-page .page-head { flex-wrap: wrap; gap: 12px; }
.trash-section { margin-top: 24px; }
.trash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trash-row, .trash-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; }
.trash-main { display: grid; gap: 3px; flex: 1 1 280px; min-width: 0; }
.trash-main b { overflow-wrap: anywhere; }
.trash-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.trash-clean { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* 1.2.42 TikTok Studio login + Automatic / Semi-automatic switch */
.tts-box { display: grid; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.tts-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.tts-user { margin: 0; display: flex; gap: 6px; align-items: center; font-size: 13px; overflow-wrap: anywhere; }
.tts-cap { display: grid; gap: 4px; max-width: 360px; }
.tts-cap .input { width: 90px; }
.tts-cap-note { font-size: 12px; }
.tts-switch { display: grid; gap: 6px; min-width: 0; }
.tts-switch .segmented button { display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.tts-api summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.tts-api[open] summary { margin-bottom: 8px; }

/* 1.2.45 platform overlay over the 9:16 preview (export.PRESETS safe zones) */
.pview { position: absolute; inset: 0; pointer-events: none; font-size: 10px; color: #fff; }
.pview > div { position: absolute; background: rgba(0, 0, 0, 0.42); display: flex; }
.pview-top { top: 0; left: 0; right: 0; align-items: center; justify-content: center; }
.pview-right { right: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12%; padding-bottom: 6px; }
.pview-right i { width: 62%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.pview-left { left: 0; }
.pview-bottom { bottom: 0; left: 0; right: 0; flex-direction: column; justify-content: flex-start; gap: 3px; padding: 8px 10px; text-align: start; }
.pview-bottom b { font-size: 11px; }
.pview-bottom em { margin-top: auto; font-style: normal; opacity: 0.8; }
.pview-top span, .pview-bottom em { text-shadow: 0 1px 2px #000; }
.final-wait { display: grid; gap: 8px; }
.final-play { display: grid; gap: 6px; justify-items: center; }
.final-play video { width: min(100%, 300px); aspect-ratio: 9 / 16; background: #000; border-radius: 12px; }

/* ---------------------------------------------------------------- 1.2.51 full video + Channel style */
.full-alts {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.full-alt {
  display: block;
  width: 100%;
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.full-alt[aria-pressed="true"] {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-text);
}
.cstyle-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  min-width: 0;
}
.cstyle-box {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 12px 14px;
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}
.cstyle-box h3 {
  margin: 0;
  font-size: 14px;
}
.cstyle-box ul {
  margin: 0;
  padding-inline-start: 18px;
  display: grid;
  gap: 3px;
  font-size: 13px;
}
.cstyle-box li,
.cstyle-tags {
  overflow-wrap: anywhere;
}
.cstyle-tags {
  font-size: 12.5px;
  color: var(--muted);
}
.cstyle-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.cstyle-compare th,
.cstyle-compare td {
  text-align: start;
  vertical-align: top;
  padding: 8px;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.cstyle-compare th {
  color: var(--muted);
  font-weight: 600;
}
.cstyle-compare ol {
  margin: 0;
  padding-inline-start: 18px;
}
.cstyle-scroll {
  overflow-x: auto;
  min-width: 0;
}
.cstyle-md {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 1.2.53 language switcher (top bar + Easy home): flag + language name */
.flag { display: inline-block; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); vertical-align: middle; }
.lang-switch { position: relative; display: inline-flex; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lang-caret { font-size: 10px; opacity: 0.7; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 70; margin: 0; padding: 6px; list-style: none;
  min-width: 220px; max-height: min(70vh, 460px); overflow: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg, 12px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.lang-menu.lang-menu-up { top: auto; bottom: calc(100% + 6px); }
.topbar-actions .lang-menu { inset-inline-end: auto; inset-inline-start: 0; }
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; text-align: start; cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--hover, rgba(127, 127, 127, 0.14)); outline: none; }
.lang-menu button[aria-current="true"] { font-weight: 600; }
.lang-check { margin-inline-start: auto; color: var(--gold, currentColor); }
.lang-switch-big .lang-menu { inset-inline-end: auto; inset-inline-start: 50%; transform: translateX(-50%); }
[dir="rtl"] .lang-switch-big .lang-menu { transform: translateX(50%); }
.ez-lang { display: flex; justify-content: center; margin-top: 12px; }
@media (max-width: 560px) { .lang-menu { min-width: 200px; } }
.perf-note { align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* 1.2.53 game picker */
.game-chip { display: inline-flex; align-items: center; gap: 6px; }
.chip-beta { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
/* 1.2.53: on small screens the top bar's language switcher shows only the flag (the name stays in aria-label) */
@media (max-width: 1100px) { header .lang-btn > span[lang] { display: none; } }
/* 1.2.53: long labels (es / pt / fr) wrap to a second row instead of being cut off */
.segmented { flex-wrap: wrap; }

/* 1.2.56 first-run downloads (SetupDownloads.tsx): onboarding step, Settings > Downloads, banner */
.setup { display: grid; gap: 12px; min-width: 0; }
.setup-pc { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13.5px; color: var(--muted); }
.setup-pc svg { flex: none; margin-top: 2px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.setup-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.setup-item.present { background: transparent; }
.setup-check { display: flex; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 260px; cursor: pointer; }
.setup-check input { margin-top: 3px; flex: none; }
.setup-name { display: grid; gap: 2px; min-width: 0; }
.setup-name b { font-size: 14px; overflow-wrap: anywhere; }
.setup-name .muted { font-size: 12.5px; }
.setup-size { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.setup-ok, .setup-done { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; }
.setup-done { margin: 0; font-size: 14px; }
.setup-st { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.setup-st.st-done, .setup-st.st-present { color: var(--success); }
.setup-st.st-error { color: var(--danger); }
.setup-st.st-downloading, .setup-st.st-installing { color: var(--text); }
.setup-progress { display: grid; gap: 8px; }
.setup-progress-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.setup-actions { display: grid; gap: 8px; }
.setup-total, .setup-offline { margin: 0; font-size: 13.5px; }
.setup-offline { font-size: 12.5px; }
.setup-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 16px 0; }
.setup-banner span { flex: 1 1 200px; min-width: 0; }
.setup-welcome .setup-item { background: #ffffff; border-color: var(--w-line); }
.setup-welcome .setup-pc, .setup-welcome .muted { color: var(--w-muted); }

/* 1.2.57 channel monitoring (components/Channels.tsx) */
.chan-body { display: grid; gap: 14px; align-content: start; min-width: 0; }
.chan-how { margin-top: 10px !important; font-size: 12.5px !important; }
.chan-add { display: grid; gap: 10px; min-width: 0; }
.chan-add-row { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chan-add-row .input { flex: 1 1 200px; min-width: 0; }
.chan-own { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.chan-own input { accent-color: var(--gold); }
.chan-note { margin: 0; font-size: 12.5px; }
.chan-list, .chan-vods, .ez-chan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.chan-item { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.chan-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-width: 0; }
.chan-name { display: grid; gap: 4px; flex: 1 1 180px; min-width: 0; }
.chan-name b { overflow-wrap: anywhere; color: var(--strong); }
.chan-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chan-status { font-size: 12.5px; }
.chan-opts { display: grid; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; min-width: 0; }
.chan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.chan-grid label, .chan-free { display: grid; gap: 4px; min-width: 0; }
.chan-grid .select, .chan-free .select { width: 100%; min-width: 0; }
.chan-free { max-width: 220px; }
.chan-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chan-import, .chan-confirm { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chan-import .select { width: auto; min-width: 70px; flex: none; }
.chan-confirm > span { font-size: 13px; }
.chan-err { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.chan-recent h3 { margin: 4px 0 8px; font-size: 14px; color: var(--strong); }
.chan-vod { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); min-width: 0; }
.chan-vod-main { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; }
.chan-vod-title { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.chan-vod-meta { display: flex; gap: 4px 10px; flex-wrap: wrap; font-size: 12px; }
.chan-vod-side { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chan-global { display: grid; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.chan-ph-kick { --pf: #1d6b2c; } .chan-ph-twitch { --pf: #6a3fc4; } .chan-ph-youtube { --pf: #b8002a; }
.chan-src { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.chan-src svg { flex: none; }
.ez-lib-item .chan-src { margin-inline-start: 6px; }
.ez-chan-card { margin-top: 28px; max-width: 860px; padding: 18px; display: grid; gap: 12px; }
.ez-chan-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ez-chan-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-text); flex: none; }
.ez-chan-text { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.ez-chan-text h2 { margin: 0; font-size: 17px; color: var(--strong); }
.ez-chan-text p { margin: 0; font-size: 13.5px; }
.ez-chan-text b { overflow-wrap: anywhere; }
.ez-chan-row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ez-chan-row .ez-chan-text .muted { font-size: 12.5px; }

/* 1.2.58 Updates page (every version's release notes) */
.updates-page { max-width: 920px; }
.updates-search { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.updates-search > svg { position: absolute; inset-inline-start: 12px; color: var(--muted); pointer-events: none; }
.updates-search .input { width: 100%; padding-inline-start: 36px; }
.updates-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.updates-item { padding: 0; overflow: hidden; }
.updates-item summary { list-style: none; cursor: pointer; display: grid; gap: 6px; padding: 14px 16px; }
.updates-item summary::-webkit-details-marker { display: none; }
.updates-item summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.updates-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.updates-head b { font-size: 16px; color: var(--strong); }
.updates-summary { color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
.updates-more { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-text); font-weight: 500; }
.updates-item details[open] .updates-more svg { transform: rotate(180deg); }
.updates-body { display: grid; gap: 14px; padding: 4px 16px 16px; border-top: 1px solid var(--border); padding-top: 14px; overflow-wrap: anywhere; }
.updates-group h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.updates-new h2 { color: var(--gold-text); }
.nav-new { margin-inline-start: 2px; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 600; background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-line); vertical-align: 1px; }

/* 1.2.59: the waiting mini game's button (the game panel's own styles load with the game) */
.mg-dock {
  position: fixed;
  inset-block-end: 16px;
  inset-inline-start: 16px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: calc(100vw - 32px);
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.mg-dock:hover { border-color: var(--gold-line); }
.mg-dock:focus-visible { outline: none; box-shadow: var(--focus); }
.mg-dock-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mark-tile); flex: none; }
.mg-dock span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-dock-ready { border-color: var(--gold); color: var(--strong); }
body:has(.mg-dock) .app-footer { padding-bottom: 72px; }

/* 1.2.63 Pro mode: one "Advanced" look for the less used controls of every screen */
.advanced { border: 1px dashed var(--border-strong); border-radius: var(--r-sm); padding: 0 12px; background: transparent; }
.advanced > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 38px;
  font-size: 13px; font-weight: 550; color: var(--muted); user-select: none;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary:hover { color: var(--strong); }
.advanced > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.advanced-chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
[dir="rtl"] .advanced-chev { transform: rotate(135deg); }
.advanced[open] > summary .advanced-chev { transform: rotate(45deg); }
.advanced-body { display: grid; gap: 12px; padding: 4px 0 12px; min-width: 0; }
.advanced-hint { margin: 0; }
.advanced.inline { border: 0; padding: 0; }
.advanced.inline > summary { min-height: 32px; }
.proj-more .advanced-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clip-more { margin: 0 10px 8px; }
.clip-more .advanced-body { display: flex; flex-wrap: wrap; gap: 4px; }
.lower-grid.single { grid-template-columns: minmax(0, 1fr); }
.settings-advanced > .advanced-body { gap: 16px; }
.pub-row-actions { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .advanced-chev { transition: none; } }
/* 1.2.63: every Pro nav link fits at 1280 px (the 8th, "Updates", used to hide behind the edge) */
@media (max-width: 1500px) {
  .nav a { padding: 7px 9px; }
  .job-pill b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
}
@media (max-width: 1300px) {
  .nav a { padding: 7px 7px; font-size: 13.5px; }
  .job-pill b { display: none; }
}

/* 1.2.63 clip end point: range on the progress bar, start / end markers, time left, End of clip */
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; gap: 4px; }
.btn-xs.icon-btn { width: 26px; padding: 0; }
.clipbar { display: grid; gap: 4px; padding: 6px 2px 2px; min-width: 0; }
.clipbar-track { position: relative; height: 14px; cursor: pointer; touch-action: none; border-radius: 7px; }
.clipbar-track::before { content: ""; position: absolute; inset-inline: 0; top: 5px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.clipbar-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.clipbar-range { position: absolute; top: 3px; height: 8px; border-radius: 4px; background: var(--gold-soft); border: 1px solid var(--gold-line); box-sizing: border-box; }
.clipbar-done { position: absolute; top: 5px; height: 4px; border-radius: 2px; background: var(--gold); }
.clipbar-mark { position: absolute; top: -1px; width: 3px; height: 16px; margin-inline-start: -1.5px; border-radius: 2px; background: var(--strong); }
.clipbar-mark.end { background: var(--danger); }
.clipbar-mark.end.hit { box-shadow: 0 0 0 3px var(--danger-soft); }
.clipbar-head { position: absolute; top: 1px; width: 12px; height: 12px; margin-inline-start: -6px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); box-sizing: border-box; pointer-events: none; }
.clipbar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; min-width: 0; }
.clipbar-left { font-weight: 600; color: var(--strong); }
.clipbar.compact { padding: 4px 8px 2px; }
.clipbar.compact .clipbar-range-text { display: none; }
.clip-end-badge { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: rgba(10, 16, 32, 0.82); color: #fff; opacity: 0; transition: opacity 0.18s; white-space: nowrap; }
.clip-end-badge.on { opacity: 1; }
.clip-video { display: grid; min-width: 0; }
.clip-video-frame { position: relative; min-width: 0; }
.clip-video-frame video { display: block; width: 100%; }
.clip-video:fullscreen, .player-box:fullscreen { background: #000; display: grid; grid-template-rows: 1fr auto; padding: 12px; }
.clip-video:fullscreen .clip-video-frame, .player-box:fullscreen .player { display: grid; place-items: center; min-height: 0; }
.clip-video:fullscreen video, .player-box:fullscreen video { max-height: calc(100vh - 90px); width: auto; max-width: 100%; margin: auto; }
.clip-video:fullscreen .clipbar, .player-box:fullscreen .clipbar { color: #fff; }
.player-box { position: relative; min-width: 0; }
.vprev-frame { position: relative; }
@media (prefers-reduced-motion: reduce) { .clip-end-badge { transition: none; } }
/* ===================================================================== Easy mode (1.2.16)
   Big touch targets, lots of space, at most two main actions per screen.
   Uses the design tokens of styles.css (navy / gold / white, both themes). */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.danger { color: var(--danger); }

.btn-xl {
  height: 56px;
  padding: 0 28px;
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--r-xl);
}
.btn-xl svg { width: 20px; height: 20px; }

/* the Pro switch (top bar, both modes) */
.pro-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.pro-switch:hover { border-color: var(--border-strong); }
.pro-switch:focus-visible { outline: none; box-shadow: var(--focus); }
.pro-switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
}
.pro-switch-knob {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: inset-inline-start 0.15s var(--ease), background 0.15s;
}
.pro-switch.on .pro-switch-track { background: var(--gold-soft); border-color: var(--gold-line); }
.pro-switch.on .pro-switch-knob { inset-inline-start: 16px; background: var(--gold); }

.ez-topbar .nav a { padding: 8px 14px; font-size: 15px; }

.ez-page { max-width: 1240px; padding-top: 36px; }
.ez-hero { margin-bottom: 28px; }
.ez-hero .display { font-size: 48px; margin: 0 0 8px; }
.ez-hero .lede { font-size: 17px; max-width: 56ch; margin: 0; }

/* create screen */
.ez-create { display: grid; gap: 20px; max-width: 860px; }
.ez-drop {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 44px 28px;
  border: 2px dashed var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.ez-drop.drag { border-color: var(--gold); background: var(--gold-soft); }
.ez-drop.has-file { border-style: solid; border-color: var(--gold-line); }
.ez-drop-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--gold-soft);
  color: var(--gold-text);
}
.ez-drop-icon svg { width: 30px; height: 30px; }
.ez-drop-title { font-size: 22px; font-weight: 600; color: var(--strong); line-height: 1.3; }
.ez-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 560px);
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
}
.ez-link:focus-within { box-shadow: var(--focus); border-color: var(--gold-line); }
.ez-link .input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  background: transparent;
  font-size: 16px;
  box-shadow: none;
  padding: 0;
}
.ez-link .input:focus { outline: none; box-shadow: none; }
.ez-choose { font-size: 15px; min-height: 44px; }
.ez-file { display: grid; gap: 4px; justify-items: center; }
.ez-file strong { font-size: 18px; color: var(--strong); overflow-wrap: anywhere; }
.ez-file .link-btn { min-height: 40px; }
.ez-upload-bar { display: grid; gap: 6px; width: min(100%, 420px); }
.ez-create-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.ez-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 500;
}
.ez-chip:focus-within { box-shadow: var(--focus); }
.ez-chip select {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 500;
  padding: 0 2px;
  cursor: pointer;
}
.ez-chip select:focus { outline: none; }
.ez-chip select option { color: var(--text); background: var(--surface); }
.ez-chip-note { font-size: 12px; opacity: 0.85; }

/* progress */
.ez-working { max-width: 760px; }
.ez-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.ez-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ez-progress-head h2 { margin: 0; font-size: 20px; color: var(--strong); }
.ez-eta { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-text); font-weight: 500; }
.ez-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ez-step { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: var(--muted); font-size: 16px; }
.ez-step-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.ez-step-dot .spinner { width: 16px; height: 16px; }
.ez-step-done { color: var(--text); }
.ez-step-done .ez-step-dot { background: var(--success-soft); border-color: transparent; color: var(--success); }
.ez-step-active { color: var(--strong); font-weight: 600; }
.ez-step-active .ez-step-dot { border-color: var(--gold-line); background: var(--gold-soft); }
.ez-step-text { flex: 1; min-width: 0; }
.ez-step-pct { color: var(--gold-text); font-size: 14px; }
.ez-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); }
.ez-progress.compact { padding: 18px 22px; }
.ez-progress.compact .ez-steps { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.ez-progress.compact .ez-step { flex-direction: column; text-align: center; gap: 6px; font-size: 13px; padding: 0; }

/* recent videos */
.ez-recent { margin-top: 48px; max-width: 860px; }
.ez-recent h2 { font-size: 18px; color: var(--strong); margin: 0 0 12px; }
.ez-recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ez-recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.ez-recent-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ez-recent-thumb {
  flex: none;
  width: 84px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.ez-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ez-recent-text { flex: 1; min-width: 0; display: grid; }
.ez-recent-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); font-weight: 600; }

/* project screen */
.ez-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--muted); text-decoration: none; font-weight: 500; }
.ez-back:hover { color: var(--strong); }
.ez-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 24px; }
.ez-head-text { min-width: 0; flex: 1 1 320px; }
.ez-title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--strong); overflow-wrap: anywhere; }
.ez-head-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ez-section-title { font-size: 20px; color: var(--strong); margin: 8px 0 16px; }
.ez-error { margin-bottom: 24px; align-items: center; }

.ez-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}
.ez-card-skel { aspect-ratio: 9 / 16; border-radius: 18px; max-height: 520px; }
.ez-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ez-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-line), var(--shadow); }
.ez-video { position: relative; width: 100%; aspect-ratio: 9 / 16; background: #050913; }
.ez-video video { width: 100%; height: 100%; object-fit: contain; display: block; background: #050913; }
.ez-video-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: #c9d3e6;
  text-align: center;
}
.ez-video-wait .progress { width: 160px; }
.ez-check {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(5, 9, 19, 0.55);
  cursor: pointer;
}
.ez-check input { width: 22px; height: 22px; accent-color: var(--gold); cursor: pointer; }
.ez-dur {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 9, 19, 0.75);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}
.ez-video .ez-dur { top: 10px; bottom: auto; }
.ez-card-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; flex: 1; }
.ez-viral {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--chip-bg);
  color: var(--chip-text);
}
.ez-viral-very_high { background: var(--gold-soft); color: var(--gold-text); }
.ez-viral-high { background: var(--success-soft); color: var(--success); }
.ez-card-title { margin: 0; font-size: 18px; line-height: 1.35; color: var(--strong); font-weight: 600; overflow-wrap: anywhere; }
.ez-actions { display: grid; gap: 10px; margin-top: auto; }
.ez-big { height: 52px; font-size: 16px; font-weight: 600; border-radius: 14px; width: 100%; }
.ez-big svg { width: 19px; height: 19px; }
.ez-when {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.ez-when button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ez-when button[aria-checked="true"] { background: var(--surface); color: var(--strong); box-shadow: var(--shadow); }
.ez-when button:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-up-state { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 500; }
.ez-up-line { display: flex; align-items: center; gap: 10px; }
.ez-up-live { grid-template-columns: auto 1fr; align-items: center; color: var(--success); background: var(--success-soft); }
.ez-up-live .ez-big { grid-column: 1 / -1; }
.ez-up-planned { grid-template-columns: auto 1fr; align-items: center; color: var(--gold-text); background: var(--gold-soft); }
.ez-up-error { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--danger); font-size: 13px; }
.ez-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ez-card-foot .link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; }
.ez-menu { position: relative; }
.ez-menu .icon-btn { width: 40px; height: 40px; font-size: 20px; line-height: 1; }
.ez-menu-pop {
  position: absolute;
  bottom: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 5;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.ez-menu-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: start;
}
.ez-menu-pop button:hover:not(:disabled) { background: var(--surface-2); }
.ez-menu-pop button:disabled { opacity: 0.5; cursor: not-allowed; }
.ez-more { display: flex; justify-content: center; margin-top: 28px; }

.ez-selbar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 10px 10px 10px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-pop);
  font-weight: 600;
}

/* edit sheet */
.ez-field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.ez-field legend { font-weight: 600; color: var(--strong); margin-bottom: 10px; padding: 0; font-size: 15px; }
.ez-titles { display: grid; gap: 6px; }
.ez-title-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.ez-title-opt.on { border-color: var(--gold-line); background: var(--gold-soft); }
.ez-title-opt input { accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.ez-trim-video { width: 100%; aspect-ratio: 16 / 9; max-height: 220px; border-radius: 12px; background: #050913; margin-bottom: 12px; }
.ez-trim { position: relative; height: 44px; }
.ez-trim-track { position: absolute; inset-inline: 0; top: 19px; height: 6px; border-radius: 3px; background: var(--track); }
.ez-trim-track span { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--gold); }
.ez-trim input[type="range"] {
  position: absolute;
  inset-inline: 0;
  top: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.ez-trim input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 44px; }
.ez-trim input[type="range"]::-moz-range-track { background: transparent; }
.ez-trim input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 26px;
  height: 26px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--primary-bg);
  border: 3px solid var(--gold);
  cursor: grab;
}
.ez-trim input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-bg);
  border: 3px solid var(--gold);
  cursor: grab;
}
.ez-trim input[type="range"]:focus-visible { outline: none; }
.ez-trim input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus); }
.ez-trim-times { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin: 2px 0 6px; }
.ez-toggles { display: grid; gap: 14px; }
.ez-toggles .toggle-line,
.ez-set-card .toggle-line { justify-content: space-between; min-height: 44px; }
.ez-toggles .toggle-line > span,
.ez-set-card .toggle-line > span { display: grid; gap: 2px; min-width: 0; }
.ez-hint { font-size: 13px; overflow-wrap: anywhere; }

/* library */
.ez-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
}
.ez-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ez-tabs button[aria-selected="true"] { background: var(--surface); color: var(--strong); box-shadow: var(--shadow); }
.ez-tabs button:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-tab-count { font-size: 13px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text); }
.ez-lib-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 24px;
}
.ez-lib-item a { display: grid; gap: 8px; text-decoration: none; color: var(--text); border-radius: 16px; }
.ez-lib-item a:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-lib-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--surface-3); }
.ez-lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s var(--ease); }
.ez-lib-item a:hover img { transform: scale(1.03); }
.ez-lib-title { font-size: 16px; color: var(--strong); line-height: 1.35; overflow-wrap: anywhere; }
.ez-lib-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* settings */
.ez-settings { max-width: 760px; }
.ez-set-card { padding: 24px; margin-bottom: 18px; display: grid; gap: 14px; }
.ez-set-card h2 { margin: 0; font-size: 18px; color: var(--strong); }
.ez-set-card .link-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.ez-set-pro { grid-template-columns: 1fr auto; align-items: center; }

/* first-run tour */
.ez-tip {
  position: fixed;
  z-index: 60;
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-pop);
}
.ez-tip.above { transform: translateY(-100%); }
.ez-tip:focus { outline: none; }
.ez-tip h2 { margin: 2px 0 6px; font-size: 17px; color: var(--strong); }
.ez-tip p { margin: 0 0 12px; color: var(--text); }
.ez-tip-count { font-size: 12px; color: var(--gold-text); }
.ez-tip-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 720px) {
  .ez-page { padding-top: 20px; }
  .ez-hero .display { font-size: 36px; }
  .ez-drop { padding: 28px 16px; }
  .ez-drop-title { font-size: 19px; }
  .ez-create-row .btn-xl { width: 100%; }
  .ez-title { font-size: 28px; }
  .ez-progress { padding: 20px; }
  .ez-progress.compact .ez-steps { grid-auto-flow: row; }
  .ez-progress.compact .ez-step { flex-direction: row; text-align: start; font-size: 14px; }
  .ez-topbar .nav a { padding: 7px 9px; font-size: 14px; }
  .ez-topbar .select-sm { display: none; }
  .pro-switch { padding: 0 8px; }
  .pro-switch-label { font-size: 13px; }
  .ez-set-pro { grid-template-columns: 1fr; }
  .ez-head .btn-lg { width: 100%; }
  .ez-selbar { padding: 10px; justify-content: center; }
  .ez-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; overflow: visible; }
  .ez-tabs button { padding: 0 6px; font-size: 14px; gap: 5px; justify-content: center; white-space: normal; text-align: center; }
}

/* 1.2.18: the upload button's platform picker + TikTok / Reels states */
.ez-when.ez-platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ez-platforms button { min-height: 32px; font-size: 13px; }
.ez-platform-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.ez-platform-tools .link-btn { display: inline-flex; align-items: center; gap: 5px; }
.ez-mode-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.ez-up-live .ez-hint { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }

/* 1.2.31: bleep report */
.bleep-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.bleep-badge.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.bleep-badge.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.bleep-badge.warn { color: var(--warn); }
.bleep-hold { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bleep-list { padding: 6px 12px 10px; font-size: 12px; min-width: 0; }
.bleep-list summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.bleep-list ul { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.bleep-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.bleep-list li.bad .bleep-word { color: var(--danger); font-weight: 600; }
.bleep-word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; }

/* ---- Easy 2.0 (1.2.34): smart cut row, nudges */
.ez-cut { display: grid; gap: 8px; }
.ez-cut-why, .ez-cut-len { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.ez-cut-why svg, .ez-cut-len svg { flex: none; margin-top: 2px; }
.ez-cut-len { color: var(--gold-text); }
.ez-cut-len.warn { color: var(--danger); }
.ez-nudges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); gap: 6px; }
.ez-nudge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  text-align: center;
  line-height: 1.2;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ez-nudge:hover:not(:disabled) { border-color: var(--gold-line); color: var(--strong); }
.ez-nudge:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-nudge:disabled { opacity: 0.55; cursor: default; }
.ez-nudge .spinner { width: 13px; height: 13px; }
.ez-smart { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ez-hook { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.ez-hook svg { flex: none; margin-top: 2px; }
.ez-hook b { color: var(--text); font-weight: 600; }
.ez-hook-strong svg { color: var(--success); }
.ez-hook-ok svg { color: var(--gold-text); }
.ez-hook-weak svg { color: var(--danger); }
.ez-banner-field { display: grid; gap: 8px; }
.ez-banner-row { display: flex; gap: 8px; align-items: center; }
.ez-banner-row .input { flex: 1; min-width: 0; }
.ez-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ez-chips .ez-viral { align-self: auto; }
.ez-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.ez-viral-real { background: var(--success-soft); color: var(--success); }
.ez-card-foot .ez-taste { display: flex; gap: 4px; margin-inline-start: auto; }
.ez-thumb { width: 40px; height: 40px; border-radius: 12px; color: var(--muted); }
.ez-thumb.on { color: var(--success); background: var(--success-soft); }
.ez-thumb.on.bad { color: var(--danger); background: var(--danger-soft, var(--surface-2)); }
.ez-chip-taste { gap: 4px; color: var(--success); background: var(--success-soft); border-color: transparent; }

/* ---- Easy 2.0: connection pill, Autopilot */
.ez-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ez-pill:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ez-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.ez-pill-warn .ez-dot { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.ez-pill-error { border-color: var(--danger); color: var(--danger); }
.ez-pill-error .ez-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ez-hero .ez-pill { margin-bottom: 12px; }
.ez-ap h2 { display: flex; align-items: center; gap: 8px; }
.ez-ap-chain { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: ap; }
.ez-ap-chain li {
  counter-increment: ap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.ez-ap-chain li::before { content: counter(ap) ". "; }
.ez-ap-chain li.on { color: var(--strong); border-color: var(--gold-line); }
.ez-ap-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }

/* ---- Easy 2.0: phone-true preview (Shorts buttons over the clip) */
.ez-phone { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 9 / 16; max-width: 100%; pointer-events: none; container-type: size; color: #fff; }
.ez-phone svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ez-phone-channel, .ez-phone-sub, .ez-phone-title {
  position: absolute;
  font-family: Roboto, Arial, sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ez-phone-channel { left: 13.5%; top: 83.6%; width: 20%; font-size: 3.2cqh; font-weight: 600; line-height: 1; }
.ez-phone-sub { left: 34.6%; top: 84%; width: 15.4%; font-size: 1.6cqh; font-weight: 700; color: #0f0f0f; text-shadow: none; text-align: center; line-height: 1.75; }
.ez-phone-title { left: 4%; top: 88.6%; width: 80%; font-size: 1.9cqh; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.ez-phone-btn {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(5, 9, 19, 0.6);
  color: #fff;
  cursor: pointer;
}
.ez-phone-btn.on { background: var(--gold); color: #0e1a33; }
.ez-phone-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-video .ez-dur { inset-inline-end: 58px; }
.ez-video:has(.ez-phone) .ez-dur { display: none; }

/* ---- Easy 2.0: tap a caption word to fix it */
.ez-capfix { display: flex; flex-wrap: wrap; gap: 4px; max-height: 220px; overflow-y: auto; padding: 2px; }
.ez-capfix.busy { opacity: 0.7; }
.ez-capword {
  min-height: 32px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.ez-capword:hover:not(:disabled) { border-color: var(--gold-line); }
.ez-capword:focus-visible { outline: none; box-shadow: var(--focus); }
.ez-capword.mine { background: var(--success-soft); color: var(--success); }
.ez-capword.swear { color: var(--muted); cursor: default; }
.ez-capfix-input { min-height: 32px; height: 32px; padding: 2px 8px; width: auto; max-width: 100%; font-size: 15px; }

/* ---- Easy 2.0: weekly digest */
.ez-digest { display: grid; gap: 12px; margin-bottom: 20px; padding: 18px 20px; }
.ez-digest h2 { margin: 0; font-size: 18px; }
.ez-digest-stats { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px 24px; align-items: start; }
.ez-digest-stats > div { display: grid; gap: 2px; min-width: 0; }
.ez-digest-stats b { font-size: 26px; color: var(--strong); line-height: 1.1; }
.ez-digest-best a, .ez-digest-best > span[dir] { font-weight: 600; overflow-wrap: anywhere; color: var(--strong); }
.ez-digest-worked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ez-digest-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--text); }
.ez-digest-sug svg { color: var(--gold-text); flex: none; }
.ez-digest-target { margin: 0; font-size: 13px; }
@media (max-width: 560px) {
  .ez-digest-stats { grid-template-columns: 1fr 1fr; }
  .ez-digest-best { grid-column: 1 / -1; }
}

/* 1.2.41: delete a project from the recent list, delete a clip from its menu */
.ez-recent-list li { display: flex; align-items: center; gap: 6px; }
.ez-recent-list li > .ez-recent-item { flex: 1; min-width: 0; }
.ez-recent-del { flex: none; }
.ez-menu-pop button.danger { color: var(--danger); }
.ez-trash-link { margin-top: 18px; text-align: center; }
.ez-settings .ez-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* 1.2.53: longer texts in es / pt / fr wrap instead of being cut off */
.ez-viral { max-width: 100%; white-space: normal; }
.ez-settings .segmented { flex-wrap: wrap; overflow-x: visible; }
.ez-settings .segmented button { height: auto; min-height: 30px; white-space: normal; }
.ez-when { min-width: 0; }
.ez-when button { white-space: normal; line-height: 1.2; min-width: 0; }
.mp-block, .mp-go, .mp-switches { min-width: 0; flex-wrap: wrap; }
.ez-settings .btn { white-space: normal; height: auto; min-height: 40px; text-align: center; }
.ez-card-body { min-width: 0; }
.ez-card .ez-big { white-space: normal; height: auto; min-height: 44px; line-height: 1.2; min-width: 0; }
.ez-video-box { display: grid; min-width: 0; }
.ez-video-box:fullscreen { background: #000; grid-template-rows: 1fr auto; padding: 12px; }
.ez-video-box:fullscreen .ez-video { max-height: none; height: calc(100vh - 80px); margin: 0 auto; }
.ez-video-box:fullscreen .clipbar { color: #fff; }

.ez-import-presets { min-inline-size: 0; margin: 0; padding: 12px 16px 16px; }
.ez-import-presets legend { padding: 0 8px; font-weight: 650; }
.ez-import-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 12px 16px; }
.ez-import-controls > :not(.ez-import-toggle) { display: grid; align-content: start; gap: 6px; }
.ez-import-controls select { width: 100%; }
.ez-import-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.ez-lib-item { position: relative; min-width: 0; }
.ez-lib-thumb-placeholder { display: grid; height: 100%; place-items: center; color: var(--muted); }
.ez-lib-select {
  position: absolute;
  inset: 8px 8px auto auto;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0d1512b8;
  color: #102018;
  cursor: pointer;
}
.ez-lib-select[aria-pressed="true"] { background: #8be09b; border-color: #8be09b; }
.ez-lib-select:focus-visible { outline: 2px solid #8be09b; outline-offset: 3px; }

.ez-pool-picker { display: grid; gap: 8px; margin: 8px 0 0; min-width: 0; }
.ez-pool-options { display: flex; flex-wrap: wrap; gap: 6px; }
.ez-pool-options .btn { display: inline-flex; align-items: center; gap: 5px; }
.ez-pool-picker > .btn { justify-self: start; }
/* LocalClipMaker — charcoal studio, green editing accents. */
:root {
  --font-display: var(--font-ui);
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
}
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: #111916;
  --surface-2: #17221c;
  --surface-3: #203026;
  --border: #26362d;
  --border-strong: #3a5142;
  --text: #e1eae3;
  --strong: #f1f7ef;
  --muted: #9bad9e;
  --gold: #b1ef8d;
  --gold-text: #b1ef8d;
  --gold-soft: #b1ef8d12;
  --gold-line: #b1ef8d55;
  --primary-bg: #b1ef8d;
  --primary-hover: #c5f6a9;
  --primary-text: #102115;
  --chip-bg: #203127;
  --chip-text: #bfdbc5;
  --success: #9de1a9;
  --success-soft: #9de1a916;
  --mark-tile: #b1ef8d;
  --mark-tile-border: #b1ef8d;
  --mark-fin: #102115;
  --mark-wave: #102115;
  --focus: 0 0 0 3px #b1ef8d45;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f1;
  --surface: #fff;
  --surface-2: #eaf0e6;
  --surface-3: #dce7d8;
  --border: #d5dfd0;
  --border-strong: #afc1a9;
  --text: #263b2c;
  --strong: #12291a;
  --muted: #566e5b;
  --gold: #316632;
  --gold-text: #316632;
  --gold-soft: #3166320c;
  --gold-line: #31663255;
  --primary-bg: #316632;
  --primary-hover: #254e26;
  --primary-text: #fff;
  --mark-tile: #b1ef8d;
  --mark-fin: #102115;
  --mark-wave: #102115;
}
.display { font-weight: 650; letter-spacing: -.045em; line-height: 1.12; }
.brand-name { font-family: var(--font-ui); font-weight: 700; font-size: 17px; letter-spacing: -.045em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.lsm-brand-copy { display: grid; gap: 7px; }
.lsm-brand-sub { color: var(--muted); font: 9px/1 var(--font-mono); letter-spacing: .14em; }
.lsm-brand-sub b { color: var(--gold-text); font-weight: 500; letter-spacing: .04em; margin-inline-start: 3px; }
.topbar .nav a { display: flex; align-items: center; gap: 10px; }
.topbar .nav a[aria-current="page"] { background: var(--gold-soft); color: var(--gold-text); }
.topbar { backdrop-filter: none; background: var(--surface); }
.btn { border-radius: 10px; }
.btn-primary { font-weight: 650; box-shadow: none; }
.lsm-eyebrow { display: block; color: var(--gold-text); font: 10px/1.4 var(--font-mono); letter-spacing: .18em; margin-bottom: 14px; }
.lsm-home { max-width: 1440px; }
.lsm-home-hero { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 36px; }
.lsm-home-hero .display { max-width: 720px; font-size: clamp(30px, 3.2vw, 46px); margin-bottom: 16px; text-wrap: balance; }
.lsm-home-hero .lede { max-width: 63ch; font-size: 15px; line-height: 1.7; }
.lsm-workbench { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 22px; align-items: stretch; margin-bottom: 24px; }
.lsm-import-panel, .lsm-pipeline { min-width: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 24px; }
.lsm-panel-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.lsm-step { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 10px; color: var(--gold-text); font-family: var(--font-mono); font-size: 12px; flex: none; }
.lsm-panel-heading h2 { margin: 0 0 4px; color: var(--strong); font-size: 17px; font-weight: 600; }
.lsm-panel-heading p { margin: 0; font-size: 12px; color: var(--muted); }
.lsm-home .ez-create { max-width: none; gap: 20px; }
.lsm-home .ez-drop { min-height: 300px; padding: 32px 18px; border-width: 1px; border-radius: 14px; background: var(--bg); gap: 17px; align-content: center; }
.lsm-home .ez-drop-title { font-size: 19px; letter-spacing: -.02em; }
.lsm-home .ez-drop-icon { width: 54px; height: 54px; border-radius: 15px; border: 1px solid var(--gold-line); background: var(--gold-soft); }
.lsm-home .ez-link { background: var(--surface); border-radius: 9px; }
.lsm-home .ez-choose { color: var(--gold-text); font-size: 13px; }
.lsm-home .ez-create-row { gap: 12px; flex-wrap: wrap; }
.lsm-home .btn-xl { height: 46px; font-size: 14px; padding-inline: 20px; }
.lsm-pipeline { padding: 28px; display: flex; flex-direction: column; }
.lsm-pipeline h2 { margin: 0 0 10px; font-size: 23px; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; }
.lsm-pipeline > p { font-size: 12px; margin: 0; line-height: 1.65; }
.lsm-pipeline ol { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 23px; }
.lsm-pipeline li { display: flex; gap: 14px; align-items: start; position: relative; }
.lsm-workflow-ring {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}
.lsm-workflow-ring::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
}
.lsm-workflow-ring.spinning {
  background: conic-gradient(var(--gold-text) 25%, var(--border-strong) 0);
  animation: lsm-workflow-spin 1s linear infinite;
}
@keyframes lsm-workflow-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lsm-workflow-ring.spinning { animation: none; } }
.lsm-pipeline-number { font: 10px/28px var(--font-mono); border-radius: 50%; width: 28px; height: 28px; text-align: center; border: 1px solid var(--border-strong); color: var(--gold-text); flex: none; }
.lsm-pipeline h3 { margin: 1px 0 5px; font-size: 13px; font-weight: 600; color: var(--strong); }
.lsm-pipeline li p { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
.lsm-local-note { margin-top: auto; border-top: 1px solid var(--border); padding-top: 16px; display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 11px; }
.lsm-home .ez-recent { max-width: none; margin-top: 36px; }
.lsm-home .ez-recent > h2 { font-size: 18px; letter-spacing: -.025em; }
.lsm-home .ez-recent-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lsm-home .ez-recent-list > li { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; }
.lsm-home .ez-recent-item { border: none; background: none; min-width: 0; }
.ez-lib-item { border-radius: 16px; }
.ez-pill-warn .ez-dot { background: #e4ba79; box-shadow: 0 0 0 3px #e4ba7918; }
.ez-navigation { display: contents; }
.ez-topbar .ez-menu-toggle, .ez-menu-backdrop { display: none; }
@media (min-width: 1200px) {
  .ez-topbar .ez-monitor { position: fixed; top: 16px; right: 20px; }
  .topbar { position: fixed; inset: 0 auto 0 0; width: 244px; height: 100dvh; padding: 30px 18px 20px; display: flex; flex-direction: column; align-items: stretch; border-bottom: 0; border-right: 1px solid var(--border); gap: 0; }
  [dir="rtl"] .topbar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--border); }
  .topbar .brand { flex: none; margin: 0 0 42px; gap: 9px; }
  .topbar .nav { display: flex; flex-direction: column; flex: 0 1 auto; overflow-x: hidden; overflow-y: auto; gap: 6px; }
  .topbar .nav a { padding: 12px 14px; font-size: 13px; min-height: 44px; border: 1px solid transparent; }
  .topbar .nav a[aria-current="page"] { border-color: var(--gold-line); }
  .topbar-spacer { min-height: 24px; }
  .topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; }
  .topbar-actions > .pro-switch { flex: 1 0 100%; justify-content: center; border-radius: 10px; }
  .page-fx, .app-footer { margin-inline-start: 244px; }
  .page-fx > .page { padding: 46px 40px 56px; }
}
@media (max-width: 1199px) {
  .lsm-brand-sub { display: none; }
  .topbar { padding-inline: 16px; }
  .brand-name { font-size: 16px; }
  .topbar .brand { margin-inline-end: 0; }
  .topbar .nav a { padding-inline: 9px; font-size: 12px; }
  .topbar .nav a svg { display: none; }
  .lsm-workbench { grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr); }
}
@media (max-width: 800px) {
  .lsm-workbench { grid-template-columns: minmax(0, 1fr); }
  .lsm-home-hero { flex-direction: column; gap: 16px; }
  .lsm-home-hero .display { font-size: 33px; }
  .lsm-pipeline ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar .brand-name { font-size: 14px; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; padding: 16px; gap: 14px; }
  .topbar .brand { grid-row: 1; justify-self: start; }
  .topbar .brand-name { display: inline; }
  .topbar .nav { grid-row: 2; width: 100%; max-width: 100%; overflow-x: auto; }
  .topbar .topbar-actions { grid-row: 3; width: 100%; min-width: 0; flex-wrap: wrap; }
  .topbar .topbar-spacer { display: none; }
  .ez-topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .ez-topbar .brand { display: none; }
  .ez-topbar .ez-menu-toggle { display: inline-flex; grid-row: 1; grid-column: 1; justify-self: start; }
  .ez-topbar .ez-monitor { grid-row: 1; grid-column: 2; justify-self: end; }
  .ez-topbar .ez-navigation { display: none; }
  .ez-topbar .ez-navigation.is-open {
    display: flex; flex-direction: column; gap: 12px; position: absolute;
    top: 100%; left: 12px; z-index: 2; width: min(290px, calc(100vw - 24px));
    max-height: calc(100dvh - 90px); overflow-y: auto; padding: 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  }
  .ez-menu-backdrop { display: block; position: absolute; inset: 100% 0 auto; height: 100dvh;
    width: 100%; border: 0; background: #0006; z-index: 1; }
  .ez-topbar .ez-navigation .nav { display: flex; flex-direction: column; align-items: stretch; overflow: visible; }
  .ez-topbar .ez-navigation .nav a { min-height: 42px; }
  .ez-topbar .ez-navigation .nav a svg { display: inline; }
  .ez-topbar .ez-navigation .topbar-actions .select { display: block; }
  .ez-topbar .ez-monitor .gov-nums { display: none; }
}
@media (max-width: 520px) {
  .lsm-import-panel, .lsm-pipeline { padding: 18px; }
  .lsm-home .ez-recent-list, .lsm-pipeline ol { grid-template-columns: 1fr; }
  .lsm-home-hero .display { font-size: 29px; }
  .lsm-home .ez-create-row > .btn { width: 100%; justify-content: center; }
  .topbar-actions .pro-switch { font-size: 11px; }
}

.ez-monitor { display: flex; align-items: center; gap: 8px; }
.ez-monitor .studio-plan { white-space: nowrap; gap: 6px; }
.studio-plan strong { color: var(--strong); }
.pro-panel {
  --pro-accent: #adf2ba;
  color: #edf8ee;
  background: #101a15;
  border-color: #395b46;
  margin: auto;
  padding: 0;
  width: min(480px, calc(100% - 32px));
}
.pro-panel::backdrop { background: rgb(3 10 6 / 72%); backdrop-filter: blur(4px); }
.pro-panel-hero {
  position: relative;
  padding: 28px 24px 22px;
  background: radial-gradient(ellipse at top left, #254e36, transparent 76%);
}
.pro-panel .pro-panel-close { position: absolute; top: 12px; right: 12px; color: #d5e7d9; }
.pro-panel-emblem, .pro-panel-features li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--pro-accent);
  background: #243e2e;
  flex: none;
}
.pro-panel-hero h2 {
  margin: 14px 0 6px;
  color: inherit;
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.1;
}
.pro-panel-hero h2 span { color: var(--pro-accent); }
.pro-panel-hero p, .pro-panel-features p { margin: 0; color: #b8cfbf; }
.pro-panel-features { display: grid; gap: 8px; margin: 0; padding: 0 24px 24px; list-style: none; }
.pro-panel-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #304b38;
  border-radius: 12px;
  background: #17251d;
}
.pro-panel-features p { font-size: 13px; }
.pro-panel-action {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #304b38;
}
.pro-panel-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; margin: 0; }
.pro-panel-price strong { font-size: 26px; line-height: 1.1; }
.pro-panel-price span { font-size: 12px; color: #b8cfbf; }
.pro-panel-action .btn-primary { color: #0b2113; background: var(--pro-accent); border-color: var(--pro-accent); }
.pro-panel-action .btn-primary:hover:not(:disabled) { background: #c8f9d0; }
.pro-panel-action [role="alert"] { grid-column: 1 / -1; margin: 0; }
@media (max-width: 400px) {
  .pro-panel-action { grid-template-columns: 1fr; }
}
.ez-monitor .ez-signout-desktop { height: 32px; white-space: nowrap; }
.ez-topbar .ez-signout-mobile { display: none; }
@media (max-width: 800px) {
  .ez-topbar .ez-signout-desktop { display: none; }
  .ez-topbar .ez-signout-mobile { display: inline-flex; }
}


.ez-pool-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #78cd9b;
  padding: 2px 9px;
  font-size: 0.8rem;
}
.pool-platform-logos, .pool-platform-logos > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}
.lsm-connected-accounts {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 800px) {
  .lsm-connected-accounts { justify-content: flex-start; }
}
