/* ═══════════════════════════════════════════
   APP.CSS — AI Studio Complete Component Library
   ═══════════════════════════════════════════ */

/* ── Layout Shell ───────────────────────── */
.portal-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

/* ── Header ─────────────────────────────── */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-brand svg { flex-shrink: 0; }

.portal-brand svg {
  color: var(--accent);
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}

.portal-link:hover { color: #fff; }

/* Status Badges */
.credit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 20px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill--active {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
}

.engine-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.engine-status-badge.connected {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--success);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Auth Nav Dock ───────────────────────── */
.unauth-nav-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.unauth-nav-dock .btn {
  padding: 10px 22px;
  min-height: 40px;
  border-radius: 100px;
  font-size: 13.5px;
  line-height: 1.25;
}

.unauth-nav-dock .btn-ghost {
  background: transparent;
  border-color: transparent;
}

.unauth-nav-dock .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}

.auth-nav-dock {
  display: flex;
  align-items: center;
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-nav-dock:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255,255,255,0.05);
}

.auth-dock-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.auth-dock-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Credits */
.auth-dock-item.credit-item {
  cursor: default;
  color: var(--gold);
}
.auth-dock-item.credit-item:hover {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
}

/* Status */
.auth-dock-item.status-pill {
  cursor: default;
  padding: 8px 12px;
}
.auth-dock-item.status-pill--active {
  color: var(--success);
}
.auth-dock-item.status-pill--active:hover {
  background: rgba(16, 185, 129, 0.1);
}

/* Upgrade */
.dock-btn-upgrade {
  color: #fff;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.dock-btn-upgrade:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* Danger / Sign out */
.dock-btn-danger {
  padding: 8px 12px;
}
.dock-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

/* For smooth icons */
.auth-dock-item svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-dock-item:hover svg {
  transform: scale(1.1);
}

/* ── Avatar Dropdown Menu ────────────────── */
.avatar-menu {
  position: relative;
}

.avatar-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-menu-btn:hover,
.avatar-menu.open .avatar-menu-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.avatar-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-menu.open .avatar-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.avatar-menu-item.status-pill {
  cursor: default;
}

.avatar-menu-btn-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-menu-btn-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.avatar-menu-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.avatar-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 2px;
}

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--card-border);
  color: var(--text-secondary);
  font-size: 13px;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-full { width: 100%; }

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 12px;
}

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

.btn-social {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Generate Button */
.btn-generate {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
  letter-spacing: 0.01em;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.4);
}

.generate-btn--locked {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--card-border) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.generate-btn--locked:hover {
  transform: none !important;
}

/* ── Hero ───────────────────────────────── */
.portal-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100svh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  text-align: center;
  padding: 40px 20px 28px;
  overflow: hidden;
}

.portal-hero__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.portal-hero__cta {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.use-for-free-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.use-for-free-btn:hover {
  color: #fff;
}

.use-for-free-btn svg {
  margin-top: 4px;
  color: #fbbf24;
}

.hero-compact__text {
  max-width: 820px;
  margin: 0 auto;
  flex-shrink: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 13px;
  margin-bottom: 18px;
  background: rgba(144, 238, 144, 0.1);
  border: 1px solid rgba(144, 238, 144, 0.16);
  border-radius: 999px;
  color: #90ee90;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-compact__title {
  max-width: 760px;
  margin: 0 auto 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(30px, 8.5vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: break-word;
}

#heroAnimatedWord {
  display: inline-block;
  min-width: 0;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(90deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stationary-3d-text {
  display: inline-block;
  margin-top: 4px;
  padding-bottom: 8px;
  text-shadow: 0px 5px 15px rgba(167, 139, 250, 0.4);
}

.animated-3d-text {
  display: inline-block;
  margin-top: 4px;
  padding-bottom: 8px;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: float-3d 6s ease-in-out infinite alternate;
}

@keyframes float-3d {
  0% {
    transform: perspective(1000px) rotateX(10deg) rotateY(-5deg) translateZ(10px);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3), 0px 5px 15px rgba(167, 139, 250, 0.4);
  }
  50% {
    transform: perspective(1000px) rotateX(-5deg) rotateY(5deg) translateZ(25px);
    text-shadow: -2px 4px 5px rgba(0,0,0,0.3), 0px 10px 25px rgba(244, 114, 182, 0.6);
  }
  100% {
    transform: perspective(1000px) rotateX(5deg) rotateY(10deg) translateZ(15px);
    text-shadow: 3px -2px 5px rgba(0,0,0,0.3), -5px 5px 20px rgba(167, 139, 250, 0.5);
  }
}

.animated-3d-text-premium {
  display: inline-block;
  margin-top: 4px;
  padding-bottom: 8px;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: float-3d-premium 6s ease-in-out infinite alternate;
}

@keyframes float-3d-premium {
  0% {
    transform: perspective(1000px) rotateX(10deg) rotateY(-5deg) translateZ(10px);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3), 0px 5px 15px rgba(251, 191, 36, 0.4);
  }
  50% {
    transform: perspective(1000px) rotateX(-5deg) rotateY(5deg) translateZ(25px);
    text-shadow: -2px 4px 5px rgba(0,0,0,0.3), 0px 10px 25px rgba(245, 158, 11, 0.6);
  }
  100% {
    transform: perspective(1000px) rotateX(5deg) rotateY(10deg) translateZ(15px);
    text-shadow: 3px -2px 5px rgba(0,0,0,0.3), -5px 5px 20px rgba(251, 191, 36, 0.5);
  }
}

.hero-compact__sub {
  max-width: 650px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.65;
}

.demo-carousel {
  display: flex;
  gap: 16px;
  max-width: min(720px, 100%);
  margin: 0 auto;
  flex-shrink: 1;
  min-height: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 10px;
}

.demo-carousel::-webkit-scrollbar {
  display: none;
}

.demo-vid-card {
  position: relative;
  flex: 0 0 150px;
  scroll-snap-align: start;
  aspect-ratio: 9 / 16;
  min-height: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.demo-vid-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-vid-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.demo-vid-card:hover .demo-vid-label {
  opacity: 1;
}

/* ── Main Layout ─────────────────────────── */
.portal-main {
  flex: 0 0 auto;
  padding: 16px 32px 32px;
  overflow-x: hidden;
  scroll-margin-top: var(--header-height);
  min-height: calc(100svh - var(--header-height));
}

.portal-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Config Sidebar ──────────────────────── */
.config-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps-split-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 16px;
  align-items: start;
}

/* Config Cards */
.config-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 17, 23, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  transition: border-color 0.2s, background-color 0.2s;
  min-width: 0;
}

.config-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.config-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.config-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.config-card__scroll-area {
  flex: 1;
  overflow: visible;
  padding-right: 4px;
}

.industry-pill-scroll {
  padding-right: 4px;
  margin-bottom: 12px;
  overflow: visible;
}

.optional-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* Generate CTA block */
.generate-cta {
  background: var(--bg-surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  max-height: 250px;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s;
}

.generate-cta.hidden-cta,
.generate-cta.step-locked {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  margin-top: 0;
  margin-bottom: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0.35s;
}

.generate-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* Step 5 spans full width */
.step-5-card {
  /* no grid-column needed — lives in flex column */
}
.step-5-content {
  display: flex;
  gap: 16px;
  flex: 1;
}
.step-5-content .setting-group {
  flex: 1;
  margin-top: 0 !important;
}

/* ── Preset Tiles (Voiceover Style) ──────── */
.preset-grid {
  display: flex;
  overflow-x: auto;
  overflow-y: visible;
  gap: 8px;
  padding-top: 4px;
  margin-top: -16px;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.preset-grid::-webkit-scrollbar {
  display: none;
}

.preset-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  flex: 0 0 160px;
  aspect-ratio: 1 / 1;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  margin-top: 12px;
}

.preset-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.preset-card:active {
  transform: scale(0.97) !important;
}

.preset-card.preset-card--active,
.preset-card.preset-card--active:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(139, 92, 246, 0.3);
}

.preset-card__preview {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.preset-card__preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.preset-card--active .preset-card__preview video,
.preset-card:hover .preset-card__preview video,
.preset-card--active .preset-card__preview img,
.preset-card:hover .preset-card__preview img {
  opacity: 1;
  transform: scale(1.06);
}

.preset-play-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  opacity: 0.65;
  transform: scale(0.95);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  pointer-events: auto;
}

.preset-card:hover .preset-play-btn,
.preset-card--audio-active .preset-play-btn {
  opacity: 1;
  transform: scale(1);
}

.preset-play-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.preset-card--audio-active .preset-play-btn {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.preset-card__content {
  position: relative;
  z-index: 2;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
  width: 100%;
  pointer-events: none;
}

.preset-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.preset-card__sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.preset-card--active .preset-card__name {
  color: #c4b5fd;
}

/* ── Industry Category Carousel ─────────────── */
.carousel-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
  padding-top: 2px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.cat-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding-right: 16px;
}

.cat-pills > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.ind-cat-pill {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.ind-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ind-cat-pill:active {
  transform: scale(0.95);
}

.ind-cat-pill--active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

/* Industry Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 0;
}

.ind-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.ind-tile:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: translateY(-1px);
}

.ind-tile:active {
  transform: scale(0.96) !important;
}

.ind-tile--active {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

.ind-tile__icon {
  font-size: 18px;
  line-height: 1;
}

.ind-tile__name {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Chip / Suggestion Row ───────────────── */
/* Legacy chip classes preserved if needed elsewhere */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chip {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.chip:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: #c4b5fd;
}

.chip:active {
  transform: scale(0.95);
}

/* ── Industry Pill Grid ─────────────────── */
.pill-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 4px 0;
}

/* When a cloud has an active item, dim the inactive ones slightly */
.pill-cloud.has-active .industry-pill:not(.active) {
  opacity: 0.5;
  filter: brightness(0.85) saturate(0.8);
}

.pill-cloud.has-active .industry-pill:not(.active):hover {
  opacity: 0.8;
  filter: brightness(1) saturate(1);
}

.industry-pill {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0 16px 0 8px;
  border-radius: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.industry-pill .ind-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html[data-theme='light'] .industry-pill .ind-icon {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.industry-pill:hover .ind-icon {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15) rotate(5deg);
}

html[data-theme='light'] .industry-pill:hover .ind-icon {
  background: #eef2ff;
}

.industry-pill .app-choice-label {
  flex: 0 0 auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  overflow: visible;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  min-height: 0 !important;
  height: auto;
  padding: 0;
  margin: 0;
}

html[data-theme='light'] .industry-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.industry-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme='light'] .industry-pill:hover {
  background: #f8fafc;
  border-color: #a78bfa;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.1), 0 2px 4px rgba(0,0,0,0.02);
}

.industry-pill:active {
  transform: scale(0.97);
}

.industry-pill.active {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.08));
  border-color: rgba(167, 139, 250, 0.85);
  color: #fff;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

html[data-theme='light'] .industry-pill.active {
  background: #f3e8ff;
  border-color: #8b5cf6;
  color: #6d28d9;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.18), inset 0 0 0 1px rgba(139, 92, 246, 0.05);
}

.industry-pill.active .app-choice-label {
  font-weight: 600;
}

.industry-pill.active .ind-icon {
  transform: scale(1.15) rotate(-5deg);
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

html[data-theme='light'] .industry-pill.active .ind-icon {
  background: #e9d5ff;
  border-color: #c084fc;
}
.tags-input-container {
  margin-top: 10px;
}

.tags-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tags-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.tags-count.limit-reached {
  color: var(--danger);
}

.tags-input-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 48px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: text;
  transition: all 0.2s;
  align-items: center;
}

.tags-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.tag-input-field {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}

.tag-input-field::placeholder {
  color: var(--text-muted);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag.product-tag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  width: 100%;
}

.tag.product-tag-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.product-tag-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.product-tag-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.tag-remove {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  font-size: 11px;
  gap: 4px;
}

.tag-remove:hover {
  color: #ef4444;
}

.product-tag-image-zone {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  color: var(--text-muted);
}

.product-tag-image-zone:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.product-tag-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Minimal Suggestions ─────────────────── */
.suggestions-wrapper {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestions-wrapper.workspace-step {
  overflow: visible;
}

.suggestions-wrapper.suggestions-hidden {
  display: none;
}

.suggestions-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding-bottom: 4px;
}

.suggestion-chip {
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  white-space: nowrap;
  opacity: 1;
  animation: suggestion-chip-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.suggestion-chip:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
  color: #fff;
}

.suggestion-chip--added {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.suggestion-chip--added:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes suggestion-chip-enter {
  from { transform: translateY(8px); }
  to { transform: translateY(0); }
}

.suggestion-chip:nth-child(1) { animation-delay: 0s; }
.suggestion-chip:nth-child(2) { animation-delay: 0.02s; }
.suggestion-chip:nth-child(3) { animation-delay: 0.04s; }
.suggestion-chip:nth-child(4) { animation-delay: 0.06s; }
.suggestion-chip:nth-child(5) { animation-delay: 0.08s; }
.suggestion-chip:nth-child(6) { animation-delay: 0.1s; }
.suggestion-chip:nth-child(7) { animation-delay: 0.12s; }
.suggestion-chip:nth-child(8) { animation-delay: 0.14s; }
.suggestion-chip:nth-child(9) { animation-delay: 0.16s; }
.suggestion-chip:nth-child(10) { animation-delay: 0.18s; }
.suggestion-chip:nth-child(11) { animation-delay: 0.2s; }
.suggestion-chip:nth-child(12) { animation-delay: 0.22s; }

/* Animations for Tags and Suggestions */
.tags-list .tag {
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Animations for dynamically created and selected industry pills */
@keyframes newPillAppear {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(10px);
    background: rgba(139, 92, 246, 0.4);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  }
  50% {
    transform: scale(1.08) translateY(-2px);
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
  }
}

.industry-pill.newly-added {
  animation: newPillAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes pillHighlight {
  0%, 100% {
    transform: scale(1);
    box-shadow: none;
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    border-color: var(--accent);
  }
}

.industry-pill.highlighted {
  animation: pillHighlight 0.6s ease-in-out;
}

/* ── Form Elements ───────────────────────── */
.form-input, .portal-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus, .portal-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder, .portal-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: none;
  height: 80px;
  min-height: unset;
  max-height: 120px;
  line-height: 1.5;
}

/* ── Upload Zone ──────────────────────────── */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  flex: 1;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: #c4b5fd;
}

.upload-zone svg { color: var(--text-muted); }
.upload-zone:hover svg { color: var(--accent); }

.upload-zone__hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Reference image preview */
.ref-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.ref-preview__img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.ref-hints { display: flex; flex-direction: column; gap: 4px; width: 100%; }

.ref-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
}

.ref-hint--good { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.ref-hint--warn { background: rgba(251, 191, 36, 0.1); color: #fbbf24; }
.ref-hint--bad  { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* ── Output Option Buttons ───────────────── */
.setting-group { }
.setting-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.option-row {
  display: flex;
  gap: 8px;
}

.option-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.option-btn:active {
  transform: scale(0.96);
}

.option-btn.option-btn--active,
.option-btn.option-btn--active:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.option-btn__main { font-size: 14px; font-weight: 700; }
.option-btn__sub  { font-size: 10px; font-weight: 500; color: inherit; opacity: 0.7; }

/* ── Shared Labels ───────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.meta-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Main Panel / Results Area ───────────── */
.main-panel {
  background: var(--bg-surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.main-panel.is-dormant {
  display: none;
}

.main-panel:not(.is-dormant) {
  justify-content: flex-start;
  align-items: stretch;
  scroll-margin-top: calc(var(--header-height, 64px) + 16px);
  min-height: calc(100svh - var(--header-height) - 32px);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  max-width: 520px;
}

.empty-state__icon {
  width: 80px;
  height: 80px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--text-muted);
}

.empty-state__title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.empty-state__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.empty-state__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-secondary);
}

.flow-step__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Result cards (dynamically inserted by script.js) */
#resultsArea {
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
}

.skeleton-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.result-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Showcase result cards — video-first layout */
.result-card--showcase {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
}

.result-card__glow {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(251, 191, 36, 0.2), rgba(99, 102, 241, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.result-card__inner {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(12px);
}

.result-card--showcase:hover .result-card__glow {
  opacity: 1;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(251, 191, 36, 0.35), rgba(99, 102, 241, 0.5));
  transition: opacity 0.3s ease;
}

.result-card__header-main {
  flex: 1;
  min-width: 0;
}

/* Persona badges */
.persona-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.persona-badge__icon {
  font-size: 14px;
  line-height: 1;
}

.persona-badge__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.persona-badge__name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.persona-badge__sub {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}

.persona-badge--standard {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

.persona-badge--rage-bait {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.persona-badge--educational {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

.persona-badge--storytime {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.28);
  color: #fdba74;
}

.persona-badge--motivational {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
}

/* Showcase grid — video hero + side panel */
.prod-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.prod-showcase-video-card {
  --max-video-height: 480px;
}

.prod-showcase-video-card,
.prod-showcase-character,
.prod-showcase-script {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prod-video-frame,
.prod-character-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prod-character-frame {
  aspect-ratio: 3 / 4;
}

.prod-character-frame--ready {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.12);
}

.prod-video-frame .prod-video-wrap--hero {
  width: 100%;
  height: 100%;
}

.prod-video-frame .prod-video-pending--hero {
  width: 100%;
  min-height: 280px;
}

.prod-video-frame .prod-video--hero {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.prod-showcase-video-card .prod-vid-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.prod-showcase-video__skeleton {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 0;
}

.prod-showcase-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.prod-character-frame .prod-character-img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: top;
}

.prod-dl-btn--primary {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

.prod-dl-btn--primary:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.5);
}

.prod-video-pending--hero {
  min-height: 100%;
  border-radius: 0;
  border: none;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.08) 0%, rgba(0, 0, 0, 0.4) 70%);
}

.prod-video-pending--muted {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.35) 70%);
}

.prod-video-pending--muted .prod-pending-text {
  color: var(--text-muted);
}

.prod-video-pending--error {
  background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.08) 0%, rgba(0, 0, 0, 0.35) 70%);
}

.prod-video-pending--error .prod-pending-text {
  color: #ef4444;
}

.prod-pending-ring {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-pending-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.15);
  animation: pending-pulse 2s ease-in-out infinite;
}

@keyframes pending-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.2; }
}

.prod-pending-icon {
  font-size: 24px;
  line-height: 1;
}

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

.result-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.result-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.result-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-accent {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.tag-gold {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.tag-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.prod-media-grid {
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 14px;
  margin-top: 10px;
  align-items: start;
}

.prod-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.prod-character-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  display: block;
}

.prod-video {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 0;
  background: #000;
  display: block;
}

.prod-video-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

/* Gradient overlay bar at top of video */
.prod-video-overlays {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 7px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.prod-vid-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.prod-vid-badge--ready {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  box-shadow: 0 0 8px rgba(16,185,129,0.4);
}

.prod-vid-badge--rendering {
  background: rgba(251, 191, 36, 0.85);
  color: #000;
}

.prod-vid-fullscreen {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  border-radius: 5px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.prod-vid-fullscreen:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Below-video controls row */
.prod-vid-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 4px;
}

.prod-vid-loop-tag {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.prod-vid-mute-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.prod-vid-mute-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Compact download button for media columns */
.prod-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  width: 100%;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  justify-content: center;
}
.prod-dl-btn:hover { background: rgba(255,255,255,0.09); color: #fff; border-color: rgba(255,255,255,0.2); }

/* Pending state — compact & centered */
.prod-video-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 10px;
  min-height: 150px;
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 12px;
  text-align: center;
}

.prod-pending-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(251,191,36,0.2);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spin-render 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin-render {
  to { transform: rotate(360deg); }
}

.prod-pending-text {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
}

.prod-pending-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* Details column (3rd column) */
.prod-details-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.prod-script-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  flex: 1;
}

.prod-script-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
}

.prod-script-meta-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 2px 8px;
  border-radius: 20px;
}

.prod-script-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}

.copy-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Debug Prompts Panel */
.debug-prompts-panel {
  margin-top: 16px;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

.debug-prompts-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.debug-chevron { transition: transform 0.2s; }
details[open] .debug-chevron { transform: rotate(180deg); }

.debug-prompts-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }

.debug-prompt-block {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--card-border);
}

.debug-prompt-block--image { border-color: rgba(139, 92, 246, 0.2); }
.debug-prompt-block--video { border-color: rgba(251, 191, 36, 0.2); }

.debug-prompt-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.debug-prompt-text {
  font-family: monospace;
  font-size: 12px;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  margin: 0;
}

/* Action row on cards */
.result-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
}

/* Star rating */
.star-rating { display: flex; gap: 2px; }
.star {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  padding: 0;
}
.star svg { width: 16px; height: 16px; }
.star--active { color: var(--gold); }
.star:hover { color: var(--gold); }

/* Regen button */
.regen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.regen-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Skeleton Loading */
.skeleton-card { opacity: 0.7; }

.skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-box {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

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

/* Skeleton card live header */
.skel-header {
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.skel-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.skel-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.skel-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 6px #6366f1;
  animation: pulse-dot 1.5s infinite;
  flex-shrink: 0;
}

.skel-status-dot--success {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.skel-status-dot--error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: none;
}

/* Submitted confirmation banner inside skeleton card */
.skel-submitted-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 8px;
  font-size: 12px;
  color: #4ade80;
  animation: fadein-banner 0.4s ease both;
}

@keyframes fadein-banner {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.skel-timer {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.skel-item-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.skel-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skel-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #a78bfa, #6366f1);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  width: 14%;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.skel-progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.skel-progress-steps span {
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.48;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.skel-progress-steps span.is-active {
  color: #c4b5fd;
  opacity: 1;
}

.skel-progress-steps span.is-complete {
  color: #4ade80;
  opacity: 0.9;
}

@keyframes skel-progress-fill {
  0%   { width: 2%;  }
  20%  { width: 30%; }
  50%  { width: 60%; }
  75%  { width: 76%; }
  100% { width: 88%; }
}

/* Spinner */
.spinner {
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Live Log Panel */
.live-log-panel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.live-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
}

.live-log-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-dot 1.5s infinite;
  display: inline-block;
}

.live-log-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.live-log-entries {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.log-entry--done   { color: #86efac; }
.log-entry--error  { color: #fca5a5; }
.log-entry--warn   { color: #fcd34d; }
.log-entry--running { color: var(--text-secondary); }

.log-icon { flex-shrink: 0; }
.log-msg  { word-break: break-word; }

/* ── Modals ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* A closed overlay is a full-viewport fixed layer at z-index:1000. Even with
   pointer-events:none on the overlay, descendants like .pricing-view--active
   re-enable pointer-events and silently intercept clicks meant for the page
   underneath (e.g. the suggestion chips). Force every descendant of a closed
   overlay to ignore pointer events so it never steals clicks. */
.modal-overlay:not(.active),
.modal-overlay:not(.active) * {
  pointer-events: none !important;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
  transform: translateY(24px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
  z-index: 1;
}

.modal-tabs-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--bg-surface-elevated);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.modal-tab {
  flex: 1;
  padding: 9px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-tab--active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.auth-content-transition,
.pricing-content-transition {
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.auth-content-transition.fade-out,
.pricing-content-transition.fade-out {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* ── Auth success modal ───────────────────── */
.auth-success-modal {
  z-index: 1100;
}

.auth-success-modal .modal-box {
  max-width: 380px;
  padding: 40px 32px 28px;
  text-align: center;
  overflow: hidden;
}

.auth-success-box {
  position: relative;
}

.auth-success-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(ellipse 90% 70% at 50% 0%, rgba(16, 185, 129, 0.22), transparent 65%);
  pointer-events: none;
  opacity: 0;
}

.auth-success-modal.active .auth-success-glow {
  animation: authSuccessGlowIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes authSuccessGlowIn {
  to { opacity: 1; }
}

.auth-success-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  opacity: 0;
  transform: scale(0.6);
}

.auth-success-modal.active .auth-success-icon {
  animation: authSuccessIconIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes authSuccessIconIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.auth-success-check {
  display: block;
}

.auth-success-circle {
  stroke: rgba(16, 185, 129, 0.25);
  stroke-width: 2;
}

.auth-success-check-path {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.auth-success-modal.active .auth-success-check-path {
  animation: authSuccessCheckDraw 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

@keyframes authSuccessCheckDraw {
  to { stroke-dashoffset: 0; }
}

.auth-success-title {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(8px);
}

.auth-success-desc {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
}

.auth-success-modal.active .auth-success-title {
  animation: authSuccessTextIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.auth-success-modal.active .auth-success-desc {
  animation: authSuccessTextIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
}

@keyframes authSuccessTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-success-progress {
  position: relative;
  z-index: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
}

.auth-success-modal.active .auth-success-progress {
  animation: authSuccessTextIn 0.3s ease 0.75s forwards;
}

.auth-success-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--success), #34d399);
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(1);
}

.auth-success-modal.active .auth-success-progress-bar {
  animation: authSuccessProgress 2.8s linear 0.85s forwards;
}

@keyframes authSuccessProgress {
  to { transform: scaleX(0); }
}

.auth-success-modal.closing {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.auth-success-modal.closing .modal-box {
  transform: translateY(-12px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.auth-success-modal.active .modal-box {
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .auth-success-modal.active .auth-success-icon,
  .auth-success-modal.active .auth-success-check-path,
  .auth-success-modal.active .auth-success-title,
  .auth-success-modal.active .auth-success-desc,
  .auth-success-modal.active .auth-success-progress,
  .auth-success-modal.active .auth-success-glow,
  .auth-success-modal.active .auth-success-progress-bar {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ── Pricing view transitions ─────────────── */
.pricing-content-wrapper {
  position: relative;
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.pricing-view {
  width: 100%;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.4s;
}

.pricing-view:not(.pricing-view--active) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
}

.pricing-view--active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pricing-view--entering {
  animation: pricingViewEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pricingViewEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Billing toggle (subscriptions only) ─── */
.billing-toggle-wrap {
  overflow: hidden;
  max-height: 48px;
  opacity: 1;
  margin-top: 20px;
  transition:
    max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.billing-toggle-wrap--hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

/* ── Animated price values ───────────────── */
.price-amount,
.price-billed {
  display: inline-block;
  transition:
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-amount.price-updating,
.price-billed.price-updating {
  opacity: 0;
  transform: translateY(-6px);
}

.price-amount.price-updated,
.price-billed.price-updated {
  animation: priceReveal 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.pricing-card--price-shift {
  animation: cardPriceShift 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardPriceShift {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* Floating Label Inputs */
.float-field {
  position: relative;
  margin-bottom: 16px;
}

.float-input {
  width: 100%;
  padding: 22px 16px 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.float-input:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.float-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.float-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.float-input:focus ~ .float-label,
.float-input:not(:placeholder-shown) ~ .float-label {
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Social Buttons */
.social-btns { display: flex; flex-direction: column; gap: 10px; }

/* ── Billing Toggle ──────────────────────── */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.billing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.billing-label--active { color: #fff; }

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle-switch input:checked ~ .toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

.save-badge {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 4px;
  font-weight: 700;
}

/* ── Step 1: Format & Goal ───────────────── */


/* ── Pricing Grid ─────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: end;
}

.pricing-card {
  background: rgba(15, 17, 23, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, background-color 0.2s, box-shadow 0.35s ease;
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.pricing-card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.pricing-card-slot .pricing-card {
  width: 100%;
}

.pricing-card--featured {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.06);
}

.pricing-card__badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.pricing-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.pricing-card__price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 20px;
}

.pricing-card__period {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.launch-banner {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  animation: pulse-dot 2s infinite;
}

.risk-reversal-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  margin-bottom: -4px;
}

.cost-callout {
  color: #10b981;
  font-weight: 700;
}

.pricing-features {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.check-icon {
  width: 16px;
  height: 16px;
  stroke: var(--success);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* ── History Grid ─────────────────────────── */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-grid::-webkit-scrollbar { width: 4px; }
.history-grid::-webkit-scrollbar-track { background: transparent; }
.history-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* ── Toast ────────────────────────────────── */
#toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  cursor: pointer;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }

/* ── Batch Stats ─────────────────────────── */
.batch-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.batch-stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.batch-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ── Fade-in animation ───────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
}

.fade-up.visible {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-delay-100 { animation-delay: 100ms; }
.reveal-delay-200 { animation-delay: 200ms; }
.reveal-delay-300 { animation-delay: 300ms; }
.reveal-delay-400 { animation-delay: 400ms; }

/* ── Shake ───────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

.shake { animation: shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

/* ── Scrollbars ──────────────────────────── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 1100px) {
  /* No changes needed for .portal-layout here since it's flex column */
}

@media (max-width: 900px) {
  .steps-2x2-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .config-card {
    height: auto;
  }
  .step-5-content {
    flex-direction: column;
    gap: 16px;
  }
  .portal-header { padding: 0 20px; }
  .portal-main   { padding: 16px 20px 40px; }
  .portal-hero { padding: 32px 20px 24px; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .prod-media-grid { grid-template-columns: 1fr; }
  .prod-showcase-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .prod-showcase-video-card {
    --max-video-height: 420px;
  }
  .main-panel { min-height: 400px; }
}

@media (max-width: 480px) {
  .portal-header {
    height: 56px;
    padding: 0 14px;
  }
  .portal-brand {
    gap: 7px;
    font-size: 18px;
  }
  .portal-brand svg {
    width: 19px;
    height: 19px;
  }
  .unauth-nav-dock {
    gap: 4px;
    padding: 4px;
  }
  .unauth-nav-dock .btn {
    padding: 9px 16px;
    min-height: 36px;
    font-size: 13px;
  }
  .btn {
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 13px;
  }
  .portal-hero {
    padding: 20px 16px 16px;
  }
  .hero-compact__text {
    margin-bottom: 0;
  }
  .eyebrow {
    margin-bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .hero-compact__title {
    max-width: 350px;
    margin-bottom: 12px;
    line-height: 1.2;
  }
  .hero-compact__sub {
    font-size: 15px;
    line-height: 1.5;
  }
  .portal-hero__content > div:has(+ .demo-carousel) {
    margin-top: 16px !important;
  }
  .portal-hero__content > div:has(+ .demo-carousel) p {
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }
  .portal-hero .ai-rotator-wrapper {
    margin-top: 14px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  .demo-carousel {
    gap: 10px;
    max-width: 100%;
    padding: 0 0 4px;
  }
  .demo-vid-card {
    flex: 0 0 clamp(120px, 36vw, 156px);
    scroll-snap-align: center;
    border-radius: 12px;
  }
  .portal-hero__cta {
    padding-top: 10px;
  }
  .portal-main {
    padding: 10px 14px 32px;
  }
  .portal-layout {
    gap: 16px;
  }
  .config-card,
  .generate-cta,
  .main-panel {
    border-radius: 14px;
  }
  .empty-state {
    padding: 44px 22px;
  }
  .empty-state__icon {
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
  }
  .empty-state__title {
    font-size: 20px;
  }
  .empty-state__desc {
    font-size: 13px;
    margin-bottom: 0;
  }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-user { gap: 8px; }
  .credit-badge span:last-child { display: none; }
}

/* Product configuration cards */
.mother-arsenal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-top: 18px;
}

.mother-product-card {
  background: rgba(15, 15, 30, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mother-product-card--collapsed {
  border-color: rgba(255, 255, 255, 0.05);
}

.mother-product-card--collapsed:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(20, 18, 42, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.mother-product-card--active {
  border-color: rgba(139, 92, 246, 0.75);
  background: rgba(22, 18, 52, 0.97);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35),
              0 0 28px rgba(139, 92, 246, 0.12),
              0 14px 34px rgba(0,0,0,0.36);
}

.mother-product-card--collapsed .mother-product-body {
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.mother-product-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 17, 33, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mother-product-card--collapsed:hover .mother-product-header {
  background: rgba(30, 27, 75, 0.5);
}

.mother-product-card--active .mother-product-header {
  background: linear-gradient(95deg, rgba(139, 92, 246, 0.15) 0%, rgba(217, 70, 239, 0.03) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
}

.mother-product-title {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 800;
  font-size: 14px;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mother-product-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mother-product-card--active .mother-product-index {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(167, 139, 250, 0.6);
  color: #fff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.mother-product-name,
.mother-product-title > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.mother-product-card--active .mother-product-name,
.mother-product-card--active .mother-product-title > span:nth-child(2) {
  color: #ede9fe;
}

.mother-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.mother-product-chevron {
  flex-shrink: 0;
  color: rgba(148, 163, 184, 0.7);
  transition: transform 0.48s cubic-bezier(0.25, 0.8, 0.25, 1),
              color 0.3s ease;
}

.mother-product-chevron--open {
  transform: rotate(180deg);
  color: #a78bfa;
}

.mother-product-card--active .mother-product-chevron {
  color: #c4b5fd;
}

.mother-product-actions .tag-remove {
  color: var(--danger);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}

.mother-product-actions .tag-remove:hover {
  background: rgba(225, 29, 72, 0.12);
  opacity: 1;
}

.mother-product-header:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.55);
  outline-offset: -2px;
}

.mother-product-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  min-width: 0;
  padding: 0 16px;
  opacity: 0;
  pointer-events: none;
  transition: grid-template-rows 0.48s cubic-bezier(0.25, 0.8, 0.25, 1),
              padding 0.48s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.35s ease-out;
}

.mother-product-card--active .mother-product-body {
  grid-template-rows: 1fr;
  padding: 18px;
  opacity: 1;
  pointer-events: auto;
}

.mother-product-body-inner {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.38s cubic-bezier(0.25, 0.8, 0.25, 1) 0.08s,
              transform 0.42s cubic-bezier(0.25, 0.8, 0.25, 1) 0.05s;
}

.mother-product-body-inner > * {
  min-width: 0;
}

.mother-product-card--active .mother-product-body-inner {
  opacity: 1;
  transform: translateY(0);
}

/* Hide the Edit button when active */
.mother-product-card--active .mother-edit-btn {
  display: none;
}

.mother-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mother-section-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.mother-section-hint {
  max-width: 52ch;
  color: rgba(161, 161, 170, 0.86);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.mother-optional-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.mother-settings-block {
  min-width: 0;
}

/* Internal grid for Image + Script */
.mother-config-split {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  min-width: 0;
}

.mother-config-split > * {
  min-width: 0;
}

.mother-img-upload {
  width: 112px;
  height: 112px;
  max-width: 100%;
  border: 2px dashed rgba(139, 92, 246, 0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0,0,0,0.3);
  color: var(--text-muted);
  transition: all 0.2s;
  overflow: hidden;
  flex-shrink: 0;
}

.mother-img-upload:hover {
  border-color: #E11D48;
  background: rgba(225, 29, 72, 0.1);
  color: #F8FAFC;
}

.mother-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mother-img-upload-wrap {
  position: relative;
  width: 112px;
  max-width: 100%;
}

.mother-img-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: #1a1a1f;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.mother-img-remove:hover {
  color: #fff;
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}

.mother-script-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.script-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -4px;
}

.script-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.script-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.script-mode-btn--active {
  background: var(--accent-glow);
  color: var(--accent);
}

.script-word-count {
  font-size: 11px;
  color: var(--text-muted);
}

.script-word-count--good { color: var(--success); }
.script-word-count--warn { color: var(--warning); }
.script-word-count--bad { color: var(--danger); }

.script-voice-warn {
  font-size: 11px;
  line-height: 1.4;
  color: var(--warning);
  margin-top: 4px;
}
.script-voice-warn:empty { display: none; }

.script-selfintro-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.script-selfintro-toggle input[type="checkbox"] {
  cursor: pointer;
}

/* Preset grid override inside mother card */
.mother-product-card .preset-grid {
  padding-bottom: 10px;
}
.mother-product-card .preset-card {
  flex: 0 0 148px;
  border-color: rgba(255,255,255,0.1);
}
.mother-product-card .preset-card--active {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Audio active pulse animations */
.preset-card.preset-card--audio-active {
  animation: audioPulsePurple 2s infinite ease-in-out;
}
.mother-product-card .preset-card.preset-card--audio-active {
  animation: audioPulsePurple 2s infinite ease-in-out;
}

@keyframes audioPulsePurple {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4), 0 4px 12px rgba(139, 92, 246, 0.2);
    border-color: var(--accent);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.7), 0 8px 20px rgba(139, 92, 246, 0.5);
    border-color: var(--accent);
  }
}

@media (max-width: 560px) {
  .mother-product-header {
    align-items: center;
    flex-direction: row;
  }
  .mother-product-actions {
    width: auto;
    justify-content: flex-end;
  }
  .mother-product-card--active .mother-product-body {
    padding: 12px;
  }
  .mother-product-body-inner {
    gap: 12px;
  }
  .mother-config-split {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }
  .mother-img-upload {
    width: 76px;
    height: 76px;
  }
  .mother-img-preview {
    object-fit: contain;
  }
  .mother-script-wrap textarea.form-textarea {
    min-height: 72px !important;
    max-height: 84px;
    font-size: 14px;
  }
  .mother-product-card .preset-card {
    flex: 0 0 100px;
  }
  .mother-product-card .preset-card .preset-card__content {
    padding: 8px;
  }
  .mother-product-card .preset-card .preset-card__name {
    font-size: 11px;
  }
  .mother-product-card .preset-card .preset-card__sub {
    font-size: 9px;
  }
  .mother-settings-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }
  .mother-setting-group .option-btn {
    padding: 8px 4px;
    font-size: 11px;
    gap: 2px;
    min-width: 0;
  }
  .mother-setting-group .option-btn svg {
    width: 14px;
    height: 14px;
  }
  .mother-setting-group .option-btn__main {
    font-size: 12px;
  }
  .mother-setting-group .option-btn__sub {
    font-size: 9px;
  }
}

.gray-shimmer {
  background: linear-gradient(
    90deg,
    #ffffff 40%,
    #d1d5db 50%,
    #ffffff 60%
  );
  background-size: 300% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: ai-shimmer 4s linear infinite;
}

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

.gold-shimmer {
  background: linear-gradient(
    90deg,
    #ca8a04 0%,
    #fbbf24 25%,
    #ffffff 50%,
    #fbbf24 75%,
    #ca8a04 100%
  );
  background-size: 600px 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gold-sweep 3s linear infinite;
}

@keyframes gold-sweep {
  0% {
    background-position: 0px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

.anything-glow {
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.75)) drop-shadow(0 0 24px rgba(251, 191, 36, 0.45));
}

.badge-shimmer-bg {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.badge-shimmer-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: badge-sweep 3s infinite linear;
  z-index: 0;
  pointer-events: none;
  border-radius: 100px;
}

@keyframes badge-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.badge-shimmer-bg > * {
  position: relative;
  z-index: 1;
}

@keyframes bounce-down {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(4px);
  }
  60% {
    transform: translateY(2px);
  }
}

.bounce-down {
  animation: bounce-down 2s infinite;
}

/* Step locking & progressive workspace reveal */
.workspace-step {
  scroll-margin-top: calc(var(--header-height, 64px) + 16px);
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
  transition:
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    margin-bottom 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s;
}

.workspace-step.step-locked {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  transition:
    max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    margin-bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.35s;
}

.workspace-step.step-unlocking {
  animation: workspace-step-glow 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.workspace-step.step-unlocked {
  overflow: visible;
  max-height: none;
}

#suggestionsGroup.workspace-step {
  overflow: visible;
}

#popularItems.suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}

@keyframes workspace-step-glow {
  0% {
    box-shadow: none;
  }
  35% {
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.22), 0 8px 28px rgba(139, 92, 246, 0.12);
  }
  100% {
    box-shadow: none;
  }
}

.mother-product-card--entering {
  animation: mother-card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mother-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-step,
  .generate-cta,
  .mother-product-card,
  .mother-product-card--entering,
  .mother-product-chevron,
  .mother-advanced-summary__chevron,
  .skel-progress-bar,
  .skel-progress-steps span,
  .suggestion-chip {
    transition: none !important;
    animation: none !important;
  }

  .workspace-step.step-locked,
  .generate-cta.hidden-cta,
  .generate-cta.step-locked {
    transform: none;
    filter: none;
  }
}

/* Per-product Output Settings */
.mother-settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.mother-settings-row--full {
  grid-template-columns: 1fr !important;
}

.mother-advanced-settings {
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.055);
  overflow: clip;
}

.mother-advanced-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  touch-action: manipulation;
}

.mother-advanced-summary::-webkit-details-marker { display: none; }

.mother-advanced-summary:focus-visible {
  outline: 3px solid var(--accent, #8b5cf6);
  outline-offset: -3px;
}

.mother-advanced-summary__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
}

.mother-advanced-summary > span:nth-child(2) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mother-advanced-summary strong { font-size: 13px; }
.mother-advanced-summary small { color: var(--text-muted); font-size: 11px; line-height: 1.35; }

.mother-advanced-summary__chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform 0.22s ease;
}

.mother-advanced-settings[open] .mother-advanced-summary__chevron,
.mother-advanced-settings.details-active .mother-advanced-summary__chevron { transform: rotate(180deg); }

.mother-advanced-content {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(139, 92, 246, 0.14);
}

.mother-advanced-content .mother-config-split { margin-top: 14px; }

html[data-theme='light'] .mother-advanced-settings {
  background: #faf7ff;
  border-color: #ddd6fe;
}

.pricing-catalog-status {
  min-height: 18px;
  margin: -16px 0 12px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}
.mother-setting-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.mother-setting-group .option-row {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.mother-setting-group .option-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  border-radius: 8px;
  gap: 4px;
  min-width: 0;
}

/* ── App Icon Carousels ─────────────────────────────
   Shared treatment for industry, product suggestion, and setting choices. */
.industry-pill-scroll,
.suggestions-wrapper,
.mother-setting-group,
.mother-product-body-inner > div {
  min-width: 0;
}

.pill-cloud,
.suggestions-list,
.option-carousel {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 16px;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scroll-snap-type: x proximity;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 8px 12px;
  margin-top: 0;
  margin-inline: -8px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 34px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 34px), transparent 100%);
}

.pill-cloud.is-dragging,
.suggestions-list.is-dragging,
.option-carousel.is-dragging {
  cursor: grabbing !important;
  scroll-snap-type: none !important;
}

.pill-cloud.is-dragging *,
.suggestions-list.is-dragging *,
.option-carousel.is-dragging * {
  cursor: grabbing !important;
}

.option-carousel img,
.pill-cloud img,
.suggestions-list img {
  -webkit-user-drag: none;
  user-select: none;
}

.pill-cloud::-webkit-scrollbar,
.suggestions-list::-webkit-scrollbar,
.option-carousel::-webkit-scrollbar {
  display: none;
}

.pill-cloud::after,
.suggestions-list::after,
.option-carousel::after {
  content: '';
  flex: 0 0 2px;
}

.app-choice-tile,
.option-carousel .option-btn {
  position: relative;
  flex: 0 0 110px;
  width: 110px;
  height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 8px;
  scroll-snap-align: start;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.85);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  margin-top: 12px;
}
html[data-theme='light'] .app-choice-tile,
html[data-theme='light'] .option-carousel .option-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.app-choice-tile:hover,
.option-carousel .option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
html[data-theme='light'] .app-choice-tile:hover,
html[data-theme='light'] .option-carousel .option-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.app-choice-tile.option-btn--active,
.option-carousel .option-btn--active {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
  color: #c4b5fd !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.5) !important;
}
html[data-theme='light'] .app-choice-tile.option-btn--active,
html[data-theme='light'] .option-carousel .option-btn--active {
  background: #f3e8ff !important;
  border-color: #a855f7 !important;
  color: #7e22ce !important;
  box-shadow: inset 0 0 0 1px #a855f7 !important;
}


.option-carousel .option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}
.option-carousel .option-btn:focus-visible {
  outline: 3px solid var(--accent, #8b5cf6);
  outline-offset: 3px;
}
.concept-rule-note {
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.output-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.output-feedback__label,
.output-feedback__thanks {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.output-feedback__button,
.output-feedback__submit {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
}
.output-feedback__button:focus-visible,
.output-feedback__submit:focus-visible {
  outline: 3px solid var(--accent, #8b5cf6);
  outline-offset: 2px;
}
.output-feedback__issues {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.output-feedback__issues[hidden] { display: none; }
.output-feedback__issues label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: capitalize;
}

.app-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.2s ease;
}
html[data-theme='light'] .app-choice-icon {
  background: #f1f5f9;
}
.option-btn--active .app-choice-icon {
  background: rgba(139, 92, 246, 0.2);
}
html[data-theme='light'] .option-btn--active .app-choice-icon {
  background: #e9d5ff;
}

.suggestion-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  height: 44px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05);
  color: rgba(248, 250, 252, 0.88);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
html[data-theme='light'] .suggestion-chip {
  background: #fff;
  border-color: #e2e8f0;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.suggestion-chip:hover:not(.suggestion-chip--added) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
}
html[data-theme='light'] .suggestion-chip:hover:not(.suggestion-chip--added) {
  background: #f8fafc;
  border-color: #a78bfa;
}
.suggestion-chip:active:not(.suggestion-chip--added) {
  transform: scale(0.96);
}
.suggestion-chip--added {
  background: rgba(139, 92, 246, 0.05) !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  opacity: 0.6;
  cursor: default;
  filter: none !important;
  pointer-events: none;
}
html[data-theme='light'] .suggestion-chip--added {
  background: #f3e8ff !important;
  border-color: #ddd6fe !important;
  color: #a78bfa !important;
}
.chip-monogram {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.88);
  letter-spacing: 0.5px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme='light'] .chip-monogram {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #ddd6fe;
  color: #6d28d9;
}
.suggestion-chip:hover:not(.suggestion-chip--added) .chip-monogram {
  transform: scale(1.1);
}
.suggestion-chip--added .chip-monogram {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.15) !important;
  color: rgba(255, 255, 255, 0.4) !important;
}
html[data-theme='light'] .suggestion-chip--added .chip-monogram {
  background: #e9d5ff !important;
  border-color: #c084fc !important;
  color: #7e22ce !important;
}
.chip-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.app-choice-label {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.86);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
}

.app-choice-tile:hover,
.industry-pill.app-choice-tile:hover,
.suggestion-chip.app-choice-tile:hover,
.option-carousel .option-btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(25, 27, 36, 0.94);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -14px 28px rgba(0, 0, 0, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.app-choice-tile:hover .app-choice-icon,
.option-carousel .option-btn:hover .app-choice-icon {
  transform: translateY(-1px) scale(1.045);
}

.app-choice-tile:active,
.industry-pill.app-choice-tile:active,
.suggestion-chip.app-choice-tile:active,
.option-carousel .option-btn:active {
  transform: translateY(0) scale(0.97);
}

.pill-cloud.has-active .industry-pill.app-choice-tile:not(.active) {
  opacity: 0.64;
  filter: saturate(0.72) brightness(0.9);
}

.pill-cloud.has-active .industry-pill.app-choice-tile:not(.active):hover {
  opacity: 1;
  filter: saturate(1) brightness(1);
}

.industry-pill.app-choice-tile.active,
.industry-pill.app-choice-tile.active:hover,
.option-carousel .option-btn.option-btn--active,
.option-carousel .option-btn.option-btn--active:hover {
  border-color: rgba(196, 181, 253, 0.78);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.24), rgba(139, 92, 246, 0.07)),
    rgba(27, 23, 42, 0.96);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 0 1px rgba(139, 92, 246, 0.46),
    0 14px 34px rgba(139, 92, 246, 0.26),
    0 18px 38px rgba(0, 0, 0, 0.32);
}

.industry-pill.app-choice-tile.active .app-choice-icon,
.option-carousel .option-btn.option-btn--active .app-choice-icon {
  transform: scale(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -12px 24px rgba(0, 0, 0, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(139, 92, 246, 0.3);
}

.suggestion-chip.app-choice-tile--product {
  height: 126px;
}

.suggestion-chip.app-choice-tile--product .app-choice-label {
  -webkit-line-clamp: 3;
  min-height: 42px;
}

.suggestion-chip--added.app-choice-tile {
  opacity: 0.42;
  cursor: default;
  filter: grayscale(0.35);
  pointer-events: none;
}

.option-carousel .option-btn__main,
.option-carousel .option-btn__sub {
  display: none;
}

@media (max-width: 720px) {
  .app-choice-tile,
  .industry-pill.app-choice-tile,
  .suggestion-chip.app-choice-tile,
  .option-carousel .option-btn {
    flex-basis: 92px !important;
    width: 92px;
    min-width: 92px;
    height: 108px;
    border-radius: 20px;
  }

  .app-choice-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
    font-size: 23px;
  }

  .app-choice-icon--product {
    font-size: 18px;
  }

  .app-choice-label {
    font-size: 10px;
  }

  .mother-product-card--active .mother-product-body {
    padding: 16px 14px 18px;
  }

  .mother-settings-row,
  .mother-config-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mother-img-upload {
    width: 100%;
    max-width: 180px;
    height: 132px;
  }

  .mother-product-header {
    align-items: center;
    gap: 10px;
  }

  .mother-product-actions {
    gap: 6px;
  }

  .mother-product-actions .tag-remove {
    padding-inline: 6px;
  }
}

/* ── Premium Feature Notice ───────────────────────────── */
.premium-notice-dialog {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  width: calc(100% - 32px);
  max-width: 400px;
  overflow: visible;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition:
    opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    display 0.32s allow-discrete;
}

.premium-notice-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .premium-notice-dialog[open] {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

.premium-notice-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition:
    opacity 0.32s ease,
    display 0.32s allow-discrete;
}

.premium-notice-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .premium-notice-dialog[open]::backdrop {
    opacity: 0;
  }
}

.premium-notice-card {
  position: relative;
  padding: 28px 26px 22px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(28, 22, 48, 0.98) 0%, rgba(16, 14, 28, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(139, 92, 246, 0.08) inset;
  text-align: center;
}

.premium-notice-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.18), transparent 70%);
  pointer-events: none;
  opacity: 0;
  animation: premium-notice-glow-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes premium-notice-glow-in {
  to { opacity: 1; }
}

.premium-notice-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.premium-notice-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.05);
}

.premium-notice-text {
  position: relative;
  margin: 0 0 22px;
  padding: 0 8px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.88);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.premium-notice-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.premium-notice-btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.premium-notice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.premium-notice-btn:active {
  transform: translateY(0);
}

.premium-notice-link {
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.premium-notice-link:hover {
  color: #c4b5fd;
}

@media (max-width: 480px) {
  .premium-notice-card {
    padding: 24px 20px 20px;
  }

  .premium-notice-text {
    font-size: 14px;
    padding: 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-notice-dialog,
  .premium-notice-dialog::backdrop,
  .premium-notice-glow,
  .premium-notice-btn,
  .premium-notice-close {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Niche Auth Dialog ──────────────────────────────── */
.niche-auth-dialog {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0;
  width: calc(100% - 32px);
  max-width: 420px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  overflow: visible;
  margin: auto;
  
  /* Animations */
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: 
    opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    display 0.3s allow-discrete;
}

.niche-auth-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .niche-auth-dialog[open] {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}

.niche-auth-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: 
    opacity 0.3s ease,
    display 0.3s allow-discrete;
}

.niche-auth-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .niche-auth-dialog[open]::backdrop {
    opacity: 0;
  }
}

.niche-auth-box {
  padding: 36px 32px 32px;
  position: relative;
  text-align: center;
}

.niche-auth-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
  font-size: 28px;
}

.niche-auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.niche-auth-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.niche-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.niche-auth-actions .btn {
  font-size: 15px;
  padding: 12px 20px;
}

/* ── Dynamic Background Styles (UI/UX Pro Max) ───────── */
.dynamic-bg-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #060613 0%, #010103 100%);
  contain: strict;
}

.dynamic-bg-container.is-paused,
.dynamic-bg-container.is-paused * {
  animation-play-state: paused !important;
}

/* Floating ambient blobs — pre-softened gradients, lighter blur */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.09;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

.bg-glow-1 {
  width: 65vw;
  height: 65vw;
  top: -25vw;
  left: -25vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5) 0%, rgba(139, 92, 246, 0.12) 45%, transparent 72%);
  animation: float-glow-1 35s infinite alternate ease-in-out;
}

.bg-glow-2 {
  width: 55vw;
  height: 55vw;
  bottom: -15vw;
  right: -15vw;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.35) 0%, rgba(225, 29, 72, 0.08) 45%, transparent 72%);
  animation: float-glow-2 42s infinite alternate ease-in-out;
}

.bg-glow-3 {
  width: 50vw;
  height: 50vw;
  top: 25vh;
  left: 40vw;
  background: radial-gradient(circle, rgba(30, 27, 75, 0.55) 0%, rgba(30, 27, 75, 0.1) 50%, transparent 72%);
  animation: float-glow-3 30s infinite alternate ease-in-out;
}

.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(248, 250, 252, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: center;
  pointer-events: none;
  z-index: 1;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(248, 250, 252, 0.008) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(248, 250, 252, 0.008) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  pointer-events: none;
  z-index: 2;
}

.cursor-glow-follower {
  position: fixed;
  width: 380px;
  height: 380px;
  top: -190px;
  left: -190px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.14) 0%,
    rgba(225, 29, 72, 0.05) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  filter: blur(28px);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

@keyframes float-glow-1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 8vh, 0) scale(1.08); }
  100% { transform: translate3d(-3vw, 4vh, 0) scale(0.95); }
}

@keyframes float-glow-2 {
  0% { transform: translate3d(0, 0, 0) scale(0.95); }
  50% { transform: translate3d(-8vw, -6vh, 0) scale(1.1); }
  100% { transform: translate3d(3vw, -10vh, 0) scale(1); }
}

@keyframes float-glow-3 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4vw, 7vh, 0) scale(0.9); }
  100% { transform: translate3d(5vw, -3vh, 0) scale(1.05); }
}

/* Twinkling Starfield */
.space-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  contain: layout style paint;
}

.space-star {
  position: absolute;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
  transform: translate3d(0, 0, 0);
}

.star-slow { animation: star-twinkle 12s infinite alternate ease-in-out; }
.star-mid { animation: star-twinkle 7s infinite alternate ease-in-out; }
.star-fast { animation: star-twinkle 4s infinite alternate ease-in-out; }

@keyframes star-twinkle {
  0% { opacity: 0.2; transform: translate3d(0, 0, 0) scale(0.85); }
  50% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.15); }
  100% { opacity: 0.2; transform: translate3d(0, 0, 0) scale(0.85); }
}

.space-shooting-star {
  position: absolute;
  width: 72px;
  height: 2px;
  background: linear-gradient(-45deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  border-radius: 999px;
  transform: translate3d(0, 0, 0) rotate(-45deg);
  pointer-events: none;
  opacity: 0;
}

.s-star-1 { top: 15%; left: 65%; animation: shooting-anim 18s infinite ease-in-out; }
.s-star-2 { top: 40%; left: 85%; animation: shooting-anim 26s infinite ease-in-out; animation-delay: 6s; }
.s-star-3 { top: 8%; left: 20%; animation: shooting-anim 22s infinite ease-in-out; animation-delay: 11s; }

.bg-keywords {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  contain: layout style paint;
}

.bg-keyword {
  position: absolute;
  padding: 6px 14px;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(248, 250, 252, 0.55);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.16);
  transform: translate3d(0, 0, 0);
  user-select: none;
}

.bg-keyword--gold {
  color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.14);
}

.bg-keyword--rose {
  color: rgba(244, 114, 182, 0.55);
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.14);
}

.bg-keyword--cyan {
  color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.14);
}

.bg-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  contain: layout style paint;
}

.bg-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.bg-particle--dot {
  background: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 4px rgba(139, 92, 246, 0.35);
}

.bg-particle--line {
  width: 1px !important;
  height: 22px !important;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, rgba(248, 250, 252, 0.22), transparent);
  box-shadow: none;
}

.bg-floating-sites {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  contain: layout style paint;
}

.bg-site-card {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 17, 23, 0.82);
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  transform: translate3d(0, 0, 0);
  opacity: 0.55;
}

.bg-site-card__chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bg-site-card__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bg-site-card__dot--red { background: #ff5f57; }
.bg-site-card__dot--yellow { background: #febc2e; }
.bg-site-card__dot--green { background: #28c840; }

.bg-site-card__url {
  flex: 1;
  font-size: 7px;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.45);
  font-family: 'Inter', monospace;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.bg-site-card__video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #060613;
}

.bg-site-card__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bg-site-card__badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: rgba(248, 250, 252, 0.7);
  background: rgba(139, 92, 246, 0.35);
  padding: 2px 6px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes bg-float-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--bg-rot, 0deg)); }
  25% { transform: translate3d(12px, -18px, 0) rotate(calc(var(--bg-rot, 0deg) + 2deg)); }
  50% { transform: translate3d(-8px, -30px, 0) rotate(calc(var(--bg-rot, 0deg) - 1deg)); }
  75% { transform: translate3d(16px, -12px, 0) rotate(calc(var(--bg-rot, 0deg) + 1deg)); }
}

@keyframes bg-float-hover {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--bg-rot, 0deg)) scale(1); }
  50% { transform: translate3d(0, -22px, 0) rotate(calc(var(--bg-rot, 0deg) + 3deg)) scale(1.03); }
}

@keyframes bg-fall-particle {
  0% { transform: translate3d(0, -10vh, 0); opacity: 0; }
  8% { opacity: var(--bg-p-opacity, 0.6); }
  92% { opacity: var(--bg-p-opacity, 0.6); }
  100% { transform: translate3d(var(--bg-drift, 30px), 110vh, 0); opacity: 0; }
}

@keyframes bg-site-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--bg-rot, -4deg)) scale(1); }
  33% { transform: translate3d(0, -16px, 0) rotate(calc(var(--bg-rot, -4deg) + 2deg)) scale(1.02); }
  66% { transform: translate3d(0, 8px, 0) rotate(calc(var(--bg-rot, -4deg) - 1deg)) scale(0.98); }
}

@keyframes shooting-anim {
  0% { transform: translate3d(150px, -150px, 0) rotate(-45deg) scaleX(0); opacity: 0; }
  3% { opacity: 1; transform: translate3d(50px, -50px, 0) rotate(-45deg) scaleX(1); }
  8% { transform: translate3d(-200px, 200px, 0) rotate(-45deg) scaleX(0); opacity: 0; }
  100% { transform: translate3d(-200px, 200px, 0) rotate(-45deg) scaleX(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-glow,
  .space-star,
  .space-shooting-star,
  .bg-keyword,
  .bg-particle,
  .bg-site-card {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .bg-floating-sites { display: none; }
  .bg-keyword { font-size: 9px; padding: 4px 10px; }
}

@media (max-width: 480px) {
  .bg-keywords { opacity: 0.65; }
  .bg-particles { opacity: 0.55; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE / MOBILE OVERHAUL
   Layered breakpoints: ≤980 (tablet), ≤768 (large phone),
   ≤560 (phone), ≤380 (small phone) + touch-device handling.
   Placed last so it wins the cascade.
   ════════════════════════════════════════════════════════════ */

/* ── Touch / no-hover devices ── */
@media (hover: none), (pointer: coarse) {
  .cursor-glow-follower { display: none !important; }
  .pricing-card:hover,
  .btn-generate:hover,
  .dock-btn-upgrade:hover { transform: none; }
}

/* ── Tablet & below ─────────────────────────────────────── */
@media (max-width: 980px) {
  .portal-header {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .steps-split-layout { grid-template-columns: 1fr; }
  .prod-media-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Prevent iOS input zoom: inputs need ≥16px on mobile ── */
@media (max-width: 768px) {
  input,
  textarea,
  select,
  .float-input,
  .tag-input-field,
  .portal-input { font-size: 16px; }

  .float-input { padding: 22px 14px 8px; }

  /* Modal chrome */
  .modal-overlay {
    padding: 16px;
    align-items: flex-start;
  }
  .modal-box { padding: 24px; border-radius: 18px; }
  /* Override inline padding on the wide pricing modal */
  #pricingModal .modal-box { padding: 24px !important; }
  #pricingModal { /* keep centered scroll */ }

  /* Pricing controls wrap gracefully */
  .billing-toggle { flex-wrap: wrap; gap: 8px; }
  .modal-tabs { margin-bottom: 20px; }

  /* Result cards tighter */
  #resultsArea { padding: 16px; gap: 18px; }
  .result-card { padding: 18px; }
  .result-card__title { font-size: 18px; }
}

/* ── Phones ─────────────────────────────────────────────── */
@media (max-width: 560px) {
  .portal-header { height: 58px; }
  .portal-main { padding-bottom: max(96px, calc(env(safe-area-inset-bottom) + 80px)); }

  /* Hero: compact demo carousel so title → videos → CTA fits one screen */
  .portal-hero {
    padding: 18px 16px 14px;
  }
  .hero-compact__title {
    margin-bottom: 10px;
  }
  .hero-compact__sub { font-size: 15px !important; }
  .portal-hero__content > div:has(+ .demo-carousel) {
    margin-top: 14px !important;
  }
  .demo-carousel {
    gap: 10px;
    max-width: 100%;
    padding: 0 0 4px;
  }
  .demo-vid-card {
    flex: 0 0 clamp(118px, 34vw, 148px);
    scroll-snap-align: center;
  }
  .portal-hero__cta {
    padding-top: 8px;
  }
  .config-card {
    min-width: 0;
    overflow: hidden;
  }
  .config-card__scroll-area {
    min-width: 0;
    overflow: visible;
  }

  /* Logged-in nav dock: compact, no clutter */
  .auth-nav-dock { padding: 3px; gap: 1px; }
  .auth-dock-item { padding: 6px 8px; font-size: 12px; }
  .dock-divider { display: none; }
  .auth-dock-item.status-pill { display: none !important; }
  #creditBalanceLabel { display: none; }

  /* Unauth buttons stay readable */
  .unauth-nav-dock { gap: 4px; padding: 4px; }
  .unauth-nav-dock .btn { padding: 9px 14px; min-height: 36px; font-size: 12.5px; }

  /* Hero spacing */
  .hero-compact__sub { font-size: 15px !important; }
  .ai-rotator-wrapper { max-width: calc(100vw - 40px); }
  .ai-rotator-text { font-size: 13px; }

  /* Modals full-bleed-ish */
  .modal-overlay { padding: 12px; }
  .modal-box { padding: 16px; }
  #pricingModal .modal-box { padding: 16px !important; }
  .pricing-card { padding: 16px; }

  /* History becomes 2-up then 1-up naturally via auto-fill */
  .history-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  /* Keep transient toasts away from active builder controls on phones. */
  #toast-stack {
    left: 12px;
    right: 12px;
    top: calc(var(--header-height, 58px) + env(safe-area-inset-top) + 10px);
    bottom: auto;
    align-items: stretch;
  }
  .toast {
    justify-content: center;
    text-align: center;
    max-width: none;
    padding: 12px 14px;
    transform: translateY(-16px);
  }
  .toast.show {
    transform: translateY(0);
  }

  /* Niche dialog */
  .niche-auth-box { padding: 30px 22px 26px; }
}

/* ── Icon-only dock buttons on tight phones ─────────────── */
@media (max-width: 460px) {
  .dock-btn-upgrade { padding: 6px 10px; }
  .mother-product-actions .tag-remove {
    width: 32px;
    height: 32px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }
  .mother-product-actions .tag-remove svg {
    width: 15px;
    height: 15px;
  }
}

/* ── Small phones ───────────────────────────────────────── */
@media (max-width: 380px) {
  .portal-brand { font-size: 17px; }
  .auth-dock-item { padding: 6px; }

  .btn { padding: 8px 10px; font-size: 12.5px; }
  .empty-state { padding: 40px 18px; }
  .modal-box { padding: 18px; }
  .pricing-card__price { font-size: 30px; }
}

/* ── Landscape short screens: let tall modals scroll ────── */
@media (max-height: 560px) {
  .modal-overlay { align-items: flex-start; }
}

/* ── Aspect Ratio Previews ───────────────── */
.aspect-ratio-preview-container {
  background: rgba(0, 0, 0, 0.25) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 40px; /* Shift mockup up to center in visible area */
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.preset-card:hover .aspect-ratio-preview-container {
  background: rgba(0, 0, 0, 0.35) !important;
}

.preset-card--active .aspect-ratio-preview-container {
  background: rgba(139, 92, 246, 0.1) !important;
}

/* Phone Mockup */
.ar-preview-phone {
  width: 27px;
  height: 48px;
  border: 2px solid rgba(248, 250, 252, 0.35);
  border-radius: 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.ar-preview-phone::before {
  content: '';
  width: 10px;
  height: 2px;
  background: rgba(248, 250, 252, 0.35);
  border-radius: 1px;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  transition: background 0.3s ease;
}

.ar-preview-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed rgba(248, 250, 252, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4px;
  gap: 3px;
  transition: all 0.3s ease;
}

.ar-preview-phone-bar {
  height: 3px;
  background: rgba(248, 250, 252, 0.25);
  border-radius: 1.5px;
  width: 80%;
  transition: background 0.3s ease;
}
.ar-preview-phone-bar--short {
  width: 50%;
}

/* Hover and active states for phone */
.preset-card:hover .ar-preview-phone {
  border-color: rgba(248, 250, 252, 0.6);
  transform: scale(1.04);
}
.preset-card:hover .ar-preview-phone::before,
.preset-card:hover .ar-preview-phone-bar {
  background: rgba(248, 250, 252, 0.5);
}

.preset-card.preset-card--active .ar-preview-phone {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}
.preset-card.preset-card--active .ar-preview-phone::before {
  background: var(--accent);
}
.preset-card.preset-card--active .ar-preview-phone-screen {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}
.preset-card.preset-card--active .ar-preview-phone-bar {
  background: #c4b5fd;
}

/* Monitor Mockup */
.ar-preview-monitor-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ar-preview-monitor {
  width: 52px;
  height: 30px;
  border: 2px solid rgba(248, 250, 252, 0.35);
  border-radius: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 3px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.ar-preview-monitor-screen {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed rgba(248, 250, 252, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3px;
  gap: 2.5px;
  transition: all 0.3s ease;
}

.ar-preview-monitor-stand {
  width: 8px;
  height: 6px;
  background: rgba(248, 250, 252, 0.35);
  margin-top: -1px;
  transition: background 0.3s ease;
}

.ar-preview-monitor-base {
  width: 24px;
  height: 2px;
  background: rgba(248, 250, 252, 0.35);
  border-radius: 1px 1px 0 0;
  transition: background 0.3s ease;
}

.ar-preview-monitor-bar {
  height: 3px;
  background: rgba(248, 250, 252, 0.25);
  border-radius: 1.5px;
  width: 60%;
  transition: background 0.3s ease;
}
.ar-preview-monitor-bar--short {
  width: 35%;
}

/* Hover and active states for monitor */
.preset-card:hover .ar-preview-monitor {
  border-color: rgba(248, 250, 252, 0.6);
  transform: scale(1.04);
}
.preset-card:hover .ar-preview-monitor-stand,
.preset-card:hover .ar-preview-monitor-base,
.preset-card:hover .ar-preview-monitor-bar {
  background: rgba(248, 250, 252, 0.5);
}

.preset-card.preset-card--active .ar-preview-monitor {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}
.preset-card.preset-card--active .ar-preview-monitor-stand,
.preset-card.preset-card--active .ar-preview-monitor-base {
  background: var(--accent);
}
.preset-card.preset-card--active .ar-preview-monitor-screen {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}
.preset-card.preset-card--active .ar-preview-monitor-bar {
  background: #c4b5fd;
}

/* Light mode support for mockups */
html[data-theme='light'] .ar-preview-phone,
html[data-theme='light'] .ar-preview-monitor {
  border-color: rgba(71, 85, 105, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
html[data-theme='light'] .ar-preview-phone::before,
html[data-theme='light'] .ar-preview-phone-bar,
html[data-theme='light'] .ar-preview-monitor-stand,
html[data-theme='light'] .ar-preview-monitor-base,
html[data-theme='light'] .ar-preview-monitor-bar {
  background: rgba(71, 85, 105, 0.3);
}

html[data-theme='light'] .preset-card:hover .ar-preview-phone,
html[data-theme='light'] .preset-card:hover .ar-preview-monitor {
  border-color: rgba(71, 85, 105, 0.6);
}
html[data-theme='light'] .preset-card:hover .ar-preview-phone::before,
html[data-theme='light'] .preset-card:hover .ar-preview-phone-bar,
html[data-theme='light'] .preset-card:hover .ar-preview-monitor-stand,
html[data-theme='light'] .preset-card:hover .ar-preview-monitor-base,
html[data-theme='light'] .preset-card:hover .ar-preview-monitor-bar {
  background: rgba(71, 85, 105, 0.5);
}

html[data-theme='light'] .preset-card.preset-card--active .ar-preview-phone,
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-monitor {
  border-color: var(--accent);
}
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-phone::before,
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-monitor-stand,
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-monitor-base {
  background: var(--accent);
}
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-phone-bar,
html[data-theme='light'] .preset-card.preset-card--active .ar-preview-monitor-bar {
  background: var(--accent);
}

/* Sleek carousel indicators (scrollbars) */
.preset-grid,
.demo-carousel {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent !important;
}

.preset-grid::-webkit-scrollbar,
.demo-carousel::-webkit-scrollbar {
  display: block !important;
  height: 4px !important;
}

.preset-grid::-webkit-scrollbar-track,
.demo-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 10px !important;
}

.preset-grid::-webkit-scrollbar-thumb,
.demo-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  transition: background 0.2s;
}

.preset-grid::-webkit-scrollbar-thumb:hover,
.demo-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #8b5cf6) !important;
}

/* Light Theme overrides for indicators */
html[data-theme='light'] .preset-grid,
html[data-theme='light'] .demo-carousel {
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent !important;
}

html[data-theme='light'] .preset-grid::-webkit-scrollbar-track,
html[data-theme='light'] .demo-carousel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme='light'] .preset-grid::-webkit-scrollbar-thumb,
html[data-theme='light'] .demo-carousel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15) !important;
}

html[data-theme='light'] .preset-grid::-webkit-scrollbar-thumb:hover,
html[data-theme='light'] .demo-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #8b5cf6) !important;
}

/* ── Carousel Arrows ──────────────────────────────── */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: visible;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.carousel-arrow.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background: var(--accent, #8b5cf6);
  border-color: var(--accent, #8b5cf6);
  transform: translateY(-50%) scale(1.1);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-arrow--left {
  left: -12px;
}

.carousel-arrow--right {
  right: -12px;
}

/* ── Duration Choice Buttons ──────────────────────── */
.duration-btn {
  padding: 14px 12px;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex !important;
  flex-direction: column !important;
}

.duration-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.option-btn--active.duration-btn,
.option-btn--active.duration-btn:hover {
  background: rgba(139, 92, 246, 0.08) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.duration-btn__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2px;
}

.duration-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--text-muted, #94a3b8);
  transition: all 0.2s ease;
}

.option-btn--active .duration-btn__icon {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent, #8b5cf6);
}

.duration-btn__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.option-btn--active .duration-btn__badge {
  background: var(--accent-glow);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.2);
}

.duration-btn__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
}

.duration-btn__desc {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  line-height: 1.2;
}

/* ── Product Card Exit Animation ──────────────────────── */
.mother-product-card--removing {
  animation: mother-card-exit 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  overflow: hidden;
}

@keyframes mother-card-exit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 500px;
    margin-bottom: 14px;
    border-width: 1px;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    border-color: transparent;
  }
}

/* ── Product Settings Wizard Sequence ────────────────── */
.mother-wizard-step {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  transition: max-height 0.48s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.35s ease,
              margin 0.48s cubic-bezier(0.25, 0.8, 0.25, 1),
              padding 0.48s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mother-wizard-step--active {
  max-height: 800px;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  margin-top: 24px !important;
}

details.mother-wizard-step--active {
  margin-top: 28px !important;
}
/* Accessibility and launch footer */
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }
.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a, .auth-legal a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.auth-legal { margin: 12px 10px 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; text-align: center; }
:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
@media (max-width: 600px) { .site-footer { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
