.app-page {
  --app-page-background: #f7f6ff;
  --app-navbar-bg: rgba(251, 251, 253, 0.82);
  --app-navbar-shell-bg: rgba(255, 255, 255, 0.9);
  --app-navbar-shell-border: rgba(0, 0, 0, 0.06);
  --app-navbar-shell-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  --app-sidebar-bg: rgba(255, 255, 255, 0.9);
  --app-sidebar-border: rgba(0, 0, 0, 0.06);
  --app-sidebar-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
  --app-brand-text: #1d1d1f;
  --app-nav-text: #424245;
  --app-nav-hover-bg: rgba(0, 0, 0, 0.03);
  --app-nav-active-border: rgba(0, 113, 227, 0.08);
  --app-nav-active-bg: #e8f3ff;
  --app-nav-active-text: #0071e3;
  --app-panel-muted-bg: #f5f5f7;
  --app-panel-muted-border: rgba(0, 0, 0, 0.05);
  --app-label-text: #86868b;
  --app-control-bg: #fff;
  --app-control-border: rgba(0, 0, 0, 0.08);
  --app-control-text: #1d1d1f;
  --app-control-muted-text: #424245;
  --app-card-bg: rgba(255, 255, 255, 0.94);
  --app-card-border: rgba(0, 0, 0, 0.06);
  --app-card-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  --app-hover-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  --app-surface-nested-bg: #fff;
  --app-surface-nested-border: #ecebff;
  --app-surface-nested-shadow: var(--shadow-soft);
  --app-surface-subtle-bg: #fbfaff;
  --app-surface-subtle-border: #dde6f0;
  --app-surface-subtle-text: #4b4491;
  --app-surface-accent-bg: #f1efff;
  --app-surface-accent-border: #dcd7ff;
  --app-surface-accent-text: #4b4491;
  --app-surface-success-bg: #eef8f3;
  --app-surface-success-border: #c9e8d8;
  --app-surface-success-text: #1f744f;
  --app-surface-danger-bg: #fff1ef;
  --app-surface-danger-border: #f3b4ab;
  --app-surface-danger-text: #b94032;
  --app-title-text: #1d1d1f;
  --app-body-text: #6e6e73;
  --app-body-soft-text: #86868b;
  --app-primary-bg: #0071e3;
  --app-primary-text: #fff;
  --app-primary-shadow: none;
  --app-outline-bg: #fff;
  --app-outline-border: rgba(0, 0, 0, 0.08);
  --app-outline-text: #1d1d1f;
  --app-input-bg: #fff;
  --app-input-border: rgba(0, 0, 0, 0.08);
  --app-input-text: #424245;
  --app-focus-outline: rgba(0, 113, 227, 0.16);
  --app-focus-border: rgba(0, 113, 227, 0.22);
  --app-status-bg: #e8f3ff;
  --app-status-border: rgba(0, 113, 227, 0.08);
  --app-status-text: #0071e3;
  --app-status-success-bg: #e8f6ee;
  --app-status-success-border: rgba(46, 121, 84, 0.08);
  --app-status-success-text: #2e7954;
  --app-status-error-bg: #fdecea;
  --app-status-error-border: rgba(171, 76, 62, 0.08);
  --app-status-error-text: #ab4c3e;
  --app-notice-bg: #fff7e8;
  --app-notice-border: rgba(255, 159, 10, 0.18);
  --app-notice-text: #7a4c00;
  --app-notice-offline-bg: #fff;
  --app-notice-offline-border: rgba(0, 0, 0, 0.08);
  --app-notice-offline-text: #424245;
  --app-stat-bg: #fff;
  --app-stat-border: rgba(0, 0, 0, 0.06);
  --app-stat-label-text: #86868b;
  --app-stat-value-text: #1d1d1f;
  --app-empty-bg: rgba(255, 255, 255, 0.76);
  --app-empty-border: rgba(0, 0, 0, 0.08);
  --app-empty-text: #6e6e73;
  --app-modal-backdrop: rgba(29, 29, 31, 0.28);
  --app-mobile-sidebar-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
  --app-sidebar-backdrop: rgba(29, 29, 31, 0.22);
  --app-skeleton-shimmer: linear-gradient(90deg, #ebe7ff 25%, #f8f6ff 50%, #ebe7ff 75%);
  --app-skeleton-row-bg: #f8f7ff;
  --app-skeleton-row-border: #ecebff;
  --app-skeleton-surface: #fff;
  --app-skeleton-surface-border: #ecebff;
  --app-skeleton-hero-bg: linear-gradient(135deg, #ffffff 0%, #f7f4ff 58%, #f2fbff 100%);
  --app-skeleton-highlight-surface: linear-gradient(135deg, #faf8ff 0%, #f2f8ff 100%);
  --app-trust-chip-bg: var(--app-surface-subtle-bg);
  --app-trust-chip-border: var(--app-surface-subtle-border);
  --app-trust-chip-text: var(--app-surface-subtle-text);
  --app-accent-link: #3f38a1;
  --app-avatar-ring: #fff;
  --app-series-divider: #ecebff;
  --app-series-heading: #2a2559;
  --app-series-link: #4b4491;
  --app-series-link-hover: #2f286d;
  --app-row-bg: var(--app-surface-nested-bg);
  --app-row-border: var(--app-surface-nested-border);
  --app-row-shadow: none;
  --app-row-title: #2a2559;
  --app-row-text: #6a658f;
  --app-series-row-bg: var(--app-row-bg);
  --app-series-row-border: var(--app-row-border);
  --app-series-row-title: var(--app-row-title);
  --app-series-row-text: var(--app-row-text);
  --app-quick-hero-bg: #f7f5ff;
  --app-quick-hero-border: #e4defe;
  --app-quick-eyebrow-text: #6a64b1;
  --app-quick-heading-text: #2a2559;
  --app-quick-step-badge-bg: #fff;
  --app-quick-step-badge-border: #d9cffc;
  --app-quick-step-badge-text: #4b4491;
  --app-quick-step-text: #433c74;
  --app-series-summary-bg: var(--app-surface-nested-bg);
  --app-series-summary-border: var(--app-surface-nested-border);
  --app-series-summary-title: #2a2559;
  --app-series-summary-meta: #6a658f;
  --app-series-pill-bg: var(--app-surface-accent-bg);
  --app-series-pill-border: var(--app-surface-accent-border);
  --app-series-pill-text: var(--app-surface-accent-text);
  --app-series-outline-text: #4b4766;
  --app-onboarding-heading: #2a2559;
  --app-onboarding-step-bg: #efeaff;
  --app-onboarding-step-text: #4b4491;
  --app-quick-progress-bg: var(--app-surface-nested-bg);
  --app-quick-progress-border: var(--app-surface-nested-border);
  --app-quick-progress-active-bg: var(--app-surface-accent-bg);
  --app-quick-progress-active-border: var(--app-surface-accent-border);
  --app-quick-progress-complete-bg: var(--app-surface-success-bg);
  --app-quick-progress-complete-border: var(--app-surface-success-border);
  --app-quick-progress-failed-bg: var(--app-surface-danger-bg);
  --app-quick-progress-failed-border: var(--app-surface-danger-border);
  --app-quick-progress-title: #2a2559;
  --app-quick-progress-status: #5a5580;
  --app-quick-progress-status-complete: var(--app-surface-success-text);
  --app-quick-progress-status-failed: var(--app-surface-danger-text);
  --app-quick-wait-bg: linear-gradient(135deg, #f8f6ff 0%, #eef7ff 100%);
  --app-quick-wait-border: #ddd8ff;
  --app-quick-wait-badge-bg: var(--app-surface-subtle-bg);
  --app-quick-wait-badge-border: var(--app-surface-subtle-border);
  --app-quick-wait-badge-text: var(--app-surface-subtle-text);
  --app-quick-wait-elapsed: #4f4a7a;
  --app-quick-wait-stage: #2a2559;
  --app-quick-wait-fact: #4b4766;
  --app-quick-wait-tip-border: #c8c0ff;
  --app-quick-wait-tip-border-hover: #b5acff;
  --app-quick-wait-tip-text: #40378a;
  --app-quick-wait-tip-text-hover: #2a2559;
  --app-scene-plan-card-bg: var(--app-surface-nested-bg);
  --app-scene-plan-card-border: var(--app-surface-nested-border);
  --app-scene-plan-card-shadow: var(--app-surface-nested-shadow);
  --app-scene-plan-title: #2a2559;
  --app-selected-border: rgba(0, 113, 227, 0.14);
  --app-selected-shadow: 0 12px 26px rgba(0, 113, 227, 0.08);
  --app-plan-badge-bg: rgba(46, 121, 84, 0.12);
  --app-plan-badge-text: #2e7954;
  --app-error-text: #ab4c3e;
  --app-muted-dot: rgba(148, 163, 184, 0.32);
  min-height: 100%;
  background: var(--app-page-background);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 850;
}

.sidebar-toggle {
  border: 1px solid #dddaf5;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  color: #2a2559;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(63, 50, 150, 0.08);
}

.app-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  background: #f7f6ff;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px;
  background: #fff;
  border-right: 1px solid #ecebff;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: #2a2559;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav a:hover {
  background: #f0edff;
}

.sidebar-nav a.active {
  background: var(--background-gradient);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-divider {
  height: 1px;
  background: #ecebff;
}

.sidebar-account {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.mode-toggle {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f6ff;
  border: 1px solid #e2ddff;
}

.mode-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c86b5;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #edeaff;
  border: 1px solid #ddd7ff;
}

.mode-switch button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  color: #4b4491;
  cursor: pointer;
}

.mode-switch button:focus-visible {
  outline: 2px solid #7a73ff;
  outline-offset: 2px;
}

.mode-switch button.is-active {
  background: var(--background-gradient);
  color: #fff;
  box-shadow: 0 10px 18px rgba(90, 90, 255, 0.2);
}

.language-toggle {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f6ff;
  border: 1px solid #e2ddff;
}

.language-toggle.compact {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.language-toggle.compact .language-toggle-label {
  display: none;
}

.language-toggle-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6f6999;
}

.language-toggle-select {
  min-width: 120px;
  border: 1px solid #d9d3ff;
  border-radius: 8px;
  background: #fff;
  color: #2f2a58;
  font: inherit;
  font-size: 0.84rem;
  padding: 6px 10px;
  line-height: 1.2;
}

.language-toggle-select:focus-visible {
  outline: 2px solid #7a73ff;
  outline-offset: 2px;
}

.language-toggle.compact .language-toggle-select {
  min-width: 110px;
  font-size: 0.8rem;
  padding: 5px 8px;
}

.sidebar-account .account-summary {
  width: 100%;
  justify-content: space-between;
}

.sidebar-action {
  border: none;
  background: none;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: #2a2559;
  cursor: pointer;
  border-radius: 10px;
}

.sidebar-action:hover {
  background: #f0edff;
}

.sidebar-backdrop {
  display: none;
}

.billing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 16px;
}

.billing-stat {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ecebff;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.billing-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c86b5;
}

.billing-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2a2559;
  position: relative;
  min-height: 1.2em;
}

.billing-stat-value.is-loading {
  color: transparent;
}

.billing-stat-value.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 0.95em;
  width: clamp(90px, 70%, 160px);
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--app-skeleton-shimmer);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.app-page .btn[data-loading="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.app-page .btn[data-loading="true"]:hover {
  transform: none;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  opacity: 0.8;
  vertical-align: middle;
}

.btn[data-loading="true"] .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.series-skeleton {
  position: relative;
  overflow: hidden;
}

.series-skeleton .inline-actions {
  margin-top: 16px;
}

.skeleton-line,
.skeleton-block,
.skeleton-pill {
  display: block;
  background: var(--app-skeleton-shimmer);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.skeleton-block {
  border-radius: 12px;
}

.skeleton-input {
  height: 44px;
  width: 100%;
  border-radius: 10px;
}

.skeleton-pill {
  height: 34px;
  width: 120px;
  border-radius: 999px;
}

.skeleton-title {
  height: 22px;
  width: 60%;
  border-radius: 10px;
}

.skeleton-meta {
  height: 14px;
  width: 72%;
  margin-top: 10px;
}

.skeleton-paragraph {
  height: 54px;
  width: 100%;
  margin-top: 16px;
}

.skeleton-episode-title {
  height: 16px;
  width: 120px;
}

.skeleton-episode-meta {
  height: 14px;
  width: 90px;
}

.skeleton-episode-row {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-skeleton-row-bg);
  border: 1px solid var(--app-skeleton-row-border);
  display: grid;
  gap: 6px;
}

.skeleton-episode-row-title {
  height: 14px;
  width: 60%;
}

.skeleton-episode-row-meta {
  height: 12px;
  width: 45%;
}

.field.has-skeleton .field-skeleton {
  display: none;
}

#series-form[data-loading="true"] .field.has-skeleton .field-control {
  display: none;
}

#series-form[data-loading="true"] .field.has-skeleton .field-skeleton {
  display: block;
}

.style-option.style-skeleton {
  display: grid;
  gap: 10px;
}

.style-skeleton-card {
  pointer-events: none;
}

.style-skeleton-card::after {
  content: none;
}

.skeleton-style-label {
  height: 12px;
  width: 60%;
}

.voice-option.voice-skeleton {
  pointer-events: none;
}

.voice-skeleton-card {
  cursor: default;
}

.skeleton-voice-title {
  height: 16px;
  width: 55%;
}

.skeleton-voice-subtitle {
  height: 12px;
  width: 35%;
}

.skeleton-voice-meta {
  height: 12px;
  width: 80%;
}

.plan-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 12px;
}

.plan-card .btn {
  width: 100%;
}

.plan-card.selected {
  border-color: #6d63ff;
  box-shadow: 0 18px 30px rgba(90, 90, 255, 0.16);
}

.plan-card.current {
  border-color: #6d63ff;
  box-shadow: 0 18px 30px rgba(90, 90, 255, 0.18);
}

.billing-sections {
  display: grid;
  gap: 20px;
}

.billing-plan-list-section {
  display: grid;
  gap: 14px;
}

.billing-current-card {
  padding: 16px;
  background: var(--app-card-bg);
  border-color: var(--app-card-border);
}

.billing-current-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--app-title-text);
}

.billing-current-card .billing-grid {
  margin-top: 12px;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.billing-current-card .billing-stat {
  padding: 12px;
  border-radius: 12px;
  border-color: var(--app-stat-border);
  background: var(--app-stat-bg);
}

.billing-current-card .billing-stat-label {
  color: var(--app-stat-label-text);
}

.billing-current-card .billing-stat-value {
  font-size: 1rem;
  color: var(--app-stat-value-text);
}

.billing-current-card .meta {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--app-body-text);
}

.plan-deliverables {
  display: grid;
  gap: 4px;
}

.plan-output,
.plan-output-meta {
  margin: 0;
}

.plan-output {
  color: #2f286d;
}

.plan-output-meta {
  font-size: 0.9rem;
  color: #5a5580;
}

.billing-shared-includes-card {
  padding: 16px 18px;
  background: var(--app-card-bg);
  border-color: var(--app-card-border);
}

.billing-shared-includes {
  margin: 0;
  padding: 0;
}

.billing-shared-includes summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--app-accent-link);
}

.billing-shared-includes summary::-webkit-details-marker {
  display: none;
}

.billing-shared-includes summary::after {
  content: "\25BE";
  font-size: 0.9em;
  color: var(--app-accent-link);
}

.billing-shared-includes[open] summary::after {
  transform: rotate(180deg);
}

.billing-shared-includes-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.billing-shared-includes-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
  color: var(--app-nav-text);
}

.billing-shared-includes-list li::before {
  content: "\2713";
  color: var(--accent-color, var(--app-accent-link));
  line-height: 1.2;
}

.billing-shared-includes-meta {
  margin-top: 12px;
  font-size: 0.84rem;
}

.billing-shared-includes-meta a {
  color: var(--app-accent-link);
  font-weight: 700;
}

.billing-trust-line {
  margin-top: 14px;
}

.billing-confirm-trust-line {
  margin-top: 0;
}

.billing-mobile-cta {
  display: none;
}

.billing-mobile-cta-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-body-soft-text);
}

.billing-mobile-cta-plan {
  margin: 0;
  font-weight: 700;
  color: var(--app-title-text);
}

.billing-header-proof {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.billing-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.billing-avatar-stack {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 4px;
}

.billing-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--app-avatar-ring);
  box-shadow: 0 6px 12px rgba(28, 24, 67, 0.16);
}

.billing-avatar + .billing-avatar {
  margin-left: -16px;
}

.billing-proof-copy {
  margin: 0;
  color: var(--app-body-text);
  font-size: 0.92rem;
  font-weight: 600;
}

.billing-stars {
  color: #f2b014;
  letter-spacing: 0.08em;
  margin-right: 6px;
}

.billing-header-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-header-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--app-trust-chip-border);
  background: var(--app-trust-chip-bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--app-trust-chip-text);
}

.billing-trust-icon {
  color: var(--accent-color, var(--app-accent-link));
}

.launch-offer {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d8d2ff;
  background: #f5f2ff;
  color: #4a3db0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.billing-offer-card {
  width: min(92vw, 450px);
  text-align: center;
  gap: 10px;
}

.billing-offer-title {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  line-height: 1.2;
  color: #2a2559;
}

.billing-offer-copy {
  margin: 0;
  color: #4e4884;
  font-weight: 600;
}

.billing-offer-countdown-label {
  margin: 0;
  font-size: 0.95rem;
  color: #5d568f;
}

.billing-offer-countdown-label strong {
  color: #352f7a;
}

.billing-offer-note {
  margin: 0;
  font-size: 0.8rem;
}

.billing-offer-apply {
  width: 100%;
}

.billing-paypal-card {
  width: min(92vw, 460px);
  gap: 12px;
}

.billing-paypal-close {
  justify-self: end;
  border: none;
  background: transparent;
  color: #5d568f;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.billing-paypal-title {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #2a2559;
}

.billing-paypal-copy {
  margin: 0;
  color: #4e4884;
  font-weight: 600;
}

#billing-paypal-button-container {
  min-height: 52px;
}

.billing-paypal-meta {
  margin: 0;
}

.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.plan-price-old {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff3f3;
  border: 1px solid #f1c5c5;
  font-weight: 700;
  color: #5a4f80;
  text-decoration: line-through;
  text-decoration-color: #d04a4a;
  text-decoration-thickness: 2px;
}

.plan-price-new {
  font-weight: 700;
  color: #2f286d;
}

.plan-price-credits {
  color: #6a658f;
}

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--background-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.billing-confirm-shell {
  max-width: 1200px;
}

.billing-embedded-shell {
  max-width: 560px;
}

.billing-embedded-page .app-shell {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.billing-confirm-card {
  padding: 20px;
}

.billing-embedded-card {
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 10px;
  display: grid;
  gap: 10px;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.billing-embedded-back-link {
  width: fit-content;
  font-size: 0.76rem;
  color: #8d96bc;
  font-weight: 500;
  text-decoration: none;
}

.billing-embedded-back-link:hover,
.billing-embedded-back-link:focus-visible {
  color: #6d77a4;
  text-decoration: underline;
}

.billing-checkout-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
}

.billing-checkout-content {
  display: grid;
  gap: 14px;
}

.billing-checkout-skeleton {
  display: none;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
}

.billing-checkout-skeleton-section,
.billing-checkout-skeleton-payment {
  padding: 16px;
  border: 1px solid var(--app-skeleton-surface-border);
  border-radius: 14px;
  background: var(--app-skeleton-surface);
  display: grid;
  gap: 10px;
}

.billing-checkout-skeleton-payment {
  position: static;
}

.billing-checkout-skeleton-testimonials {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-checkout-skeleton-card {
  height: 120px;
}

.billing-checkout-skeleton-checkout {
  min-height: 320px;
}

.billing-checkout-skeleton-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.billing-checkout-skeleton-pill {
  width: 110px;
}

.billing-checkout-skeleton-title {
  width: 72%;
  height: 28px;
}

.billing-checkout-skeleton-subtitle {
  width: 88%;
}

.billing-checkout-skeleton-subtitle.short {
  width: 62%;
}

.billing-checkout-skeleton-heading {
  width: 170px;
}

.billing-checkout-skeleton-item {
  width: 100%;
}

.billing-checkout-skeleton-item.short {
  width: 74%;
}

.billing-checkout-skeleton-btn {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}

.billing-confirm-page .billing-checkout-layout,
.billing-confirm-page .billing-checkout-content,
.billing-confirm-page .billing-checkout-payment,
.billing-confirm-page .billing-checkout-section,
.billing-confirm-page .billing-testimonials,
.billing-confirm-page .billing-testimonial {
  min-width: 0;
}

.billing-confirm-page.is-loading .billing-checkout-skeleton {
  display: grid;
}

.billing-confirm-page.is-loading .billing-checkout-layout {
  display: none;
}

.billing-confirm-page {
  overflow-x: hidden;
}

.billing-embedded-page .billing-confirm-embedded-shell {
  width: 100%;
  min-height: 0;
  height: auto;
}

.billing-embedded-page #billing-confirm-embedded-checkout {
  width: 100%;
  min-height: 0;
  height: auto;
}

.billing-checkout-section {
  padding: 16px;
  border: 1px solid var(--app-surface-nested-border, #dfe4fa);
  border-radius: 14px;
  background: var(--app-surface-nested-bg, linear-gradient(180deg, #ffffff 0%, #fbfcff 100%));
  box-shadow: var(--app-surface-nested-shadow, 0 10px 22px rgba(20, 27, 78, 0.05));
}

.billing-checkout-section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--app-title-text, #17265f);
}

.billing-offer-hero {
  border-color: var(--app-surface-accent-border, #d3dbff);
  background: var(--app-surface-nested-bg, linear-gradient(160deg, #ffffff 0%, #f4f7ff 100%));
}

.billing-offer-hero .app-subtitle {
  max-width: 56ch;
}

.billing-features-section {
  display: grid;
  gap: 12px;
}

.billing-feature-highlights {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-feature-card {
  margin: 0;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--app-surface-nested-border, #dbe1ff);
  background: var(--app-surface-nested-bg, linear-gradient(180deg, #f8faff 0%, #f2f6ff 100%));
  display: grid;
  gap: 5px;
}

.billing-feature-card-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-body-soft-text, #6071b8);
}

.billing-feature-card-value {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--app-title-text, #13245d);
}

.billing-feature-card-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--app-body-text, #4f5f98);
}

.billing-feature-pills {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-feature-pill {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--app-surface-nested-border, #dbe1ff);
  background: var(--app-surface-nested-bg, #ffffff);
  color: var(--app-body-text, #24346e);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.billing-feature-pill::before {
  content: "\2713";
  color: var(--accent-color, #3553b2);
  line-height: 1.1;
  margin-top: 1px;
}

.billing-checkout-guarantee {
  background: var(--app-surface-subtle-bg, #faf9ff);
}

.billing-trust-section {
  background: var(--app-surface-subtle-bg, linear-gradient(180deg, #fbfcff 0%, #f4f8ff 100%));
}

.billing-trust-grid {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.billing-trust-item {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--app-surface-nested-border, #dbe1ff);
  background: var(--app-surface-nested-bg, #fff);
  display: grid;
  gap: 4px;
}

.billing-trust-item-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-title-text, #1f2b66);
}

.billing-trust-item-copy {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--app-body-text, #4d5a92);
}

.billing-checkout-payment {
  position: static;
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid var(--app-surface-nested-border, #d3dbff);
  border-radius: 14px;
  background: var(--app-surface-nested-bg, linear-gradient(180deg, #f9fbff 0%, #f3f7ff 100%));
}

.billing-checkout-payment-meta {
  margin: 0;
  color: var(--app-body-text, #4b5f9d);
}

.billing-checkout-order {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--app-surface-nested-border, #d6ddff);
  background: var(--app-surface-nested-bg, #fff);
  display: grid;
  gap: 7px;
}

.billing-checkout-order-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--app-body-soft-text, #6270aa);
}

.billing-checkout-order-plan {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--app-title-text, #162863);
}

.billing-checkout-order-price {
  margin: 0;
}

.billing-checkout-order-points {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.billing-checkout-order-points li {
  font-size: 0.85rem;
  color: var(--app-body-text, #2f3f79);
  font-weight: 600;
  display: flex;
  gap: 7px;
}

.billing-checkout-order-points li::before {
  content: "\2022";
  color: var(--accent-color, #3f5ab3);
}

.billing-confirm-embedded-shell {
  border: 1px solid var(--app-surface-nested-border, #ebe8ff);
  border-radius: 12px;
  background: var(--app-surface-nested-bg, #fff);
  min-height: 420px;
  max-width: 100%;
  overflow: hidden;
}

#billing-confirm-embedded-checkout {
  min-height: 420px;
  max-width: 100%;
}

.billing-confirm-embedded-shell iframe {
  border: 0;
  border-radius: 12px;
}

.billing-confirm-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.9vw, 2.15rem);
  line-height: 1.2;
  color: var(--app-title-text, #241f4a);
}

.billing-confirm-plan-meta {
  margin: 10px 0 0;
}

.billing-confirm-plan-current {
  font-weight: 700;
  color: var(--app-title-text, #2f286d);
}

.billing-confirm-plan-old {
  margin-left: 4px;
  color: var(--app-body-soft-text, #7e78a8);
  text-decoration: line-through;
  text-decoration-color: #cf5959;
  text-decoration-thickness: 2px;
  font-weight: 600;
}

.billing-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.billing-confirm-actions.is-embedded {
  justify-content: flex-start;
}

.billing-confirm-actions .btn.primary {
  margin-left: auto;
}

.billing-testimonials {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-testimonial {
  margin: 0;
  padding: 15px 14px;
  border-radius: 12px;
  border: 1px solid var(--app-surface-nested-border, #dbe1ff);
  background: var(--app-surface-nested-bg, #fff);
  text-align: left;
  display: grid;
  gap: 8px;
  align-content: start;
}

.billing-testimonial-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.billing-testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 2px solid #d4ddff;
  box-shadow: 0 6px 14px rgba(26, 40, 92, 0.16);
  flex-shrink: 0;
}

.billing-testimonial-metric {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--app-surface-accent-border, #cdd8ff);
  background: var(--app-surface-accent-bg, #ecf2ff);
  color: var(--app-surface-accent-text, #2f4da6);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.billing-testimonial-name {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--app-title-text, #1d2a62);
}

.billing-testimonial-quote {
  margin: 0;
  color: var(--app-body-text, #384a84);
  font-weight: 500;
  line-height: 1.4;
  font-size: 0.9rem;
}

@media (max-width: 1080px) {
  .billing-checkout-layout {
    grid-template-columns: 1fr;
  }

  .billing-checkout-skeleton {
    grid-template-columns: 1fr;
  }

  .billing-checkout-payment {
    position: static;
  }

  .billing-checkout-skeleton-payment {
    position: static;
  }

  .billing-feature-highlights,
  .billing-feature-pills,
  .billing-trust-grid {
    grid-template-columns: 1fr;
  }

  .billing-offer-hero .app-subtitle {
    max-width: none;
  }

  .billing-embedded-shell {
    max-width: none;
  }
}

[hidden] {
  display: none !important;
}

.nav-links button {
  border: none;
  background: none;
  padding: 6px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary-text-color);
}

.account-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e2ddff;
  background: #f8f6ff;
  box-shadow: 0 8px 16px rgba(63, 50, 150, 0.1);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c86b5;
}

.account-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2a2559;
}

.account-summary .status-pill {
  padding: 4px 10px;
  font-size: 0.65rem;
}

.app-shell {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.app-header > * {
  min-width: 0;
}

.app-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: var(--background-gradient);
  -webkit-background-clip: text;
  color: transparent;
}

.app-subtitle {
  margin: 8px 0 0;
  color: #5a5580;
  overflow-wrap: anywhere;
}

.app-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #ecebff;
}

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 600;
  color: #2a2559;
}

.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #dddaf5;
  background: #fbfaff;
  width: 100%;
  min-width: 0;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.number-stepper {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.number-stepper input[type="number"] {
  flex: 1;
  text-align: center;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  -moz-appearance: textfield;
}

.number-stepper input[type="number"]::-webkit-outer-spin-button,
.number-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-btn {
  width: 48px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #dddaf5;
  background: #f1efff;
  color: #2a2559;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
}

.number-stepper .stepper-btn:first-child {
  border-radius: 10px 0 0 10px;
}

.number-stepper .stepper-btn:last-child {
  border-radius: 0 10px 10px 0;
}

.stepper-btn:hover {
  background: #ebe7ff;
  border-color: #cfc9ff;
}

.stepper-btn:active {
  transform: scale(0.97);
}

.stepper-btn:focus-visible {
  outline: 2px solid #6b61ff;
  outline-offset: 2px;
}

.pro-only {
  display: none;
}

.app-page[data-mode="pro"] .pro-only {
  display: block;
}

.app-page[data-mode="pro"] .field.pro-only {
  display: flex;
}

.pro-only-inline {
  display: none;
}

.app-page[data-mode="pro"] .pro-only-inline {
  display: inline-flex;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid .field {
  min-width: 0;
}

.scroll-strip {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-top: 4px;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: auto;
}

.style-grid {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: clamp(140px, 22vw, 190px);
  width: max-content;
}

.style-option {
  position: relative;
  scroll-snap-align: start;
}

.style-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #1d193a;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.style-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75) 100%);
}

.style-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.style-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.style-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(30, 30, 60, 0.2);
}

.style-option input:focus-visible + .style-card {
  outline: 2px solid #7a73ff;
  outline-offset: 4px;
}

.style-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.style-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #2a2559;
  display: grid;
  place-items: center;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.style-option input:checked + .style-card .style-check {
  opacity: 1;
  transform: scale(1);
}

.voice-grid {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: clamp(190px, 24vw, 260px);
  width: max-content;
}

.voice-option {
  position: relative;
  scroll-snap-align: start;
}

.voice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.voice-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--app-surface-nested-bg, #fff);
  border: 1px solid var(--app-surface-nested-border, #ecebff);
  box-shadow: var(--app-surface-nested-shadow, var(--shadow-soft));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.voice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(30, 30, 60, 0.12);
}

.voice-option input:focus-visible + .voice-card {
  outline: 2px solid #7a73ff;
  outline-offset: 4px;
}

.voice-option input:checked + .voice-card {
  border-color: var(--app-selected-border, #6f67ff);
  box-shadow: var(--app-selected-shadow, 0 18px 30px rgba(79, 70, 229, 0.18));
  transform: translateY(-2px);
}

.voice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.voice-name {
  font-weight: 700;
  color: var(--app-title-text, #2a2559);
  font-size: 0.98rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.voice-provider {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--app-surface-accent-bg, #f0edff);
  color: var(--app-surface-accent-text, #4b4491);
  border: 1px solid var(--app-surface-accent-border, transparent);
  padding: 3px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.voice-description {
  margin: 0;
  color: var(--app-body-text, #6a658f);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.voice-sample-btn {
  border: 1px solid var(--app-surface-subtle-border, #d6d1ff);
  background: var(--app-surface-subtle-bg, #fff);
  color: var(--app-surface-accent-text, #4b4491);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
}

.voice-sample-btn.is-playing {
  background: var(--background-gradient);
  color: #fff;
  border-color: transparent;
}

.voice-sample-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.voice-sample-status {
  font-size: 0.72rem;
  color: var(--app-body-soft-text, #6a658f);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-strip::-webkit-scrollbar {
  height: 12px;
}

.scroll-strip::-webkit-scrollbar-thumb {
  background: #d7d4f5;
  border-radius: 999px;
}

.scroll-strip::-webkit-scrollbar-track {
  background: transparent;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.app-page .btn {
  text-decoration: none;
}

.inline-actions .btn.outline {
  border-width: 1px;
  border-color: #c7c2ee;
  color: #5c58a5;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.inline-actions .btn.outline:hover {
  transform: none;
  box-shadow: none;
}

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.app-page[data-mode="quick"] .stepper {
  display: none;
}

.step-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dad5ff;
  background: #fff;
  font-weight: 600;
  color: #4b4491;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.step-pill.active {
  background: var(--background-gradient);
  color: #fff;
  border-color: transparent;
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f0edff;
  color: #5349aa;
}

.status-pill.success {
  background: #e1f7ea;
  color: #1f7a4f;
}

.status-pill.error {
  background: #ffe8e5;
  color: #b94032;
}

.notice {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff6e5;
  color: #7a5200;
  border: 1px solid #f0d9ac;
}

.notice strong {
  color: #5a3b00;
}

.notice.notice-offline {
  background: #eef1ff;
  color: #2a2559;
  border-color: #cdd3ff;
  margin: 16px 0;
}

.notice.notice-offline strong {
  color: #1f1a47;
}

.quick-hero {
  display: none;
  background: var(--app-quick-hero-bg);
  border-color: var(--app-quick-hero-border);
}

.app-page[data-mode="quick"] .quick-hero {
  display: block;
}

.app-page[data-mode="quick"] #series-summary {
  display: none;
}

.app-page[data-mode="quick"] #episode-form {
  display: none;
}

.quick-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--app-quick-eyebrow-text);
  margin: 0;
}

.quick-hero-top h2 {
  margin: 8px 0 6px;
  font-size: 1.6rem;
  color: var(--app-quick-heading-text);
}

.quick-hero-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.quick-hero-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

.quick-hero-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--app-quick-step-badge-bg);
  border: 1px solid var(--app-quick-step-badge-border);
  color: var(--app-quick-step-badge-text);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.quick-hero-step-text {
  color: var(--app-quick-step-text);
  line-height: 1.45;
}

.quick-hero-foot {
  margin-top: 12px;
}

.onboarding-heading {
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--app-onboarding-heading);
}

.onboarding-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--app-onboarding-step-bg);
  color: var(--app-onboarding-step-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.onboarding-step-time {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--app-onboarding-step-text);
}

.quick-series-summary {
  margin-top: 18px;
}

.series-summary-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--app-series-summary-bg);
  border: 1px solid var(--app-series-summary-border);
}

.series-summary-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.series-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.series-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--app-series-pill-bg);
  border: 1px solid var(--app-series-pill-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-series-pill-text);
}

.series-summary-outline {
  margin: 0;
  color: var(--app-series-outline-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-progress {
  display: none;
}

.episode-page-skeleton {
  display: none;
  gap: 20px;
}

.app-page[data-page-loading="true"] .episode-page-skeleton {
  display: grid;
}

.app-page[data-page-loading="true"] .episode-page-shell {
  display: none;
}

.episode-page-skeleton-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.episode-page-skeleton-title-group {
  display: grid;
  gap: 10px;
}

.episode-page-skeleton-title {
  width: min(240px, 55vw);
}

.episode-page-skeleton-subtitle {
  width: min(180px, 42vw);
}

.episode-page-skeleton-status {
  width: 148px;
  height: 40px;
}

.episode-page-skeleton-card {
  display: grid;
  gap: 18px;
}

.episode-page-skeleton-card-head {
  display: grid;
  gap: 10px;
}

.episode-page-skeleton-card-title {
  width: min(220px, 52vw);
}

.episode-page-skeleton-card-title-short {
  width: min(160px, 42vw);
}

.episode-page-skeleton-card-meta {
  width: min(380px, 78vw);
}

.episode-page-skeleton-card-meta-short {
  width: min(300px, 68vw);
}

.episode-page-skeleton-step-list {
  display: grid;
  gap: 12px;
}

.episode-page-skeleton-step {
  height: 52px;
  border-radius: 12px;
}

.episode-page-skeleton-lounge {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--app-skeleton-surface-border);
  background: var(--app-skeleton-highlight-surface);
}

.episode-page-skeleton-lounge-chip {
  width: 110px;
}

.episode-page-skeleton-lounge-line {
  width: min(420px, 78vw);
}

.episode-page-skeleton-lounge-line-short {
  width: min(280px, 60vw);
}

.episode-page-skeleton-scene-grid {
  display: grid;
  gap: 14px;
}

.episode-page-skeleton-scene {
  height: 84px;
  border-radius: 16px;
}

.episode-page-skeleton-actions {
  display: flex;
  justify-content: flex-end;
}

.episode-page-skeleton-button {
  width: 168px;
  height: 48px;
}

.app-page[data-mode="quick"] .quick-progress {
  display: block;
}

.quick-progress-steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.quick-progress-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--app-quick-progress-border);
  background: var(--app-quick-progress-bg);
}

.quick-progress-step.is-active {
  border-color: var(--app-quick-progress-active-border);
  background: var(--app-quick-progress-active-bg);
}

.quick-progress-step.is-complete {
  border-color: var(--app-quick-progress-complete-border);
  background: var(--app-quick-progress-complete-bg);
}

.quick-progress-step.is-failed {
  border-color: var(--app-quick-progress-failed-border);
  background: var(--app-quick-progress-failed-bg);
}

.quick-step-title {
  font-weight: 600;
  color: var(--app-quick-progress-title);
}

.quick-step-status {
  font-size: 0.85rem;
  color: var(--app-quick-progress-status);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.quick-progress-step.is-complete .quick-step-status {
  color: var(--app-quick-progress-status-complete);
}

.quick-progress-step.is-failed .quick-step-status {
  color: var(--app-quick-progress-status-failed);
}

.quick-wait-lounge {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--app-quick-wait-border);
  background: var(--app-quick-wait-bg);
  display: grid;
  gap: 10px;
}

.quick-wait-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-wait-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--app-quick-wait-badge-border);
  background: var(--app-quick-wait-badge-bg);
  color: var(--app-quick-wait-badge-text);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.quick-wait-elapsed {
  font-size: 0.82rem;
  color: var(--app-quick-wait-elapsed);
  font-weight: 600;
}

.quick-wait-stage,
.quick-wait-fact {
  margin: 0;
}

.quick-wait-stage {
  color: var(--app-quick-wait-stage);
  font-weight: 600;
}

.quick-wait-fact {
  color: var(--app-quick-wait-fact);
}

.quick-wait-actions {
  margin-top: 2px;
}

.quick-wait-tip-btn {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  border-color: var(--app-quick-wait-tip-border);
  color: var(--app-quick-wait-tip-text);
}

.quick-wait-tip-btn:hover {
  border-color: var(--app-quick-wait-tip-border-hover);
  color: var(--app-quick-wait-tip-text-hover);
}

.app-page[data-mode="quick"] #generate-images,
.app-page[data-mode="quick"] #render-video {
  display: none;
}

.app-page[data-mode="quick"] #episode-scenes {
  display: none;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #6a658f;
  border: 1px dashed #d6d1ff;
  border-radius: 16px;
  background: #fff;
}

.series-card h3,
.episode-card h3,
.scene-card h3 {
  margin: 0 0 8px;
}

.episode-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--app-series-divider);
  display: grid;
  gap: 12px;
}

.episode-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.episode-list-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.episode-view-all {
  font-weight: 600;
  color: var(--app-series-link);
  text-decoration: none;
}

.episode-view-all:hover {
  color: var(--app-series-link-hover);
  text-decoration: underline;
}

.episode-list-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--app-series-heading);
}

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

.episode-row .inline-actions {
  gap: 8px;
}

.meta {
  color: #6a658f;
  font-size: 0.92rem;
}

.credit-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff6e5;
  border: 1px solid #f0d9ac;
  color: #7a5200;
  font-size: 0.9rem;
}

.credit-warning strong {
  color: #5a3b00;
  font-weight: 600;
}

.credit-warning a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.compact-meta {
  margin: 0;
  font-size: 0.84rem;
}

.scene-grid {
  display: grid;
  gap: 16px;
}

.scene-plan {
  display: grid;
  gap: 14px;
}

.scene-plan-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.scene-plan-grid {
  display: grid;
  gap: 16px;
}

.scene-plan-card {
  border: 1px solid var(--app-scene-plan-card-border);
  border-radius: 16px;
  padding: 16px;
  background: var(--app-scene-plan-card-bg);
  box-shadow: var(--app-scene-plan-card-shadow);
  display: grid;
  gap: 14px;
}

.scene-plan-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--app-scene-plan-title);
}

.scene-plan-fields {
  display: grid;
  gap: 12px;
}

.scene-plan-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.scene-card {
  display: grid;
  gap: 14px;
  grid-template-columns: 90px 1fr;
  align-items: start;
}

.scene-transcript {
  margin: 6px 0 0;
  color: #2a2559;
  white-space: pre-wrap;
}

.scene-audio {
  margin-top: 6px;
}

.scene-audio audio {
  width: 100%;
}

.scene-thumb {
  width: 90px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  background: #1a1736;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  overflow: hidden;
}

.scene-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-preview-frame {
  max-width: 360px;
  width: 100%;
}

.video-preview-frame video {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: #121127;
}

.social-success {
  margin-top: 14px;
  padding: 0;
  border: none;
  background: transparent;
  display: grid;
  gap: 14px 16px;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  grid-template-areas:
    "media publish"
    "media copy";
}

.social-success h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--app-title-text, #1d2b34);
}

.social-success-media {
  grid-area: media;
  display: grid;
  gap: 10px;
  align-content: start;
}

.social-vision-phone {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d5e3e9;
  background: #102032;
  box-shadow: 0 14px 28px rgba(22, 44, 58, 0.18);
  aspect-ratio: var(--social-video-ratio, 9 / 16);
}

.social-vision-phone video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  background: #000;
}

.social-vision-phone video:fullscreen,
.social-vision-phone video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.social-publish-panel {
  grid-area: publish;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 12px;
}

.social-publish-panel.is-locked {
  opacity: 0.92;
}

.social-publish-heading {
  margin: 0;
  color: var(--app-title-text, #1f3440);
  display: grid;
  gap: 8px;
}

.social-platform-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--app-surface-subtle-border, #cfdae6);
  background: var(--app-surface-subtle-bg, rgba(255, 255, 255, 0.9));
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--app-body-text, #22353d);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-platform-chip:hover {
  border-color: var(--app-surface-subtle-border, #bccfdd);
  background: var(--app-surface-nested-bg, #fff);
}

.social-platform-chip:focus-visible {
  outline: 2px solid #6f67db;
  outline-offset: 2px;
}

.social-platform-chip.is-selected {
  border-color: var(--app-surface-success-border, #2d7f59);
  background: var(--app-surface-success-bg, #eef8f3);
  color: var(--app-surface-success-text, #1f744f);
  box-shadow: 0 8px 18px rgba(29, 88, 61, 0.14);
}

.social-platform-name {
  line-height: 1.1;
}

.social-platform-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--app-surface-success-text, #1f744f);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.social-selection-summary {
  margin: 0;
  color: var(--app-body-text, #51636d);
}

.social-schedule-label {
  margin: 0;
  color: var(--app-body-text, #51636d);
  font-weight: 600;
}

.social-schedule-input {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--app-input-border, #cfdae6);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--app-input-text, #22353d);
  background: var(--app-input-bg, #fff);
}

.social-schedule-input:focus-visible {
  outline: 2px solid #6f67db;
  outline-offset: 2px;
}

.social-publish-actions {
  gap: 8px;
  align-items: center;
}

.social-publish-panel .btn {
  white-space: nowrap;
}

.social-publish-panel .meta {
  margin: 0;
}

.social-media-actions {
  justify-content: stretch;
}

.social-media-actions .btn {
  width: 100%;
}

.social-destination-modal-card {
  width: min(92vw, 520px);
}

.social-destination-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.social-destination-header h3 {
  margin: 0;
  color: var(--app-title-text, inherit);
}

.social-destination-list {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 360px);
  overflow-y: auto;
}

.social-destination-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--app-surface-nested-border, #dde6f0);
  background: var(--app-surface-nested-bg, #fff);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.social-destination-item.is-selected {
  border-color: var(--app-surface-success-border, #2d7f59);
  background: var(--app-surface-success-bg, #f4fbf7);
}

.social-destination-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2d7f59;
}

.social-destination-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #1f3440, #4b7096);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.social-destination-meta {
  display: grid;
  gap: 2px;
}

.social-destination-name {
  color: var(--app-title-text, #1f3440);
  font-weight: 600;
  line-height: 1.2;
}

.social-destination-handle {
  color: var(--app-body-soft-text, #60707c);
  font-size: 0.82rem;
  line-height: 1.2;
}

.tiktok-publish-modal-card {
  width: min(92vw, 560px);
  max-height: min(92vh, 840px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  gap: 12px;
}

.tiktok-publish-header h3 {
  margin: 0;
  color: var(--app-title-text, #1f3440);
}

.tiktok-publish-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--app-surface-nested-border, #dde6f0);
  background: var(--app-surface-nested-bg, #fff);
}

.tiktok-publish-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}

.tiktok-publish-account-meta {
  display: grid;
  gap: 2px;
}

.tiktok-publish-preview {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--app-surface-nested-border, #dde6f0);
  background: #000;
}

.tiktok-publish-preview video {
  width: 100%;
  max-height: min(34vh, 320px);
  display: block;
  background: #000;
}

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

.tiktok-publish-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-title-text, #1f3440);
}

.tiktok-publish-field select {
  width: 100%;
  border: 1px solid var(--app-input-border, #cfdae6);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--app-input-text, #22353d);
  background: var(--app-input-bg, #fff);
}

.tiktok-publish-toggle-grid {
  display: grid;
  gap: 10px;
}

.tiktok-publish-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--app-surface-nested-border, #dde6f0);
  background: var(--app-surface-nested-bg, #fff);
  color: var(--app-body-text, #22353d);
  font-weight: 600;
}

.tiktok-publish-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.tiktok-publish-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--app-surface-subtle-border, #cfdae6);
  background: var(--app-surface-subtle-bg, #fbfaff);
  color: var(--app-body-text, #355968);
}

.tiktok-publish-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.tiktok-publish-validation {
  color: var(--app-error-text, #b73e3e);
}

.tiktok-publish-modal-card .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: 4px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 42%);
}

.social-channel-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.social-channel-logo svg {
  width: 17px;
  height: 17px;
  display: block;
}

.social-channel-logo[data-platform-logo="tiktok"] {
  background: #0d0f1a;
  box-shadow: inset 2px 0 0 #25f4ee, inset -2px 0 0 #fe2c55;
}

.social-channel-logo[data-platform-logo="instagram"] {
  background: linear-gradient(135deg, #fd5949 0%, #d6249f 52%, #285aeb 100%);
}

.social-channel-logo[data-platform-logo="youtube"] {
  background: #ff2a2a;
}

.social-success-copy {
  grid-area: copy;
  border-radius: 12px;
  border: 1px dashed var(--app-surface-subtle-border, #c9d9dc);
  background: var(--app-surface-subtle-bg, rgba(255, 255, 255, 0.65));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.social-copy-actions {
  align-items: center;
}

.social-success-caption {
  margin: 0;
  color: var(--app-title-text, #1e2f38);
  font-weight: 500;
}

.social-success-tags {
  margin: 0;
  color: var(--app-body-text, #355968);
  font-size: 0.9rem;
}

.automation-section {
  display: grid;
  gap: 14px;
}

.automation-page-skeleton {
  display: grid;
  gap: 20px;
}

.automation-skeleton-hero {
  display: grid;
  gap: 12px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--app-skeleton-surface-border);
  background: var(--app-skeleton-hero-bg);
  box-shadow: var(--app-card-shadow, var(--shadow-soft));
}

.automation-skeleton-chip {
  width: 124px;
}

.automation-skeleton-title {
  height: 30px;
  width: min(360px, 70%);
  border-radius: 14px;
}

.automation-skeleton-subtitle {
  width: min(520px, 92%);
}

.automation-skeleton-subtitle-short {
  width: min(400px, 70%);
}

.automation-skeleton-stack {
  display: grid;
  gap: 20px;
}

.automation-skeleton-card {
  display: grid;
  gap: 16px;
}

.automation-skeleton-card-head {
  display: grid;
  gap: 10px;
}

.automation-skeleton-card-title {
  height: 20px;
  width: min(220px, 48%);
  border-radius: 10px;
}

.automation-skeleton-card-meta {
  width: min(320px, 68%);
}

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

.automation-skeleton-button {
  width: 152px;
}

.automation-skeleton-button-soft {
  width: 132px;
  opacity: 0.82;
}

.automation-skeleton-form {
  display: grid;
  gap: 12px;
}

.automation-skeleton-input {
  height: 46px;
  border-radius: 12px;
}

.automation-skeleton-picker {
  height: 84px;
  border-radius: 14px;
}

.automation-skeleton-submit {
  width: 144px;
}

.automation-skeleton-list {
  display: grid;
  gap: 10px;
}

.automation-skeleton-row {
  height: 74px;
  border-radius: 14px;
  border: 1px solid var(--app-skeleton-surface-border);
  background: var(--app-skeleton-shimmer);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.automation-skeleton-row-compact {
  height: 58px;
}

.automation-section-head {
  display: grid;
  gap: 4px;
}

.automation-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--app-title-text, #1f3440);
}

.automation-form {
  display: grid;
  gap: 12px;
}

#automation-schedule-form[data-loading="true"] .field.has-skeleton .field-control {
  display: none;
}

#automation-schedule-form[data-loading="true"] .field.has-skeleton .field-skeleton {
  display: block;
}

.automation-connect-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

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

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

.episode-row,
.automation-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--app-row-border, var(--app-surface-nested-border, #dde6f0));
  background: var(--app-row-bg, var(--app-surface-nested-bg, #fff));
  box-shadow: var(--app-row-shadow, none);
}

.episode-row-info,
.automation-item-info {
  display: grid;
  gap: 4px;
  flex: 1 1 280px;
  min-width: 0;
}

.episode-row-title,
.automation-item h3 {
  font-weight: 600;
  color: var(--app-row-title, #2a2559);
  overflow-wrap: anywhere;
}

.automation-item h3 {
  margin: 0;
  font-size: 1rem;
}

.episode-row .meta,
.episode-list-meta .meta,
.automation-item .meta {
  color: var(--app-row-text, #6a658f);
}

.automation-item .meta {
  margin: 4px 0 0;
}

.automation-item-actions {
  flex-shrink: 0;
}

.automation-account-picker {
  display: grid;
  gap: 8px;
  border: 1px solid var(--app-surface-nested-border, #dde6f0);
  border-radius: 10px;
  padding: 10px;
  background: var(--app-surface-nested-bg, #fff);
}

.automation-account-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--app-body-text, #253844);
  font-weight: 500;
}

.automation-account-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.automation-account-picker-field {
  grid-column: 1 / -1;
}

.automation-error {
  color: var(--app-error-text, #b73e3e);
}

.auth-card {
  max-width: 480px;
  margin: 60px auto;
}

.oauth-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.btn.google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e0dcff;
  color: #2a2559;
}

.btn.google:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.google-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.oauth-message {
  margin: 0;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8b86b2;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ecebff;
}

.auth-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-toggle button {
  border: 1px solid #e0dcff;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #4b4491;
}

.auth-toggle button.active {
  background: var(--background-gradient);
  color: #fff;
  border-color: transparent;
}

.app-footer {
  text-align: center;
  color: #8b86b2;
  font-size: 0.9rem;
  margin-top: 40px;
}

.app-footer-links {
  margin-top: 8px;
}

.app-footer-links a {
  color: #4b4491;
  font-weight: 600;
  text-decoration: none;
}

.app-footer-links a:hover {
  text-decoration: underline;
}

.app-footer-links span {
  margin: 0 6px;
  color: #b1abd7;
}

.legal-nav-links {
  gap: 10px;
}

.legal-shell {
  max-width: 920px;
}

.legal-card {
  color: #3c3769;
  line-height: 1.65;
  display: grid;
  gap: 12px;
}

.legal-meta {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b86b2;
}

.legal-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #2a2559;
}

.legal-card h2 {
  margin: 16px 0 0;
  font-size: 1.1rem;
  color: #2a2559;
}

.legal-card p {
  margin: 0;
}

.legal-card ul {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.legal-card a {
  color: #3f38a1;
}

.refund-back-wrap {
  margin: 14px 0 10px;
}

.legal-card a.refund-back-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 28px rgba(63, 56, 161, 0.26);
}

.legal-card a.refund-back-cta:hover {
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
  opacity: 1;
  pointer-events: all;
  background: transparent;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 36, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(15, 12, 36, 0.2);
  border: 1px solid #ecebff;
  display: grid;
  gap: 14px;
}

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

body.onboarding-modal-open {
  overflow: hidden;
}

.series-onboarding-modal-card {
  width: min(92vw, 440px);
  max-height: min(88vh, 520px);
  overflow-y: auto;
  gap: 16px;
}

.series-onboarding-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.series-onboarding-count {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a73a7;
}

.series-onboarding-skip {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #5c58a5;
  cursor: pointer;
}

.series-onboarding-dots {
  display: flex;
  gap: 8px;
}

.series-onboarding-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d8d4f3;
  cursor: pointer;
}

.series-onboarding-dot.is-active {
  background: #4b4491;
}

.series-onboarding-page {
  display: none;
  min-height: 180px;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #e2ddff;
  background: linear-gradient(135deg, #faf8ff 0%, #ffffff 100%);
}

.series-onboarding-page.is-active {
  display: grid;
}

.series-onboarding-page .meta {
  margin: 0;
}

.series-onboarding-page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #2a2559;
}

.series-onboarding-actions {
  justify-content: space-between;
  gap: 10px;
}

.series-onboarding-actions .btn {
  min-width: 104px;
  text-align: center;
}

@media (max-width: 720px) {
  .tiktok-publish-modal-card {
    width: min(96vw, 560px);
    max-height: calc(100vh - 20px);
    padding: 16px;
    gap: 10px;
  }

  .tiktok-publish-preview video {
    max-height: min(26vh, 220px);
  }

  .tiktok-publish-modal-card .modal-actions {
    padding-top: 10px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stepper {
    flex-direction: column;
  }

  .step-pill {
    width: 100%;
  }

  .legal-title {
    font-size: 1.7rem;
  }

  .refund-back-wrap {
    margin: 12px 0 8px;
  }

  .legal-card a.refund-back-cta {
    width: 100%;
  }

  .card-grid.cols-2,
  .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .billing-shared-includes-card {
    padding: 14px;
  }

  .billing-shared-includes-list {
    grid-template-columns: 1fr;
  }

  .style-grid {
    grid-auto-columns: clamp(120px, 40vw, 170px);
    gap: 10px;
  }

  .voice-grid {
    grid-auto-columns: clamp(150px, 40vw, 210px);
    gap: 10px;
  }

  .scene-card {
    grid-template-columns: 1fr;
  }

  .scene-thumb {
    width: 100%;
  }

  .social-success {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "publish"
      "copy";
  }

  .social-success-media {
    max-width: 260px;
    margin: 0 auto;
    width: 100%;
  }

  .social-publish-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .social-publish-actions .btn {
    width: 100%;
    text-align: center;
  }

  .social-copy-actions .btn {
    width: 100%;
    text-align: center;
  }

  .social-schedule-input {
    max-width: none;
  }

  .quick-wait-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-wait-actions .btn {
    width: 100%;
    text-align: center;
  }

  .series-onboarding-modal-card {
    width: min(94vw, 420px);
    max-height: min(86vh, 520px);
    padding: 18px;
    gap: 14px;
  }

  .series-onboarding-page {
    min-height: 0;
    padding: 18px;
  }

  .series-onboarding-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .series-onboarding-actions .btn {
    width: 100%;
  }

  .automation-item {
    flex-direction: column;
  }

  .automation-item-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .automation-item-actions .btn {
    width: 100%;
    text-align: center;
  }

  .automation-form-actions {
    justify-content: stretch;
  }

  .automation-form-actions .btn {
    width: 100%;
  }

  .automation-connect-grid {
    grid-template-columns: 1fr;
  }

  .automation-skeleton-hero {
    padding: 22px;
  }

  .automation-skeleton-title,
  .automation-skeleton-subtitle,
  .automation-skeleton-subtitle-short,
  .automation-skeleton-card-title,
  .automation-skeleton-card-meta {
    width: 100%;
  }

  .automation-skeleton-button,
  .automation-skeleton-button-soft,
  .automation-skeleton-submit {
    width: 100%;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .account-summary {
    width: 100%;
    justify-content: flex-end;
  }

  .billing-confirm-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .billing-checkout-section,
  .billing-checkout-payment,
  .billing-checkout-skeleton-section,
  .billing-checkout-skeleton-payment {
    padding: 14px;
  }

  .billing-confirm-embedded-shell,
  #billing-confirm-embedded-checkout {
    min-height: 360px;
  }

  .billing-embedded-page .billing-confirm-embedded-shell,
  .billing-embedded-page #billing-confirm-embedded-checkout {
    min-height: 0;
  }

  .billing-checkout-skeleton-testimonials {
    grid-template-columns: 1fr;
  }

  .billing-checkout-skeleton-checkout {
    min-height: 260px;
  }

  .billing-confirm-actions .btn {
    width: 100%;
    text-align: center;
  }

  .billing-confirm-actions .btn.primary {
    margin-left: 0;
  }

  .billing-page {
    padding-bottom: 136px;
  }

  .billing-header-proof {
    margin-top: 8px;
    gap: 7px;
  }

  .billing-avatar {
    width: 30px;
    height: 30px;
  }

  .billing-avatar + .billing-avatar {
    margin-left: -14px;
  }

  .billing-proof-copy {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .billing-header-trust li {
    font-size: 0.73rem;
    padding: 4px 9px;
  }

  .billing-offer-countdown-label {
    font-size: 0.9rem;
  }

  .billing-mobile-cta {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 880;
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #ebe8ff;
    box-shadow: 0 10px 20px rgba(26, 20, 64, 0.12);
  }

  .billing-mobile-cta .btn {
    width: 100%;
    text-align: center;
  }

  .billing-testimonials {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 70vw);
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .billing-testimonial {
    scroll-snap-align: start;
  }

  .billing-testimonials::-webkit-scrollbar {
    height: 10px;
  }

  .billing-testimonials::-webkit-scrollbar-thumb {
    background: #d7d4f5;
    border-radius: 999px;
  }

  .billing-confirm-page .app-shell {
    padding: 0 12px;
  }

  .billing-embedded-page .app-shell {
    padding: 0;
  }

  .billing-confirm-page .billing-confirm-card {
    padding: 14px;
  }

  .billing-embedded-card {
    gap: 8px;
    padding: 8px;
  }

  .billing-confirm-page .billing-testimonials {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: minmax(0, 1fr);
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .billing-confirm-page .billing-testimonial {
    scroll-snap-align: none;
  }
}

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

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: min(280px, 80vw);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 950;
    box-shadow: 0 24px 60px rgba(15, 12, 36, 0.2);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 36, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

@media (min-width: 961px) {
  .app-topbar {
    display: none;
  }
}

/* Minimal app refresh */
body.app-page {
  background: var(--app-page-background);
}

body.app-page .navbar {
  border-bottom: none;
  background: var(--app-navbar-bg);
  backdrop-filter: blur(18px);
}

body.app-page .nav-content {
  min-height: 72px;
}

body.app-page .logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.app-page .sidebar-toggle {
  border: 1px solid var(--app-control-border);
  background: var(--app-control-bg);
  color: var(--app-control-text);
  border-radius: 999px;
  min-width: 88px;
  min-height: 40px;
  box-shadow: var(--app-primary-shadow);
}

body.app-page .app-layout {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 20px 36px;
  gap: 20px;
  grid-template-columns: 250px minmax(0, 1fr);
  background: transparent;
}

body.app-page .app-sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 22px 18px;
  border-radius: 26px;
  border: 1px solid var(--app-sidebar-border);
  background: var(--app-sidebar-bg);
  box-shadow: var(--app-sidebar-shadow);
}

body.app-page .app-sidebar .logo,
body.app-page .app-sidebar .logo-text {
  color: var(--app-brand-text);
}

body.app-page .sidebar-nav {
  gap: 8px;
}

body.app-page .sidebar-nav a {
  padding: 11px 12px;
  border-radius: 16px;
  color: var(--app-nav-text);
  border: 1px solid transparent;
}

body.app-page .sidebar-nav a:hover {
  background: var(--app-nav-hover-bg);
}

body.app-page .sidebar-nav a.active {
  border-color: var(--app-nav-active-border);
  background: var(--app-nav-active-bg);
  color: var(--app-nav-active-text);
  transform: none;
}

body.app-page .sidebar-divider {
  background: var(--app-sidebar-border);
}

body.app-page .mode-toggle,
body.app-page .language-toggle,
body.app-page .account-summary {
  border-radius: 16px;
  border: 1px solid var(--app-panel-muted-border);
  background: var(--app-panel-muted-bg);
}

body.app-page .mode-label,
body.app-page .language-toggle-label,
body.app-page .account-label {
  color: var(--app-label-text);
}

body.app-page .mode-switch {
  border-color: var(--app-control-border);
  background: var(--app-control-bg);
}

body.app-page .billing-proof-copy {
  color: var(--app-body-text);
}

body.app-page .billing-header-trust li {
  color: var(--app-trust-chip-text);
}

body.app-page .launch-offer {
  color: var(--app-nav-active-text);
}

body.app-page .mode-switch button {
  color: var(--app-control-muted-text);
}

body.app-page .mode-switch button.is-active {
  background: var(--app-primary-bg);
  color: var(--app-primary-text);
  box-shadow: var(--app-primary-shadow);
}

body.app-page .language-toggle-select {
  border-color: var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-input-text);
}

body.app-page .account-value {
  color: var(--app-title-text);
}

body.app-page .sidebar-action {
  color: var(--app-control-text);
}

body.app-page .sidebar-action:hover {
  background: var(--app-nav-hover-bg);
}

body.app-page .btn {
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.app-page .btn.primary {
  color: var(--app-primary-text);
  background: var(--app-primary-bg);
  box-shadow: var(--app-primary-shadow);
}

body.app-page .btn.outline {
  border: 1px solid var(--app-outline-border);
  background: var(--app-outline-bg);
  color: var(--app-outline-text);
}

body.app-page .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--app-hover-shadow);
}

body.app-page .app-shell {
  max-width: none;
  margin: 0;
  padding: 10px 0 0;
}

body.app-page .app-header {
  margin-bottom: 24px;
  gap: 16px;
}

body.app-page .app-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--app-title-text);
  background: none;
}

body.app-page .app-subtitle {
  margin-top: 10px;
  color: var(--app-body-text);
  line-height: 1.6;
}

body.app-page .app-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--app-card-border);
  background: var(--app-card-bg);
  box-shadow: var(--app-card-shadow);
}

body.app-page .card-grid {
  gap: 18px;
}

body.app-page .field label {
  color: var(--app-title-text);
  font-weight: 600;
}

body.app-page .field input,
body.app-page .field textarea,
body.app-page .field select {
  border-radius: 16px;
  border: 1px solid var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-input-text);
  box-shadow: none;
}

body.app-page .field input:focus,
body.app-page .field textarea:focus,
body.app-page .field select:focus {
  outline: 2px solid var(--app-focus-outline);
  border-color: var(--app-focus-border);
}

body.app-page .stepper-btn {
  border-radius: 14px;
  border-color: var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-title-text);
}

body.app-page .stepper {
  gap: 10px;
  margin-bottom: 24px;
}

body.app-page .step-pill {
  padding: 9px 14px;
  border-radius: 999px;
  border-color: var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-control-muted-text);
}

body.app-page .step-pill.active {
  color: var(--app-nav-active-text);
  border-color: var(--app-nav-active-border);
  background: var(--app-nav-active-bg);
}

body.app-page .status-pill {
  border: 1px solid var(--app-status-border);
  background: var(--app-status-bg);
  color: var(--app-status-text);
}

body.app-page .status-pill.success {
  border-color: var(--app-status-success-border);
  background: var(--app-status-success-bg);
  color: var(--app-status-success-text);
}

body.app-page .status-pill.error {
  border-color: var(--app-status-error-border);
  background: var(--app-status-error-bg);
  color: var(--app-status-error-text);
}

body.app-page .notice {
  border-radius: 18px;
  border-color: var(--app-notice-border);
  background: var(--app-notice-bg);
  color: var(--app-notice-text);
}

body.app-page .notice.notice-offline {
  border-color: var(--app-notice-offline-border);
  background: var(--app-notice-offline-bg);
  color: var(--app-notice-offline-text);
}

body.app-page .billing-stat,
body.app-page .billing-current-card .billing-stat {
  border-radius: 16px;
  border-color: var(--app-stat-border);
  background: var(--app-stat-bg);
}

body.app-page .billing-stat-label,
body.app-page .billing-current-card .billing-stat-label {
  color: var(--app-stat-label-text);
}

body.app-page .billing-stat-value,
body.app-page .billing-current-card .billing-stat-value {
  color: var(--app-stat-value-text);
}

body.app-page .plan-card {
  border-radius: 22px;
}

body.app-page .plan-card.selected,
body.app-page .plan-card.current {
  border-color: var(--app-selected-border);
  box-shadow: var(--app-selected-shadow);
}

body.app-page .empty-state {
  border-radius: 22px;
  border: 1px dashed var(--app-empty-border);
  background: var(--app-empty-bg);
  color: var(--app-empty-text);
}

body.app-page .modal-backdrop {
  background: var(--app-modal-backdrop);
  backdrop-filter: blur(6px);
}

body.app-page .modal-card {
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

body.app-page .series-onboarding-page {
  border-radius: 18px;
  border-color: var(--app-card-border);
  background: var(--app-card-bg);
}

body.app-page .series-onboarding-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--app-title-text);
}

@media (max-width: 960px) {
  body.app-page .app-topbar {
    padding: 16px 20px 0;
  }

  body.app-page .app-layout {
    grid-template-columns: 1fr;
    padding: 16px 20px 28px;
    gap: 16px;
  }

  body.app-page .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: min(300px, 82vw);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 950;
    border-radius: 0 24px 24px 0;
    box-shadow: var(--app-mobile-sidebar-shadow);
  }

  body.app-page .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--app-sidebar-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
  }

  body.sidebar-open.app-page .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open.app-page .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open.app-page {
    overflow: hidden;
  }

  body.app-page .app-shell {
    padding-top: 4px;
  }
}

/* AI SaaS app refresh */
body.app-page {
  font-family: var(--font-body);
  color: var(--app-body-text);
  --app-page-background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 24%),
    linear-gradient(180deg, #07111f 0%, #0f172a 46%, #111827 100%);
  --app-navbar-bg: transparent;
  --app-navbar-shell-bg: rgba(7, 17, 31, 0.72);
  --app-navbar-shell-border: var(--surface-border);
  --app-navbar-shell-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  --app-sidebar-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
  --app-sidebar-border: var(--surface-border);
  --app-sidebar-shadow: 0 20px 44px rgba(2, 6, 23, 0.32);
  --app-brand-text: var(--text-strong);
  --app-nav-text: var(--text-muted);
  --app-nav-hover-bg: rgba(59, 130, 246, 0.08);
  --app-nav-active-border: rgba(59, 130, 246, 0.2);
  --app-nav-active-bg: rgba(59, 130, 246, 0.14);
  --app-nav-active-text: #dbeafe;
  --app-panel-muted-bg: rgba(15, 23, 42, 0.68);
  --app-panel-muted-border: var(--surface-border);
  --app-label-text: var(--text-soft);
  --app-control-bg: var(--surface-glass);
  --app-control-border: var(--surface-border);
  --app-control-text: var(--text-strong);
  --app-control-muted-text: var(--text-muted);
  --app-card-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.86) 0%, rgba(15, 23, 42, 0.74) 100%);
  --app-card-border: var(--surface-border);
  --app-card-shadow: 0 18px 40px rgba(2, 6, 23, 0.26);
  --app-hover-shadow: 0 12px 28px rgba(2, 6, 23, 0.3);
  --app-surface-nested-bg: linear-gradient(180deg, rgba(24, 36, 60, 0.92) 0%, rgba(19, 30, 50, 0.86) 100%);
  --app-surface-nested-border: rgba(148, 163, 184, 0.22);
  --app-surface-nested-shadow: 0 16px 30px rgba(2, 6, 23, 0.22);
  --app-surface-subtle-bg: rgba(20, 32, 54, 0.78);
  --app-surface-subtle-border: rgba(148, 163, 184, 0.18);
  --app-surface-subtle-text: var(--text-muted);
  --app-surface-accent-bg: rgba(99, 102, 241, 0.14);
  --app-surface-accent-border: rgba(129, 140, 248, 0.26);
  --app-surface-accent-text: #c7d2fe;
  --app-surface-success-bg: rgba(34, 197, 94, 0.12);
  --app-surface-success-border: rgba(34, 197, 94, 0.24);
  --app-surface-success-text: #86efac;
  --app-surface-danger-bg: rgba(248, 113, 113, 0.1);
  --app-surface-danger-border: rgba(248, 113, 113, 0.2);
  --app-surface-danger-text: #fca5a5;
  --app-title-text: var(--text-strong);
  --app-body-text: var(--text-muted);
  --app-body-soft-text: var(--text-soft);
  --app-primary-bg: var(--background-gradient);
  --app-primary-text: #fff;
  --app-primary-shadow: 0 16px 34px rgba(59, 130, 246, 0.24);
  --app-outline-bg: rgba(15, 23, 42, 0.58);
  --app-outline-border: var(--surface-border);
  --app-outline-text: var(--text-strong);
  --app-input-bg: rgba(7, 17, 31, 0.72);
  --app-input-border: var(--surface-border);
  --app-input-text: var(--text-muted);
  --app-focus-outline: rgba(59, 130, 246, 0.18);
  --app-focus-border: rgba(59, 130, 246, 0.38);
  --app-status-bg: rgba(59, 130, 246, 0.14);
  --app-status-border: rgba(59, 130, 246, 0.22);
  --app-status-text: #dbeafe;
  --app-status-success-bg: rgba(34, 197, 94, 0.14);
  --app-status-success-border: rgba(34, 197, 94, 0.24);
  --app-status-success-text: #86efac;
  --app-status-error-bg: rgba(248, 113, 113, 0.12);
  --app-status-error-border: rgba(248, 113, 113, 0.22);
  --app-status-error-text: #fecaca;
  --app-notice-bg: rgba(59, 130, 246, 0.1);
  --app-notice-border: rgba(59, 130, 246, 0.18);
  --app-notice-text: #dbeafe;
  --app-notice-offline-bg: rgba(15, 23, 42, 0.72);
  --app-notice-offline-border: var(--surface-border);
  --app-notice-offline-text: var(--text-muted);
  --app-stat-bg: rgba(7, 17, 31, 0.78);
  --app-stat-border: var(--surface-border);
  --app-stat-label-text: var(--text-soft);
  --app-stat-value-text: var(--text-strong);
  --app-empty-bg: rgba(15, 23, 42, 0.52);
  --app-empty-border: rgba(148, 163, 184, 0.24);
  --app-empty-text: var(--text-soft);
  --app-modal-backdrop: rgba(2, 6, 23, 0.58);
  --app-mobile-sidebar-shadow: 0 20px 44px rgba(2, 6, 23, 0.44);
  --app-sidebar-backdrop: rgba(2, 6, 23, 0.5);
  --app-skeleton-shimmer:
    linear-gradient(90deg, rgba(30, 41, 59, 0.96) 0%, rgba(71, 85, 105, 0.72) 50%, rgba(30, 41, 59, 0.96) 100%);
  --app-skeleton-row-bg: rgba(15, 23, 42, 0.72);
  --app-skeleton-row-border: var(--surface-border);
  --app-skeleton-surface: linear-gradient(180deg, rgba(15, 23, 42, 0.84) 0%, rgba(15, 23, 42, 0.72) 100%);
  --app-skeleton-surface-border: var(--surface-border);
  --app-skeleton-hero-bg:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(8, 47, 73, 0.88) 100%);
  --app-skeleton-highlight-surface: linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.84) 100%);
  --app-trust-chip-bg: var(--app-surface-subtle-bg);
  --app-trust-chip-border: var(--app-surface-subtle-border);
  --app-trust-chip-text: var(--app-surface-subtle-text);
  --app-accent-link: #93c5fd;
  --app-avatar-ring: rgba(15, 23, 42, 0.86);
  --app-series-divider: rgba(148, 163, 184, 0.16);
  --app-series-heading: #a5b4fc;
  --app-series-link: #93c5fd;
  --app-series-link-hover: #bfdbfe;
  --app-row-bg: var(--app-surface-nested-bg);
  --app-row-border: var(--app-surface-nested-border);
  --app-row-shadow: none;
  --app-row-title: #dbe4f0;
  --app-row-text: var(--app-body-soft-text);
  --app-series-row-bg: var(--app-row-bg);
  --app-series-row-border: var(--app-row-border);
  --app-series-row-title: var(--app-row-title);
  --app-series-row-text: var(--app-row-text);
  --app-quick-hero-bg:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.84) 100%);
  --app-quick-hero-border: var(--surface-border);
  --app-quick-eyebrow-text: #818cf8;
  --app-quick-heading-text: var(--app-title-text);
  --app-quick-step-badge-bg: rgba(248, 250, 252, 0.96);
  --app-quick-step-badge-border: rgba(129, 140, 248, 0.24);
  --app-quick-step-badge-text: #4338ca;
  --app-quick-step-text: var(--app-body-text);
  --app-series-summary-bg: var(--app-surface-nested-bg);
  --app-series-summary-border: var(--app-surface-nested-border);
  --app-series-summary-title: var(--app-title-text);
  --app-series-summary-meta: var(--app-body-soft-text);
  --app-series-pill-bg: var(--app-surface-accent-bg);
  --app-series-pill-border: var(--app-surface-accent-border);
  --app-series-pill-text: var(--app-surface-accent-text);
  --app-series-outline-text: var(--app-body-text);
  --app-onboarding-heading: var(--app-title-text);
  --app-onboarding-step-bg: rgba(99, 102, 241, 0.14);
  --app-onboarding-step-text: #c7d2fe;
  --app-quick-progress-bg: var(--app-surface-nested-bg);
  --app-quick-progress-border: var(--app-surface-nested-border);
  --app-quick-progress-active-bg: var(--app-surface-accent-bg);
  --app-quick-progress-active-border: var(--app-surface-accent-border);
  --app-quick-progress-complete-bg: var(--app-surface-success-bg);
  --app-quick-progress-complete-border: var(--app-surface-success-border);
  --app-quick-progress-failed-bg: var(--app-surface-danger-bg);
  --app-quick-progress-failed-border: var(--app-surface-danger-border);
  --app-quick-progress-title: var(--app-title-text);
  --app-quick-progress-status: var(--app-body-soft-text);
  --app-quick-progress-status-complete: var(--app-surface-success-text);
  --app-quick-progress-status-failed: var(--app-surface-danger-text);
  --app-quick-wait-bg:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.82) 100%);
  --app-quick-wait-border: rgba(129, 140, 248, 0.2);
  --app-quick-wait-badge-bg: var(--app-surface-subtle-bg);
  --app-quick-wait-badge-border: var(--app-surface-accent-border);
  --app-quick-wait-badge-text: var(--app-surface-accent-text);
  --app-quick-wait-elapsed: var(--app-body-soft-text);
  --app-quick-wait-stage: var(--app-title-text);
  --app-quick-wait-fact: var(--app-body-text);
  --app-quick-wait-tip-border: rgba(129, 140, 248, 0.24);
  --app-quick-wait-tip-border-hover: rgba(147, 197, 253, 0.28);
  --app-quick-wait-tip-text: #c7d2fe;
  --app-quick-wait-tip-text-hover: #e0e7ff;
  --app-scene-plan-card-bg: var(--app-surface-nested-bg);
  --app-scene-plan-card-border: var(--app-surface-nested-border);
  --app-scene-plan-card-shadow: var(--app-surface-nested-shadow);
  --app-scene-plan-title: var(--app-title-text);
  --app-selected-border: rgba(59, 130, 246, 0.24);
  --app-selected-shadow: 0 16px 34px rgba(59, 130, 246, 0.18);
  --app-plan-badge-bg: rgba(34, 197, 94, 0.16);
  --app-plan-badge-text: #86efac;
  --app-error-text: #fca5a5;
  background: var(--app-page-background);
}

body.app-page .navbar {
  border-bottom: none;
  background: transparent;
}

body.app-page .nav-content {
  min-height: 72px;
  padding: 0 18px;
  border: 1px solid var(--app-navbar-shell-border);
  border-radius: 24px;
  background: var(--app-navbar-shell-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--app-navbar-shell-shadow);
}

body.app-page .logo,
body.app-page .logo-text,
body.app-page .field label,
body.app-page .app-title,
body.app-page .account-value,
body.app-page .billing-stat-value,
body.app-page .billing-current-card .billing-stat-value,
body.app-page .automation-item h3,
body.app-page .billing-offer-title,
body.app-page .billing-paypal-title,
body.app-page .legal-title,
body.app-page .legal-card h2,
body.app-page .series-onboarding-page-title,
body.app-page .billing-current-title,
body.app-page .billing-mobile-cta-plan,
body.app-page .plan-output,
body.app-page .plan-price-new {
  color: var(--app-title-text);
}

body.app-page .nav-links a {
  color: var(--app-nav-text);
  border: 1px solid var(--app-outline-border);
  background: var(--app-outline-bg);
  -webkit-text-fill-color: initial;
}

body.app-page .nav-links a:hover {
  color: var(--app-title-text);
  background: var(--app-nav-hover-bg);
}

body.app-page .app-layout {
  padding: 24px 20px 40px;
}

body.app-page .sidebar-nav a,
body.app-page .mode-switch button,
body.app-page .sidebar-action,
body.app-page .billing-proof-copy,
body.app-page .billing-offer-copy,
body.app-page .billing-paypal-copy,
body.app-page .plan-output-meta,
body.app-page .plan-price-credits,
body.app-page .meta,
body.app-page .legal-card,
body.app-page .billing-shared-includes-list li {
  color: var(--app-body-text);
}

body.app-page .sidebar-nav a:hover,
body.app-page .sidebar-action:hover {
  background: var(--app-nav-hover-bg);
  color: var(--app-title-text);
}

body.app-page .sidebar-nav a.active {
  border-color: var(--app-nav-active-border);
  background: var(--app-nav-active-bg);
  color: var(--app-nav-active-text);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

body.app-page .sidebar-divider,
body.app-page .oauth-divider::before,
body.app-page .oauth-divider::after {
  background: var(--app-sidebar-border);
}

body.app-page .mode-toggle,
body.app-page .language-toggle,
body.app-page .account-summary,
body.app-page .billing-header-trust li,
body.app-page .launch-offer {
  border: 1px solid var(--app-trust-chip-border);
  background: var(--app-trust-chip-bg);
}

body.app-page .mode-label,
body.app-page .language-toggle-label,
body.app-page .account-label,
body.app-page .app-subtitle,
body.app-page .billing-stat-label,
body.app-page .billing-current-card .billing-stat-label,
body.app-page .billing-mobile-cta-label,
body.app-page .oauth-divider,
body.app-page .app-footer,
body.app-page .legal-meta,
body.app-page .billing-offer-countdown-label,
body.app-page .billing-offer-note,
body.app-page .billing-proof-copy,
body.app-page .billing-checkout-copy,
body.app-page .billing-shared-includes-meta,
body.app-page .plan-price-old,
body.app-page .plan-price-credits {
  color: var(--app-body-soft-text);
}

body.app-page .billing-proof-copy {
  color: var(--app-body-text);
}

body.app-page .mode-switch {
  border-color: var(--app-control-border);
  background: var(--app-control-bg);
}

body.app-page .mode-switch button.is-active,
body.app-page .btn.primary,
body.app-page .auth-toggle button.active,
body.app-page .legal-card a.refund-back-cta {
  background: var(--app-primary-bg);
  color: var(--app-primary-text);
  box-shadow: var(--app-primary-shadow);
}

body.app-page .language-toggle-select,
body.app-page .field input,
body.app-page .field textarea,
body.app-page .field select,
body.app-page .stepper-btn,
body.app-page .btn.google,
body.app-page .auth-toggle button {
  border-color: var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-input-text);
}

body.app-page .field input:focus,
body.app-page .field textarea:focus,
body.app-page .field select:focus {
  outline: 2px solid var(--app-focus-outline);
  border-color: var(--app-focus-border);
}

body.app-page .btn.outline {
  border: 1px solid var(--app-outline-border);
  background: var(--app-outline-bg);
  color: var(--app-outline-text);
}

body.app-page .btn:hover {
  box-shadow: var(--app-hover-shadow);
}

body.app-page .app-card,
body.app-page .billing-shared-includes-card,
body.app-page .modal-card,
body.app-page .series-onboarding-page {
  background: var(--app-card-bg);
  border-color: var(--app-card-border);
  box-shadow: var(--app-card-shadow);
}

body.app-page .billing-checkout-skeleton-section,
body.app-page .billing-checkout-skeleton-payment {
  background: var(--app-skeleton-surface);
  border-color: var(--app-skeleton-surface-border);
  box-shadow: var(--app-card-shadow);
}

body.app-page .billing-shared-includes summary,
body.app-page .billing-offer-countdown-label strong,
body.app-page .billing-mobile-cta-plan,
body.app-page .automation-account-option,
body.app-page .billing-shared-includes-meta a,
body.app-page .legal-card a,
body.app-page .app-footer-links a,
body.app-page .billing-embedded-back-link {
  color: var(--app-accent-link);
}

body.app-page .series-card h3 {
  color: var(--app-title-text);
}

body.app-page .quick-hero {
  background: var(--app-quick-hero-bg);
  border-color: var(--app-quick-hero-border);
}

body.app-page .series-summary-card h3 {
  margin: 0;
  color: var(--app-series-summary-title);
}

body.app-page .series-summary-card .meta {
  color: var(--app-series-summary-meta);
}

body.app-page .series-pill {
  color: var(--app-series-pill-text);
  background: var(--app-series-pill-bg);
  border-color: var(--app-series-pill-border);
}

body.app-page .episode-list-header h4 {
  color: var(--app-series-heading);
}

body.app-page .episode-view-all {
  color: var(--app-series-link);
}

body.app-page .episode-view-all:hover {
  color: var(--app-series-link-hover);
}

body.app-page .episode-list {
  border-top-color: var(--app-series-divider);
}

body.app-page .episode-row {
  background: var(--app-row-bg);
  border-color: var(--app-row-border);
  box-shadow: var(--app-row-shadow);
}

body.app-page .automation-item {
  background: var(--app-row-bg);
  border-color: var(--app-row-border);
  box-shadow: var(--app-row-shadow);
}

body.app-page .episode-row-title {
  color: var(--app-row-title);
}

body.app-page .automation-item h3 {
  color: var(--app-row-title);
}

body.app-page .episode-row .meta,
body.app-page .episode-list-meta .meta,
body.app-page .automation-item .meta {
  color: var(--app-row-text);
}

body.app-page .billing-shared-includes-list li::before,
body.app-page .billing-trust-icon,
body.app-page .billing-stars {
  color: var(--accent-color);
}

body.app-page .series-onboarding-dot.is-active {
  background: var(--accent-color);
}

body.app-page .legal-card a.refund-back-cta {
  color: var(--app-primary-text);
}

body.app-page .plan-card.selected,
body.app-page .plan-card.current {
  border-color: var(--app-selected-border);
  box-shadow: var(--app-selected-shadow);
}

body.app-page .step-pill {
  border-color: var(--app-input-border);
  background: var(--app-input-bg);
  color: var(--app-input-text);
}

body.app-page .step-pill.active,
body.app-page .status-pill {
  border-color: var(--app-status-border);
  background: var(--app-status-bg);
  color: var(--app-status-text);
}

body.app-page .status-pill.success {
  border-color: var(--app-status-success-border);
  background: var(--app-status-success-bg);
  color: var(--app-status-success-text);
}

body.app-page .status-pill.error {
  border-color: var(--app-status-error-border);
  background: var(--app-status-error-bg);
  color: var(--app-status-error-text);
}

body.app-page .notice {
  border-color: var(--app-notice-border);
  background: var(--app-notice-bg);
  color: var(--app-notice-text);
}

body.app-page .notice.notice-offline {
  border-color: var(--app-notice-offline-border);
  background: var(--app-notice-offline-bg);
  color: var(--app-notice-offline-text);
}

body.app-page .empty-state {
  border: 1px dashed var(--app-empty-border);
  background: var(--app-empty-bg);
  color: var(--app-empty-text);
}

body.app-page .modal-backdrop {
  background: var(--app-modal-backdrop);
}

body.app-page .series-onboarding-dot {
  background: var(--app-muted-dot);
}

body.app-page .plan-badge {
  background: var(--app-plan-badge-bg);
  color: var(--app-plan-badge-text);
}

body.app-page .automation-error {
  color: var(--app-error-text);
}

@media (max-width: 960px) {
  body.app-page .nav-content {
    border-radius: 20px;
  }

  body.app-page .app-sidebar {
    border-radius: 0 24px 24px 0;
    box-shadow: var(--app-mobile-sidebar-shadow);
  }

  body.app-page .sidebar-backdrop {
    background: var(--app-sidebar-backdrop);
  }
}

/* Auth page layout reset */
body.auth-page .app-shell {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

body.auth-page .app-header {
  justify-content: flex-start;
  margin-bottom: 24px;
}

body.auth-page .app-header > * {
  max-width: 32rem;
}

body.auth-page .app-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: var(--background-gradient);
  -webkit-background-clip: text;
  color: transparent;
}

body.auth-page .app-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

body.auth-page .nav-links {
  gap: 10px;
}

body.auth-page .nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

body.auth-page .nav-links .ghost {
  color: var(--text-strong);
  border: 1px solid var(--surface-border);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

body.auth-page .nav-links .ghost:hover,
body.auth-page .nav-links .ghost:focus-visible {
  border-color: rgba(59, 130, 246, 0.26);
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-strong);
}

body.auth-page .nav-links .language-toggle.compact {
  display: inline-flex;
  align-items: center;
}

body.auth-page .nav-links .language-toggle-select {
  min-height: 42px;
  padding: 0 40px 0 14px;
  border-radius: 999px;
}

@media (max-width: 720px) {
  body.auth-page .nav-content {
    align-items: flex-start;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  body.auth-page .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  body.auth-page .app-shell {
    margin-top: 28px;
  }

  body.auth-page .app-title {
    font-size: clamp(1.9rem, 9vw, 2.35rem);
  }
}
