/* ============================================================
   SalesVidGen 3.0 — Premium Creative Design System
   Aesthetic: Vibrant, playful, glassmorphism, gradient-rich
   Typography: Playfair Display (display) + DM Sans (body) + Inter (alt)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* === Aurora Theme (Default) — Vibrant Creative === */
:root, [data-theme="aurora"] {
  --bg-base: #0f0f1a;
  --bg-surface: rgba(255, 255, 255, 0.05);
  --bg-elevated: rgba(255, 255, 255, 0.08);
  --text-primary: #f0ecf9;
  --text-secondary: #a8a3be;
  --text-tertiary: #6e6988;
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --gradient-accent: linear-gradient(135deg, #8b5cf6, #ec4899, #f97316);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.08), rgba(249,115,22,0.05));
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-subtle: rgba(139, 92, 246, 0.08);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2), 0 0 60px rgba(236, 72, 153, 0.1);
  --btn-glow: 0 4px 20px rgba(139, 92, 246, 0.35), 0 0 40px rgba(236, 72, 153, 0.15);
  --header-bg: rgba(15, 15, 26, 0.85);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* === Sunset Theme — Warm Premium === */
[data-theme="sunset"] {
  --bg-base: #1a1210;
  --bg-surface: rgba(255, 240, 220, 0.05);
  --bg-elevated: rgba(255, 240, 220, 0.08);
  --text-primary: #f5ebe0;
  --text-secondary: #c4a882;
  --text-tertiary: #8a7460;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --gradient-accent: linear-gradient(135deg, #f59e0b, #e11d48);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(225,29,72,0.06));
  --accent-glow: rgba(245, 158, 11, 0.25);
  --accent-subtle: rgba(245, 158, 11, 0.08);
  --border-color: rgba(255, 240, 220, 0.08);
  --border-strong: rgba(255, 240, 220, 0.14);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.2), 0 0 60px rgba(225, 29, 72, 0.1);
  --btn-glow: 0 4px 20px rgba(245, 158, 11, 0.35), 0 0 40px rgba(225, 29, 72, 0.15);
  --header-bg: rgba(26, 18, 16, 0.88);
}

/* === Ocean Theme — Cool Professional === */
[data-theme="ocean"] {
  --bg-base: #0a1628;
  --bg-surface: rgba(100, 180, 255, 0.04);
  --bg-elevated: rgba(100, 180, 255, 0.07);
  --text-primary: #e0ecf8;
  --text-secondary: #8aa8c8;
  --text-tertiary: #5a7090;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --gradient-accent: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(59,130,246,0.06));
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-subtle: rgba(59, 130, 246, 0.08);
  --border-color: rgba(100, 180, 255, 0.08);
  --border-strong: rgba(100, 180, 255, 0.14);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.15), 0 0 60px rgba(59, 130, 246, 0.1);
  --btn-glow: 0 4px 20px rgba(59, 130, 246, 0.35), 0 0 40px rgba(6, 182, 212, 0.15);
  --header-bg: rgba(10, 22, 40, 0.88);
}

/* === Emerald Theme — Fresh Natural === */
[data-theme="emerald"] {
  --bg-base: #0a1a14;
  --bg-surface: rgba(80, 220, 160, 0.04);
  --bg-elevated: rgba(80, 220, 160, 0.07);
  --text-primary: #e0f5ec;
  --text-secondary: #82b8a0;
  --text-tertiary: #5a8874;
  --accent: #10b981;
  --accent-hover: #34d399;
  --gradient-accent: linear-gradient(135deg, #10b981, #14b8a6);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(20,184,166,0.06));
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-subtle: rgba(16, 185, 129, 0.08);
  --border-color: rgba(80, 220, 160, 0.08);
  --border-strong: rgba(80, 220, 160, 0.14);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.15), 0 0 60px rgba(20, 184, 166, 0.1);
  --btn-glow: 0 4px 20px rgba(16, 185, 129, 0.35), 0 0 40px rgba(20, 184, 166, 0.15);
  --header-bg: rgba(10, 26, 20, 0.88);
}

/* === Ivory Theme — Light Elegant === */
[data-theme="ivory"] {
  --bg-base: #faf8f5;
  --bg-surface: #ffffff;
  --bg-elevated: #f5f0eb;
  --text-primary: #1a1a2e;
  --text-secondary: #6b6880;
  --text-tertiary: #9e9bae;
  --accent: #c8985e;
  --accent-hover: #b8863f;
  --gradient-accent: linear-gradient(135deg, #c8985e, #d4a853);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(200,152,94,0.08), rgba(212,168,83,0.04));
  --accent-glow: rgba(200, 152, 94, 0.2);
  --accent-subtle: rgba(200, 152, 94, 0.08);
  --border-color: rgba(26, 26, 46, 0.08);
  --border-strong: rgba(26, 26, 46, 0.15);
  --success: #2d9d78;
  --success-bg: rgba(45, 157, 120, 0.08);
  --warning: #e8a838;
  --warning-bg: rgba(232, 168, 56, 0.08);
  --error: #d44848;
  --error-bg: rgba(212, 72, 72, 0.06);
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
  --shadow-md: 0 4px 20px rgba(26, 26, 46, 0.06);
  --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.08);
  --shadow-glow: 0 0 30px rgba(200, 152, 94, 0.12);
  --btn-glow: 0 4px 15px rgba(200, 152, 94, 0.25);
  --header-bg: rgba(250, 248, 245, 0.88);
}

/* === Cotton Theme — Light Playful === */
[data-theme="cotton"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-accent-subtle: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.04));
  --accent-glow: rgba(99, 102, 241, 0.2);
  --accent-subtle: rgba(99, 102, 241, 0.06);
  --border-color: rgba(30, 41, 59, 0.08);
  --border-strong: rgba(30, 41, 59, 0.14);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.08);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.08);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.06);
  --shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.06);
  --shadow-md: 0 4px 20px rgba(30, 41, 59, 0.08);
  --shadow-lg: 0 12px 40px rgba(30, 41, 59, 0.1);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.1);
  --btn-glow: 0 4px 15px rgba(99, 102, 241, 0.25);
  --header-bg: rgba(248, 250, 252, 0.88);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s var(--ease), color 0.3s var(--ease);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.hidden { display: none !important; }

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-in { animation: fadeUp 0.5s var(--ease) both; }
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* === Loading Spinner === */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.loader::after {
  content: '';
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: var(--text-primary);
  animation: slideIn 0.4s var(--ease);
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--error); }

/* === Header — Frosted Glass Nav === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s var(--ease);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo .version {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.nav { display: flex; gap: 0.25rem; }
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  position: relative;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
}
.header-right { display: flex; align-items: center; gap: 1rem; }

/* Credit Badge — Gradient Glow */
.credit-badge {
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: var(--gradient-accent);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  box-shadow: var(--btn-glow);
}
.user-name { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }
.theme-switcher {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-switcher:hover { border-color: var(--accent); }
.theme-switcher option, select option {
  background: #1c1c26;
  color: #f0ece6;
}
[data-theme="ivory"] select option,
[data-theme="cotton"] select option {
  background: #ffffff;
  color: #1a1a2e;
}

/* === Buttons === */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient-accent);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-glow);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}
.btn-danger:hover { background: var(--error-bg); }
.btn-full { width: 100%; justify-content: center; padding: 0.75rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* === Layout === */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  min-height: calc(100vh - 64px);
}

/* === Auth Pages === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80vw;
  height: 80vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  animation: gradientShift 8s ease infinite;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.auth-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: scaleIn 0.5s var(--ease);
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: var(--gradient-accent);
  z-index: -1;
  opacity: 0.25;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.subtitle {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }
.field-hint { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 400; }
.field-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.4rem; line-height: 1.5; padding: 0.5rem 0.6rem; background: var(--bg-elevated); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.field-desc em { color: var(--text-tertiary); }

/* Info icon */
.select-with-info { display: flex; align-items: center; gap: 0.4rem; }
.select-with-info select { flex: 1; }
.info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  color: var(--text-tertiary); font-size: 0.7rem; font-weight: 700;
  cursor: pointer; flex-shrink: 0; user-select: none;
  transition: background 0.2s, color 0.2s;
}
.info-icon:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
label .info-icon { vertical-align: middle; margin-left: 0.3rem; }

/* Tooltip hint box */
.field-tooltip {
  font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.4rem;
  line-height: 1.5; padding: 0.5rem 0.65rem;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.field-tooltip.hidden { display: none; }
.hint-example { color: var(--text-tertiary); font-style: italic; }

/* Suggest button */
.btn-suggest {
  font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  color: var(--text-tertiary); cursor: pointer; margin-left: 0.4rem;
  vertical-align: middle; transition: all 0.2s;
}
.btn-suggest:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
input, select, textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.925rem;
  transition: all 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-tertiary); }
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}
.error-msg {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* === Page Header === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.5s var(--ease);
}
.page-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-actions { display: flex; gap: 0.75rem; }
.section { margin-top: 3rem; }
.section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.stat-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* === Project Grid === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* === Cards — Glassmorphism === */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

/* === Detail Layout === */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.detail-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  animation: fadeUp 0.5s var(--ease) backwards;
}
.detail-card:nth-child(2) { animation-delay: 0.1s; }
.detail-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-content p { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.detail-content strong { color: var(--text-primary); font-weight: 600; }

/* === Job List === */
.job-list { display: flex; flex-direction: column; gap: 0.75rem; }
.job-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.job-item:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  transform: translateX(4px);
}
.meta-text { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 0.2rem; }

/* === Status Badges === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-done { background: var(--success-bg); color: var(--success); }
.status-done::before { background: var(--success); }
.status-pending, .status-planning, .status-generating, .status-stitching {
  background: var(--warning-bg); color: var(--warning);
}
.status-pending::before, .status-planning::before, .status-generating::before, .status-stitching::before {
  background: var(--warning); animation: pulse 1.5s infinite;
}
.status-failed { background: var(--error-bg); color: var(--error); }
.status-failed::before { background: var(--error); }

/* === Job Detail === */
.job-status-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.4s var(--ease);
}
.progress-steps {
  display: flex;
  margin-bottom: 2.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  animation: fadeUp 0.5s var(--ease) 0.1s backwards;
}
.progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0.5rem;
}
.progress-step::after {
  content: '';
  position: absolute;
  top: 50%; right: -1px;
  width: 2px; height: 60%;
  transform: translateY(-50%);
  background: var(--border-color);
}
.progress-step:last-child::after { display: none; }
.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  transition: color 0.3s;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  margin: 0.5rem auto 0;
  transition: all 0.3s var(--ease);
}
.progress-step.active .step-label { color: var(--accent); }
.progress-step.active .step-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.progress-step.completed .step-label { color: var(--success); }
.progress-step.completed .step-dot { background: var(--success); }

/* Video */
.video-wrap {
  margin: 2rem 0;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  animation: scaleIn 0.5s var(--ease);
}
.video-player {
  width: 100%;
  max-height: 600px;
  border-radius: var(--radius-sm);
  background: #000;
}
.video-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--error);
}
.scene-list { display: grid; gap: 1rem; }
.scene-item {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.25s var(--ease);
}
.scene-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.scene-header strong { font-family: var(--font-display); font-size: 0.95rem; }
.scene-content p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-tertiary); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; margin-bottom: 1.5rem; }

/* Confirm Dialog */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

/* Non-blocking "generating" pill — floats in the corner, app stays usable.
   Multiple tasks stack vertically. */
.busy-tray {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* tray itself doesn't block; pills are interactive */
}
.busy-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 340px;
  padding: 12px 16px;
  background: var(--bg-secondary, #1a1a1f);
  border: 1px solid var(--border, #2c2c34);
  border-left: 3px solid var(--accent, #c026d3);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  animation: slideInRight 0.25s ease;
}
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.busy-pill .busy-spinner {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent, #c026d3);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.busy-pill .busy-text { min-width: 0; }
.busy-pill .busy-msg { font-size: 0.88rem; font-weight: 600; color: var(--text-primary, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busy-pill .busy-sub { font-size: 0.74rem; color: var(--text-secondary, #aaa); }
.busy-pill.done { border-left-color: #22c55e; }
.busy-pill.done .busy-spinner { border-top-color: #22c55e; animation: none; border: 3px solid #22c55e; }
.dialog {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s var(--ease);
}
.dialog h3 {
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
}
.dialog p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.dialog-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

/* === Talent Gallery === */
.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.talent-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.talent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.talent-card:hover::before { opacity: 1; }
.talent-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.talent-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid transparent;
  background-image: var(--gradient-accent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.talent-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--accent);
  font-size: 2rem;
  font-family: var(--font-display);
}
.talent-card .card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.talent-card .card-meta { font-size: 0.8rem; color: var(--text-tertiary); }
.talent-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  overflow: hidden;
  width: 100%;
}
.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.gallery-img:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.03);
}
.gallery-item { position: relative; display: inline-block; }
.talent-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}
.talent-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  display: block;
}
.talent-thumb span {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.gallery-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .gallery-delete-btn { opacity: 1; }
.gallery-delete-btn:hover { background: var(--error); }
.talent-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  background: var(--accent-subtle);
  color: var(--accent);
}
.talent-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.talent-select-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.talent-select-card:hover { border-color: var(--accent); }
.talent-select-card.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: var(--shadow-glow);
}
.talent-select-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}
.talent-select-card .select-name { font-size: 0.8rem; font-weight: 600; }

/* === Image Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* === Strategy & Variants === */
.strategy-block {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.5s var(--ease) backwards;
}
.strategy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.strategy-header h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}
.angle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.angle-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.25s var(--ease);
  position: relative;
}
.angle-card:hover {
  border-color: var(--border-strong);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.angle-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.angle-check input { cursor: pointer; }
.angle-hook {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.angle-meta {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.angle-meta strong { color: var(--text-primary); font-weight: 600; }

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.variant-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.variant-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.variant-card:hover::before { opacity: 1; }
.variant-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.variant-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.variant-hook {
  font-style: italic;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.variant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

/* === Storyboard Scenes === */
.scene-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}
.scene-img-wrap { position: relative; }
.scene-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.scene-img:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.scene-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.scene-details strong { color: var(--text-primary); }

/* === Credit Packages === */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.package-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.package-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.package-card:hover::before { opacity: 1; }
.package-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* === Ads Studio — Spacious Redesign === */
.ads-progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  animation: fadeUp 0.5s var(--ease);
}
.ads-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.ads-step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 2px solid var(--border-color);
  color: var(--text-tertiary);
  transition: all 0.3s var(--ease);
}
.ads-step.active .ads-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.ads-step.completed .ads-step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.ads-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ads-step.active .ads-step-label { color: var(--accent); }
.ads-step.completed .ads-step-label { color: var(--success); }
.ads-step-line {
  width: 80px;
  height: 2px;
  background: var(--border-color);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
  border-radius: 1px;
  transition: background 0.3s;
}
.ads-step-line.completed { background: var(--success); }

.ads-brief-form {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ads-section {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.ads-section:hover { border-color: var(--border-strong); }
.ads-section-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.75rem 2rem 1rem;
}
.ads-section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.ads-section-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}
.ads-section-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
}
.ads-section-body {
  padding: 1rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ads-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.ads-submit-area {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2rem;
}

.ads-concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.ads-concept-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.ads-concept-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.ads-concept-card:hover::before { opacity: 1; }
.ads-concept-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.ads-concept-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ads-concept-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.ads-concept-hook {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin: 0;
}
.ads-concept-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.ads-concept-btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.ads-scenes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

[data-theme="ivory"] .ads-section,
[data-theme="ivory"] .ads-concept-card,
[data-theme="cotton"] .ads-section,
[data-theme="cotton"] .ads-concept-card {
  backdrop-filter: none;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
[data-theme="cotton"] .ads-concept-card::before {
  opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header-inner { padding: 0 1rem; }
  .nav { display: none; }
  .main { padding: 1.5rem 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .user-name { display: none; }
  .talent-grid { grid-template-columns: repeat(2, 1fr); }
  .talent-gallery { grid-template-columns: repeat(2, 1fr); }
  .talent-select-grid { grid-template-columns: repeat(3, 1fr); }
  .angle-grid { grid-template-columns: 1fr; }
  .variant-grid { grid-template-columns: 1fr; }
  .scene-body { grid-template-columns: 1fr; }
  .packages-grid { grid-template-columns: 1fr; }
  .ads-form-row-3 { grid-template-columns: 1fr; }
  .ads-concepts-grid { grid-template-columns: 1fr; }
  .ads-progress-steps { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { margin: 1rem; padding: 2rem; }
  .talent-grid { grid-template-columns: 1fr; }
}

/* === Light theme overrides for glassmorphism === */
[data-theme="ivory"] .card,
[data-theme="ivory"] .stat-card,
[data-theme="ivory"] .detail-card,
[data-theme="ivory"] .talent-card,
[data-theme="ivory"] .package-card,
[data-theme="ivory"] .strategy-block,
[data-theme="ivory"] .scene-item,
[data-theme="ivory"] .form-card,
[data-theme="ivory"] .auth-card,
[data-theme="ivory"] .dialog,
[data-theme="ivory"] .toast,
[data-theme="ivory"] .job-item,
[data-theme="cotton"] .card,
[data-theme="cotton"] .stat-card,
[data-theme="cotton"] .detail-card,
[data-theme="cotton"] .talent-card,
[data-theme="cotton"] .package-card,
[data-theme="cotton"] .strategy-block,
[data-theme="cotton"] .scene-item,
[data-theme="cotton"] .form-card,
[data-theme="cotton"] .auth-card,
[data-theme="cotton"] .dialog,
[data-theme="cotton"] .toast,
[data-theme="cotton"] .job-item {
  backdrop-filter: none;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}
[data-theme="ivory"] .card:hover,
[data-theme="ivory"] .stat-card:hover,
[data-theme="ivory"] .talent-card:hover,
[data-theme="ivory"] .package-card:hover,
[data-theme="cotton"] .card:hover,
[data-theme="cotton"] .stat-card:hover,
[data-theme="cotton"] .talent-card:hover,
[data-theme="cotton"] .package-card:hover {
  box-shadow: var(--shadow-md);
}

/* Cotton theme: colorful border-top on cards */
[data-theme="cotton"] .card::before,
[data-theme="cotton"] .stat-card::before,
[data-theme="cotton"] .talent-card::before,
[data-theme="cotton"] .package-card::before,
[data-theme="cotton"] .variant-card::before {
  opacity: 0.6;
}

/* Ivory theme: subtle gold border on hover */
[data-theme="ivory"] .card:hover,
[data-theme="ivory"] .talent-card:hover,
[data-theme="ivory"] .package-card:hover {
  border-color: rgba(200, 152, 94, 0.3);
}

/* Storyboard page (2026-10-02): one clear status block + an obvious next step */
.sb-progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), #ec4899, var(--accent));
  background-size: 200% 100%;
  animation: sbBarMove 1.4s linear infinite;
  transition: width 0.5s ease;
}
@keyframes sbBarMove { from { background-position: 200% 0; } to { background-position: 0 0; } }
.sb-cta-ready { animation: sbCtaPulse 1.8s ease-in-out infinite; }
@keyframes sbCtaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
}

/* Tick boxes and radio buttons must not inherit the full-width text-box style
   (2026-10-02: they were stretching to 100% and drifting away from their label). */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ✨ AI buttons — a real button look, with the credit cost in the label. */
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.15s var(--ease);
}
.ai-btn:hover:not(:disabled) { background: var(--accent); color: #fff; transform: translateY(-1px); }
.ai-btn:active:not(:disabled) { transform: translateY(0); }
.ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* A label that carries an AI button: text on the left, button on the right. */
label:has(> .ai-btn) { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

/* Option rows (tick box + title + short note), used in the Generate Video pop-up. */
.opt-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.opt-row:hover { border-color: var(--accent); }
.opt-row:has(input:checked) { border-color: var(--accent); background: var(--accent-subtle); }
.opt-row input { width: 16px; height: 16px; margin-top: 0.15rem; flex: 0 0 auto; }
.opt-row .opt-title { display: block; font-size: 0.85rem; font-weight: 600; }
.opt-row .opt-note { display: block; font-size: 0.72rem; color: var(--text-secondary); line-height: 1.35; }

/* Credits page (wallet) */
.wallet-card { padding: 1.25rem 1.5rem; }
.wallet-balance { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; color: var(--text-primary); }
.wallet-balance span { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.wallet-expiring { margin-top: 0.4rem; font-size: 0.85rem; color: var(--warning, #b7791f); }
.order-banner { margin-top: 0.9rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--border-color); font-size: 0.9rem; }
.order-banner.ok { border-color: var(--success); color: var(--success); }
.pack-badge { display: inline-block; margin-bottom: 0.5rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; }
.ref-link-row { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.ref-link-row input { flex: 1; min-width: 0; padding: 0.45rem 0.65rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); }

/* Admin → Pricing & Payments */
.ap-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ap-table th, .ap-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: middle; }
.ap-table input { width: 100%; min-width: 60px; padding: 0.3rem 0.45rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); }
.ap-loss { color: var(--danger, #c53030); font-weight: 600; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem 1rem; }
.ap-grid label, .ap-gw label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; margin-bottom: 0.5rem; }
.ap-gw { padding: 1rem; }
#ap-prices, #ap-packs { overflow-x: auto; }
.ap-table .opt-row { display: flex; flex-direction: row; align-items: center; gap: 0.3rem; white-space: nowrap; padding: 0; border: 0; background: none; }
.ap-table input[type="checkbox"] { width: auto; min-width: 0; }

/* Admin → Cost check */
.cost-warning { margin: 0 0 0.6rem; padding: 0.65rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid #e0746a; background: rgba(224,116,106,0.1); color: var(--text-primary); font-size: 0.88rem; text-decoration: none; }
#ac-days, #ac-outside, #ac-customers { overflow-x: auto; }
.ac-period { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.25rem; }
.ac-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; }
.ac-cards .form-card { padding: 0.8rem 0.9rem; }
.ac-cards strong { display: block; font-size: 1.3rem; margin: 0.2rem 0; }
#ac-made { overflow-x: auto; }
/* Ads Studio Step 2 — saved concepts */
.cc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.cc-regen { padding: 0.8rem 1rem; margin-bottom: 1rem; }
.cc-regen label { font-size: 0.85rem; display: block; margin-bottom: 0.4rem; }
.cc-regen-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cc-regen-row input { flex: 1; min-width: 220px; padding: 0.45rem 0.65rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); }
.cc-history { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; }
.cc-pick { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; cursor: pointer; }
.cc-pick input { width: auto; }
.cc-used { font-size: 0.72rem; color: var(--success); font-weight: 600; }
.cc-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.cc-batch { padding: 0.9rem 1rem; margin-bottom: 1rem; border: 1px solid var(--accent); }
.cc-batch-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.cc-batch-bar { height: 10px; background: var(--bg-elevated); border-radius: 5px; overflow: hidden; margin-bottom: 0.6rem; }
.cc-batch-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-top: 1px solid var(--border-color); font-size: 0.85rem; flex-wrap: wrap; }
.cc-batch-row > span:first-child { flex: 1; min-width: 160px; }
.cc-batch-status { font-size: 0.78rem; color: var(--text-secondary); }
.cc-batch-status.working { color: var(--accent); font-weight: 600; }
.cc-batch-status.done { color: var(--success); font-weight: 600; }
.cc-batch-status.failed { color: #e0746a; font-weight: 600; }

/* Premium page — Premium Studio (plan a video, see 3 ideas, choose one) */
.ps-panel { max-width: 760px; }
.ps-panel label, .ps-q, .ps-label-plain { text-transform: none; letter-spacing: 0; }
.ps-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.ps-fields:disabled { opacity: 0.6; }
.ps-step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.9rem; position: relative; padding-bottom: 1.6rem; }
.ps-step + .ps-step::before { content: ''; position: absolute; left: 1.1rem; top: -1.6rem; height: 1.3rem; width: 1px; background: var(--border-strong); }
.ps-num { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--accent); text-align: center; padding-top: 0.1rem; }
.ps-step-body { min-width: 0; }
.ps-q { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin: 0.2rem 0 0.75rem; }
.ps-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.6rem; }
.ps-tile { margin: 0; cursor: pointer; font-weight: 400; }
.ps-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ps-tile-body { display: flex; flex-direction: column; gap: 0.3rem; height: 100%; padding: 0.85rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.ps-tile-body strong { color: var(--text-primary); font-size: 0.95rem; }
.ps-tile-body span { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.45; }
.ps-tile:hover .ps-tile-body { border-color: var(--accent); }
.ps-tile input:checked + .ps-tile-body { border-color: var(--accent); background: var(--accent-subtle); box-shadow: inset 0 0 0 1px var(--accent); }
.ps-tile input:focus-visible + .ps-tile-body, .ps-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ps-more { margin-top: 1rem; display: grid; gap: 0.4rem; }
.ps-more label, .ps-label-plain { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin: 0.5rem 0 0.1rem; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0.75rem; }
.ps-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; width: max-content; max-width: 100%; }
.ps-seg label { margin: 0; cursor: pointer; }
.ps-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ps-seg span { display: block; padding: 0.5rem 1.1rem; font-size: 0.88rem; color: var(--text-secondary); }
.ps-seg label + label span { border-left: 1px solid var(--border-strong); }
.ps-seg input:checked + span { background: var(--accent-subtle); color: var(--text-primary); font-weight: 600; }
.ps-go { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0.4rem 0 0.9rem calc(2.25rem + 0.9rem); }
.ps-free { font-size: 0.85rem; color: var(--success); font-weight: 600; }
.ps-wait { display: flex; align-items: center; gap: 0.65rem; color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 1rem calc(2.25rem + 0.9rem); }
.ps-spin { width: 18px; height: 18px; flex: none; border: 2px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.ps-result { margin-top: 1.5rem; }
.ps-sets { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.35rem; margin-bottom: 0.9rem; font-size: 0.86rem; color: var(--text-tertiary); }
.ps-sets-label { font-weight: 600; margin-right: 0.2rem; }
.ps-set { background: none; border: 1px solid transparent; border-radius: 999px; padding: 0.2rem 0.65rem; font: inherit; color: var(--text-secondary); cursor: pointer; }
.ps-set:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-strong); }
.ps-set:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ps-set.is-current { color: var(--text-primary); font-weight: 600; background: var(--accent-subtle); border-color: var(--accent); }
.ps-set:disabled { cursor: default; opacity: 0.6; }
.ps-understood { max-width: 760px; padding: 0.9rem 1.1rem; margin-bottom: 1.1rem; border-left: 3px solid var(--accent); background: var(--bg-surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ps-understood p:last-child { color: var(--text-primary); line-height: 1.55; max-width: 70ch; }
.ps-sub { font-size: 0.8rem; font-weight: 600; color: var(--text-tertiary); margin: 0 0 0.35rem; }
.ps-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 1rem; align-items: stretch; }
.ps-card { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; padding: 1.15rem; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-surface); }
.ps-card.is-picked { border-color: var(--success); box-shadow: inset 0 0 0 1px var(--success); }
.ps-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ps-type { font-size: 0.78rem; font-weight: 600; color: var(--accent); padding: 0.2rem 0.6rem; border: 1px solid var(--accent); border-radius: 999px; }
.ps-chosen { font-size: 0.78rem; font-weight: 700; color: var(--success); background: var(--success-bg); padding: 0.2rem 0.6rem; border-radius: 999px; }
.ps-title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; margin: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.ps-hook { position: relative; padding: 0.8rem 0.9rem 0.8rem 1.1rem; background: var(--bg-elevated); border-radius: var(--radius-sm); overflow: hidden; }
.ps-hook::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gradient-accent); }
.ps-hook p { margin: 0; overflow-wrap: anywhere; }
.ps-hook-seen { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.45; }
.ps-hook .ps-hook-said { margin-top: 0.5rem; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; line-height: 1.4; color: var(--text-primary); }
.ps-hook-tag { display: block; font-family: var(--font-body); font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--text-tertiary); margin-bottom: 0.1rem; }
.ps-beats { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; font-size: 0.88rem; line-height: 1.45; color: var(--text-secondary); }
.ps-beats li { overflow-wrap: anywhere; }
.ps-beats li::marker { color: var(--text-tertiary); font-weight: 600; }
.ps-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ps-chip { font-size: 0.76rem; padding: 0.2rem 0.6rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-secondary); }
.ps-chip-wow { border-color: transparent; background: var(--accent-subtle); color: var(--text-primary); font-weight: 600; }
.ps-why p:last-child { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.ps-use { margin-top: auto; }
.ps-again { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.1rem; }
.ps-again .meta-text { margin: 0; }
.ps-result.is-new .ps-card { animation: fadeUp 0.5s var(--ease) both; animation-delay: calc(var(--ps-i, 0) * 90ms); }
@media (max-width: 480px) {
  .ps-step { grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; }
  .ps-step + .ps-step::before { left: 0.8rem; }
  .ps-num { font-size: 1.5rem; }
  .ps-go, .ps-wait { margin-left: 0; }
  .ps-go .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-result.is-new .ps-card { animation: none; }
  .ps-spin { animation-duration: 2s; }
}
/* Playfair's default digits are old-style ("RM500k" reads as "RM5ook"); the served file has lnum. */
.ps-panel, .ps-result { font-variant-numeric: lining-nums; }

/* Premium page — storyboard of the chosen idea: one row per shot, picture first */
.psb { margin-top: 1.5rem; max-width: 760px; padding: 1.15rem; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--bg-surface); font-variant-numeric: lining-nums; }
.psb-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.75rem; }
.psb-title { font-family: var(--font-display); font-size: 1.3rem; margin: 0; color: var(--text-primary); }
.psb-for { margin: 0; font-size: 0.88rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.psb-intro { margin: 0.6rem 0 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; max-width: 62ch; }
.psb-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.psb-bad, .psb-problems { margin: 0.6rem 0 0; color: var(--error); font-size: 0.86rem; line-height: 1.45; overflow-wrap: anywhere; }
.psb-problems { padding-left: 1.1rem; display: grid; gap: 0.2rem; }
.psb-bad a { color: inherit; text-decoration: underline; font-weight: 600; }
.psb-ok { font-size: 0.82rem; color: var(--success); font-weight: 600; }
.psb-progress { margin: 1rem 0 0.25rem; }
.psb-progress p { margin: 0.5rem 0 0; color: var(--text-primary); font-size: 0.9rem; }
.psb-progress .meta-text { color: var(--text-tertiary); font-size: 0.8rem; }
.psb-bar { height: 6px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; }
.psb-bar span { display: block; height: 100%; border-radius: inherit; background: var(--gradient-accent); transition: width 0.6s var(--ease); }
.psb-bar.is-busy span { animation: psbSweep 1.6s var(--ease) infinite; }
@keyframes psbSweep { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.psb-shots { list-style: none; margin: 1rem 0 0; padding: 0; }
.psb-shot { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); grid-template-areas: "pic head" "pic words" "says says" "redo redo"; align-content: start; gap: 0.55rem 0.9rem; padding: 1rem 0; border-top: 1px solid var(--border-color); }
.psb-pic { grid-area: pic; align-self: start; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated); cursor: zoom-in; }
.psb-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.psb-pic:disabled { cursor: default; opacity: 1; }
.psb-pic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.psb-pic-wait { display: grid; place-items: center; height: 100%; padding: 0.4rem; font-size: 0.76rem; color: var(--text-tertiary); }
.psb-head { grid-area: head; display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
.psb-n { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; color: var(--accent); }
.psb-kind { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.psb-says { grid-area: says; min-width: 0; }
.psb-says .ps-sub { display: block; }
.psb-says textarea { width: 100%; resize: vertical; line-height: 1.5; }
.psb-line { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 1.02rem; line-height: 1.45; color: var(--text-primary); overflow-wrap: anywhere; }
.psb-words { grid-area: words; min-width: 0; }
.psb-redo { grid-area: redo; min-width: 0; }
.psb-redo-form { display: grid; gap: 0.35rem; }
.psb-redo-form .psb-row { margin-top: 0.2rem; }
.psb-approve { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin: 0 -1.15rem -1.15rem; padding: 0.9rem 1.15rem; border-top: 1px solid var(--border-strong); border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(var(--bg-surface), var(--bg-surface)), var(--bg-base); }
.psb-approve .meta-text { margin: 0; }
.psb-approve .psb-bad { flex-basis: 100%; margin: 0; }
.psb-done { margin-top: 0.5rem; padding: 0.9rem 1.1rem; border: 1px solid var(--success); background: var(--success-bg); border-radius: var(--radius-sm); color: var(--text-primary); line-height: 1.5; }
.psb-done .meta-text { display: block; }
.psb-view { padding: 0; border: 0; background: transparent; max-width: min(92vw, 480px); text-align: center; }
.psb-view::backdrop { background: rgba(0, 0, 0, 0.82); }
.psb-view img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto 0.75rem; border-radius: var(--radius-sm); }
.psb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 600px) {
  .psb-shot { grid-template-columns: 8.5rem minmax(0, 1fr); grid-template-areas: "pic head" "pic says" "pic words" "pic redo"; grid-template-rows: auto auto auto 1fr; gap: 0.6rem 1.25rem; }
}
@media (max-width: 480px) {
  .psb { padding: 0.9rem; }
  .psb-approve { margin: 0 -0.9rem -0.9rem; padding: 0.8rem 0.9rem; }
  .psb-approve .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .psb-bar.is-busy span { animation: none; }
  .psb-bar span { transition: none; }
}
