/* ==========================================================================
   TripleGem Books — Styles
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  --navy: #1B2A4A;
  --teal: #2EC4B6;
  --peach: #FFDAB9;
  --lavender: #D8B4FE;
  --mint: #A7F3D0;
  --coral: #FF6B6B;
  --white: #FFFFFF;
  --off-white: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-800: #1F2937;

  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Nunito Sans', 'Nunito', sans-serif;

  --gold: #F6D365;
  --gold-light: #FEF9E7;
  --lavender-light: #F3E8FF;
  --peach-light: #FFF5EE;
  --mint-light: #ECFDF5;
  --lavender-mist: #EDE9FE;
  --fairy-pink: #FBBCCA;
  --navy-deep: #1A1F3D;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-warm-sm: 0 2px 8px rgba(216, 180, 254, 0.25);
  --shadow-warm-md: 0 6px 20px rgba(216, 180, 254, 0.35);
  --shadow-warm-lg: 0 12px 36px rgba(216, 180, 254, 0.40);
  --glow-teal: 0 0 24px rgba(46, 196, 182, 0.5);
  --glow-gold: 0 0 20px rgba(246, 211, 101, 0.5);

  --radius: 16px;
  --radius-sm: 10px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background 0.2s;
  background: linear-gradient(135deg, var(--teal) 0%, #10b981 100%);
  color: var(--white);
  padding: 14px 36px;
  text-align: center;
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--glow-teal);
  background: linear-gradient(135deg, #10b981 0%, var(--teal) 100%);
}
.btn--large { font-size: 1.15rem; padding: 16px 44px; }
.btn--small { font-size: 0.9rem; padding: 10px 24px; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(216, 180, 254, 0.35);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.navbar__brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.navbar__links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: color 0.2s;
}
.navbar__links a:hover { color: var(--navy); }

/* Mobile toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.navbar__toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: 140px 0 80px;
  background:
    radial-gradient(ellipse at 70% 80%, rgba(246, 211, 101, 0.3) 0%, transparent 50%),
    linear-gradient(170deg, #E8D5F5 0%, #FFE4CC 40%, #C8F5E0 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 60%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__description {
  font-size: 1.15rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  max-width: 480px;
}
.hero__placeholder {
  background: linear-gradient(135deg, var(--peach) 0%, var(--lavender) 100%);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gray-600);
  box-shadow: var(--shadow-warm-lg);
  animation: gentle-float 4s ease-in-out infinite;
}
.hero__placeholder span { font-size: 4rem; margin-bottom: 8px; }

/* Decorative bottom edge on hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--lavender), var(--fairy-pink), var(--peach), var(--gold), var(--mint), var(--teal));
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}
.section__title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  width: 100%;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section__title::after {
  content: '';
  display: block;
  width: 120px;
  height: 5px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--lavender), var(--fairy-pink), var(--peach), var(--gold), var(--mint));
}
.section__subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

/* --- How It Works --- */
.how-it-works {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(246, 211, 101, 0.25) 0%, transparent 60%),
    linear-gradient(180deg, #FEF9E7 0%, #FFF8F0 100%);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}
.step {
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(180deg, #ECFDF5 0%, var(--white) 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-warm-sm);
  border-top: 4px solid var(--teal);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
.step:nth-child(2) {
  border-top-color: var(--lavender);
  background: linear-gradient(180deg, var(--lavender-light) 0%, var(--white) 100%);
}
.step:nth-child(3) {
  border-top-color: var(--gold);
  background: linear-gradient(180deg, #FEF9E7 0%, var(--white) 100%);
}
.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-warm-lg);
}
.step__number {
  width: 60px; height: 60px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #10b981);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(46, 196, 182, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step:hover .step__number {
  transform: scale(1.15) rotate(-5deg);
}
.step:nth-child(2) .step__number {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}
.step:nth-child(3) .step__number {
  box-shadow: 0 4px 12px rgba(246, 211, 101, 0.3);
}
.step:nth-child(2) .step__number {
  background: linear-gradient(135deg, var(--lavender), #a855f7);
}
.step:nth-child(3) .step__number {
  background: linear-gradient(135deg, var(--peach), var(--gold));
}
.step h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 10px; }
.step p { color: var(--gray-600); font-size: 0.95rem; }

/* --- Theme Cards --- */
.themes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.themes {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(216, 180, 254, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #F5EEFF 0%, #FAFAFE 100%);
}
.theme-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-warm-sm);
  border: 1px solid rgba(216, 180, 254, 0.35);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
.theme-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-warm-lg);
  border-color: var(--lavender);
}
.theme-card__image {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-card:hover .theme-card__image {
  transform: scale(1.1) rotate(-3deg);
}
.theme-card h3 { font-size: 1.1rem; color: var(--navy); padding: 16px 20px 6px; }
.theme-card p { font-size: 0.9rem; color: var(--gray-600); padding: 0 20px 20px; }

/* --- Testimonials --- */
.testimonials {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 218, 185, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, #FFF3E8 0%, #FFFAF5 100%);
}
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-warm-sm);
  border-left: 5px solid var(--lavender);
  border-radius: 16px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
.testimonial:nth-child(2) { border-left-color: var(--peach); }
.testimonial:nth-child(3) { border-left-color: var(--mint); }
.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-warm-md);
}
.testimonial p {
  font-size: 1rem;
  color: var(--gray-800);
  margin-bottom: 14px;
  font-style: italic;
}
.testimonial cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--gray-400);
  font-weight: 600;
}

/* --- Bottom CTA --- */
.cta-bottom {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(216, 180, 254, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(246, 211, 101, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy-deep) 0%, #2d1b69 40%, #6d28d9 100%);
  color: var(--white);
}
.cta-bottom__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.cta-bottom h2 {
  font-size: 2.25rem;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gold) 50%, var(--peach) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cta-bottom p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 28px; }
.cta-bottom .btn {
  background: linear-gradient(135deg, var(--gold) 0%, #f0a830 100%);
  color: var(--navy-deep);
}
.cta-bottom .btn:hover {
  box-shadow: var(--glow-gold);
  background: linear-gradient(135deg, #f0a830 0%, var(--gold) 100%);
}

/* --- Footer --- */
.footer {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--gray-400);
  padding: 48px 0 32px;
  border-top: 4px solid;
  border-image: linear-gradient(90deg, var(--lavender), var(--peach), var(--mint), var(--teal)) 1;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--lavender) 0%, var(--peach) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer__tagline { font-size: 0.9rem; margin-top: 4px; }
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--lavender); }
.footer__copyright { font-size: 0.85rem; width: 100%; text-align: center; margin-top: 24px; }

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Sparkle & Decorative Animations --- */
@keyframes sparkle-float {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-120px) scale(0.4); opacity: 0; }
}

@keyframes sparkle-twinkle {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.4; }
  50%      { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

@keyframes sparkle-drift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  50%  { transform: translate(15px, -60px) rotate(90deg); opacity: 0.8; }
  90%  { opacity: 0.6; }
  100% { transform: translate(-10px, -120px) rotate(180deg); opacity: 0; }
}

@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

@keyframes slow-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(8deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes slow-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-8px) rotate(3deg); }
  66%      { transform: translateY(4px) rotate(-2deg); }
}

@keyframes success-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 196, 182, 0.4); }
  50%      { box-shadow: 0 0 0 16px rgba(46, 196, 182, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Sparkle Elements --- */
.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.sparkle {
  position: absolute;
  width: 16px;
  height: 16px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: var(--gold);
  left: var(--x, 50%);
  top: var(--y, 80%);
  animation: sparkle-float var(--duration, 4s) var(--delay, 0s) ease-in-out infinite;
}

.sparkle--twinkle { animation-name: sparkle-twinkle; }
.sparkle--drift   { animation-name: sparkle-drift; }

.sparkle--sm { width: 10px; height: 10px; }
.sparkle--lg { width: 24px; height: 24px; }

.sparkle--lavender { background: var(--lavender); }
.sparkle--peach    { background: var(--peach); }
.sparkle--mint     { background: var(--mint); }
.sparkle--white    { background: var(--white); }
.sparkle--pink     { background: var(--fairy-pink); }

/* --- Confetti Elements (Success Page) --- */
.confetti-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.confetti {
  position: absolute;
  width: 12px;
  height: 20px;
  border-radius: 3px;
  top: -20px;
  left: var(--x, 50%);
  background: var(--lavender);
  animation: confetti-fall var(--duration, 3s) var(--delay, 0s) ease-in infinite;
}

.confetti--peach { background: var(--peach); }
.confetti--mint  { background: var(--mint); }
.confetti--gold  { background: var(--gold); }
.confetti--pink  { background: var(--fairy-pink); }
.confetti--teal  { background: var(--teal); }

/* --- Decorative Background Emojis --- */
.bg-emoji {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  font-size: 8rem;
  line-height: 1;
  user-select: none;
  animation: slow-bob 8s ease-in-out infinite;
}
.bg-emoji--sm { font-size: 5rem; opacity: 0.06; }
.bg-emoji--lg { font-size: 12rem; opacity: 0.06; }
.bg-emoji--spin { animation-name: slow-spin; }

/* Hero emojis */
.hero .bg-emoji:nth-child(1) { top: 12%; right: 3%; animation-delay: 0s; }
.hero .bg-emoji:nth-child(2) { bottom: 15%; left: 2%; animation-delay: -3s; }
.hero .bg-emoji:nth-child(3) { top: 30%; left: 15%; animation-delay: -5s; }

/* How It Works emojis */
.how-it-works {
  position: relative;
  overflow: hidden;
}
.how-it-works::before {
  content: '🎨';
  position: absolute;
  font-size: 12rem;
  opacity: 0.06;
  top: -20px;
  left: -30px;
  pointer-events: none;
  animation: slow-bob 10s ease-in-out infinite;
}
.how-it-works::after {
  content: '🪄';
  position: absolute;
  font-size: 9rem;
  opacity: 0.06;
  bottom: -10px;
  right: -10px;
  pointer-events: none;
  animation: slow-spin 12s ease-in-out infinite;
}

/* Themes emojis */
.themes {
  position: relative;
  overflow: hidden;
}
.themes::before {
  content: '🏰';
  position: absolute;
  font-size: 11rem;
  opacity: 0.05;
  top: 10%;
  right: -20px;
  pointer-events: none;
  animation: slow-bob 11s ease-in-out infinite;
  animation-delay: -2s;
}
.themes::after {
  content: '🌈';
  position: absolute;
  font-size: 10rem;
  opacity: 0.06;
  bottom: 5%;
  left: -20px;
  pointer-events: none;
  animation: slow-spin 14s ease-in-out infinite;
}

/* Testimonials emojis */
.testimonials {
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '💛';
  position: absolute;
  font-size: 10rem;
  opacity: 0.07;
  top: 5%;
  left: 2%;
  pointer-events: none;
  animation: slow-bob 9s ease-in-out infinite;
  animation-delay: -1s;
}
.testimonials::after {
  content: '⭐';
  position: absolute;
  font-size: 8rem;
  opacity: 0.07;
  bottom: 10%;
  right: 3%;
  pointer-events: none;
  animation: slow-spin 10s ease-in-out infinite;
}

/* CTA emojis */
.cta-bottom::before {
  content: '🌙';
  position: absolute;
  font-size: 10rem;
  opacity: 0.08;
  top: 10%;
  left: 3%;
  pointer-events: none;
  z-index: 1;
  animation: slow-bob 12s ease-in-out infinite;
}

/* Success page emojis */
.success-page::before {
  content: '🎉';
  position: absolute;
  font-size: 12rem;
  opacity: 0.08;
  top: 15%;
  right: 5%;
  pointer-events: none;
  animation: slow-spin 10s ease-in-out infinite;
}
.success-page::after {
  content: '📖';
  position: absolute;
  font-size: 10rem;
  opacity: 0.07;
  bottom: 20%;
  left: 5%;
  pointer-events: none;
  animation: slow-bob 11s ease-in-out infinite;
  animation-delay: -4s;
}

/* ==========================================================================
   Create Page — Form Styles
   ========================================================================== */

/* --- Form Hero Header --- */
.form-hero {
  padding: 120px 0 40px;
  background: linear-gradient(170deg, #E8D5F5 0%, #FFE4CC 50%, var(--white) 100%);
  text-align: center;
}
.form-hero__title {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.form-hero__subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Progress Bar --- */
.form-progress {
  padding: 32px 0 0;
  background: var(--white);
}
.form-progress__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}
.form-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.form-progress__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--lavender-light);
  color: var(--lavender);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.form-progress__step.active .form-progress__dot,
.form-progress__step.completed .form-progress__dot {
  background: linear-gradient(135deg, var(--teal), #10b981);
  color: var(--white);
  box-shadow: var(--glow-teal);
}
.form-progress__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lavender);
  transition: color 0.3s;
  white-space: nowrap;
}
.form-progress__step.active .form-progress__label,
.form-progress__step.completed .form-progress__label {
  color: var(--navy);
}
.form-progress__line {
  flex: 1;
  height: 3px;
  background: var(--lavender-light);
  margin: 0 12px;
  margin-bottom: 28px;
  border-radius: 2px;
  transition: background 0.3s;
  min-width: 40px;
}
.form-progress__step.completed ~ .form-progress__line,
.form-progress__line.completed {
  background: linear-gradient(90deg, var(--teal), #10b981);
}

/* --- Form Section & Steps --- */
.form-section {
  padding: 40px 0 80px;
}
.book-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-step {
  border: none;
  padding: 0;
  display: none;
}
.form-step.active {
  display: block;
}
.form-step__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
  padding: 0;
}
.form-step__intro {
  color: var(--gray-600);
  margin-bottom: 28px;
}

/* --- Form Groups --- */
.form-group {
  margin-bottom: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.required {
  color: var(--coral);
}
.form-hint {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}
.form-input.error {
  border-color: var(--coral);
}
.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}
.form-char-count {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
}
.form-error {
  display: block;
  font-size: 0.85rem;
  color: var(--coral);
  margin-top: 4px;
  min-height: 1.2em;
}

/* --- Trait Picker Chips --- */
.trait-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trait-chip {
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-600);
  background: var(--lavender-light);
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.trait-chip:hover {
  background: var(--lavender-mist);
}
.trait-chip.selected {
  background: rgba(46, 196, 182, 0.1);
  border-color: var(--teal);
  color: var(--navy);
}

/* --- Theme Selector Cards --- */
.theme-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.theme-option {
  cursor: pointer;
}
.theme-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-option__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: center;
}
.theme-option__card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.theme-option input[type="radio"]:checked + .theme-option__card {
  border-color: var(--teal);
  background: rgba(46, 196, 182, 0.06);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}
.theme-option__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.theme-option__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}

/* --- Format Selector Cards --- */
.format-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.format-option {
  cursor: pointer;
}
.format-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.format-option__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: center;
}
.format-option__card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.format-option input[type="radio"]:checked + .format-option__card {
  border-color: var(--teal);
  background: rgba(46, 196, 182, 0.06);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}
.format-option__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.format-option__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.format-option__price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--teal);
  margin-bottom: 6px;
}
.format-option__details {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* --- Add/Remove Companion Buttons --- */
.btn--add-companion {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-600);
  background: transparent;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-align: center;
}
.btn--add-companion:hover {
  border-color: var(--teal);
  color: var(--navy);
}
.btn--remove-companion {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--coral);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.btn--remove-companion:hover {
  color: #e05555;
}

/* --- Appearance Group --- */
.appearance-group {
  background: var(--lavender-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  border: 1px solid rgba(216, 180, 254, 0.35);
}
.appearance-group__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.form-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: var(--teal);
  vertical-align: middle;
  cursor: pointer;
}
.form-label--inline {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding-top: 28px;
}

/* --- Character Section (Step 4 grouping) --- */
.character-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-200);
}
.character-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.character-section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 16px;
}

/* --- Photo Upload --- */
.photo-upload__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  background: var(--off-white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.photo-upload__dropzone:hover,
.photo-upload__dropzone.dragover {
  border-color: var(--teal);
  background: rgba(46, 196, 182, 0.04);
}
.photo-upload__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.photo-upload__text {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.photo-upload__browse {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.photo-upload__hint {
  font-size: 0.8rem;
  color: var(--gray-400);
}
.photo-upload__input {
  display: none;
}
.photo-upload__preview {
  position: relative;
  display: inline-block;
  margin-top: 16px;
}
.photo-upload__preview img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
}
.photo-upload__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.photo-upload__remove:hover {
  background: #e05555;
}

/* --- Form Actions (Back / Next buttons) --- */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}
.btn--back {
  background: transparent;
  color: var(--gray-600);
  border: 2px solid var(--gray-200);
}
.btn--back:hover {
  background: var(--gray-100);
  color: var(--navy);
  transform: none;
  box-shadow: none;
}
.btn--next {
  margin-left: auto;
}
.btn--submit {
  background: linear-gradient(135deg, var(--navy) 0%, #2d1b69 100%);
  font-size: 1.05rem;
  padding: 14px 40px;
}
.btn--submit:hover {
  background: linear-gradient(135deg, #2d1b69 0%, var(--navy) 100%);
}

/* --- Review Card --- */
.review-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--gray-200);
}
.review-section {
  margin-bottom: 28px;
}
.review-section:last-child {
  margin-bottom: 0;
}
.review-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}
.review-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
}
.review-list dt {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.review-list dd {
  font-size: 0.95rem;
  color: var(--gray-800);
}
.review-photo {
  margin-bottom: 16px;
}
.review-photo img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
}
.review-photo__label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 6px;
}

/* --- Success Message --- */
.success-page {
  background: linear-gradient(170deg, #E8D5F5 0%, #FFE4CC 40%, #C8F5E0 100%);
  min-height: 100vh;
  position: relative;
}
.form-success {
  text-align: center;
  padding: 60px 24px;
  max-width: 500px;
  margin: 0 auto;
}
.form-success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  animation: success-pulse 2s ease-in-out infinite;
}
.form-success h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.form-success p {
  color: var(--gray-600);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* ==========================================================================
   Story Preview Page
   ========================================================================== */

/* --- Story Page Layout --- */
.story-page {
  min-height: 100vh;
  padding: 120px 0 80px;
  background: linear-gradient(170deg, #E8D5F5 0%, #FFE4CC 40%, #C8F5E0 100%);
}

/* --- Loading & Error Status --- */
.story-status {
  text-align: center;
  padding: 80px 24px;
  max-width: 500px;
  margin: 0 auto;
}
.story-status h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.story-status p {
  color: var(--gray-600);
  font-size: 1.05rem;
}
.story-status__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
}
.story-status__icon--loading {
  background: linear-gradient(135deg, var(--lavender), #a855f7);
  color: var(--white);
  animation: success-pulse 2s ease-in-out infinite;
}
.story-status__icon--error {
  background: var(--coral);
  color: var(--white);
}

/* --- Spinner --- */
.story-spinner {
  width: 40px;
  height: 40px;
  margin: 24px auto;
  border: 4px solid var(--lavender-light);
  border-top-color: var(--lavender);
  border-radius: 50%;
  animation: story-spin 0.8s linear infinite;
}
@keyframes story-spin {
  to { transform: rotate(360deg); }
}

/* --- Story Header --- */
.story-header {
  text-align: center;
  margin-bottom: 40px;
}
.story-header__title {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, #7c3aed 60%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Storybook Pages (full-bleed layout) --- */
.story-pages {
  max-width: 960px;
  margin: 0 auto;
}
.storybook-page {
  position: relative;
  aspect-ratio: 1536 / 1024;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-warm-md);
  background: var(--gray-100);
}
.storybook-page__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.storybook-page__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lavender-light) 0%, var(--peach-light) 50%, var(--mint-light) 100%);
}
.storybook-page__text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 32px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.storybook-page__text-overlay--top {
  top: 0;
  bottom: auto;
  padding: 24px 32px 48px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
  align-items: flex-start;
}
.storybook-page__number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.storybook-page__text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* --- Dedication Block --- */
.story-dedication {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--lavender-light) 0%, var(--peach-light) 50%, var(--mint-light) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-warm-sm);
}
.story-dedication p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gray-800);
  line-height: 1.6;
}

/* --- Storybook Cover --- */
.storybook-cover {
  position: relative;
  aspect-ratio: 1536 / 1024;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-warm-lg);
  background: var(--gray-100);
}
.storybook-cover__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.storybook-cover__title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 32px 32px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.50) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}
.storybook-cover__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--white);
  -webkit-text-fill-color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

/* --- Illustration Spinner (used inside storybook-page__placeholder) --- */
.illustration-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--lavender);
  border-radius: 50%;
  animation: story-spin 0.8s linear infinite;
}

/* ==========================================================================
   Preview Page
   ========================================================================== */

/* --- Preview Page Layout --- */
.preview-page {
  min-height: 100vh;
  padding: 120px 0 120px;
  background: linear-gradient(170deg, #E8D5F5 0%, #FFE4CC 40%, #C8F5E0 100%);
}

/* --- Preview Text Page Cards --- */
.preview-text-pages {
  max-width: 720px;
  margin: 32px auto 0;
}
.preview-text-page {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  margin-bottom: 16px;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 5px solid var(--lavender);
  box-shadow: var(--shadow-sm);
}
.preview-text-page__number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender-light) 0%, var(--lavender-mist) 100%);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
}
.preview-text-page__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-800);
}

/* --- Preview Note --- */
.preview-note {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  text-align: center;
}
.preview-note p {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
}

/* --- Preview Sticky CTA --- */
.preview-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(216, 180, 254, 0.3);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 16px 0;
}
.preview-cta__inner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.preview-cta__btn {
  background: linear-gradient(135deg, var(--navy) 0%, #2d1b69 100%);
  font-size: 1.1rem;
  padding: 16px 48px;
  white-space: nowrap;
}
.preview-cta__btn:hover {
  background: linear-gradient(135deg, #2d1b69 0%, var(--navy) 100%);
}

/* ==========================================================================
   Visual Select — Custom Dropdowns (Swatches & Icons)
   ========================================================================== */

.vs-wrapper {
  position: relative;
}

.vs-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  text-align: left;
}

.vs-trigger:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.vs-trigger--open {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.vs-trigger__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vs-trigger__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-800);
}

.vs-trigger__icon svg {
  display: block;
}

.vs-trigger__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-trigger__label--placeholder {
  color: var(--gray-400);
}

.vs-trigger__arrow {
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
}

.vs-trigger--open .vs-trigger__arrow {
  transform: rotate(180deg);
}

/* Dropdown panel */
.vs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
}

.vs-dropdown--hidden {
  display: none;
}

/* List-style options (swatch types) */
.vs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.vs-option:hover,
.vs-option--focused {
  background: var(--lavender-light);
}

.vs-option--selected {
  border-left: 3px solid var(--teal);
  padding-left: 11px;
}

.vs-option__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vs-option__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-800);
}

.vs-option__icon svg {
  display: block;
}

.vs-option__icon *,
.vs-option__label {
  pointer-events: none;
}

.vs-option__label {
  font-size: 0.9rem;
  color: var(--gray-800);
  white-space: nowrap;
}

/* Grid layout for HairStyle (icon type) */
.vs-dropdown--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 6px;
  max-height: 300px;
}

.vs-option--grid {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 8px;
  border-left: none;
  text-align: center;
}

.vs-option--grid.vs-option--selected {
  border-left: none;
  padding-left: 6px;
  border: 2px solid var(--teal);
  background: rgba(46, 196, 182, 0.06);
}

.vs-option--grid .vs-option__icon {
  width: 28px;
  height: 28px;
}

.vs-option--grid .vs-option__label {
  font-size: 0.75rem;
  white-space: normal;
  line-height: 1.2;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__content h1 { font-size: 2.25rem; }
  .hero__description { margin: 0 auto 28px; }
  .hero__illustration { max-width: 400px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; max-width: 400px; margin: 48px auto 0; }
  .themes__grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials__grid { grid-template-columns: 1fr; max-width: 500px; margin: 48px auto 0; }

  /* Form — tablet */
  .form-hero__title { font-size: 2rem; }
  .theme-selector { grid-template-columns: repeat(2, 1fr); }
  .review-card { padding: 24px; }
  .review-list { grid-template-columns: 120px 1fr; }
  .form-progress__label { font-size: 0.7rem; }
  .form-progress__dot { width: 32px; height: 32px; font-size: 0.8rem; }
  .form-progress__line { min-width: 24px; margin: 0 8px; margin-bottom: 24px; }

  /* Storybook — tablet */
  .story-pages { max-width: 100%; padding: 0 16px; }
  .storybook-cover { margin-bottom: 24px; }
  .storybook-cover__title-overlay { padding: 48px 24px 24px; }
  .storybook-page__text-overlay { padding: 36px 24px 20px; }
  .storybook-page__text-overlay--top { padding: 20px 24px 36px; }
  .storybook-page__text { font-size: 0.95rem; }
  .story-dedication { max-width: 100%; margin-left: 16px; margin-right: 16px; }
}

@media (max-width: 640px) {
  .navbar__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .navbar__links.open { display: flex; }
  .navbar__toggle { display: flex; }

  .hero { padding: 110px 0 60px; }
  .hero__content h1 { font-size: 1.85rem; }
  .themes__grid { grid-template-columns: 1fr; max-width: 360px; margin: 48px auto 0; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { flex-wrap: wrap; justify-content: center; }

  /* Hide excess sparkles/confetti/emojis on mobile */
  .sparkle:nth-child(n+7) { display: none; }
  .confetti:nth-child(n+6) { display: none; }
  .bg-emoji { display: none; }
  .how-it-works::before, .how-it-works::after,
  .themes::before, .themes::after,
  .testimonials::before, .testimonials::after,
  .cta-bottom::before { font-size: 6rem; }

  /* Form — mobile */
  .form-hero { padding: 100px 0 28px; }
  .form-hero__title { font-size: 1.6rem; }
  .form-hero__subtitle { font-size: 0.95rem; }
  .form-section { padding: 28px 0 60px; }
  .form-step__title { font-size: 1.25rem; }

  /* Progress bar: hide labels, shrink dots */
  .form-progress__label { display: none; }
  .form-progress__dot { width: 28px; height: 28px; font-size: 0.75rem; }
  .form-progress__line { min-width: 20px; margin: 0 6px; margin-bottom: 0; }

  /* Stack two-column form rows */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Format selector: stack on mobile */
  .format-selector { grid-template-columns: 1fr; gap: 12px; }

  /* Theme selector: 2 columns on mobile */
  .theme-selector { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .theme-option__card { padding: 14px 8px; }
  .theme-option__icon { font-size: 2rem; }
  .theme-option__name { font-size: 0.8rem; }

  /* Trait chips: smaller on mobile */
  .trait-chip { padding: 6px 14px; font-size: 0.8rem; }

  /* Appearance group: tighter padding */
  .appearance-group { padding: 18px 16px; }

  /* Visual select: responsive */
  .vs-dropdown { max-height: 200px; }
  .vs-dropdown--grid { grid-template-columns: repeat(2, 1fr); max-height: 240px; }
  .form-label--inline { padding-top: 12px; }

  /* Photo upload: tighter padding */
  .photo-upload__dropzone { padding: 28px 16px; }
  .photo-upload__icon { font-size: 2rem; }
  .photo-upload__text { font-size: 0.85rem; }

  /* Review card */
  .review-card { padding: 18px; }
  .review-list { grid-template-columns: 1fr; gap: 4px; }
  .review-list dt { margin-top: 8px; }
  .review-photo img { width: 100px; height: 100px; }

  /* Form actions: stack vertically on very small screens */
  .form-actions { gap: 12px; }
  .btn--next, .btn--back { font-size: 0.9rem; padding: 12px 28px; }
  .btn--submit { font-size: 0.95rem; padding: 12px 32px; }

  /* Success state */
  .form-success { padding: 40px 16px; }
  .form-success__icon { width: 60px; height: 60px; font-size: 1.6rem; }
  .form-success h2 { font-size: 1.4rem; }

  /* Preview — mobile */
  .preview-page { padding: 100px 0 100px; }
  .preview-text-page { padding: 18px 16px; gap: 12px; }
  .preview-text-page__number { width: 28px; height: 28px; font-size: 0.75rem; }
  .preview-text-page__text { font-size: 0.9rem; }
  .preview-cta { padding: 12px 0; }
  .preview-cta__btn { font-size: 0.95rem; padding: 14px 32px; }
  .preview-note { padding: 16px; }
  .preview-note p { font-size: 0.85rem; }

  /* Storybook — mobile */
  .storybook-cover { border-radius: var(--radius-sm); margin-bottom: 16px; }
  .storybook-cover__title-overlay { padding: 36px 16px 18px; }
  .storybook-page { border-radius: var(--radius-sm); margin-bottom: 16px; }
  .storybook-page__text-overlay { padding: 28px 16px 14px; gap: 10px; }
  .storybook-page__text-overlay--top { padding: 14px 16px 28px; }
  .storybook-page__number { width: 28px; height: 28px; font-size: 0.75rem; }
  .storybook-page__text { font-size: 0.85rem; line-height: 1.5; }
  .illustration-spinner { width: 28px; height: 28px; }

  /* Story page */
  .story-page { padding: 100px 0 60px; }
  .story-header__title { font-size: 1.75rem; }
  .story-dedication { padding: 24px 18px; margin-top: 28px; }
  .story-dedication p { font-size: 1rem; }
  .story-status { padding: 60px 16px; }
  .story-status__icon { width: 60px; height: 60px; font-size: 1.6rem; }
  .story-status h2 { font-size: 1.4rem; }
}
