/* ── Asta's Studio design system ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --bg: #FFF8F1;
  --bg-deep: #FFF1E6;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #FFF4EA;
  --surface-hover: #FFEDD5;
  --surface-inverse: #111111;
  --peach: #FFE8D4;
  --border: rgba(17, 17, 17, .08);
  --border-strong: rgba(17, 17, 17, .14);
  --text: #111111;
  --text-soft: #5B5B5B;
  --text-dim: #8A8A8A;
  --text-inverse: #ffffff;
  --accent: #36e29b;
  --accent-strong: #EA580C;
  --accent-soft: rgba(54, 226, 155, .12);
  --accent-glow: rgba(54, 226, 155, .28);
  --cyan: #FB923C;
  --cyan-soft: rgba(251, 146, 60, .14);
  --magenta: #36e29b;
  --coral: #FB7185;
  --lime: #4ADE80;
  --green: #22C55E;
  --red: #EF4444;
  --yellow: #FACC15;
  --gradient-primary: linear-gradient(135deg, #36e29b 0%, #EA580C 100%);
  --gradient-cool: linear-gradient(135deg, #FB923C 0%, #36e29b 100%);
  --shadow-sm: 0 8px 24px rgba(28, 17, 8, .06);
  --shadow-md: 0 22px 60px rgba(28, 17, 8, .10);
  --shadow-glow: 0 14px 36px rgba(54, 226, 155, .28);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --content: 1120px;
  --topbar-height: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16110D;
  --bg-deep: #100C09;
  --surface: #1E1813;
  --surface-solid: #1E1813;
  --surface-raised: #261E18;
  --surface-soft: #2A211A;
  --surface-hover: #34281F;
  --surface-inverse: #FFF8F1;
  --peach: #2A1C12;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #FFF8F1;
  --text-soft: #C9B8A8;
  --text-dim: #8E7D6F;
  --text-inverse: #111111;
  --accent: #FB923C;
  --accent-strong: #FDBA74;
  --accent-soft: rgba(251, 146, 60, .16);
  --accent-glow: rgba(54, 226, 155, .32);
  --cyan: #FDBA74;
  --cyan-soft: rgba(253, 186, 116, .12);
  --coral: #FB7185;
  --lime: #4ADE80;
  --green: #4ADE80;
  --red: #F87171;
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-md: 0 30px 90px rgba(0, 0, 0, .45);
  --shadow-glow: 0 16px 54px rgba(54, 226, 155, .28);
}

html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg {
  display: block;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button, [role="button"], summary { touch-action: manipulation; }
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), white 20%);
  outline-offset: 3px;
}
.hidden { display: none !important; }
.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;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .text-button, .btn-ghost {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.015em;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease, background .2s ease, opacity .2s ease;
}
.btn-primary {
  color: white;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(54, 226, 155, .34), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}
.btn-secondary:hover { border-color: color-mix(in srgb, var(--accent), transparent 40%); background: var(--surface-hover); }
.btn-ghost {
  color: var(--text);
  background: transparent;
  padding-inline: 10px;
}
.btn-ghost:hover { color: var(--accent-strong); }
.text-button {
  min-height: 42px;
  padding: 0;
  border: 0;
  color: var(--text-soft);
  background: transparent;
}
.text-button:hover { color: var(--accent); }
.text-button span { transition: transform .2s var(--ease); }
.text-button:hover span { transform: translateX(3px); }
.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.icon-button:hover { transform: translateY(-1px); border-color: var(--border-strong); background: var(--surface-hover); }
.header-cta { min-height: 42px; padding: 0 16px; font-size: .84rem; }
.header-cta svg { width: 16px; height: 16px; }

/* ── Welcome sequence ──────────────────────────────────────────────── */
.welcome-experience {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  color: var(--text);
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
}
.welcome-experience.is-visible { opacity: 1; visibility: visible; }
.welcome-experience.is-leaving { opacity: 0; }
.welcome-copy { position: relative; z-index: 2; max-width: 640px; text-align: center; }
.welcome-copy .brand-mark { margin: 0 auto 22px; opacity: 0; animation: welcome-up .55s .08s var(--ease) forwards; }
.welcome-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  animation: welcome-up .5s .22s var(--ease) forwards;
}
.welcome-copy h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: .98;
  letter-spacing: -.06em;
  opacity: 0;
  animation: welcome-up .6s .34s var(--ease) forwards;
}
.welcome-copy p:last-child {
  max-width: 480px;
  margin: 16px auto 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.55;
  opacity: 0;
  animation: welcome-up .55s .52s var(--ease) forwards;
}
.skip-welcome {
  position: absolute;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 3;
  padding: 10px 14px;
  border: 0;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
}
@keyframes welcome-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Brand and app shell ───────────────────────────────────────────── */
.brand-mark {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--gradient-primary);
  box-shadow: 0 8px 20px var(--accent-glow);
}
.brand-mark span,
.brand-mark::before { display: none; }
.brand-mark::after {
  width: 0;
  height: 0;
  margin-left: 3px;
  content: "";
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid white;
}
.brand-mark-large { width: 58px; height: 58px; border-radius: 18px; }
.brand-mark-large::after { border-top-width: 9px; border-bottom-width: 9px; border-left-width: 15px; margin-left: 4px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: calc(var(--topbar-height) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), transparent 18%);
  backdrop-filter: blur(22px) saturate(140%);
}
.topbar-inner {
  display: flex;
  max-width: calc(var(--content) + 64px);
  height: var(--topbar-height);
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 0 22px;
}
.topbar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar-brand strong {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text);
}
.header-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}
.header-nav a, .header-nav button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.header-nav a:hover, .header-nav button:hover { color: var(--text); background: var(--surface-soft); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.active-job-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--green), transparent 62%);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--green), transparent 88%);
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green), transparent 82%); animation: pulse 1.6s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px transparent; } }
.theme-button .sun-icon, :root[data-theme="light"] .drawer-theme-row .sun-icon { display: none; }
:root[data-theme="light"] .theme-button .sun-icon { display: block; }
:root[data-theme="light"] .theme-button .moon-icon { display: none; }
.app-content {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 28px 22px calc(80px + env(safe-area-inset-bottom));
}

/* ── Drawer ────────────────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 89;
  border: 0;
  background: rgba(17, 10, 6, .46);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .28s ease;
}
body.drawer-open .drawer-overlay { opacity: 1; }
body.drawer-open { overflow: hidden; }
.app-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: flex;
  width: min(88vw, 340px);
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  border-left: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: -24px 0 80px rgba(28, 17, 8, .16);
  transform: translateX(105%);
  transition: transform .38s var(--ease);
}
body.drawer-open .app-drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 24px; }
.drawer-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }
.drawer-brand-copy strong, .drawer-brand-copy span { display: block; }
.drawer-brand-copy strong { font-size: 1rem; letter-spacing: -.03em; }
.drawer-brand-copy span { margin-top: 2px; color: var(--text-dim); font-size: .68rem; }
.drawer-close { width: 40px; height: 40px; }
.drawer-nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nav-section-label {
  margin: 12px 12px 8px;
  color: var(--text-dim);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-context-label { margin-top: 26px; }
.drawer-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  gap: 13px;
  margin-bottom: 4px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--text-soft);
  background: transparent;
  font-size: .89rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.drawer-link svg { width: 21px; height: 21px; flex: 0 0 auto; }
.drawer-link:hover { color: var(--text); background: var(--surface-soft); }
.drawer-link.active {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent), transparent 70%);
  background: var(--accent-soft);
}
.nav-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green), transparent 84%); }
.drawer-footer { padding-top: 16px; border-top: 1px solid var(--border); }
.drawer-theme-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-soft);
}
.drawer-theme-row strong, .drawer-theme-row span { display: block; }
.drawer-theme-row strong { font-size: .78rem; }
.drawer-theme-row > div > span { margin-top: 2px; color: var(--text-dim); font-size: .65rem; }
.theme-switch { position: relative; width: 48px; height: 28px; border: 0; border-radius: 999px; background: var(--accent); cursor: pointer; }
.theme-switch-thumb { position: absolute; top: 3px; left: 3px; right: auto; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: var(--accent); background: white; transform: none; transition: transform .25s var(--ease); }
.theme-switch-thumb svg { width: 13px; height: 13px; }
:root[data-theme="dark"] .theme-switch-thumb { transform: translateX(20px); }
:root[data-theme="dark"] .theme-switch-thumb .sun-icon { display: none; }
:root[data-theme="light"] .theme-switch-thumb .moon-icon { display: none; }
:root[data-theme="light"] .theme-switch-thumb .sun-icon { display: block; }
.profile-card { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 16px; }
.profile-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: white; background: var(--gradient-primary); font-weight: 800; }
.profile-card strong, .profile-card span { display: block; }
.profile-card strong { font-size: .8rem; }
.profile-card > div > span { margin-top: 2px; color: var(--text-dim); font-size: .64rem; }
.profile-status { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--green); }
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 8px 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.account-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient-primary);
  font-size: .72rem;
  font-weight: 800;
}
.account-email {
  max-width: 160px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-admin-link {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}
.account-admin-link:hover { background: var(--surface-hover); }
.account-signout {
  border: 0;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--text-dim);
  background: transparent;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.account-signout:hover { color: var(--red); background: var(--surface-hover); }
@media (max-width: 720px) {
  .account-email { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 0 28px;
  text-align: center;
}
.section-kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: .84rem;
  font-weight: 600;
}
.avatar-stack { display: flex; }
.avatar-stack img {
  width: 30px;
  height: 30px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  background: var(--peach);
}
.avatar-stack img + img { margin-left: -7px; }
.hero h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: .98;
  letter-spacing: -.06em;
  font-weight: 800;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent); }
.hero-description {
  max-width: 640px;
  margin-top: 20px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.btn-hero { min-height: 54px; padding-inline: 24px; }
.btn-hero svg { width: 18px; height: 18px; }
.play-mini {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--gradient-primary);
}
.play-mini svg { width: 12px; height: 12px; fill: currentColor; stroke: none; margin-left: 1px; }

.hero-media { padding: 8px 0 12px; }
.hero-media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: #111;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.hero-media-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  transform: translate(-50%, -50%);
  transition: transform .2s var(--ease);
}
.hero-play svg { width: 28px; height: 28px; fill: currentColor; stroke: none; margin-left: 3px; }
.hero-media-frame:hover .hero-play { transform: translate(-50%, -50%) scale(1.06); }
.hero-media-frame.is-playing .hero-play { opacity: 0; pointer-events: none; }

/* ── Feature strip ─────────────────────────────────────────────────── */
.feature-strip { padding: 64px 0 16px; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 28px;
}
.feature-card { text-align: left; }
.feature-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.feature-card p { margin-top: 8px; color: var(--text-soft); font-size: .92rem; line-height: 1.55; }

/* ── How it works ──────────────────────────────────────────────────── */
.how-section { padding: 48px 0 12px; }
.how-card {
  padding: clamp(28px, 5vw, 52px) clamp(20px, 4vw, 44px);
  border-radius: 36px;
  background: var(--peach);
}
.how-card .section-kicker { margin-bottom: 10px; }
.how-card h2 {
  max-width: 640px;
  margin-bottom: 36px;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.how-step h3 { margin-top: 16px; font-size: 1.05rem; }
.how-step p { margin-top: 8px; color: var(--text-soft); font-size: .92rem; line-height: 1.55; }
.how-icon {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.how-icon svg { width: 26px; height: 26px; }
.how-icon span {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: .7rem;
  font-weight: 800;
}
.how-arrow { display: none; color: var(--accent); }
.how-arrow svg { width: 48px; height: 24px; }

/* ── Product walkthrough ──────────────────────────────────────────── */
.workflow-guide { padding: 72px 0 24px; }
.workflow-guide-head { max-width: 720px; margin-bottom: 36px; }
.workflow-guide-head h2 { margin: 8px 0 12px; font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -.055em; }
.workflow-guide-head > p:last-child, .workflow-guide-copy p { color: var(--text-soft); line-height: 1.65; }
.workflow-guide-list { display: grid; gap: 24px; }
.workflow-guide-row { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 6vw, 72px); align-items: center; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--border); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-sm); }
.workflow-guide-copy > span { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: var(--accent); background: var(--accent-soft); font-weight: 900; }
.workflow-guide-copy h3 { margin: 18px 0 10px; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.035em; }
.workflow-shot { min-height: 250px; padding: 24px; border-radius: 24px; color: #ecfff4; background: #071810; border: 1px solid rgba(116,255,160,.18); box-shadow: inset 0 1px rgba(255,255,255,.05); }
.workflow-shot-label { display: block; margin-bottom: 26px; color: #a6ff4d; font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.shot-input { display: flex; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid #294238; border-radius: 15px; color: #a9bbb2; }
.shot-input b, .workflow-shot button { color: #07120c; background: #9cff42; white-space: nowrap; }
.shot-input b { margin: -8px; padding: 8px 12px; border-radius: 10px; }
.shot-sources, .shot-pills, .shot-ratios { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.shot-sources span, .shot-pills b, .shot-ratios span, .shot-ratios strong { padding: 9px 12px; border: 1px solid #294238; border-radius: 999px; font-size: .76rem; }
.shot-ratios strong { color: #07120c; background: #9cff42; border-color: #9cff42; }
.shot-progress { height: 8px; overflow: hidden; margin: 44px 0 24px; border-radius: 99px; background: #17291f; }.shot-progress i { display:block;width:62%;height:100%;background:#9cff42; }
.workflow-shot ul { display:grid;grid-template-columns:1fr 1fr;gap:14px;list-style:none;font-size:.78rem;color:#789083; }.workflow-shot li.done{color:#50e3ae}.workflow-shot li.active{color:#fff;font-weight:800}.workflow-shot li::before{content:'○';margin-right:7px}.workflow-shot li.done::before,.workflow-shot li.active::before{content:'●';color:#9cff42}
.shot-editor { display:flex;align-items:center;justify-content:center;gap:28px}.phone-frame{position:relative;display:grid;width:138px;aspect-ratio:9/16;overflow:hidden;border:2px solid #365146;border-radius:20px;background:#162b22}.phone-frame span{display:grid;place-items:center;border-bottom:1px solid #365146;color:#789083;font-size:.7rem}.phone-frame b{position:absolute;left:12px;right:12px;top:48%;text-align:center;font-size:.65rem;color:#fff}.shot-sliders{display:grid;gap:28px;width:38%}.shot-sliders i{display:block;height:6px;border-radius:9px;background:linear-gradient(90deg,#9cff42 60%,#294238 60%)}
.shot-checks { display:grid;gap:13px;margin-bottom:24px}.shot-checks b{padding:11px 13px;border-radius:12px;background:#10271b;color:#bfffa4;font-size:.78rem}.workflow-shot button{border:0;border-radius:999px;padding:12px 18px;font-weight:850}
@media (max-width: 760px){.workflow-guide-row{grid-template-columns:1fr}.workflow-guide-row:nth-child(even) .workflow-guide-copy{order:2}.workflow-shot{min-height:220px}.shot-editor{min-height:300px}}

/* ── Shared headings and surfaces ─────────────────────────────────── */
.section-heading, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin-top: 7px; font-size: clamp(1.55rem, 3.5vw, 2.15rem); line-height: 1.08; letter-spacing: -.045em; }
.section-note { color: var(--text-dim); font-size: .7rem; font-weight: 650; }
.page-section { animation: page-in .38s var(--ease); }
.page-heading { align-items: flex-start; margin-bottom: 30px; }
.page-heading h1 { margin-top: 6px; font-size: clamp(2.1rem, 6vw, 3.8rem); letter-spacing: -.055em; }
.page-heading p:last-child { max-width: 620px; margin-top: 10px; color: var(--text-soft); line-height: 1.55; }
.step { display: none; }
.step.active { display: block; }
.step.hidden { display: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Quick Create ──────────────────────────────────────────────────── */
.quick-create-section { scroll-margin-top: calc(var(--topbar-height) + 20px); padding-top: 56px; }
.quick-create-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.quick-create-main { padding: clamp(20px, 4vw, 36px); }
.source-method-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.source-method-head strong, .source-method-head span { display: block; }
.source-method-head strong { font-size: .92rem; }
.source-method-head div > span { margin-top: 3px; color: var(--text-dim); font-size: .7rem; }
.method-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 13px; }
.method-icon svg { width: 19px; height: 19px; }
.method-icon-orange, .method-icon-violet, .method-icon-cyan { color: var(--accent); background: var(--accent-soft); }
.url-input-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.url-input-group input, .library-search input, .preview-dialog textarea {
  width: 100%;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-solid);
  outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.url-input-group input { min-height: 54px; padding: 0 18px; border-radius: 999px; font-size: .88rem; }
.url-input-group input::placeholder, .library-search input::placeholder { color: var(--text-dim); }
.url-input-group input:focus, .library-search:focus-within, .preview-dialog textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.url-input-group .btn-primary { min-height: 54px; }
.url-input-group .btn-primary svg { width: 17px; height: 17px; }
.upload-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--text-dim); font-size: .67rem; }
.upload-divider::before, .upload-divider::after { flex: 1; height: 1px; content: ""; background: var(--border); }
.upload-area {
  display: grid;
  min-height: 142px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 22px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.upload-visual { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; color: var(--accent); background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.upload-visual svg { width: 25px; height: 25px; }
.upload-copy strong, .upload-copy span, .upload-copy small { display: block; }
.upload-copy strong { font-size: .92rem; }
.upload-copy > span { margin-top: 3px; color: var(--text-soft); font-size: .78rem; }
.upload-copy small { margin-top: 8px; color: var(--text-dim); font-size: .65rem; }
.upload-action { padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-solid); font-size: .72rem; font-weight: 750; }
.file-name { margin-top: 13px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--green), transparent 66%); border-radius: 13px; color: var(--green); background: color-mix(in srgb, var(--green), transparent 90%); font-size: .75rem; text-align: center; }
.clip-settings { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface-soft), transparent 20%); }
.clip-settings summary { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 15px; padding: 16px clamp(20px, 4vw, 36px); list-style: none; cursor: pointer; }
.clip-settings summary::-webkit-details-marker { display: none; }
.clip-settings summary > span { display: flex; align-items: center; gap: 12px; }
.clip-settings summary strong, .clip-settings summary small { display: block; }
.clip-settings summary strong { font-size: .82rem; }
.clip-settings summary small { margin-top: 3px; color: var(--text-dim); font-size: .64rem; }
.summary-chevron { transition: transform .24s var(--ease); }
.clip-settings[open] .summary-chevron { transform: rotate(180deg); }
.settings-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 4px clamp(20px, 4vw, 36px) 30px; }
.setting-group { min-width: 0; }
.setting-group-wide { grid-column: 1 / -1; }
.setting-group > label, .slider-setting > label, .control-label-row label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-dim);
  font-size: .66rem;
  font-weight: 790;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 7px; }
.btn-group button {
  min-width: 46px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-solid);
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.btn-group button:hover { color: var(--text); border-color: var(--accent); }
.btn-group button.active { color: white; border-color: transparent; background: var(--accent); box-shadow: 0 6px 18px var(--accent-glow); }
.ratio-group button { min-width: 105px; text-align: left; border-radius: 16px; }
.ratio-group button strong, .ratio-group button span { display: block; }
.ratio-group button span { margin-top: 2px; color: inherit; opacity: .66; font-size: .61rem; }

/* ── Home content ──────────────────────────────────────────────────── */
.home-section { padding-top: 72px; }
.recent-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.recent-card, .project-skeleton {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.project-skeleton { height: 230px; background: linear-gradient(100deg, var(--surface) 20%, var(--surface-hover) 38%, var(--surface) 55%); background-size: 200% 100%; animation: skeleton 1.5s infinite; }
@keyframes skeleton { to { background-position-x: -200%; } }
.recent-card { position: relative; cursor: pointer; transition: transform .25s var(--ease), border-color .2s, box-shadow .2s; }
.recent-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent), transparent 55%); box-shadow: var(--shadow-md); }
.recent-poster { position: relative; display: grid; height: 142px; place-items: center; overflow: hidden; color: white; background: linear-gradient(135deg, var(--project-color, #36e29b), #16382b 80%); }
.recent-poster::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 70% 10%, rgba(255,255,255,.24), transparent 32%); }
.recent-poster .poster-letter { position: relative; font-size: 2rem; font-weight: 900; letter-spacing: -.08em; }
.recent-poster .poster-duration { position: absolute; right: 9px; bottom: 9px; padding: 4px 7px; border-radius: 7px; background: rgba(0,0,0,.58); font: 700 .55rem/1 var(--font-mono); }
.recent-copy { padding: 14px; }
.recent-copy h3 { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.recent-copy p { margin-top: 5px; color: var(--text-dim); font-size: .65rem; }
.recent-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: .61rem; font-weight: 750; }
.status-badge::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: currentColor; }
.recent-use { min-height: 32px; padding: 0 10px; border: 0; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .63rem; font-weight: 760; cursor: pointer; }

/* ── Bottom CTA + footer ───────────────────────────────────────────── */
.cta-banner { padding-top: 72px; }
.cta-card {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.cta-copy { display: flex; align-items: flex-start; gap: 16px; }
.cta-bolt {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  color: var(--accent);
  background: var(--accent-soft);
}
.cta-bolt svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.cta-card h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -.035em; }
.cta-card p { margin-top: 6px; color: var(--text-soft); line-height: 1.5; }
.cta-action { display: grid; justify-items: start; gap: 8px; }
.cta-action small { color: var(--text-dim); font-size: .72rem; padding-left: 6px; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 48px;
  color: var(--text-dim);
  font-size: .82rem;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
.footer-brand .brand-mark::after { border-top-width: 5px; border-bottom-width: 5px; border-left-width: 8px; }

/* ── Library ───────────────────────────────────────────────────────── */
.library-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.library-search { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-solid); }
.library-search svg { flex: 0 0 auto; color: var(--text-dim); }
.library-search input { min-width: 0; height: 48px; padding: 0; border: 0; background: transparent; }
.filter-pills { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.filter-pills button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 999px; color: var(--text-dim); background: transparent; font-size: .68rem; font-weight: 700; cursor: pointer; }
.filter-pills button.active { color: var(--text); background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.library-overview { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 20px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.library-overview > div { padding: 18px; border-right: 1px solid var(--border); }
.library-overview > div:last-child { border: 0; }
.library-overview span, .library-overview strong { display: block; }
.library-overview span { color: var(--text-dim); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
.library-overview strong { margin-top: 7px; font-size: 1.15rem; letter-spacing: -.04em; }
.library-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; min-height: 220px; }
.library-item { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .24s var(--ease), border-color .2s; }
.library-item:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent), transparent 55%); }
.library-media { position: relative; display: grid; height: 150px; place-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, var(--library-color, #36e29b), #16382b); }
.library-media::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 72% 20%, rgba(255,255,255,.22), transparent 30%); }
.library-media svg { position: relative; width: 35px; height: 35px; }
.library-media video { width: 100%; height: 100%; object-fit: contain; background: #050806; }
.library-source-link { color: var(--accent); font-size: .72rem; font-weight: 750; }
.library-media-tag { position: absolute; top: 10px; left: 10px; padding: 5px 8px; border-radius: 8px; color: rgba(255,255,255,.88); background: rgba(0,0,0,.36); font-size: .55rem; font-weight: 800; text-transform: uppercase; }
.library-copy { padding: 14px 14px 10px; }
.library-title { overflow: hidden; font-size: .82rem; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.library-meta { margin-top: 6px; color: var(--text-dim); font-size: .64rem; }
.library-use { width: calc(100% - 28px); min-height: 40px; margin: 2px 14px 14px; }
.library-empty { grid-column: 1 / -1; display: grid; min-height: 240px; place-items: center; padding: 30px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-dim); background: var(--surface); text-align: center; }

/* ── Processing ────────────────────────────────────────────────────── */
.step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.step-num { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: .7rem; font-weight: 850; }
.step-header h2 { margin-top: 4px; font-size: clamp(1.55rem, 4vw, 2.4rem); letter-spacing: -.045em; }
.step-extra { margin-left: auto; color: var(--text-dim); font-size: .68rem; }
.processing-page { max-width: 820px; margin: 0 auto; }
.processing-card { padding: clamp(28px, 7vw, 58px); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-md); text-align: center; }
.processing-orbit { position: relative; width: 84px; height: 84px; margin: 0 auto 22px; border: 1px solid var(--border); border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 62%); }
.processing-orbit::before, .processing-orbit::after { position: absolute; inset: 9px; content: ""; border: 2px solid transparent; border-top-color: var(--accent); border-radius: 50%; animation: spin 1.1s linear infinite; }
.processing-orbit::after { inset: 20px; border-top-color: #FDBA74; animation-duration: .75s; animation-direction: reverse; }
.processing-orbit span { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); transform: translate(-50%, -50%); }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-copy p, .processing-card > p { font-size: 1.02rem; font-weight: 730; }
.processing-copy span, .processing-footnote { display: block; margin-top: 7px; color: var(--text-dim); font-size: .7rem; }
.progress-bar { height: 6px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--gradient-primary); box-shadow: 0 0 18px var(--accent-glow); transition: width .8s var(--ease); }
.progress-fill.indeterminate { width: 40% !important; animation: indeterminate-slide 1.4s ease-in-out infinite; }
@keyframes indeterminate-slide { from { margin-left: -40%; } to { margin-left: 100%; } }
.processing-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.processing-stages li { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text-dim); font-size: .62rem; font-weight: 650; }
.processing-stages li span { width: 7px; height: 7px; border: 1px solid var(--border-strong); border-radius: 50%; }
.processing-stages li.active { color: var(--text); }
.processing-stages li.active span { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.processing-stages li.complete span { border-color: var(--green); background: var(--green); }
.cancel-btn { margin-top: 28px; color: var(--red); }
.cache-badge { margin-bottom: 16px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--accent), transparent 62%); border-radius: 13px; color: var(--text-soft); background: var(--accent-soft); font-size: .68rem; }

/* ── Results and caption controls ─────────────────────────────────── */
.results-header { align-items: flex-start; }
.transcript-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface);
  font-size: .7rem;
  font-weight: 730;
  cursor: pointer;
}
.transcript-toggle svg { width: 17px; height: 17px; }
.transcript-box { max-height: 300px; overflow-y: auto; margin-bottom: 18px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-soft); background: var(--surface); white-space: pre-wrap; font: .72rem/1.65 var(--font-mono); }
.controls-bar { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 17px; margin-bottom: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.controls-bar > *, .caption-editor > * { min-width: 0; }
.caption-styles { min-width: 0; max-width: 100%; }
.controls-bar select { min-width: 0; max-width: 100%; }
.controls-bar .style-card { flex: 0 0 102px; }
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-label-row span { color: var(--text-dim); font-size: .62rem; }
.style-preview-row { display: flex; max-width: 100%; gap: 8px; overflow-x: auto; padding: 3px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.style-card { min-width: 102px; padding: 7px; border: 1px solid var(--border); border-radius: 16px; color: var(--text); background: var(--surface-solid); cursor: pointer; scroll-snap-align: start; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.style-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.style-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent), transparent 82%); }
.style-preview { display: flex; width: 86px; height: 100px; align-items: flex-end; justify-content: center; overflow: hidden; margin-bottom: 7px; padding: 0 4px 12px; border-radius: 10px; background: linear-gradient(145deg, #2A211A, #16110D); }
.preview-karaoke { color: white; font-size: .62rem; font-weight: 900; line-height: 1.05; text-align: center; text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000; }
.preview-italic { font-style: italic; }
.yellow-word { color: #ffd600; }
.orange-word { color: #ff8a00; }
.blue-word { color: #32b5ff; }
.lime-word { color: #b9ff2c; }
.teal-word { color: #12c9a5; }
.preview-condensed { font-family: "Arial Narrow","DejaVu Sans Condensed",sans-serif; }
.preview-spaced { word-spacing: .26em; white-space: nowrap; }
.preview-pop { display:inline-block;font-size:1.55em;line-height:.7;vertical-align:middle;margin-inline:.08em; }
.preview-clean { color: white; font-size: .58rem; text-align: center; text-shadow: 0 1px 3px #000; }
.preview-none { align-items: center; color: #85899a; font-size: 1.35rem; font-weight: 700; }
.style-name { display: block; min-height: 25px; color: var(--text-dim); font-size: .6rem; line-height: 1.2; text-align: center; }
.caption-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.caption-choice { display:grid;gap:7px;color:var(--text-soft);font-size:.78rem;font-weight:700; }
.caption-choice select { width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:16px; }
.slider-setting label { display: flex; justify-content: space-between; gap: 10px; }
.slider-setting output { color: var(--accent); }
.slider-setting input[type="range"] { width: 100%; height: 20px; accent-color: var(--accent); cursor: pointer; }
.slider-ends { display: flex; justify-content: space-between; margin-top: 2px; color: var(--text-dim); font-size: .55rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.moments-list { display: grid; gap: 12px; }
.moment-card { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 13px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), border-color .2s, background .2s; }
.moment-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.moment-card.selected { border-color: color-mix(in srgb, var(--accent), transparent 30%); background: color-mix(in srgb, var(--accent-soft), var(--surface) 72%); }
.moment-rank { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 11px; color: white; background: var(--gradient-primary); font-size: .67rem; font-weight: 850; }
.moment-check { width: 22px; height: 22px; margin-top: 5px; accent-color: var(--accent); cursor: pointer; }
.moment-body { min-width: 0; }
.moment-time { margin-bottom: 6px; color: var(--accent); font: 700 .65rem/1 var(--font-mono); }
.moment-hook { font-size: .9rem; font-weight: 680; line-height: 1.4; }
.moment-reason { margin-top: 6px; color: var(--text-soft); font-size: .7rem; line-height: 1.55; }
.caption-edit-btn { min-height: 38px; margin-top: 12px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--accent), transparent 65%); border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .65rem; font-weight: 760; cursor: pointer; }
@media (max-width: 839px) {
  #step-results .controls-bar { padding: 16px; }
  #step-results .caption-editor { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #step-results .control-label-row { flex-wrap: wrap; gap: 6px; }
  #step-results .actions { grid-template-columns: minmax(0, 1fr); }
  #step-results .actions > * { min-width: 0; width: 100%; }
  #step-results .actions button, #step-results select { min-height: 44px; }
  #step-results .moment-time { line-height: 1.5; overflow-wrap: anywhere; }
  #step-results .moment-hook, #step-results .moment-reason { overflow-wrap: anywhere; }
  #step-results .caption-edit-btn { max-width: 100%; min-height: 44px; padding: 10px 12px; white-space: normal; }
}

/* ── Preview dialog ────────────────────────────────────────────────── */
.preview-dialog { width: min(720px, calc(100% - 22px)); max-height: 92dvh; overflow-y: auto; padding: 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow-md); }
.preview-dialog::backdrop { background: rgba(17, 10, 6, .62); backdrop-filter: blur(9px); }
.preview-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.preview-dialog-header strong { display: block; margin-top: 4px; font-size: 1.05rem; }
.dialog-close { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface-soft); cursor: pointer; }
.preview-video-shell { position: relative; overflow: hidden; margin-bottom: 17px; border-radius: 18px; background: #000; }
.preview-dialog video { display: block; width: 100%; max-height: 48dvh; background: #000; }
.preview-render-status { padding: 10px 12px; color: #FDBA74; background: #16110D; font-size: .62rem; text-align: center; }
.preview-dialog > label { display: block; margin-bottom: 7px; color: var(--text-dim); font-size: .63rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.preview-dialog textarea { min-height: 120px; resize: vertical; padding: 13px; border-radius: 14px; font-size: .8rem; line-height: 1.5; }
.preview-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 17px; }

/* Account-level watermark: platform mark and handle are one scalable unit. */
.watermark-settings-card { padding: clamp(20px,4vw,34px); border:1px solid var(--border); border-radius:24px; background:var(--surface); box-shadow:var(--shadow-md); }
.watermark-heading,.watermark-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.watermark-heading p { margin-top:5px; color:var(--text-soft); font-size:.8rem; }
.watermark-toggle { display:flex; align-items:center; gap:8px; font-weight:800; color:var(--accent); }
.watermark-toggle input { width:22px; height:22px; accent-color:var(--accent); }
.watermark-preview-shell { container-type:inline-size; position:relative; height:260px; margin:24px 0; overflow:hidden; border:1px solid var(--border); border-radius:20px; background:linear-gradient(145deg,#26332d,#101713 58%,#322820); }
.watermark-preview { --watermark-scale:1; position:absolute; display:flex; align-items:center; gap:4px; padding:4px 7px; border-radius:5px; color:white; background:rgba(0,0,0,.78); font-size:.72rem; font-weight:800; transform:scale(var(--watermark-scale)); transform-origin:inherit; box-shadow:0 1px 5px rgba(0,0,0,.24); }
.watermark-preview.top_left { top:18px; left:18px; transform-origin:top left; }.watermark-preview.top_right { top:18px; right:18px; transform-origin:top right; }
.watermark-preview.top_center { top:18px; left:50%; transform:translateX(-50%) scale(var(--watermark-scale)); transform-origin:top center; }
.watermark-preview.middle { top:50%; left:50%; transform:translate(-50%,-50%) scale(var(--watermark-scale)); transform-origin:center; }
.watermark-preview.bottom_left { bottom:18px; left:18px; transform-origin:bottom left; }.watermark-preview.bottom_right { right:18px; bottom:18px; transform-origin:bottom right; }
.watermark-preview.bottom_center { left:50%; bottom:18px; transform:translateX(-50%) scale(var(--watermark-scale)); transform-origin:bottom center; }
.watermark-preview.profile-badge { gap:.28em; padding:0 4em 0 0; border-radius:999px; background:rgba(0,0,0,.49); font-size:var(--profile-font-size, 4.5cqw); transform:none; box-shadow:none; }
.watermark-preview.profile-badge.bottom_center { bottom:0; transform:translateX(-50%); }
.watermark-preview.profile-badge.top_center { transform:translateX(-50%); }
.watermark-preview.profile-badge.middle { transform:translate(-50%,-50%); }
.watermark-preview.profile-badge .watermark-platform { display:none; }
.watermark-avatar { display:block; width:2.1em; height:2.1em; border-radius:50%; object-fit:cover; }
.watermark-avatar[hidden] { display:none; }
.watermark-preview-image { position:absolute; height:auto; max-height:93%; object-fit:contain; }
.watermark-preview-image[hidden], .watermark-preview[hidden] { display:none; }
.watermark-preview-image.top_left { top:3.5%; left:4.5%; }
.watermark-preview-image.top_right { top:3.5%; right:4.5%; }
.watermark-preview-image.top_center { top:3.5%; left:50%; transform:translateX(-50%); }
.watermark-preview-image.middle { top:50%; left:50%; transform:translate(-50%,-50%); }
.watermark-preview-image.bottom_left { bottom:3.5%; left:4.5%; }
.watermark-preview-image.bottom_right { bottom:3.5%; right:4.5%; }
.watermark-preview-image.bottom_center { bottom:3.5%; left:50%; transform:translateX(-50%); }
.watermark-platform:empty { display:none; }.watermark-platform[data-platform="youtube"] { color:#ff5a5a; }.watermark-platform[data-platform="tiktok"] { color:#73f7f2; }.watermark-platform[data-platform="instagram"] { color:#ff73dc; }
.watermark-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.watermark-field { display:grid; gap:9px; color:var(--text-dim); font-size:.66rem; font-weight:790; letter-spacing:.09em; text-transform:uppercase; }
.watermark-field input,.watermark-field select { width:100%; min-height:48px; padding:0 14px; border:1px solid var(--border); border-radius:13px; color:var(--text); background:var(--surface-solid); font:inherit; font-size:.82rem; letter-spacing:0; text-transform:none; outline:0; }
.watermark-field input:focus,.watermark-field select:focus { border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.watermark-actions { margin-top:24px; }.watermark-actions span { color:var(--text-soft); font-size:.76rem; }
@media(max-width:620px){.watermark-fields{grid-template-columns:1fr}.watermark-heading,.watermark-actions{align-items:flex-start;flex-direction:column}.watermark-actions .btn-primary{width:100%}}
.folder-dialog { width:min(92vw,620px); max-height:86dvh; margin:auto; padding:24px; overflow:auto; border:1px solid var(--border); border-radius:24px; color:var(--text); background:var(--surface-solid); box-shadow:var(--shadow-md); }
.folder-dialog::backdrop { background:rgba(0,0,0,.68); backdrop-filter:blur(5px); }
.folder-help { margin:12px 0 18px; color:var(--text-soft); font-size:.82rem; line-height:1.5; }
.folder-select-row { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; color:var(--text-dim); font-size:.75rem; }
.folder-video-list { display:grid; gap:9px; max-height:46dvh; overflow:auto; }
.folder-video-row { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; padding:13px; border:1px solid var(--border); border-radius:14px; background:var(--surface-soft); cursor:pointer; }
.folder-video-row input { width:20px; height:20px; accent-color:var(--accent); }.folder-video-row strong,.folder-video-row small { display:block; }.folder-video-row strong { overflow:hidden; font-size:.82rem; text-overflow:ellipsis; white-space:nowrap; }.folder-video-row small { margin-top:4px; overflow:hidden; color:var(--text-dim); font-size:.66rem; text-overflow:ellipsis; white-space:nowrap; }
.preview-note { margin: 11px 0 15px; color: var(--text-dim); font-size: .62rem; line-height: 1.45; }
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── Completion, clips, and errors ─────────────────────────────────── */
.completion-hero { padding: 20px 0 32px; text-align: center; }
.completion-burst { display: grid; width: 68px; height: 68px; margin: 0 auto 18px; place-items: center; border-radius: 24px; color: #06180f; background: var(--green); box-shadow: 0 0 40px color-mix(in srgb, var(--green), transparent 55%); font-size: 1.6rem; font-weight: 900; }
.completion-hero h2 { margin-top: 7px; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.06em; }
.completion-hero > p:last-child { margin-top: 10px; color: var(--text-soft); }
.clips-grid { display: grid; gap: 12px; }
.clip-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.clip-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--accent-soft); font-size: 1.1rem; }
.clip-info { min-width: 0; }
.clip-hook { overflow: hidden; font-size: .8rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.clip-time { margin-top: 4px; color: var(--text-dim); font: .61rem/1 var(--font-mono); }
.clip-download { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; color: #06180f; background: var(--green); font-size: .68rem; font-weight: 800; text-decoration: none; }
.clip-result-controls { display: grid; min-width: min(360px, 45vw); gap: 9px; }
.social-caption-box { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.social-caption-box > strong { color: var(--text-soft); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; }
.social-caption-box textarea { width: 100%; resize: vertical; border: 0; outline: 0; color: var(--text); background: transparent; font: 500 .72rem/1.55 var(--font-sans); }
.social-caption-box input,.social-caption-box select { width:100%; min-width:0; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-solid); color:var(--text); font:inherit; }
.social-caption-box small { color:var(--text-soft); line-height:1.5; }
.copy-caption-btn { min-height: 36px; justify-self: start; padding: 0 12px; font-size: .68rem; }
.done-actions { margin-top: 20px; text-align: center; }
.error-banner { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; margin-bottom: 16px; padding: 15px; border: 1px solid color-mix(in srgb, var(--red), transparent 48%); border-radius: 16px; color: var(--red); background: color-mix(in srgb, var(--red), transparent 90%); animation: page-in .25s var(--ease); }
.error-icon { font-size: 1.1rem; }
.error-title { font-size: .78rem; font-weight: 780; }
.error-detail { margin-top: 3px; color: color-mix(in srgb, var(--red), var(--text) 28%); font-size: .67rem; line-height: 1.45; }
.error-dismiss { width: 34px; height: 34px; border: 0; color: var(--red); background: transparent; cursor: pointer; }

/* Persistent clip library + per-source run configuration */
.library-run-controls { display: grid; gap: 10px; min-width: 170px; padding: 0 14px 14px; }
.library-run-controls select {
  width: 100%; min-height: 42px; padding: 0 12px; color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 12px;
  font: inherit;
}
.library-run-controls .library-use,
.library-run-controls .library-based-use,
.library-run-controls > .btn-secondary { width: 100%; min-height: 42px; margin: 0; }
.library-run-controls .library-use,
.library-run-controls .library-based-use { grid-column: 1 / -1; }
.library-based-use { border-color: color-mix(in srgb, var(--accent), transparent 35%); color: var(--accent-strong); }
.all-clips-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.all-clip-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s, transform .18s; }
.all-clip-card.selection-mode { cursor: pointer; }
.all-clip-card.clip-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); transform: translateY(-2px); }
.all-clip-card video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #111; object-fit: contain; }
.clips-load-more { grid-column: 1 / -1; justify-self: center; min-width: 220px; }
.all-clip-copy { display: grid; gap: 8px; padding: 18px; }
.all-clip-copy h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.all-clip-copy p, .all-clip-copy span { margin: 0; color: var(--text-dim); font-size: .78rem; }
.clip-library-download { justify-self: start; margin-top: 6px; text-decoration: none; }
.clips-overview { max-width: 620px; }
.clips-filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.clips-campaign-tabs { display:flex;flex:1 0 100%;gap:8px;overflow-x:auto;padding-bottom:2px; }
.clips-campaign-tabs button { min-height:40px;padding:0 14px;white-space:nowrap;border:1px solid var(--border);border-radius:999px;background:var(--surface-solid);color:var(--text);font:inherit;font-weight:700; }
.clips-campaign-tabs button.active { border-color:var(--accent);background:var(--accent-soft);color:var(--accent); }
.clips-filter-bar select {
  min-height: 40px; padding: 0 12px; color: var(--text);
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 12px; font: inherit;
  color-scheme:dark;
}
.clips-filter-bar select option { color:var(--text);background:var(--surface-solid); }
.clip-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.clip-action { min-height: 36px; padding: 0 12px; font-size: .78rem; text-decoration: none; }
.clip-select-indicator {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; display: grid;
  width: 36px; height: 36px; place-items: center; border: 2px solid var(--border-strong);
  border-radius: 50%; color: transparent; background: var(--surface-solid);
  font-size: 1rem; font-weight: 900; box-shadow: var(--shadow-sm); cursor: pointer;
}
.clip-selected .clip-select-indicator { color: white; border-color: var(--accent); background: var(--accent); }
.clip-selection-bar {
  position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left)); z-index: 50; display: grid;
  grid-template-columns: auto 1fr auto auto; align-items: center; gap: 9px;
  max-width: 760px; margin: auto; padding: 11px; border: 1px solid var(--border-strong);
  border-radius: 18px; background: color-mix(in srgb, var(--surface-solid), transparent 4%);
  box-shadow: var(--shadow-md); backdrop-filter: blur(18px);
}
.clip-selection-bar strong { text-align: center; font-size: .75rem; }
.clip-selection-bar button { min-height: 42px; padding: 0 13px; }
.clip-delete-confirm-trigger:not(:disabled) { color: white; background: #dc2626; }
.delete-confirm-dialog {
  width: min(430px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--border-strong);
  border-radius: 24px; color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow-md);
}
.delete-confirm-dialog::backdrop { background: rgba(10, 6, 4, .68); backdrop-filter: blur(7px); }
.delete-confirm-dialog form { text-align: center; }
.delete-confirm-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 15px; place-items: center; border-radius: 50%; color: white; background: #dc2626; font-weight: 900; }
.delete-confirm-dialog h2 { margin-bottom: 8px; }
.delete-confirm-dialog p { color: var(--text-soft); font-size: .75rem; line-height: 1.55; }
.delete-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.delete-confirm-actions button { min-height: 46px; }
.btn-danger {
  color: #B91C1C; background: var(--surface-solid);
  border: 1px solid color-mix(in srgb, #EF4444, transparent 55%); border-radius: 999px; cursor: pointer;
}
.btn-danger:hover { background: color-mix(in srgb, #EF4444, transparent 90%); }
:root[data-theme="dark"] .btn-danger { color: #ff8a8a; }
.fallback-badge {
  margin-bottom: 16px; padding: 11px 14px; border: 1px solid color-mix(in srgb, #F59E0B, transparent 55%);
  border-radius: 13px; color: #B45309; background: color-mix(in srgb, #F59E0B, transparent 90%);
  font-size: .68rem; line-height: 1.5;
}
:root[data-theme="dark"] .fallback-badge { color: #ffd9a0; }

/* ── Responsive layout ─────────────────────────────────────────────── */
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
  .header-cta { display: inline-flex; }
}
@media (max-width: 560px) {
  .clip-selection-bar { grid-template-columns: auto 1fr auto; }
  .clip-selection-bar #selectAllClipsBtn { grid-column: 1 / 3; }
  .clip-selection-bar #deleteSelectedClipsBtn { grid-column: 3; grid-row: 2; }
}

@media (min-width: 840px) {
  .controls-bar { grid-template-columns: minmax(0, 1fr) 220px; align-items: end; }
  .actions { align-self: end; }
  .cta-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .cta-action { justify-items: end; text-align: right; }
  .cta-action small { padding-left: 0; padding-right: 6px; }
}

@media (min-width: 980px) {
  .header-nav { display: flex; }
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .how-steps {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: start;
    gap: 12px;
  }
  .how-arrow { display: grid; place-items: center; padding-top: 22px; }
}

@media (max-width: 839px) {
  .app-content { padding-top: 18px; }
  .hero { padding-top: 20px; }
  .recent-projects, .library-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .header-cta { display: none; }
}

@media (max-width: 620px) {
  :root { --topbar-height: 66px; --radius-xl: 26px; }
  .topbar-inner { padding-inline: 14px; }
  .topbar-brand strong { font-size: 1rem; }
  .active-job-pill > span:last-child { display: none; }
  .active-job-pill { width: 40px; padding: 0; justify-content: center; }
  .app-content { padding-inline: 14px; }
  .hero { padding-bottom: 18px; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.5rem); }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .hero-actions button { width: 100%; }
  .hero-media-frame, .how-card, .cta-card { border-radius: 24px; }
  .hero-play { width: 68px; height: 68px; }
  .section-heading, .page-heading { align-items: flex-start; }
  .section-note { display: none; }
  .quick-create-main { padding: 18px; }
  .url-input-group { grid-template-columns: 1fr; }
  .url-input-group .btn-primary { width: 100%; }
  .upload-area { min-height: 194px; grid-template-columns: 1fr; justify-items: center; gap: 11px; padding: 23px 18px; text-align: center; }
  .settings-row { grid-template-columns: 1fr; }
  .setting-group-wide { grid-column: auto; }
  .ratio-group { display: grid; grid-template-columns: 1fr 1fr; }
  .ratio-group button { min-width: 0; }
  .home-section, .cta-banner { padding-top: 56px; }
  .recent-projects, .library-list { display: flex; margin-right: -14px; padding-right: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .recent-card, .project-skeleton, .library-item { min-width: min(82vw, 310px); scroll-snap-align: start; }
  .page-heading { display: grid; gap: 14px; }
  .page-heading .btn-secondary { justify-self: start; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .filter-pills { width: 100%; overflow-x: auto; }
  .filter-pills button { flex: 1; white-space: nowrap; }
  .library-overview { grid-template-columns: 1fr 1fr; }
  .library-overview > div:nth-child(2) { border-right: 0; }
  .library-overview > div:nth-child(3) { display: none; }
  .processing-card { padding: 30px 18px; }
  .processing-stages { grid-template-columns: 1fr 1fr; gap: 12px 6px; text-align: left; }
  .processing-stages li { justify-content: flex-start; }
  .results-header .step-extra { display: none; }
  .caption-editor, .preview-sliders, .preview-actions { grid-template-columns: 1fr; }
  .moment-card { padding: 15px; }
  .preview-dialog { padding: 15px; }
  .clip-card { grid-template-columns: auto minmax(0,1fr); }
  .clip-result-controls { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .clip-download { grid-column: 1 / -1; justify-content: center; }
  .social-caption-box textarea { min-height: 112px; }
  .copy-caption-btn { width: 100%; justify-content: center; }
}

@media (max-width: 700px) {
  .all-clips-grid { grid-template-columns: 1fr; }
  .library-run-controls { min-width: 100%; grid-template-columns: 1fr 1fr; }
  .library-run-controls .library-use { grid-column: 1 / -1; }
  .clip-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .clip-actions .btn-primary { grid-column: 1 / -1; }
}
.bulk-actions,.job-actions{display:flex;gap:10px;flex-wrap:wrap}.bulk-check{width:22px;height:22px;margin:16px 0 0 16px;accent-color:#f97316}.all-clip-card{position:relative}.clip-bulk-check{position:absolute;z-index:2;top:8px;left:8px;margin:0}.job-actions{padding:14px}

/* Durable job queue: deliberately independent from the Library carousel. */
.jobs-page { max-width: 880px; margin-inline: auto; }
.job-section { margin-top: 28px; }
.job-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.job-section-heading h2 { font-size: 1.05rem; }
.job-section-heading span, .job-history summary span { display: inline-grid; min-width: 27px; height: 27px; padding: 0 8px; place-items: center; border-radius: 999px; color: var(--text-soft); background: var(--surface-soft); font-size: .7rem; }
.jobs-list { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; min-height: 0; overflow: visible; }
.job-card { width: 100%; min-width: 0; padding: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.job-swipe-shell { position: relative; width: 100%; overflow: hidden; border-radius: 20px; background: #b91c1c; }
.job-swipe-shell .job-card { position: relative; z-index: 1; transition: transform .22s ease; }
.job-swipe-shell.swipe-open .job-card { transform: translateX(-92px); }
.job-swipe-action { position: absolute; top: 0; right: 0; bottom: 0; width: 92px; border: 0; color: white; background: #b91c1c; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.job-clear-button { min-height: 40px; margin-left: auto; padding: 0 12px; border: 0; color: #dc2626; background: transparent; font: inherit; font-size: .7rem; font-weight: 750; cursor: pointer; }
:root[data-theme="dark"] .job-clear-button { color: #ff8a8a; }
.job-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.job-card-copy { min-width: 0; }
.job-card-copy h3 { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.job-card-copy p { margin-top: 6px; color: var(--text-soft); font-size: .74rem; line-height: 1.45; overflow-wrap: anywhere; }
.job-status-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: .6rem; font-weight: 800; text-transform: capitalize; }
.job-interrupted .job-status-badge, .job-error .job-status-badge { color: #dc2626; background: color-mix(in srgb, #ef4444, transparent 88%); }
.job-progress-track { height: 7px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.job-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--gradient-primary); transition: width .35s ease; }
.job-progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--text-dim); font-size: .62rem; }
.job-card-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.job-card-actions button { min-height: 40px; }
.jobs-empty { padding: 22px; border: 1px dashed var(--border-strong); border-radius: 18px; color: var(--text-dim); background: var(--surface); text-align: center; font-size: .74rem; }
.job-history { margin-top: 28px; }
.job-history summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; color: var(--text-soft); cursor: pointer; font-size: .78rem; font-weight: 700; }
.job-history[open] .jobs-list { margin-top: 4px; }

@media (max-width: 390px) {
  .theme-button { width: 41px; height: 41px; }
  .hero h1 { font-size: 2.35rem; }
  .style-card { min-width: 95px; }
  .moment-rank { width: 29px; height: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .welcome-experience { display: none !important; }
}


/* Asta family: forest-black surfaces, lime actions, mint details. */
:root {
  --bg:#f4f8f5;--bg-deep:#eaf2ec;--surface:#fff;--surface-solid:#fff;
  --surface-raised:#fff;--surface-soft:#eaf2ec;--surface-hover:#dcebdd;
  --surface-inverse:#07110e;--peach:#e5efdf;--text:#0b2116;--text-soft:#435f50;
  --text-dim:#526b5d;--text-inverse:#fff;--accent:#286b37;--accent-strong:#1b5428;
  --accent-soft:rgba(54,226,155,.12);--accent-glow:rgba(54,226,155,.12);
  --cyan:#1b7756;--cyan-soft:rgba(54,226,155,.12);--magenta:#286b37;
  --lime:#b8ff52;--green:#187748;--gradient-primary:linear-gradient(135deg,#b8ff52,#83ef4c);
  --gradient-cool:linear-gradient(135deg,#b8ff52,#36e29b);--shadow-glow:0 8px 24px rgba(54,226,155,.10);
}
:root[data-theme="dark"] {
  --bg:#050a08;--bg-deep:#030705;--surface:#0f1915;--surface-solid:#0f1915;
  --surface-raised:#14241c;--surface-soft:#101d18;--surface-hover:#1a2c23;
  --surface-inverse:#f5f7f6;--peach:#152a1d;--text:#f5f7f6;--text-soft:#b5c5bc;
  --text-dim:#92a49c;--text-inverse:#07110e;--accent:#b8ff52;--accent-strong:#ceff89;
  --accent-soft:rgba(184,255,82,.10);--accent-glow:rgba(184,255,82,.12);
  --cyan:#36e29b;--cyan-soft:rgba(54,226,155,.12);--magenta:#b8ff52;--green:#36e29b;
  --shadow-glow:0 8px 28px rgba(184,255,82,.10);
}
body {background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,#16382b,transparent 50%),transparent 42rem),var(--bg)}
.btn-primary,.btn-group button.active,.moment-rank,.profile-avatar,.account-avatar,.play-mini {color:#07110e;background:var(--gradient-primary)}
:root[data-theme="dark"] .how-icon span {color:#07110e}
.btn-primary:hover {box-shadow:0 12px 30px var(--accent-glow)}
.brand-mark {background:var(--gradient-cool);box-shadow:none}
.brand-mark::after {content:"";width:60%;height:65%;margin:0;border:0;background:#07110e;clip-path:polygon(40% 0,60% 0,100% 100%,76% 100%,50% 29%,24% 100%,0 100%)}
.brand-mark-large::after {margin:0;border:0}
.hero h1 {font-size:clamp(2.35rem,6.2vw,4.6rem);letter-spacing:-.06em}
.hero-description {font-size:1rem}
.hero-media-frame {position:relative;display:block;overflow:hidden;cursor:default}
.hero-media-label {position:absolute;bottom:22px;left:22px;right:22px;padding:14px 18px;border:1px solid rgba(184,255,82,.2);border-radius:14px;background:rgba(5,10,8,.9);color:#f5f7f6;font-size:1rem;font-weight:650}
.preview-dot {width:8px;height:8px;border-radius:50%;background:var(--green)}
.social-pill {gap:10px;padding:9px 16px}
.public-signin {font-size:.875rem;font-weight:650;text-decoration:none;white-space:nowrap}
.bulk-check {accent-color:var(--green)}
.membership-dialog {position:fixed;inset:0;width:min(92vw,480px);max-height:90dvh;overflow:auto;margin:auto;padding:32px;border:1px solid var(--border-strong);border-radius:24px;background:var(--surface-solid);color:var(--text);box-shadow:var(--shadow-md)}
.membership-dialog::backdrop {background:rgba(0,0,0,.7);backdrop-filter:blur(5px)}
.membership-close {position:absolute;right:14px;top:14px;font-size:1.5rem}
.membership-dialog .section-kicker {margin-top:22px}
.membership-dialog h2 {margin:12px 0;font-size:1.9rem;line-height:1.12;letter-spacing:-.045em}
.membership-dialog p {font-size:1rem;line-height:1.6;color:var(--text-soft)}
.membership-note {padding:16px;margin:24px 0;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.membership-note strong {font-size:.9rem;color:var(--accent)}
.membership-note p {margin-top:6px;font-size:.875rem}
.membership-dialog .btn-primary {width:100%;text-decoration:none}
.membership-dialog>.text-button,.membership-dialog>form:last-child {text-align:center;margin-top:10px}
.guest-preview {padding:26px;border:1px dashed var(--border-strong);border-radius:18px;background:var(--surface-soft)}
.guest-preview p {font-size:1rem;color:var(--text-soft);margin:10px 0 16px;line-height:1.6}
.guest-preview .btn-secondary {font-size:.875rem}
@media(max-width:480px){.topbar-inner{gap:10px;padding-inline:16px}.topbar-brand{gap:8px}.topbar-brand strong{font-size:1rem}.topbar-actions{gap:8px}.membership-dialog{padding:26px}.hero-media-label{font-size:.875rem;bottom:12px;left:12px;right:12px}}


/* Asta compact homepage: 20260902 */
.hero { padding: 28px 0 24px; }
.hero h1 { font-size: clamp(2.25rem, 5.6vw, 4rem); line-height: 1.06; letter-spacing: -.055em; }
.hero-description { max-width: 510px; margin-top: 14px; font-size: 1rem; line-height: 1.5; }
.quick-create-section { padding-top: 0; }
.quick-create-card { max-width: 800px; margin-inline: auto; border-radius: 22px; }
.quick-create-main { padding: 22px; }
.source-method-head { margin-bottom: 12px; }
.source-method-head strong { font-size: .95rem; }
.source-method-head span:not(.method-icon) { font-size: .8rem; }
.url-input-group input { min-width: 0; min-height: 50px; font-size: 16px; }
.url-input-group .btn-primary { min-height: 50px; }
.upload-divider { margin: 16px 0; }
.upload-area { min-height: 88px; padding: 14px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; text-align: left; justify-items: stretch; }
.upload-visual { width: 36px; height: 36px; border-radius: 10px; }
.upload-visual svg { width: 20px; height: 20px; }
.upload-copy strong { font-size: .875rem; }
.upload-copy > span { display: none; }
.upload-copy small { font-size: .7rem; line-height: 1.4; }
.upload-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; padding: 0 12px; }
.clip-settings { border-bottom: 0; border-top: 1px solid var(--border); }
.clip-settings summary { min-height: 64px; padding: 12px 22px; }
.clip-settings summary strong { font-size: .85rem; }
.clip-settings summary small { font-size: .75rem; }
.feature-strip { padding: 32px 0 0; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.feature-icon { width: 32px; height: 32px; margin-bottom: 10px; border-radius: 9px; }
.feature-icon svg { width: 18px; height: 18px; }
.feature-card h3 { font-size: .9rem; line-height: 1.3; }
.feature-card p { margin-top: 6px; font-size: .8rem; line-height: 1.45; }
.how-section { padding: 24px 0 0; }
.how-card { padding: 24px; border-radius: 22px; }
.how-card h2 { margin-bottom: 22px; font-size: clamp(1.4rem, 3vw, 2rem); }
.how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how-arrow { display: none; }
.how-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; text-align: left; align-content: start; }
.how-icon { width: 28px; height: 28px; margin: 0; grid-row: 1 / 3; border: 0; box-shadow: none; }
.how-icon svg { display: none; }
.how-icon span { position: static; width: 28px; height: 28px; border: 0; font-size: .75rem; }
.how-step h3 { margin: 3px 0 0; font-size: .9rem; }
.how-step p { margin-top: 5px; font-size: .8rem; line-height: 1.5; }
.home-section { padding-top: 32px; }
.cta-banner { margin-top: 32px; padding-top: 24px; padding-bottom: 24px; }
@media (min-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .hero { padding: 18px 0 20px; }
  .hero h1 { font-size: clamp(2.15rem, 9.5vw, 3rem); }
  .hero-description { max-width: 370px; font-size: .95rem; }
  .quick-create-main { padding: 16px; }
  .source-method-head .method-icon { display: none; }
  .url-input-group { gap: 8px; }
  .clip-settings summary { padding: 12px 16px; }
  .clip-settings summary .method-icon { width: 30px; height: 30px; }
  .upload-area { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .upload-visual { display: none; }
  .feature-card { padding: 14px; }
  .how-card { padding: 20px; }
  .how-card h2 { margin-bottom: 18px; }
  .how-steps { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 359px) {
  .feature-grid { grid-template-columns: 1fr; }
  .upload-area { grid-template-columns: 1fr; }
}

/* Campaign-safe vertical composition */
.split-framing-controls { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
.split-framing-controls > p { margin: 0 0 14px; color: var(--text-soft); font-size: .82rem; line-height: 1.5; }
.split-slider-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; }
.split-slider-grid label { display: grid; grid-template-columns: 1fr auto; gap: 8px; color: var(--text); font-size: .78rem; font-weight: 650; }
.split-slider-grid output { color: var(--accent); }
.split-slider-grid input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.quality-check-panel { display: grid; gap: 12px; margin: 18px 0; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); }
.quality-check-panel strong { display: block; margin-top: 4px; font-size: .95rem; }
.quality-check-items { display: flex; flex-wrap: wrap; gap: 8px; }
.quality-check-items span { padding: 7px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.quality-pass { color: var(--green); background: color-mix(in srgb,var(--green),transparent 88%); }
.quality-warning { color: #ffbd66; background: rgba(255,173,66,.12); }
/* Finishing room: lightweight, code-native product motion. */
.hero-eyebrow{font-size:.68rem;letter-spacing:.22em;font-weight:850;color:var(--accent);margin-bottom:20px}
.hero .format-demo{max-width:900px;margin:40px auto 0;text-align:left;border:1px solid #294336;border-radius:26px;padding:20px;background:#081810;color:#eaffef;box-shadow:0 24px 80px #0002;overflow:hidden}
.demo-toolbar{display:flex;justify-content:space-between;gap:12px;font-size:.59rem;letter-spacing:.1em;color:#99afa1}.demo-toolbar i{display:inline-block;width:6px;height:6px;background:#a7ff45;border-radius:50%;margin-right:7px}
.demo-stage{height:280px;display:flex;align-items:center;justify-content:center;gap:32px;padding:24px 0}.demo-source{width:48%;aspect-ratio:16/9;position:relative;display:flex;border-radius:12px;overflow:hidden}.demo-person{position:relative;flex:1;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 30% 0%,#72967c,#284b3d 65%)}.person-two{background:radial-gradient(ellipse at 70% 0%,#ccaa77,#584636 65%)}.demo-person:before{content:'';position:absolute;width:32%;height:36%;left:34%;top:16%;background:#d6b995;border-radius:50% 50% 44% 44%}.demo-person i{position:absolute;width:82%;height:65%;left:9%;top:48%;border-radius:50% 50% 0 0;background:#142a22}.person-two i{background:#413c35}.demo-source-label{position:absolute;bottom:10px;left:12px;font-size:.5rem;letter-spacing:.12em;color:#fff}.demo-arrow{font-size:28px;color:#a7ff45}.demo-output{width:130px;height:230px;position:relative;display:flex;flex-direction:column;border:2px solid #a7ff4570;border-radius:15px;overflow:hidden;transition:width .4s,height .4s}.demo-output .demo-person{min-height:0}.demo-caption{position:absolute;top:68%;left:8%;right:8%;text-align:center;font-size:.6rem;font-weight:950;line-height:1.4;text-shadow:0 1px 4px #000}.demo-caption em{color:#b0ff4d;font-style:normal}.format-demo[data-format=original] .demo-output{width:230px;height:130px;flex-direction:row}.format-demo[data-format=vertical] .demo-output .person-two{display:none}.demo-timeline{height:25px;position:relative;display:flex;gap:5px;margin:8px 0 18px;overflow:hidden}.demo-timeline span{flex:1;border-radius:4px;background:repeating-linear-gradient(90deg,#244d37 0 3px,#142c20 3px 7px);border:1px solid #416848}.demo-timeline span:nth-child(2){background:#88c74755}.demo-timeline i{position:absolute;top:0;bottom:0;width:2px;background:#b1ff59;animation:demo-scan 8s linear infinite}.demo-formats{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.demo-formats button{padding:10px 16px;min-height:44px;border:1px solid #395344;border-radius:99px;background:transparent;color:#d9eddf;font-size:.75rem;cursor:pointer}.demo-formats button[aria-pressed=true]{background:#b0ff4d;color:#102014;border-color:#b0ff4d}.demo-note{text-align:center;font-size:.68rem;color:#9ab3a3;margin-top:12px}.legacy-how-section{display:none!important}@keyframes demo-scan{from{left:0}to{left:100%}}
.workflow-guide-row{box-shadow:none}.workflow-guide{scroll-margin-top:110px}.workflow-shot{min-width:0}.shot-input{font-size:.75rem;flex-wrap:wrap}.app-content>*{min-width:0}.library-run-controls{flex-wrap:wrap}.library-run-controls select{max-width:100%;min-width:0}
@media(max-width:620px){.hero .format-demo{padding:14px;border-radius:20px;margin-top:28px}.demo-toolbar{font-size:.5rem}.demo-toolbar>span:last-child{max-width:100px;text-align:right}.demo-stage{height:220px;gap:12px}.demo-source{width:43%}.demo-output{width:96px;height:172px}.demo-arrow{font-size:20px}.format-demo[data-format=original] .demo-output{width:125px;height:80px}.demo-source-label{font-size:.36rem;left:5px;bottom:5px}.demo-caption{font-size:.46rem}.demo-formats{gap:5px}.demo-formats button{font-size:.65rem;padding:9px 11px}.url-input-group{grid-template-columns:minmax(0,1fr)}.url-input-group input{font-size:16px}.url-input-group button{width:100%}.workflow-guide-row{padding:20px;gap:22px;border-radius:22px}.workflow-guide{padding-top:40px}.preview-dialog,.folder-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);overflow-y:auto}.preview-actions{flex-wrap:wrap}.preview-actions>*{min-width:0;flex:1 1 140px}.section-heading{flex-wrap:wrap}.btn-group{flex-wrap:wrap}.quick-create-main{padding:20px}.app-content{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:reduce){.demo-timeline i{animation:none;left:42%}.demo-output{transition:none}}
@media (max-width:620px) {
  .split-slider-grid { grid-template-columns: 1fr; }
  .quality-check-items { display:grid; }
}

/* Shorts Factory: deliberate batch creation, not one-click blind rendering. */
.factory-page{max-width:1180px;margin:0 auto;padding-bottom:80px}
.factory-hero{display:flex;align-items:end;justify-content:space-between;gap:32px;margin-bottom:28px;padding:40px;border:1px solid var(--border);border-radius:28px;background:radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--accent),transparent 76%),transparent 34%),linear-gradient(135deg,var(--surface),var(--surface-soft));overflow:hidden}
.factory-hero h1{margin-top:7px;font-size:clamp(2.5rem,7vw,5.2rem);line-height:.94;letter-spacing:-.065em}
.factory-hero>div:first-child>p:last-child{max-width:670px;margin-top:18px;color:var(--text-soft);font-size:1rem;line-height:1.65}
.factory-badge{flex:0 0 142px;aspect-ratio:1;display:grid;place-content:center;text-align:center;border:1px solid color-mix(in srgb,var(--accent),transparent 55%);border-radius:50%;background:color-mix(in srgb,var(--accent),transparent 90%);box-shadow:inset 0 0 0 9px color-mix(in srgb,var(--accent),transparent 95%)}
.factory-badge strong{font-size:2.4rem;line-height:1;color:var(--accent)}
.factory-badge span{max-width:80px;margin:7px auto 0;color:var(--text-soft);font-size:.67rem;line-height:1.3;text-transform:uppercase;letter-spacing:.08em}
.factory-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:18px;align-items:start}
.factory-panel{min-width:0;padding:26px;border:1px solid var(--border);border-radius:24px;background:var(--surface);box-shadow:var(--shadow-sm)}
.factory-style-panel{grid-row:span 2}
.factory-panel-heading,.factory-panel-heading>div,.factory-select-row,.factory-form-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.factory-panel-heading>div{justify-content:flex-start}
.factory-panel-heading>div>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font:800 .7rem var(--font-mono)}
.factory-panel h2{font-size:1.1rem;letter-spacing:-.025em}
.factory-panel-copy{margin:11px 0 20px;color:var(--text-soft);font-size:.83rem;line-height:1.55}
.factory-style-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.factory-style-card{min-width:0;padding:9px;text-align:left;border:1px solid var(--border);border-radius:17px;background:var(--surface-soft);color:var(--text);cursor:pointer;transition:transform .2s var(--ease),border-color .2s,box-shadow .2s}
.factory-style-card:hover{transform:translateY(-2px);border-color:var(--border-strong)}
.factory-style-card.active{border-color:var(--pack-accent,var(--accent));box-shadow:0 0 0 2px color-mix(in srgb,var(--pack-accent,var(--accent)),transparent 70%)}
.factory-style-visual{position:relative;display:flex;gap:2px;width:100%;aspect-ratio:9/11;margin-bottom:11px;overflow:hidden;border-radius:11px;background:#0a130f}
.factory-style-visual i{flex:1;background:radial-gradient(circle at 50% 28%,#d6b28b 0 10%,transparent 11%),linear-gradient(150deg,#456d58,#16271e 58%)}
.factory-style-visual i:nth-child(2){background:radial-gradient(circle at 50% 30%,#bd9572 0 10%,transparent 11%),linear-gradient(210deg,#655343,#241d19 58%)}
.factory-style-visual.layout-split{flex-direction:column}
.factory-style-visual b{position:absolute;left:6%;right:6%;top:70%;color:#fff;text-align:center;font-size:clamp(.35rem,.75vw,.54rem);line-height:1.2;text-shadow:0 2px 5px #000;white-space:nowrap}
.factory-style-card.active .factory-style-visual b{color:var(--pack-accent,var(--accent))}
.factory-style-copy{display:block;min-width:0;padding:0 3px 4px}
.factory-style-copy strong,.factory-style-copy small{display:block;overflow:hidden;text-overflow:ellipsis}
.factory-style-copy strong{font-size:.82rem;white-space:nowrap}
.factory-style-copy small{margin-top:5px;color:var(--text-soft);font-size:.62rem;line-height:1.4}
.factory-style-delete{display:inline-block;margin-top:8px;color:var(--red);font-size:.65rem;font-weight:750}
.factory-style-form{margin-top:20px;padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft)}
.factory-style-form label,.factory-run-settings label{display:grid;gap:8px;color:var(--text-soft);font-size:.72rem;font-weight:750}
.factory-style-form>label{margin-top:18px}
.factory-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.factory-style-form input,.factory-style-form select,.factory-run-settings select{width:100%;min-width:0;min-height:45px;padding:0 12px;border:1px solid var(--border-strong);border-radius:12px;background:var(--surface);color:var(--text);font:600 .8rem var(--font-sans)}
.factory-style-form input[type=range]{min-height:28px;padding:0;accent-color:var(--accent)}
.factory-style-form .btn-primary{width:100%;margin-top:4px}
.factory-select-row{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.factory-select-row strong{color:var(--text-soft);font-size:.75rem}
.factory-source-list{display:grid;gap:9px;max-height:408px;overflow:auto;padding-right:3px}
.factory-source-card{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:12px;min-width:0;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft);cursor:pointer}
.factory-source-card.selected{border-color:color-mix(in srgb,var(--accent),transparent 40%);background:var(--accent-soft)}
.factory-source-card input{position:absolute;opacity:0;pointer-events:none}
.factory-source-check{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--border-strong);border-radius:9px;color:transparent;background:var(--surface)}
.factory-source-card.selected .factory-source-check{border-color:var(--accent);background:var(--accent);color:#07110e;font-weight:900}
.factory-source-copy{min-width:0}
.factory-source-copy strong,.factory-source-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.factory-source-copy strong{font-size:.82rem}
.factory-source-copy small{margin-top:5px;color:var(--text-soft);font-size:.67rem}
.factory-run-settings{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.factory-run-summary{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--border);border-radius:15px;overflow:hidden}
.factory-run-summary>div{padding:14px}.factory-run-summary>div+div{border-left:1px solid var(--border)}
.factory-run-summary span,.factory-run-summary strong{display:block}.factory-run-summary span{color:var(--text-dim);font-size:.61rem;text-transform:uppercase;letter-spacing:.08em}.factory-run-summary strong{margin-top:6px;font-size:.78rem}
.factory-status{min-height:42px;margin:14px 0;color:var(--text-soft);font-size:.72rem;line-height:1.5}
.factory-run-button{width:100%}

@media(max-width:900px){.factory-grid{grid-template-columns:1fr}.factory-style-panel{grid-row:auto}.factory-style-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:620px){.factory-page{padding-bottom:48px}.factory-hero{align-items:flex-start;padding:24px;border-radius:22px}.factory-hero h1{font-size:clamp(2.35rem,13vw,3.6rem)}.factory-badge{display:none}.factory-panel{padding:18px;border-radius:20px}.factory-panel-heading{align-items:flex-start}.factory-panel-heading .btn-secondary{padding-inline:12px}.factory-style-list{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 12px}.factory-style-card{flex:0 0 148px;scroll-snap-align:start}.factory-style-visual{aspect-ratio:9/10}.factory-form-grid{grid-template-columns:1fr}.factory-source-list{max-height:360px}.factory-run-settings{grid-template-columns:1fr}.factory-run-summary{grid-template-columns:1fr}.factory-run-summary>div+div{border-left:0;border-top:1px solid var(--border)}}


/* Framed Shorts and uploaded brand assets */
.logo-upload-panel{display:grid;gap:14px;margin-top:20px;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft)}
.logo-upload-panel>div:first-child p{margin:6px 0 0;color:var(--text-soft);font-size:.78rem;line-height:1.5}
.logo-preview-shell{display:flex;align-items:center;gap:14px;min-height:76px;padding:12px;border:1px solid var(--border-strong);border-radius:14px;background:#07110e}
.logo-preview-shell img{width:64px;height:52px;object-fit:contain}
.logo-preview-shell span{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#dff6e7;font-size:.76rem}
.factory-style-visual.layout-framed{display:grid;place-items:center;padding:24% 5% 20%;background:#07110e}
.factory-style-visual.layout-framed i{display:block;width:100%;height:42%;background:linear-gradient(150deg,#456d58,#16271e 58%)}
.factory-style-visual.layout-framed i:nth-child(2){display:none}
.factory-style-visual.layout-framed b{top:11%}
@media(max-width:620px){.logo-upload-panel .watermark-actions{align-items:stretch}.logo-upload-panel .watermark-actions button{width:100%}}
.campaign-mode-banner{display:flex;align-items:center;gap:14px;margin:0 0 20px;padding:14px 16px;border:1px solid rgba(91,132,255,.45);border-radius:16px;background:linear-gradient(135deg,rgba(22,37,77,.92),rgba(7,12,25,.96));color:#fff}
.campaign-mode-banner img{width:112px;max-height:34px;object-fit:contain}
.campaign-mode-banner div{display:grid;gap:3px;flex:1}
.campaign-mode-banner span{font-size:.82rem;color:rgba(255,255,255,.7)}
.campaign-mode-banner .text-button{color:#a9c5ff}
.basedbot-page{max-width:980px;margin:0 auto;padding:clamp(24px,5vw,64px) 20px 80px}
.basedbot-hero,.basedbot-assets{border:1px solid rgba(91,132,255,.25);border-radius:24px;background:linear-gradient(145deg,rgba(16,29,61,.96),rgba(5,10,20,.98));box-shadow:0 24px 70px rgba(0,0,0,.28)}
.basedbot-hero{padding:clamp(28px,6vw,64px);text-align:center}
.basedbot-hero>img{width:min(280px,72%);height:auto;margin:0 auto 28px}
.basedbot-hero h1{font-size:clamp(2.4rem,7vw,5rem);margin:.2em 0}
.basedbot-hero>p:not(.section-kicker){max-width:650px;margin:0 auto 28px;color:var(--text-muted)}
.basedbot-assets{margin-top:22px;padding:22px;display:grid;gap:14px}
.basedbot-assets article{display:flex;align-items:center;gap:16px;padding:16px;border-radius:16px;background:rgba(255,255,255,.04)}
.basedbot-assets article>span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#234caa;color:#fff;font-weight:800}
.basedbot-assets article div{flex:1}
.basedbot-assets article p{margin:4px 0 0;color:var(--text-muted)}
.basedbot-assets article>b{color:#75e8ad}
.basedbot-assets video{width:100%;max-height:360px;border-radius:16px;background:#02050b}
.basedbot-brief{margin-top:22px;padding:clamp(20px,4vw,32px);border:1px solid rgba(91,132,255,.32);border-radius:24px;background:var(--surface);box-shadow:0 24px 70px rgba(0,0,0,.18)}
.basedbot-brief-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.basedbot-brief-heading h2{margin:4px 0 0;font-size:1.7rem}.basedbot-brief-heading>span{padding:7px 10px;border-radius:999px;background:var(--surface-soft);color:var(--text-soft);font-size:.7rem}.basedbot-brief-heading>span[data-state="saved"]{color:#75e8ad}.basedbot-brief-heading>span[data-state="dirty"]{color:#ffd477}.basedbot-brief-heading>span[data-state="error"]{color:#ff9292}
.basedbot-brief-help{max-width:760px;margin:16px 0 22px;color:var(--text-muted);font-size:.82rem;line-height:1.6}.basedbot-brief-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.basedbot-brief-grid label{display:grid;align-content:start;gap:8px;color:var(--text-soft);font-size:.75rem;font-weight:700}.basedbot-brief-grid .brief-wide{grid-column:1/-1}.basedbot-brief-grid textarea,.basedbot-brief-grid input,.basedbot-brief-grid select{width:100%;padding:13px 14px;border:1px solid var(--border-strong);border-radius:12px;background:var(--surface-soft);color:var(--text);font:inherit;font-weight:500;resize:vertical}.basedbot-brief-grid small{color:var(--text-dim);font-size:.66rem;font-weight:500;line-height:1.45}.basedbot-brief-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:22px}.moment-brief-match{margin-top:8px;padding:7px 9px;border-left:2px solid #5b84ff;border-radius:4px;background:rgba(91,132,255,.08);color:var(--text-soft);font-size:.68rem;line-height:1.5}.brief-badge{border-color:rgba(91,132,255,.45)}
@media(max-width:640px){.campaign-mode-banner{align-items:flex-start;flex-wrap:wrap}.campaign-mode-banner img{width:96px}.basedbot-assets article{align-items:flex-start}.basedbot-assets article>b{margin-left:auto}.basedbot-brief-heading{display:grid}.basedbot-brief-grid{grid-template-columns:1fr}.basedbot-brief-grid .brief-wide{grid-column:auto}.basedbot-brief-actions{display:grid}.basedbot-brief-actions button{width:100%}}


/* Optional campaign direction shared by imports, batches and saved-source runs. */
.campaign-brief-panel { display: grid; gap: 10px; padding: 20px; margin: 16px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.campaign-brief-panel[hidden] { display: none; }
.campaign-brief-panel label, .campaign-brief-panel strong { font-weight: 600; }
.campaign-brief-panel label span, .campaign-brief-panel small { color: var(--text-dim); font-weight: 400; line-height: 1.5; }
.campaign-brief-panel textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 100px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; line-height: 1.5; }
.campaign-brief-panel textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.campaign-brief-panel p, .campaign-brief-panel ul { margin: 0; }
.campaign-brief-panel ul { padding-left: 20px; line-height: 1.7; }
.campaign-brief-panel .btn-secondary { justify-self: start; }


.campaign-logo-quick { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(180px,.7fr);gap:16px 22px;align-items:center;margin:20px 0;padding:20px;border:1px solid var(--border-strong);border-radius:18px;background:var(--surface); }
.campaign-logo-quick h3 { margin:4px 0 7px; }
.campaign-logo-quick p { margin:0;color:var(--text-soft);line-height:1.5; }
.campaign-logo-quick label { display:grid;gap:7px;min-width:0; }
.campaign-logo-quick input[type=range],.campaign-logo-quick select { width:100%; }
.campaign-logo-quick output { float:right;color:var(--accent);font-weight:800; }
.campaign-logo-quick small { grid-column:1/-1;color:var(--text-soft);min-height:1.4em; }
.custom-campaign-nav:empty{display:none}.custom-campaign-nav{display:contents}.custom-campaign-workspace{--campaign-accent:var(--accent)}
.custom-campaign-hero img{max-width:180px;max-height:86px;object-fit:contain}
.custom-campaign-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0}
.custom-campaign-actions button,.custom-campaign-actions a{display:grid;gap:7px;min-height:112px;padding:18px;border:1px solid var(--border-strong);border-radius:18px;background:var(--surface);color:var(--text);text-align:left;text-decoration:none;cursor:pointer}
.custom-campaign-actions button:hover,.custom-campaign-actions a:hover{border-color:var(--campaign-accent);background:var(--surface-hover)}
.custom-campaign-actions strong{font-size:1rem}.custom-campaign-actions span{color:var(--text-soft);font-size:.8rem;line-height:1.5}
.custom-campaign-assets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft)}
.custom-campaign-assets img,.custom-campaign-assets video{width:100%;max-height:260px;object-fit:contain;border-radius:12px;background:var(--bg-deep)}
.custom-campaign-assets p{grid-column:1/-1;color:var(--text-soft)}
@media(max-width:640px){.custom-campaign-actions,.custom-campaign-assets{grid-template-columns:1fr}.custom-campaign-actions button,.custom-campaign-actions a{min-height:96px}.custom-campaign-assets p{grid-column:auto}}
.campaign-logo-live { position:relative;grid-row:span 3;justify-self:stretch;min-height:180px;border-radius:14px;background:linear-gradient(135deg,#17211c,#06100b);overflow:hidden; }
.campaign-logo-live img { position:absolute;height:auto;max-height:45%;object-fit:contain; }
.campaign-logo-live[data-position="top_left"] img { left:5%;top:5%; }
.campaign-logo-live[data-position="top_right"] img { right:5%;top:5%; }
.campaign-logo-live[data-position="bottom_left"] img { left:5%;bottom:5%; }
.campaign-logo-live[data-position="bottom_right"] img { right:5%;bottom:5%; }
@media(max-width:640px){.campaign-logo-quick{grid-template-columns:1fr}.campaign-logo-live{grid-row:auto;min-height:150px}.campaign-logo-quick small{grid-column:auto}}

/* Schedule to X (Buffer-backed) settings card and clip panel. */
.x-schedule-settings { display:grid; gap:16px; margin-top:22px; }
.x-schedule-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; }
.x-schedule-row .btn-secondary { min-height:48px; white-space:nowrap; }
.x-schedule-status { margin-top:16px; color:var(--text-soft); font-size:.8rem; line-height:1.45; }
.x-schedule-status:empty { display:none; }
.x-schedule-status[data-state="ok"] { color:var(--accent); }
.x-schedule-status[data-state="warn"] { color:#FDBA74; }
.x-schedule-status[data-state="error"] { color:#ff8a8a; }
.x-schedule-help { margin-top:10px; color:var(--text-dim); font-size:.72rem; line-height:1.45; }
.x-schedule-wrap { display:contents; }
:has(> .x-schedule-wrap) { flex-wrap:wrap; }
.x-schedule-panel { flex:1 1 100%; grid-column:1 / -1; width:100%; box-sizing:border-box; display:grid; gap:12px; margin-top:4px; padding:16px; border:1px solid var(--border); border-radius:18px; background:var(--surface-solid); }
.x-schedule-panel[hidden] { display:none; }
.x-schedule-title { font-size:.9rem; }
.x-schedule-label { display:grid; gap:7px; color:var(--text-dim); font-size:.63rem; font-weight:790; letter-spacing:.09em; text-transform:uppercase; }
.x-schedule-label[hidden] { display:none; }
.x-schedule-label textarea,.x-schedule-label select,.x-schedule-label input { width:100%; box-sizing:border-box; padding:11px 13px; border:1px solid var(--border); border-radius:13px; color:var(--text); background:var(--surface); font:inherit; font-size:.82rem; font-weight:500; line-height:1.45; letter-spacing:0; text-transform:none; outline:0; }
.x-schedule-label select,.x-schedule-label input { min-height:46px; }
.x-schedule-label textarea { resize:vertical; }
.x-schedule-label :is(textarea,select,input):focus { border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.x-schedule-send { width:100%; }
.x-schedule-panel .x-schedule-status { margin-top:0; }
@media(max-width:620px){ .x-schedule-row { grid-template-columns:1fr; } .x-schedule-row .btn-secondary { width:100%; } }

/* UI consistency pass (22 Nov 2026): shared selects, settings hierarchy, helper text, cards. */
:root { --select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E9A94' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:where(.app-content, .campaign-page) select:not([multiple]) {
  appearance:none; -webkit-appearance:none;
  padding-right:40px !important;
  background-image:var(--select-chevron);
  background-repeat:no-repeat; background-position:right 14px center; background-size:16px;
  color-scheme:dark;
}
:root[data-theme="light"] :where(.app-content, .campaign-page) select:not([multiple]) { color-scheme:light; }
.campaign-brief-panel select, .library-run-controls select, .clips-filter-bar select, .watermark-field select,
.x-schedule-label select, .factory-style-form select, .factory-run-settings select, .explore-filters select,
.campaign-fields select {
  width:100%; min-width:0; min-height:46px; padding-left:14px;
  border:1px solid var(--border); border-radius:13px;
  background-color:var(--surface-solid); color:var(--text);
  font:inherit; font-size:.86rem; font-weight:600; letter-spacing:0; text-transform:none;
}
.clips-filter-bar select { width:auto; }
:is(.campaign-brief-panel, .library-run-controls, .clips-filter-bar, .explore-filters, .campaign-fields, .factory-run-settings) select:focus {
  outline:0; border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft);
}
.campaign-brief-panel input:not([type="checkbox"]), .library-run-controls input.library-speakers {
  width:100%; box-sizing:border-box; min-height:46px; padding:0 14px; border:1px solid var(--border); border-radius:13px;
  background:var(--surface-solid); color:var(--text); font:inherit; font-size:.86rem; outline:0;
}
.campaign-brief-panel input:not([type="checkbox"]):focus, .library-run-controls input.library-speakers:focus { border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.campaign-brief-panel label:has(> input:not([type="checkbox"])) { display:grid; gap:8px; }
.campaign-brief-panel .watermark-toggle, .library-auto-schedule { font-size:.86rem; font-weight:700; color:var(--text); }
.campaign-brief-panel .watermark-toggle input, .library-auto-schedule input { width:20px; height:20px; accent-color:var(--accent); }
.library-auto-schedule { display:flex; align-items:center; gap:8px; grid-column:1 / -1; }

/* Cards share one radius, padding and description style. */
.campaign-brief-panel { padding:clamp(18px,4vw,24px); border-radius:20px; }
.campaign-brief-panel > label:not(.watermark-toggle), .campaign-brief-panel > strong { font-size:.95rem; font-weight:700; }
.campaign-brief-panel small, .campaign-brief-panel label span { color:var(--text-dim); font-size:.75rem; line-height:1.5; }
.watermark-heading strong, .logo-upload-panel > div > strong, .x-schedule-card .watermark-heading strong { font-size:1.05rem; font-weight:800; letter-spacing:-.02em; }
.watermark-heading p, .logo-upload-panel > div > p { margin-top:6px; color:var(--text-soft); font-size:.8rem; line-height:1.5; }
.settings-help { margin:14px 0 0; color:var(--text-dim); font-size:.75rem; line-height:1.5; }
.watermark-fields + .settings-help { margin:12px 0 22px; }
.settings-page .watermark-settings-card + .watermark-settings-card { margin-top:18px; }

/* Account and credits: small label above a clear value. */
.account-stats { gap:10px; margin-top:18px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.account-stats .watermark-field { gap:6px; padding:14px 16px; border:1px solid var(--border); border-radius:16px; background:var(--surface-solid); }
.account-stats .watermark-field span { color:var(--text-dim); font-size:.66rem; font-weight:790; letter-spacing:.09em; text-transform:uppercase; }
.account-stats .watermark-field strong { color:var(--text); font-size:1.15rem; font-weight:800; letter-spacing:-.02em; line-height:1.2; text-transform:none; }
.settings-badge { flex:0 0 auto; padding:6px 11px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:.72rem; font-weight:750; letter-spacing:0; white-space:nowrap; }
.settings-badge:empty { display:none; }
@media(max-width:620px){
  .account-stats { grid-template-columns:1fr; gap:8px; }
  .account-stats .watermark-field { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; }
  .account-stats .watermark-field strong { font-size:1rem; text-align:right; }
}

/* Buttons: one pill shape for secondary and destructive actions. */
.btn-danger { display:inline-flex; min-height:48px; align-items:center; justify-content:center; gap:8px; padding:0 22px; font:inherit; font-size:.92rem; font-weight:700; letter-spacing:-.015em; }
.btn-danger:disabled { opacity:.45; cursor:not-allowed; }

/* Native file inputs look like the studio's upload buttons. */
input[type="file"]:not([hidden]) { color:var(--text-dim); font:inherit; font-size:.78rem; max-width:100%; }
input[type="file"]:not([hidden])::file-selector-button {
  min-height:42px; margin-right:12px; padding:0 18px; border:1px solid var(--border-strong); border-radius:999px;
  background:var(--surface); color:var(--text); font:inherit; font-size:.85rem; font-weight:700; cursor:pointer;
  transition:border-color .2s ease, background .2s ease;
}
input[type="file"]:not([hidden])::file-selector-button:hover { border-color:color-mix(in srgb, var(--accent), transparent 40%); background:var(--surface-hover); }

.account-stats + .settings-help { margin-bottom:0; }
.library-run-controls select { padding-left:12px; padding-right:30px !important; background-position:right 10px center; background-size:14px; font-size:.8rem; }
.library-run-controls input.library-speakers { grid-column:1 / -1; font-size:.8rem; }
.campaign-brief-panel textarea { border-radius:13px; background:var(--surface-solid); padding:12px 14px; }
.campaign-brief-panel textarea:focus { outline:0; border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.factory-run-settings label, .factory-style-form label { color:var(--text-dim); font-size:.66rem; font-weight:790; letter-spacing:.09em; text-transform:uppercase; }
.factory-run-settings label :is(select, input, small), .factory-style-form label :is(select, input, small) { letter-spacing:0; text-transform:none; }
.factory-run-settings label small { color:var(--text-dim); font-size:.72rem; font-weight:500; line-height:1.45; }
.campaign-brief-panel label:has(> input:not([type="checkbox"])) { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:6px; row-gap:8px; }
.campaign-brief-panel label:has(> input:not([type="checkbox"])) > input { flex:1 0 100%; }
.x-schedule-batch { display:grid; gap:12px; }
.x-schedule-batch .x-schedule-help { margin:0; }
.x-schedule-batch > .btn-primary { width:100%; }
.x-schedule-batch .x-schedule-status { margin-top:0; }
.x-schedule-batch .x-schedule-status p { margin:0 0 6px; font-weight:700; }
.x-schedule-batch .x-schedule-status ul { margin:0; padding-left:18px; color:var(--text-soft); line-height:1.55; }
