/* ============================================================
   STORYBOOK AI — DESIGN SYSTEM
   Premium editorial design. Warm, personal, literary.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors — Warm Editorial Palette */
  --ink:            #1a1410;
  --ink-soft:       #2d2520;
  --ink-muted:      #6b5e52;
  --ink-faint:      #a09080;

  --paper:          #faf7f2;
  --paper-warm:     #f5f0e8;
  --cream:          #ede8dc;
  --parchment:      #e0d8cc;

  --amber:          #c8702a;
  --amber-light:    #e8955a;
  --amber-pale:     #fdf0e5;
  --amber-glow:     rgba(200, 112, 42, 0.12);

  --sage:           #5a7a6a;
  --plum:           #6b3d6e;
  --plum-light:     #9b6d9e;
  --plum-pale:      #f5eef6;

  --gold:           #c9a227;
  --gold-pale:      #fdf8e8;

  /* Sentiment Colors */
  --s-nostalgic:    #8b6b4a;
  --s-humorous:     #c8702a;
  --s-healing:      #5a7a6a;
  --s-epic:         #4a5a8a;
  --s-childrens:    #8a5a8a;
  --s-honest:       #6a4a3a;
  --s-poetic:       #5a4a7a;
  --s-mysterious:   #3a4a5a;

  /* Status */
  --success:        #3d7a5a;
  --success-pale:   #eef6f2;
  --warning:        #b87a2a;
  --warning-pale:   #fef5e8;
  --error:          #9a3a3a;
  --error-pale:     #fef0f0;

  /* Dark Mode */
  --dark-bg:        #141210;
  --dark-surface:   #1f1c19;
  --dark-card:      #2a2622;
  --dark-border:    #3a3530;
  --dark-text:      #f0ebe3;
  --dark-muted:     #8a7e72;

  /* Typography */
  --font-editorial: 'Playfair Display', Georgia, serif;
  --font-prose:     'Lora', Georgia, serif;
  --font-ui:        'Plus Jakarta Sans', system-ui, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;
  --radius-xl:  2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(26,20,16,0.04);
  --shadow-sm:  0 2px 8px rgba(26,20,16,0.08);
  --shadow-md:  0 4px 20px rgba(26,20,16,0.12);
  --shadow-lg:  0 8px 40px rgba(26,20,16,0.16);
  --shadow-xl:  0 16px 64px rgba(26,20,16,0.20);
  --shadow-amber: 0 4px 24px rgba(200, 112, 42, 0.25);

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-xslow: 600ms;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; }

/* ── Screen Management ── */
.screen {
  display: none;
  min-height: 100vh;
  animation: screenFadeIn var(--duration-slow) var(--ease-out);
}
.screen.active { display: block; }

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

/* ============================================================
   LANDING PAGE
   ============================================================ */
#screen-landing {
  background: var(--ink);
  color: var(--dark-text);
}

.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-4) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(20,18,16,0.95), transparent);
  backdrop-filter: blur(12px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-editorial);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--dark-text);
  letter-spacing: -0.01em;
}

.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  box-shadow: var(--shadow-amber);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--space-8) var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,112,42,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(107,61,110,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(90,122,106,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-1 { width: 400px; height: 400px; top: -100px; left: -100px; background: rgba(200,112,42,0.06); animation-delay: 0s; }
.hero-orb-2 { width: 300px; height: 300px; bottom: -50px; right: -50px; background: rgba(107,61,110,0.07); animation-delay: 3s; }
.hero-orb-3 { width: 250px; height: 250px; top: 40%; left: 60%; background: rgba(90,122,106,0.05); animation-delay: 5s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(200,112,42,0.12);
  border: 1px solid rgba(200,112,42,0.25);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--amber-light);
  margin-bottom: var(--space-8);
  letter-spacing: 0.03em;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--amber-light);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-headline {
  font-family: var(--font-editorial);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  max-width: 800px;
  background: linear-gradient(135deg, var(--dark-text) 0%, rgba(240,235,227,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-headline em {
  font-style: italic;
  background: linear-gradient(135deg, var(--amber-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subheadline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--dark-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: var(--space-10);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-16);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--dark-muted);
}

.hero-trust-item svg { color: var(--sage); }

/* Before/After Demo */
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-6);
  align-items: center;
  max-width: 960px;
  margin: var(--space-16) auto var(--space-20);
  padding: 0 var(--space-8);
}

.ba-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.ba-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.ba-card.before::before { background: linear-gradient(90deg, var(--dark-border), var(--ink-muted)); }
.ba-card.after::before  { background: linear-gradient(90deg, var(--amber), var(--gold)); }

.ba-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ba-card.before .ba-label { color: var(--dark-muted); }
.ba-card.after .ba-label { color: var(--amber-light); }

.ba-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--dark-muted);
}

.ba-card.after .ba-content {
  font-family: var(--font-prose);
  font-size: 1rem;
  color: rgba(240,235,227,0.85);
  font-style: italic;
}

.ba-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--amber);
}

.ba-arrow-icon {
  width: 40px; height: 40px;
  background: rgba(200,112,42,0.12);
  border: 1px solid rgba(200,112,42,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.ba-arrow-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}

/* How It Works */
.how-section {
  background: var(--dark-surface);
  padding: var(--space-24) var(--space-8);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-editorial);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--dark-text);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--dark-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  max-width: 960px;
  margin: 0 auto;
}

.step-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: rgba(200,112,42,0.3);
}

.step-number {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 16px rgba(200,112,42,0.3);
}

.step-title {
  font-family: var(--font-editorial);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: var(--space-2);
}

.step-desc {
  font-size: 0.875rem;
  color: var(--dark-muted);
  line-height: 1.6;
}

/* Sentiment Showcase */
.sentiment-section {
  padding: var(--space-24) 0;
  overflow: hidden;
}

.sentiment-scroll {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.sentiment-scroll::-webkit-scrollbar { display: none; }

.sentiment-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.sentiment-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  transition: opacity var(--duration-base);
}

.sentiment-card[data-sentiment="nostalgic"]::before { background: linear-gradient(90deg, #8b6b4a, #c9a227); }
.sentiment-card[data-sentiment="humorous"]::before  { background: linear-gradient(90deg, #c8702a, #e8955a); }
.sentiment-card[data-sentiment="healing"]::before   { background: linear-gradient(90deg, #5a7a6a, #7aa08a); }
.sentiment-card[data-sentiment="epic"]::before      { background: linear-gradient(90deg, #4a5a8a, #6a7aaa); }
.sentiment-card[data-sentiment="childrens"]::before { background: linear-gradient(90deg, #8a5a8a, #aa7aaa); }
.sentiment-card[data-sentiment="honest"]::before    { background: linear-gradient(90deg, #6a4a3a, #8a6a5a); }
.sentiment-card[data-sentiment="poetic"]::before    { background: linear-gradient(90deg, #5a4a7a, #7a6a9a); }
.sentiment-card[data-sentiment="mysterious"]::before { background: linear-gradient(90deg, #3a4a5a, #5a6a7a); }

.sentiment-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.sentiment-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.sentiment-emoji { font-size: 1.5rem; }

.sentiment-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-text);
}

.sentiment-excerpt {
  font-family: var(--font-prose);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(240,235,227,0.7);
  font-style: italic;
}

/* CTA & Footer */
.cta-section {
  padding: var(--space-24) var(--space-8);
  text-align: center;
  background: linear-gradient(135deg, rgba(200,112,42,0.06), rgba(107,61,110,0.04));
  border-top: 1px solid var(--dark-border);
}

.landing-footer {
  border-top: 1px solid var(--dark-border);
  padding: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: var(--dark-muted);
}

.footer-links { display: flex; gap: var(--space-6); }
.footer-links a:hover { color: var(--amber-light); transition: color var(--duration-fast); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--duration-fast);
}

.btn:hover::before { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }

.btn-sm  { padding: 0.4375rem 0.875rem;  font-size: 0.8125rem; }
.btn-md  { padding: 0.6875rem 1.375rem;  font-size: 0.9375rem; }
.btn-lg  { padding: 0.875rem  1.75rem;   font-size: 1.0625rem; }
.btn-xl  { padding: 1.0625rem 2.25rem;   font-size: 1.125rem;  border-radius: var(--radius-lg); }

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #d4803a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(200,112,42,0.35);
}
.btn-primary:hover {
  box-shadow: 0 4px 24px rgba(200,112,42,0.5);
  transform: translateY(-1px);
}

.btn-ghost-light {
  background: rgba(240,235,227,0.08);
  color: var(--dark-text);
  border-color: rgba(240,235,227,0.15);
}
.btn-ghost-light:hover {
  background: rgba(240,235,227,0.12);
  border-color: rgba(240,235,227,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--parchment);
}
.btn-ghost:hover {
  background: var(--paper-warm);
  color: var(--ink);
  border-color: var(--cream);
}

.btn-secondary {
  background: var(--paper-warm);
  color: var(--ink);
  border-color: var(--parchment);
}
.btn-secondary:hover {
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-outline-amber {
  background: transparent;
  color: var(--amber);
  border-color: rgba(200,112,42,0.4);
}
.btn-outline-amber:hover {
  background: var(--amber-glow);
  border-color: var(--amber);
}

/* Wizard */
#screen-wizard {
  background: var(--paper);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.wizard-header {
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--parchment);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.wizard-logo {
  font-family: var(--font-editorial);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.wizard-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.wizard-steps { display: flex; align-items: center; gap: var(--space-2); }
.wizard-step { display: flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; font-weight: 500; color: var(--ink-faint); transition: color var(--duration-base); }
.wizard-step.active { color: var(--amber); }
.wizard-step.done   { color: var(--sage); }

.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--parchment);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--duration-base) var(--ease-out);
  background: var(--paper);
}

.wizard-step.active .step-dot {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-pale);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.wizard-step.done .step-dot {
  border-color: var(--sage);
  background: var(--success-pale);
  color: var(--sage);
}

.step-connector { width: 24px; height: 1px; background: var(--parchment); }

.wizard-body {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
  width: 100%;
}

.wizard-step-content { display: none; animation: stepSlideIn var(--duration-slow) var(--ease-out); }
.wizard-step-content.active { display: block; }

@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-heading {
  font-family: var(--font-editorial);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.step-subheading {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.format-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.format-option::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  transition: height var(--duration-base);
}

.format-option:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.format-option.selected {
  border-color: var(--amber);
  background: var(--amber-pale);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.format-option.selected::before { height: 3px; }

.format-icon {
  width: 44px; height: 44px;
  background: var(--cream);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  transition: background var(--duration-base);
}
.format-option.selected .format-icon { background: linear-gradient(135deg, var(--amber), var(--gold)); }

.format-name { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.format-desc { font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.5; }

/* Page Count Selector Grid */
.page-count-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.page-count-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: left;
}

.page-count-option:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.page-count-option.selected {
  border-color: var(--amber);
  background: var(--amber-pale);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.pc-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pc-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.pc-desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── English Level Selector ── */
.english-level-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.english-level-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: left;
  width: 100%;
}

.english-level-option:hover {
  border-color: var(--amber);
  background: var(--amber-pale);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.english-level-option.selected {
  border-color: var(--amber);
  background: linear-gradient(135deg, var(--amber-pale) 0%, rgba(200,112,42,0.06) 100%);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.el-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.el-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.el-desc {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.el-example {
  font-size: 0.75rem;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.5;
  background: rgba(0,0,0,0.03);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--amber-glow);
}

.english-level-option.selected .el-example {
  border-left-color: var(--amber);
}

/* ── Language Selector ── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.lang-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: left;
  width: 100%;
}

.lang-option:hover {
  border-color: var(--amber);
  background: var(--amber-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.lang-option.selected {
  border-color: var(--amber);
  background: linear-gradient(135deg, var(--amber-pale) 0%, rgba(200,112,42,0.07) 100%);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.lang-flag {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.lang-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.lang-desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── Script Type Selector ── */
.script-type-panel {
  background: rgba(200,112,42,0.04);
  border: 1px solid var(--amber-glow);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.script-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.script-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: left;
  width: 100%;
}

.script-option:hover {
  border-color: var(--amber);
  background: var(--amber-pale);
}

.script-option.selected {
  border-color: var(--amber);
  background: linear-gradient(135deg, var(--amber-pale) 0%, rgba(200,112,42,0.06) 100%);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.script-icon {
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: var(--paper-warm);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: serif;
}

.script-option.selected .script-icon {
  background: var(--amber);
  color: white;
}

.script-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.script-desc {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.script-example {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.6;
  background: rgba(0,0,0,0.03);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--amber-glow);
}

.script-option.selected .script-example {
  border-left-color: var(--amber);
}

/* RTL direction for Urdu native script examples */
.script-example.rtl {
  direction: rtl;
  text-align: right;
  font-style: normal;
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Arial Unicode MS', serif;
  font-size: 1rem;
  line-height: 2;
}

.sentiment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.sentiment-option {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  text-align: left;
}

.sentiment-option:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sentiment-option.selected { box-shadow: 0 0 0 3px var(--amber-glow); }

.s-nostalgic.selected  { border-color: var(--s-nostalgic); background: #faf5ef; }
.s-humorous.selected   { border-color: var(--s-humorous);  background: var(--amber-pale); }
.s-healing.selected    { border-color: var(--s-healing);   background: #eef6f2; }
.s-epic.selected       { border-color: var(--s-epic);      background: #eef2f8; }
.s-childrens.selected  { border-color: var(--s-childrens); background: #f8eef8; }
.s-honest.selected     { border-color: var(--s-honest);    background: #f5efeb; }
.s-poetic.selected     { border-color: var(--s-poetic);    background: #f0eef8; }
.s-mysterious.selected { border-color: var(--s-mysterious);background: #eef0f5; }

.s-emoji { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }
.s-name { font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: var(--space-1); }
.s-tagline { font-size: 0.75rem; color: var(--ink-muted); line-height: 1.4; }

.form-group { margin-bottom: var(--space-6); }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: var(--space-2); }
.form-input {
  width: 100%;
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}
.form-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.form-input::placeholder { color: var(--ink-faint); }
.form-textarea { resize: vertical; min-height: 140px; line-height: 1.7; font-family: var(--font-prose); font-size: 1rem; }
.char-count { text-align: right; font-size: 0.75rem; color: var(--ink-faint); margin-top: var(--space-1); }

.story-input-area {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.story-input-area:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }

.story-input-toolbar { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--parchment); display: flex; align-items: center; gap: var(--space-2); }
.story-input-main {
  width: 100%;
  min-height: 260px;
  padding: var(--space-5);
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-prose);
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.8;
  resize: none;
}
.story-input-main::placeholder { color: var(--ink-faint); font-style: italic; }

.input-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  background: var(--paper-warm);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--parchment);
}

.wizard-footer {
  border-top: 1px solid var(--parchment);
  padding: var(--space-5) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  position: sticky;
  bottom: 0;
}
.wizard-footer-info { font-size: 0.8125rem; color: var(--ink-faint); }

/* Interview */
#screen-interview {
  background: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.interview-header {
  padding: var(--space-5) var(--space-8);
  border-bottom: 1px solid var(--parchment);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.interview-title { display: flex; flex-direction: column; }
.interview-title-main { font-family: var(--font-editorial); font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.interview-title-sub { font-size: 0.8125rem; color: var(--ink-muted); }

.interview-ai-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--plum-pale);
  border: 1px solid rgba(107,61,110,0.2);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--plum);
}
.ai-badge-dot { width: 6px; height: 6px; background: var(--plum-light); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }

.interview-body { max-width: 680px; margin: 0 auto; width: 100%; padding: var(--space-8); overflow-y: auto; }
.interview-memory-summary { background: var(--paper-warm); border: 1px solid var(--parchment); border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-8); }
.memory-summary-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--space-2); }
.memory-summary-text { font-family: var(--font-prose); font-size: 0.9375rem; color: var(--ink-muted); line-height: 1.7; font-style: italic; }

.ai-persona { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); }
.ai-quill {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--plum), var(--plum-light));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  box-shadow: 0 4px 16px rgba(107,61,110,0.3);
  flex-shrink: 0;
}
.ai-persona-name { font-size: 0.875rem; font-weight: 600; color: var(--plum); }
.ai-persona-title { font-size: 0.75rem; color: var(--ink-muted); }

.ai-intro-message {
  background: var(--plum-pale);
  border: 1px solid rgba(107,61,110,0.15);
  border-radius: var(--radius-lg);
  border-top-left-radius: var(--radius-sm);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink);
  animation: messageSlide var(--duration-slow) var(--ease-out);
}

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

.questions-container { display: flex; flex-direction: column; gap: var(--space-5); }
.question-card {
  background: var(--paper-warm);
  border: 2px solid var(--parchment);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  animation: questionReveal var(--duration-slow) var(--ease-out) both;
}
.question-card:nth-child(2) { animation-delay: 120ms; }
.question-card:nth-child(3) { animation-delay: 240ms; }

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

.question-card.answered { border-color: var(--sage); background: var(--success-pale); }
.question-header { padding: var(--space-4) var(--space-5); display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; }
.q-number {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--plum-pale);
  border: 1.5px solid rgba(107,61,110,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--plum);
  flex-shrink: 0;
  margin-top: 2px;
}
.question-card.answered .q-number { background: var(--success-pale); border-color: var(--sage); color: var(--sage); }

.q-text { font-size: 0.9375rem; color: var(--ink); line-height: 1.6; flex: 1; }
.q-status { font-size: 0.75rem; color: var(--ink-faint); flex-shrink: 0; }
.question-card.answered .q-status { color: var(--sage); }

.question-answer-area { padding: 0 var(--space-5) var(--space-5); display: none; }
.question-card.open .question-answer-area { display: block; }

.answer-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--paper);
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-prose);
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color var(--duration-fast);
  margin-bottom: var(--space-3);
}
.answer-textarea:focus { border-color: var(--plum-light); box-shadow: 0 0 0 2px rgba(107,61,110,0.1); }
.answer-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }

.answers-progress { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); padding: var(--space-4); background: var(--paper-warm); border-radius: var(--radius-md); border: 1px solid var(--parchment); }
.answers-progress-bar { flex: 1; height: 4px; background: var(--parchment); border-radius: var(--radius-full); overflow: hidden; }
.answers-progress-fill { height: 100%; background: linear-gradient(90deg, var(--plum), var(--plum-light)); border-radius: var(--radius-full); transition: width var(--duration-slow) var(--ease-out); }
.answers-progress-text { font-size: 0.75rem; color: var(--ink-muted); white-space: nowrap; }

.interview-footer { border-top: 1px solid var(--parchment); padding: var(--space-5) var(--space-8); display: flex; align-items: center; justify-content: space-between; background: var(--paper); }

/* Processing */
#screen-processing {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

#screen-processing .hero-bg { opacity: 0.6; }

.processing-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--plum), var(--amber));
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin-bottom: var(--space-8);
  box-shadow: 0 8px 40px rgba(107,61,110,0.4);
  animation: iconBreath 3s ease-in-out infinite;
}

@keyframes iconBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 40px rgba(107,61,110,0.4); }
  50% { transform: scale(1.06); box-shadow: 0 12px 60px rgba(200,112,42,0.4); }
}

.processing-headline { font-family: var(--font-editorial); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; color: var(--dark-text); margin-bottom: var(--space-4); line-height: 1.2; }
.processing-subtext { font-size: 1rem; color: var(--dark-muted); max-width: 440px; line-height: 1.7; margin-bottom: var(--space-10); }

.pipeline-stages { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; max-width: 380px; margin-bottom: var(--space-10); }
.pipeline-stage { display: flex; align-items: center; gap: var(--space-4); background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); transition: all var(--duration-base) var(--ease-out); }
.pipeline-stage.active { border-color: rgba(200,112,42,0.4); background: rgba(200,112,42,0.05); }
.pipeline-stage.done { border-color: rgba(90,122,106,0.4); background: rgba(90,122,106,0.05); }

.stage-indicator { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--dark-border); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; transition: all var(--duration-base); }
.pipeline-stage.active .stage-indicator { border-color: var(--amber); animation: stageSpin 1s linear infinite; }
.pipeline-stage.done .stage-indicator { border-color: var(--sage); background: var(--sage); color: white; }

@keyframes stageSpin {
  from { border-top-color: var(--amber); border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; transform: rotate(0deg); }
  to   { border-top-color: var(--amber); border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; transform: rotate(360deg); }
}

.stage-label { font-size: 0.875rem; font-weight: 500; color: var(--dark-muted); flex: 1; }
.pipeline-stage.active .stage-label { color: var(--dark-text); }
.pipeline-stage.done .stage-label { color: var(--sage); }

.stage-status { font-size: 0.75rem; color: var(--dark-muted); }
.pipeline-stage.active .stage-status { color: var(--amber-light); }
.pipeline-stage.done .stage-status { color: var(--sage); }

.streaming-preview { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-lg); padding: var(--space-6); max-width: 560px; width: 100%; text-align: left; min-height: 120px; display: flex; flex-direction: column; gap: var(--space-3); }
.streaming-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-light); }
.streaming-text { font-family: var(--font-prose); font-size: 0.9375rem; line-height: 1.7; color: rgba(240,235,227,0.8); font-style: italic; min-height: 72px; }
.streaming-cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--amber); border-radius: 1px; vertical-align: text-bottom; animation: blink 1s ease-in-out infinite; margin-left: 2px; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Book Studio */
#screen-studio {
  background: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.studio-header { padding: var(--space-4) var(--space-8); border-bottom: 1px solid var(--parchment); display: flex; align-items: center; justify-content: space-between; background: var(--paper); position: sticky; top: 0; z-index: 50; gap: var(--space-4); }
.studio-title-area { display: flex; flex-direction: column; min-width: 0; }
.studio-book-title { font-family: var(--font-editorial); font-size: 1.125rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-book-meta { font-size: 0.75rem; color: var(--ink-muted); }
.studio-controls { display: flex; align-items: center; gap: var(--space-3); }

.studio-body { display: grid; grid-template-columns: 260px 1fr 280px; height: calc(100vh - 65px); overflow: hidden; }

.chapter-nav { border-right: 1px solid var(--parchment); overflow-y: auto; background: var(--paper-warm); padding: var(--space-5); }
.chapter-nav-header { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--parchment); }
.chapter-nav-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast); margin-bottom: var(--space-1); }
.chapter-nav-item:hover { background: var(--cream); }
.chapter-nav-item.active { background: var(--amber-pale); border: 1px solid rgba(200,112,42,0.2); }

.chap-num { width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--parchment); display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; color: var(--ink-muted); flex-shrink: 0; }
.chapter-nav-item.active .chap-num { background: linear-gradient(135deg, var(--amber), var(--gold)); color: white; }

.chap-info { min-width: 0; flex: 1; }
.chap-title { font-size: 0.8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chap-words { font-size: 0.6875rem; color: var(--ink-faint); }
.chap-status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.chap-status-dot.done { background: var(--sage); }
.chap-status-dot.draft { background: var(--warning); }
.chap-status-dot.ai { background: var(--plum-light); }

.book-canvas { overflow-y: auto; background: var(--cream); display: flex; flex-direction: column; align-items: center; padding: var(--space-10) var(--space-8); gap: var(--space-6); }
.book-page {
  background: white;
  width: 100%;
  max-width: 580px;
  min-height: 780px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.10), 0 8px 32px rgba(0,0,0,0.08), inset -1px 0 0 rgba(0,0,0,0.04);
  padding: 64px 72px;
  position: relative;
  animation: pageReveal var(--duration-xslow) var(--ease-out);
}

@keyframes pageReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.book-page-running-header { position: absolute; top: 28px; left: 72px; right: 72px; display: flex; justify-content: space-between; font-family: var(--font-prose); font-size: 0.6875rem; font-style: italic; color: #aaa; letter-spacing: 0.02em; }
.book-page-number { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); font-family: var(--font-prose); font-size: 0.75rem; color: #aaa; }
.book-chapter-title { font-family: var(--font-editorial); font-size: 1.75rem; font-weight: 600; color: #1a1410; margin-bottom: var(--space-2); line-height: 1.2; }
.book-chapter-subtitle { font-family: var(--font-prose); font-size: 0.9375rem; color: #888; font-style: italic; margin-bottom: var(--space-8); padding-bottom: var(--space-6); border-bottom: 1px solid #eee; }
.book-body-text { font-family: var(--font-prose); font-size: 1rem; color: #2d2520; line-height: 1.85; text-align: justify; hyphens: auto; }
.book-body-text p + p { text-indent: 2em; margin-top: 0; }

.drop-cap::first-letter {
  font-family: var(--font-editorial);
  font-size: 3.5em;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  margin-right: 0.08em;
  margin-top: 0.1em;
  color: var(--amber);
}

.studio-panel { border-left: 1px solid var(--parchment); overflow-y: auto; background: var(--paper-warm); padding: var(--space-5); }
.panel-section { margin-bottom: var(--space-6); padding-bottom: var(--space-6); border-bottom: 1px solid var(--parchment); }
.panel-section:last-child { border-bottom: none; }
.panel-section-title { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--space-4); }

.font-options { display: flex; flex-direction: column; gap: var(--space-2); }
.font-option { padding: var(--space-3) var(--space-4); border: 1.5px solid var(--parchment); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast); display: flex; flex-direction: column; gap: 2px; }
.font-option:hover { border-color: var(--amber); }
.font-option.active { border-color: var(--amber); background: var(--amber-pale); }
.font-name { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.font-sample { font-size: 0.875rem; color: var(--ink-muted); }

.theme-options { display: flex; gap: var(--space-2); }
.theme-option { flex: 1; aspect-ratio: 1; border-radius: var(--radius-md); border: 2px solid var(--parchment); cursor: pointer; transition: all var(--duration-fast); display: flex; align-items: center; justify-content: center; font-size: 1rem; position: relative; overflow: hidden; }
.theme-option:hover { transform: scale(1.05); }
.theme-option.active { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-glow); }
.theme-option.parchment { background: #faf7f2; }
.theme-option.sepia     { background: #f5ede0; }
.theme-option.dark      { background: #1a1410; }
.theme-option.crisp     { background: #ffffff; }

.size-slider-wrap { display: flex; align-items: center; gap: var(--space-3); }
.size-slider { flex: 1; -webkit-appearance: none; height: 4px; background: var(--parchment); border-radius: var(--radius-full); outline: none; }
.size-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--gold)); cursor: pointer; box-shadow: var(--shadow-sm); }
.size-value { font-size: 0.8125rem; font-weight: 600; color: var(--ink); min-width: 32px; text-align: right; }

.ai-action-btn { width: 100%; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--paper); border: 1.5px solid var(--parchment); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast); text-align: left; margin-bottom: var(--space-2); font-family: var(--font-ui); }
.ai-action-btn:hover { border-color: var(--plum-light); background: var(--plum-pale); }
.ai-action-icon { font-size: 1rem; flex-shrink: 0; }
.ai-action-label { font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.ai-action-desc { font-size: 0.6875rem; color: var(--ink-muted); }

.export-options { display: flex; flex-direction: column; gap: var(--space-2); }
.export-btn { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast); font-size: 0.875rem; font-weight: 600; font-family: var(--font-ui); border: 1.5px solid; }
.export-btn-pdf { background: linear-gradient(135deg, var(--amber), #d4803a); color: white; border-color: transparent; box-shadow: 0 2px 12px rgba(200,112,42,0.3); }
.export-btn-pdf:hover { box-shadow: 0 4px 20px rgba(200,112,42,0.45); transform: translateY(-1px); }
.export-btn-docx { background: var(--paper); color: var(--ink); border-color: var(--parchment); }
.export-btn-docx:hover { background: var(--paper-warm); border-color: var(--cream); }

.sentiment-tag { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 600; background: var(--amber-pale); color: var(--amber); border: 1px solid rgba(200,112,42,0.2); }

/* Toasts */
.toast-container { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 1000; display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }
.toast { background: var(--ink-soft); color: var(--dark-text); padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: var(--space-3); pointer-events: all; animation: toastIn var(--duration-base) var(--ease-spring); border: 1px solid rgba(240,235,227,0.1); max-width: 320px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.info    { border-left: 3px solid var(--amber); }

@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }

/* ============================================================
   STAGE 2 — COVER DESIGNER 3D MODAL STYLES
   ============================================================ */
.cover-designer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.cover-designer-modal.active {
  display: block;
}

.cover-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(8px);
}

.cover-modal-container {
  position: absolute;
  inset: var(--space-6);
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.cover-modal-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dark-bg);
}

.cover-header-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

.cover-modal-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  overflow: hidden;
}

/* 3D Stage */
.cover-stage {
  background: radial-gradient(circle at 50% 40%, rgba(200,112,42,0.1), rgba(15,13,11,0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  position: relative;
  perspective: 1200px;
}

.cover-3d-wrapper {
  perspective: 1200px;
  transform-style: preserve-3d;
  width: 320px;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-3d {
  width: 260px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(12deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}

.book-cover-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #141824 0%, #1c2234 100%);
  border: 1px solid #2a3248;
  border-radius: 3px 8px 8px 3px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6), inset 3px 0 8px rgba(255,255,255,0.08);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  backface-visibility: hidden;
  transform: translateZ(12px);
}

.cover-foil-border {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(243, 229, 171, 0.4);
  border-radius: 4px;
  pointer-events: none;
}

.cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.cover-foil-icon {
  font-size: 1.5rem;
  margin-top: 8px;
}

.cover-title-display {
  font-family: var(--font-editorial);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 12px;
  color: #f3e5ab;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 14px rgba(212,175,55,0.6);
  letter-spacing: 0.02em;
  word-break: break-word;
}

.cover-subtitle-display {
  font-family: var(--font-prose);
  font-size: 0.75rem;
  font-style: italic;
  color: #f3e5ab;
  opacity: 0.9;
  margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.cover-divider-line {
  width: 32px;
  height: 1.5px;
  background: #d4af37;
  margin: 12px 0;
  box-shadow: 0 0 6px rgba(212,175,55,0.5);
}

.cover-author-display {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #f3e5ab;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  margin-bottom: 8px;
}

.book-spine {
  position: absolute;
  top: 0; bottom: 0; left: -12px;
  width: 24px;
  background: #141824;
  border-left: 1px solid rgba(255,255,255,0.1);
  transform: rotateY(-90deg) translateZ(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.spine-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-editorial);
  font-size: 0.75rem;
  font-weight: 600;
  color: #f3e5ab;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.spine-author {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.6875rem;
  color: #f3e5ab;
  opacity: 0.8;
  white-space: nowrap;
}

.spine-logo { font-size: 0.75rem; }

.book-cover-back {
  position: absolute;
  inset: 0;
  background: #141824;
  border: 1px solid #2a3248;
  border-radius: 8px 3px 3px 8px;
  transform: rotateY(180deg) translateZ(12px);
  backface-visibility: hidden;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.back-dedication {
  font-family: var(--font-prose);
  font-size: 0.875rem;
  font-style: italic;
  color: #f3e5ab;
  line-height: 1.6;
  margin-top: 40px;
}

.back-publisher {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: rgba(243, 229, 171, 0.5);
}

.stage-controls {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

/* Controls Panel */
.cover-controls-panel {
  background: var(--dark-card);
  border-left: 1px solid var(--dark-border);
  padding: var(--space-6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.control-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-light);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.preset-card {
  background: var(--dark-surface);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.preset-card:hover { border-color: var(--amber); }
.preset-card.active { border-color: var(--amber); background: rgba(200,112,42,0.1); }

.preset-swatch {
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.preset-name { font-size: 0.75rem; color: var(--dark-text); font-weight: 500; }

.foil-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.foil-btn {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--dark-border);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast);
  text-align: center;
}

.foil-btn.gold   { background: rgba(212,175,55,0.15); color: #f3e5ab; border-color: rgba(212,175,55,0.3); }
.foil-btn.silver { background: rgba(220,220,220,0.15); color: #ffffff; border-color: rgba(220,220,220,0.3); }
.foil-btn.rose   { background: rgba(232,165,152,0.15); color: #ffe5e0; border-color: rgba(232,165,152,0.3); }
.foil-btn.amber  { background: rgba(200,112,42,0.15); color: #fce4cf; border-color: rgba(200,112,42,0.3); }

.foil-btn.active { box-shadow: 0 0 0 2px var(--amber); }

.cover-input {
  width: 100%;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  color: var(--dark-text);
  outline: none;
}

.cover-input:focus { border-color: var(--amber); }

.cover-textarea {
  width: 100%;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  color: var(--dark-text);
  resize: vertical;
  outline: none;
}

.cover-textarea:focus { border-color: var(--amber); }

.specs-info-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: auto;
}

.cover-modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  background: var(--dark-bg);
}

/* ============================================================
   STAGE 3 & SAAS MODAL STYLES (Pricing & Provider Settings)
   ============================================================ */
.provider-tab-card {
  background: var(--dark-surface);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  transition: all var(--duration-fast);
  text-align: left;
}

.provider-tab-card:hover {
  border-color: var(--amber);
}

.provider-tab-card.active {
  border-color: var(--amber);
  background: rgba(200, 112, 42, 0.12);
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.plan-card {
  background: var(--dark-card);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--duration-base) var(--ease-out);
}

.plan-card:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.plan-card.current {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(200, 112, 42, 0.12) 0%, var(--dark-card) 100%);
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.plan-name {
  font-family: var(--font-editorial);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: var(--space-1);
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amber-light);
  margin-bottom: var(--space-4);
}

.plan-divider {
  height: 1px;
  background: var(--dark-border);
  margin-bottom: var(--space-4);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.plan-feature {
  font-size: 0.8125rem;
  color: var(--dark-muted);
  line-height: 1.4;
}

/* Person Matrix Quick View */
.person-matrix-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  border: 1px solid var(--parchment);
  border-radius: var(--radius-md);
}

/* Photo Gallery Item */
.photo-card-item {
  background: var(--paper);
  border: 1px solid var(--parchment);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}

/* Utilities */
.hidden  { display: none !important; }
.flex    { display: flex; }
.grid    { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.text-muted { color: var(--ink-muted); }
.text-amber { color: var(--amber); }
.font-editorial { font-family: var(--font-editorial); }
.font-prose { font-family: var(--font-prose); }
.italic { font-style: italic; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.relative { position: relative; }

/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS (< 900px, < 640px, < 480px)
   ============================================================ */

@media (max-width: 900px) {
  .cover-modal-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .cover-modal-container { inset: var(--space-2); }
  .studio-body { grid-template-columns: 1fr; height: calc(100vh - 70px); }
  .chapter-nav { display: none; }
  .studio-panel { display: none; }
  .before-after { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .ba-arrow { flex-direction: row; }
}

@media (max-width: 640px) {
  /* Navigation & Hero */
  .landing-nav { padding: var(--space-3) var(--space-4); }
  .nav-logo { font-size: 1.125rem; }
  .hero { padding: var(--space-12) var(--space-4) var(--space-8); }
  .hero-headline { font-size: clamp(2rem, 7.5vw, 2.75rem); line-height: 1.15; }
  .hero-subheadline { font-size: 0.9375rem; margin-bottom: var(--space-6); }
  .hero-actions { flex-direction: column; align-items: stretch; gap: var(--space-3); }

  /* Wizard */
  .wizard-header { padding: var(--space-3) var(--space-4); }
  .wizard-steps { display: none; }
  .wizard-screen { padding: var(--space-4) var(--space-3) var(--space-16); }
  .wizard-container { max-width: 100%; }
  .wizard-title { font-size: 1.5rem; }
  .wizard-subtitle { font-size: 0.875rem; }
  .format-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .sentiment-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .lang-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important; gap: 8px; }
  .lang-option { padding: 10px 8px; }
  .lang-flag { font-size: 1.25rem; }
  .lang-name { font-size: 0.8125rem; }
  .lang-desc { font-size: 0.6875rem; display: none; }
  .script-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .wizard-footer { padding: 12px 16px; position: sticky; bottom: 0; background: var(--paper); z-index: 40; border-top: 1px solid var(--parchment); }

  /* Studio & Book Reader */
  .studio-header { padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .studio-book-title { font-size: 0.9375rem; max-width: 140px; }
  .studio-book-meta { font-size: 0.6875rem; }
  .studio-controls { gap: 6px; }
  .studio-controls .btn { padding: 6px 10px; font-size: 0.75rem; }
  .book-canvas { padding: 12px 6px; }
  .book-page {
    padding: 36px 16px 44px;
    max-width: 100%;
    min-height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }
  .book-page-running-header { left: 16px; right: 16px; top: 12px; font-size: 0.625rem; }
  .book-page-number { bottom: 12px; font-size: 0.6875rem; }
  .book-chapter-title { font-size: 1.25rem; }
  .book-chapter-subtitle { font-size: 0.8125rem; margin-bottom: var(--space-4); }
  .book-body-text { font-size: 0.9375rem; line-height: 1.75; text-align: left; }
  .drop-cap::first-letter { font-size: 2.75em; }

  /* 3D Cover Modal */
  .cover-modal-container { inset: 4px; border-radius: 10px; }
  .cover-modal-header { padding: 10px 14px; }
  .cover-modal-body { padding: 12px; gap: 12px; }
  .cover-3d-scene { height: 260px; min-height: 260px; }
  .cover-3d-book { transform: scale(0.72) rotateY(-12deg) rotateX(8deg); }

  /* Creator Connect & Comments */
  .comments-section { padding: var(--space-8) var(--space-4); }
  .creator-connect-box { flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px; }
  .creator-links { width: 100%; justify-content: flex-start; gap: 6px; }
  .social-pill { font-size: 0.75rem; padding: 6px 10px; }
  .comment-form-card { padding: 14px; }
  .comment-form-row { grid-template-columns: 1fr; gap: 8px; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--parchment); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cream); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.book-page-text-area::-webkit-scrollbar {
  width: 6px;
}
.book-page-text-area::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
.book-page-text-area::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ============================================================
   COMMUNITY COMMENTS & CREATOR CONNECT SECTION
   ============================================================ */
.comments-section {
  padding: var(--space-16) var(--space-6);
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  color: var(--dark-text);
  position: relative;
}

.comments-container {
  max-width: 860px;
  margin: 0 auto;
}

.creator-connect-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-10);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.creator-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.creator-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--plum));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.creator-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--dark-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.social-pill:hover {
  background: var(--amber);
  color: #111;
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.comment-form-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-10);
  backdrop-filter: blur(8px);
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 600px) {
  .comment-form-row {
    grid-template-columns: 1fr;
  }
}

.comment-input, .comment-textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

.comment-input:focus, .comment-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: rgba(0, 0, 0, 0.45);
}

.comment-textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  animation: fadeIn 0.3s ease-out;
}

.comment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.comment-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--plum);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
}

.comment-user-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--dark-text);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--dark-muted);
}

.comment-body {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  white-space: pre-wrap;
}
