/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: #0f0720;
  color: #e2d9f0;
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   CUSTOM PROPERTIES — Dark Purple Palette (shared base)
   ============================================================ */
:root {
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-nav: 'Inter', sans-serif;
  --font-button: 'Inter', sans-serif;
  --heading-size:   clamp(2.5rem, 6vw, 4.5rem);
  --heading-size-card: 1.2rem;
  --body-size:      1rem;
  --letter-spacing: 0;
  --line-height:    1.6;
  --purple-50:  #f5f0ff;
  --purple-100: #ede5ff;
  --purple-200: #d9ccf5;
  --purple-300: #c4abf0;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #6d46c8;
  --purple-700: #4a2d7a;
  --purple-800: #2d1b4e;
  --purple-900: #1a0a2e;
  --purple-950: #0f0720;
  --font-serif: var(--font-heading);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   CUSTOM PROPERTIES — Children Theme (overrides via .theme-children)
   ============================================================ */
.theme-children {
  /* Pastel palette */
  --pastel-lavender: #d4c4ec;
  --pastel-pink: #f5d0e0;
  --pastel-blue: #d6e8f7;
  --pastel-gold: #fbbf24;
  --pastel-peach: #fed7aa;
  --pastel-mint: #a7f3d0;
  --pastel-sky: #bae6fd;
  --warm-gold: #d97706;
  --warm-purple: #3d2070;
  --deep-warm: #2d1b4e;
  --soft-text: #1f1435;
  --purple-50:  #f5f0ff;
  --purple-100: #ede5ff;
  --purple-200: #d9ccf5;
  --purple-300: #c4abf0;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #6d46c8;
  --purple-700: #4a2d7a;
  --purple-800: #2d1b4e;
  --purple-900: #1a0a2e;
  --purple-950: #0f0720;
}
.theme-children body {
  background: linear-gradient(180deg, var(--pastel-lavender) 0%, var(--pastel-pink) 25%, var(--pastel-blue) 50%, var(--pastel-pink) 75%, var(--pastel-lavender) 100%);
  color: var(--soft-text);
}

/* ============================================================
   NAVIGATION — Dark Theme
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 7, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
}
nav .logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--purple-300);
}
nav .logo span { color: var(--purple-500); }
nav ul { display: flex; gap: 2rem; }
nav ul a {
  font-family: var(--font-nav);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--purple-200);
  transition: color var(--transition);
  position: relative;
}
nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--purple-500);
  transition: width var(--transition);
}
nav ul a:hover { color: #fff; }
nav ul a:hover::after { width: 100%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--purple-300);
  transition: var(--transition);
}

/* Navigation — Children Theme */
.theme-children nav {
  background: rgba(232, 223, 245, 0.88);
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}
.theme-children nav .logo { color: var(--deep-warm); }
.theme-children nav .logo span { color: var(--warm-gold); }
.theme-children nav ul a {
  color: var(--warm-purple);
}
.theme-children nav ul a::after { background: var(--warm-gold); }
.theme-children nav ul a:hover { color: var(--deep-warm); }
.theme-children .nav-toggle span { background: var(--warm-purple); }

/* ============================================================
   STARFIELD BACKGROUND
   ============================================================ */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
#starfield .star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes twinkle {
  0%, 100% { opacity: var(--base-opacity); }
  50% { opacity: calc(var(--base-opacity) * 0.15); }
}
.nebula {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: nebulaDrift 40s ease-in-out infinite;
}
.nebula:nth-child(1) {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.07), transparent 70%);
  top: -15%; left: -10%;
  animation-delay: 0s;
}
.nebula:nth-child(2) {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.05), transparent 70%);
  bottom: -10%; right: -8%;
  animation-delay: -20s;
}
.nebula:nth-child(3) {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.03), transparent 70%);
  top: 35%; left: 55%;
  animation-delay: -10s;
}
@keyframes nebulaDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(35px, -25px) scale(1.06); }
  50% { transform: translate(-15px, 35px) scale(0.94); }
  75% { transform: translate(25px, -15px) scale(1.03); }
}
.drift-particle {
  position: fixed;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.12);
  pointer-events: none;
  z-index: -1;
  animation: particleDrift var(--duration) linear infinite;
  animation-delay: var(--delay);
}
@keyframes particleDrift {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: var(--particle-opacity); }
  85% { opacity: var(--particle-opacity); }
  100% { transform: translate(var(--drift-x), var(--drift-y)) scale(0.4); opacity: 0; }
}

/* Starfield — Children Theme */
.theme-children #starfield .star { background: #fbbf24; }
.theme-children .nebula:nth-child(1) {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.06), transparent 70%);
}
.theme-children .nebula:nth-child(2) {
  background: radial-gradient(circle, rgba(251, 131, 169, 0.04), transparent 70%);
}
.theme-children .nebula:nth-child(3) {
  background: radial-gradient(circle, rgba(147, 197, 253, 0.04), transparent 70%);
}
.theme-children .drift-particle { background: rgba(251, 191, 36, 0.08); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  color: var(--purple-400);
  font-size: 0.85rem;
}
footer .socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
footer .socials a {
  color: var(--purple-400);
  transition: color var(--transition);
}
footer .socials a:hover { color: #fff; }
footer .socials i { font-size: 1.125rem; }

/* Footer — Children Theme */
.theme-children footer {
  border-top: 1px solid rgba(251, 191, 36, 0.08);
  color: var(--warm-purple);
}
.theme-children footer .socials a { color: var(--warm-purple); }
.theme-children footer .socials a:hover { color: var(--deep-warm); }

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   HERO / LANDING (index.html)
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(139, 92, 246, 0.08), transparent),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(167, 139, 250, 0.06), transparent);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
  margin-bottom: 0.5rem;
}
.hero h1 span { color: var(--purple-400); }
.hero .tagline {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--purple-300);
  max-width: 520px;
  margin-bottom: 3rem;
}
.hero-artwork {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}
.hero-artwork img {
  width: 100%;
  height: auto;
  display: block;
}
.planets {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 2;
}
.planet-card {
  flex: 1 1 260px;
  max-width: 320px;
  background: linear-gradient(145deg, rgba(74, 45, 122, 0.3), rgba(26, 10, 46, 0.6));
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: planetEnter 0.8s ease-out both;
  position: relative;
  overflow: hidden;
}
.planet-card:nth-child(1) { animation-delay: 0.1s; }
.planet-card:nth-child(2) { animation-delay: 0.25s; }
.planet-card:nth-child(3) { animation-delay: 0.4s; }
@keyframes planetEnter {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.planet-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
  border-color: rgba(167, 139, 250, 0.4);
}
.planet-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.planet-card:hover::before { opacity: 1; }
.planet-icon {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.25rem;
  position: relative;
  transition: transform var(--transition);
}
.planet-icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.planet-card:hover .planet-icon { transform: scale(1.08); }
.planet-children .planet-icon {
  width: 210px;
  height: auto;
  animation: floatPlanet 5s ease-in-out infinite;
}
.planet-children .planet-icon img {
  width: 210px;
  height: auto;
  border-radius: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}
.planet-children .planet-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18) 0%, rgba(139, 92, 246, 0.12) 30%, transparent 65%);
  pointer-events: none;
  z-index: -1;
  animation: portalPulse 3s ease-in-out infinite;
}
.planet-children .paw {
  position: absolute;
  width: auto;
  height: auto;
  z-index: auto;
  opacity: 1;
  border-radius: 0;
  font-size: 16px;
  color: rgba(216, 180, 254, 0.65);
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.2));
  pointer-events: none;
  animation: pawFade 5s ease-in-out infinite;
  line-height: 1;
}
@keyframes portalPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes pawFade {
  0%, 100% { opacity: 0.15; transform: scale(0.85); }
  50% { opacity: 0.85; transform: scale(1.1); }
}
.planet-children .sparkle {
  position: absolute;
  width: auto;
  height: auto;
  z-index: auto;
  opacity: 1;
  border-radius: 0;
  font-size: 10px;
  color: rgba(253, 230, 138, 0.5);
  filter: drop-shadow(0 0 3px rgba(253, 230, 138, 0.15));
  pointer-events: none;
  animation: sparkleTwinkle 4s ease-in-out infinite;
  line-height: 1;
}
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.7; transform: scale(1.1) rotate(20deg); }
}
@media (prefers-reduced-motion: reduce) {
  .planet-children .planet-icon::before,
  .planet-children .paw,
  .planet-children .sparkle {
    animation: none;
  }
  .planet-children .planet-icon::before {
    opacity: 0.6;
  }
  .planet-children .paw {
    opacity: 0.45;
  }
  .planet-children .sparkle {
    opacity: 0.4;
  }
}
.planet-scifi .planet-icon {
  filter: drop-shadow(0 0 22px rgba(192, 132, 252, 0.25));
  animation: floatPlanet 5s ease-in-out infinite 0.5s;
}
.planet-fantasy .planet-icon {
  filter: drop-shadow(0 0 22px rgba(52, 211, 153, 0.2));
  animation: floatPlanet 5s ease-in-out infinite 1s;
}
@keyframes floatPlanet {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.planet-card:hover .planet-icon { animation-play-state: paused; }
.planet-card h3 {
  font-family: var(--font-heading);
  font-size: var(--heading-size-card, 1.2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}
.planet-card .brand {
  font-size: 0.85rem;
  color: var(--purple-300);
  margin-bottom: 0.5rem;
}
.planet-card p {
  font-size: 0.85rem;
  color: var(--purple-200);
  opacity: 0.8;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.planet-btn {
  display: inline-block;
  padding: 0.65rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-button);
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  background: transparent;
}
.planet-children .planet-btn {
  color: #fbbf24;
  border-color: #fbbf24;
}
.planet-children .planet-btn:hover {
  background: #fbbf24;
  color: #1a0a2e;
}
.planet-scifi .planet-btn {
  color: #c084fc;
  border-color: #c084fc;
}
.planet-scifi .planet-btn:hover {
  background: #c084fc;
  color: #1a0a2e;
}
.planet-fantasy .planet-btn {
  color: #34d399;
  border-color: #34d399;
}
.planet-fantasy .planet-btn:hover {
  background: #34d399;
  color: #1a0a2e;
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--purple-400);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.6;
}
.scroll-hint svg { width: 20px; height: 20px; }
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   WORLD SECTIONS (shared structure)
   ============================================================ */
.world-section {
  min-height: 100vh;
  padding: 6rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.world-section .container {
  max-width: 800px;
  width: 100%;
  position: relative;
  z-index: 2;
}
.world-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
.world-section .subtitle {
  font-family: var(--font-button);
  font-size: 1rem;
  color: var(--purple-300);
  margin-bottom: 2rem;
}
.world-section .description {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0.85;
}
.world-section .companion {
  margin: 1.5rem 0;
}
.world-section .companion img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto;
  animation: companionWiggle 3s ease-in-out infinite;
}
@keyframes companionWiggle {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
}
.world-section .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-nav);
  color: var(--purple-400);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  margin-top: 1rem;
}
.world-section .back-link:hover { color: #fff; }
.world-children {
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1b4e 30%, #3b1f6e 60%, #2d1b4e 100%);
}
.world-children::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.06), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(248, 113, 113, 0.05), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.03), transparent 70%);
  pointer-events: none;
}
.world-children h2 { font-family: 'Fredoka', sans-serif; color: #fbbf24; }
.world-children h3 { font-family: 'Fredoka', sans-serif; }
.planet-card.planet-children h3 { font-family: 'Fredoka', sans-serif; }
.world-children .planet-btn {
  color: #fbbf24;
  border-color: #fbbf24;
}
.world-children .planet-btn:hover {
  background: #fbbf24;
  color: #1a0a2e;
}
.world-scifi {
  background: linear-gradient(180deg, #0f0720 0%, #1e1035 30%, #2d1b4e 60%, #1e1035 100%);
}
.world-scifi::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(192, 132, 252, 0.07), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.05), transparent 50%);
  pointer-events: none;
}
.world-scifi h2 { color: #c084fc; }
.world-scifi .planet-btn {
  color: #c084fc;
  border-color: #c084fc;
}
.world-scifi .planet-btn:hover {
  background: #c084fc;
  color: #0f0720;
}
.world-fantasy {
  background: linear-gradient(180deg, #0a1a12 0%, #0f2d1a 30%, #1a3b24 60%, #0f2d1a 100%);
}
.world-fantasy::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 30%, rgba(52, 211, 153, 0.06), transparent 50%),
    radial-gradient(circle at 60% 70%, rgba(16, 185, 129, 0.04), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.03), transparent 70%);
  pointer-events: none;
}
.world-fantasy h2 { color: #34d399; }

/* ============================================================
   PAGE SECTIONS (About, Books, Contact shared)
   ============================================================ */
.page-section {
  padding: 5rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.page-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 1rem;
}
.page-section p {
  font-family: var(--font-body);
  color: var(--purple-200);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.page-section.alt {
  background: rgba(74, 45, 122, 0.08);
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-button);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 50px;
  color: var(--purple-300);
  font-size: var(--body-size);
  transition: background var(--transition), border-color var(--transition);
}
.contact-email:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}

/* ============================================================
   ABOUT THE AUTHOR (index.html)
   ============================================================ */
.about-author {
  padding: 5rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-author h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 1.25rem;
}
.about-author > p {
  font-family: var(--font-body);
  color: var(--purple-200);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.identity-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.identity-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: linear-gradient(145deg, rgba(74, 45, 122, 0.25), rgba(26, 10, 46, 0.4));
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.identity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.12);
  border-color: rgba(167, 139, 250, 0.25);
}
.identity-card .card-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.2rem;
}
.identity-card .card-label {
  font-family: var(--font-button);
  font-size: 0.75rem;
  color: var(--purple-300);
  margin-bottom: 1.25rem;
}
.card-btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-button);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--purple-500);
  color: var(--purple-300);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.card-btn:hover {
  background: var(--purple-500);
  color: #fff;
}
.card-btn:active { transform: scale(0.97); }

/* ============================================================
   CHILDREN'S PAGE
   ============================================================ */
.theme-children .hero::before {
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(251, 191, 36, 0.06), transparent),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(251, 131, 169, 0.04), transparent),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(147, 197, 253, 0.04), transparent);
}
.theme-children .hero h1 { color: var(--deep-warm); }
.theme-children .hero h1 span { color: var(--warm-gold); }
.theme-children .hero .tagline { color: var(--warm-purple); }
.theme-children .hero-artwork {
  margin-bottom: 2.5rem;
  border-radius: 24px;
  box-shadow:
    0 0 30px rgba(251, 191, 36, 0.08),
    0 0 60px rgba(251, 191, 36, 0.06),
    0 0 120px rgba(251, 131, 169, 0.04);
  aspect-ratio: 700 / 260;
}
.theme-children .hero-artwork::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(251, 191, 36, 0.08);
  pointer-events: none;
}
.theme-children .hero-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.theme-children .scroll-hint { color: var(--warm-purple); }

/* Artwork fireflies */
.artwork-firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: fireflyPulse 3s ease-in-out infinite;
}
.artwork-firefly--gold {
  background: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.2), 0 0 20px rgba(251, 191, 36, 0.1);
}
.artwork-firefly--pink {
  background: rgba(251, 131, 169, 0.35);
  box-shadow: 0 0 8px rgba(251, 131, 169, 0.2), 0 0 20px rgba(251, 131, 169, 0.1);
}
.artwork-firefly--sky {
  background: rgba(147, 197, 253, 0.35);
  box-shadow: 0 0 8px rgba(147, 197, 253, 0.2), 0 0 20px rgba(147, 197, 253, 0.1);
}
@keyframes fireflyPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.4); }
}

/* Children's featured book */
.featured-book {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
}
.featured-book h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--warm-gold);
  margin-bottom: 1.5rem;
}
.featured-book-inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  text-align: left;
  background: linear-gradient(145deg, rgba(212, 196, 236, 0.35), rgba(255, 255, 255, 0.15));
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(212, 196, 236, 0.15);
  box-shadow: 0 4px 24px rgba(45, 27, 78, 0.06);
}
.featured-cover {
  width: 160px;
  flex-shrink: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
  aspect-ratio: 2 / 3;
}
.featured-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.featured-cover-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.05), rgba(251, 131, 169, 0.05));
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.08);
}
.featured-cover img[src] { position: relative; z-index: 1; }
.featured-info {
  flex: 1;
  min-width: 0;
}
.featured-info h4 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: #6d28d9;
  margin-bottom: 0.05rem;
}
.featured-title-es {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 0.6rem;
}
.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  align-items: center;
}
.featured-tag {
  display: inline-block;
  font-family: var(--font-button);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid;
}
.featured-tag--primary {
  font-size: 0.6rem;
  padding: 0.2rem 0.55rem;
  color: #fff;
  border-color: #c2410c;
  background: #c2410c;
}
.featured-tag--secondary {
  font-size: 0.5rem;
  padding: 0.15rem 0.45rem;
}
.featured-tag--secondary.featured-tag--lavender {
  color: #6d28d9;
  border-color: rgba(109, 40, 217, 0.2);
  background: rgba(109, 40, 217, 0.07);
}
.featured-tag--secondary.featured-tag--plum {
  color: var(--deep-warm);
  border-color: rgba(45, 27, 78, 0.2);
  background: rgba(45, 27, 78, 0.07);
}
.featured-status {
  display: inline-block;
  font-family: var(--font-button);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #b45309;
  background: rgba(251, 191, 36, 0.08);
  margin-bottom: 0.6rem;
}
.featured-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--warm-purple);
  line-height: 1.6;
  font-style: italic;
}
.featured-desc-space {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(251, 191, 36, 0.06);
  min-height: 1.5rem;
}
.hero-artwork-wrapper {
  position: relative;
  max-width: 700px;
  width: 100%;
  margin: 0 auto 2.5rem;
}
.theme-children .world-section .subtitle { color: var(--warm-purple); }
.theme-children .world-section .companion img { filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.25)); }
.theme-children .world-section .back-link { color: var(--warm-gold); }
.theme-children .world-section .back-link:hover { color: var(--deep-warm); }
.theme-children .world-children { background: transparent; }

/* Floating sparkles (children) */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: sparkleFloat var(--sparkle-dur) ease-in-out infinite;
  animation-delay: var(--sparkle-delay);
  opacity: 0;
}
.sparkle-gold { background: rgba(251, 191, 36, 0.5); box-shadow: 0 0 6px rgba(251, 191, 36, 0.2); }
.sparkle-pink { background: rgba(251, 131, 169, 0.4); box-shadow: 0 0 6px rgba(251, 131, 169, 0.2); }
.sparkle-sky { background: rgba(147, 197, 253, 0.4); box-shadow: 0 0 6px rgba(147, 197, 253, 0.2); }
@keyframes sparkleFloat {
  0% { transform: translateY(0) scale(0); opacity: 0; }
  20% { opacity: 0.7; transform: translateY(-20px) scale(1); }
  80% { opacity: 0.4; transform: translateY(-60px) scale(0.6); }
  100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

/* ============================================================
   SCI-FI PAGE
   ============================================================ */
:root {
  --cyber-glow: #c084fc;
  --cyber-accent: #e9d5ff;
}
.series-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.series-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 30% 25%, rgba(192, 132, 252, 0.08), transparent),
    radial-gradient(ellipse 50% 50% at 70% 75%, rgba(139, 92, 246, 0.06), transparent);
  pointer-events: none;
}
.series-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(192, 132, 252, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
.series-hero .container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
}
.series-artwork {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
  aspect-ratio: 700 / 260;
}
.series-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.series-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-button);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyber-glow);
  border: 1.5px solid rgba(192, 132, 252, 0.25);
  padding: 0.45rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.12);
}
.series-badge::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyber-glow);
  box-shadow: 0 0 6px rgba(192, 132, 252, 0.5);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.series-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}
.series-hero h1 em {
  font-style: italic;
  color: var(--cyber-glow);
}
.series-tagline {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--purple-300);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}
.series-intro {
  font-family: var(--font-body);
  font-size: var(--body-size);
  color: var(--purple-200);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0.85;
}
.series-intro + .series-intro {
  margin-top: 1rem;
}
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.genre-tag {
  font-family: var(--font-button);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cyber-glow);
  border: 1px solid rgba(192, 132, 252, 0.15);
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  background: rgba(192, 132, 252, 0.05);
  transition: border-color var(--transition), background var(--transition);
}
.genre-tag:hover {
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.1);
}
.series-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 2.25rem;
  border-radius: 50px;
  font-family: var(--font-button);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--cyber-glow);
  color: var(--cyber-accent);
  background: rgba(192, 132, 252, 0.08);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
  position: relative;
  margin-top: 3rem;
}
.series-cta:hover {
  background: rgba(192, 132, 252, 0.2);
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.25), 0 0 50px rgba(192, 132, 252, 0.1);
  color: #fff;
}
.series-cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}
.series-cta:hover svg {
  transform: translateY(2px);
}
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyber-glow), transparent);
  margin: 0 auto 2.5rem;
  opacity: 0.4;
}
.book-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}
.scifi-book-card {
  background: linear-gradient(145deg, rgba(74, 45, 122, 0.2), rgba(26, 10, 46, 0.4));
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.scifi-book-card:hover {
  border-color: rgba(192, 132, 252, 0.25);
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.08);
}
.scifi-book-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.scifi-book-card .book-status {
  font-family: var(--font-button);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyber-glow);
  margin-bottom: 0.75rem;
  display: inline-block;
}
.scifi-book-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-nav);
  color: var(--purple-400);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  margin-top: 6.25rem;
}
.back-link:hover { color: #fff; }
.book-card-horizontal {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.book-cover {
  flex-shrink: 0;
  width: 160px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}
.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  z-index: 1;
}
.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(74, 45, 122, 0.25), rgba(26, 10, 46, 0.45));
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 8px;
  font-family: var(--font-button);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--purple-400);
  text-align: center;
  padding: 1rem;
  position: relative;
  z-index: 0;
}
.book-content {
  flex: 1;
  min-width: 0;
}
.book-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--purple-300);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-style: italic;
}
.status-badge {
  display: inline-block;
  font-family: var(--font-button);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(192, 132, 252, 0.2);
  color: var(--cyber-glow);
  background: rgba(192, 132, 252, 0.05);
  margin-bottom: 0.75rem;
}
.progress-section {
  max-width: 600px;
  margin: 4rem auto 0;
  text-align: center;
}
.progress-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  margin-bottom: 2.5rem;
}
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(192, 132, 252, 0.3), rgba(192, 132, 252, 0.05));
}
.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  text-align: left;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple-800);
  border: 2px solid var(--cyber-glow);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.15);
}
.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.timeline-book {
  font-family: var(--font-button);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--purple-500);
  text-transform: uppercase;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #fff;
}
.timeline-status {
  display: inline-block;
  font-family: var(--font-button);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid;
  width: fit-content;
  margin-top: 0.1rem;
}
.timeline-status[data-status="querying"] {
  color: var(--cyber-glow);
  border-color: rgba(192, 132, 252, 0.2);
  background: rgba(192, 132, 252, 0.05);
}
.timeline-status[data-status="complete"] {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.2);
  background: rgba(94, 234, 212, 0.05);
}
.timeline-status[data-status="drafting"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.05);
}

/* ============================================================
   BOOKS PAGE
   ============================================================ */
.books-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.books-book-card {
  flex: 1 1 340px;
  max-width: 420px;
  border-radius: 24px;
  padding: 2rem 2rem 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.books-book-card:hover {
  transform: translateY(-4px);
}
.books-book-card--children {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.06), rgba(212, 196, 236, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(251, 191, 36, 0.12);
  box-shadow: 0 4px 24px rgba(251, 191, 36, 0.04);
}
.books-book-card--children:hover {
  box-shadow: 0 12px 48px rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}
.books-book-card--scifi {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.06), rgba(74, 45, 122, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(139, 92, 246, 0.12);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.04);
}
.books-book-card--scifi:hover {
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}
.books-book-card .book-card-cover {
  width: 200px;
  margin: 0 auto 1.5rem;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}
.books-book-card .book-card-cover .cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-family: var(--font-button);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 1rem;
}
.books-book-card--children .cover-placeholder {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.1), rgba(212, 196, 236, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.12);
  color: rgba(251, 191, 36, 0.5);
}
.books-book-card--scifi .cover-placeholder {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(74, 45, 122, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.12);
  color: rgba(139, 92, 246, 0.45);
}
.books-book-card .book-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  z-index: 1;
}
.books-book-card .book-card-category {
  font-family: var(--font-button);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.books-book-card--children .book-card-category { color: #d97706; }
.books-book-card--scifi .book-card-category { color: #c084fc; }
.books-book-card .book-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.05rem;
}
.books-book-card .book-card-title-es {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #d97706;
  margin-bottom: 0.4rem;
}
.books-book-card .book-card-series {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--purple-300);
  font-style: italic;
  margin-bottom: 0.4rem;
}
.books-book-card .book-card-author {
  font-family: var(--font-button);
  font-size: 0.7rem;
  color: var(--purple-400);
  margin-bottom: 0.75rem;
}
.book-card-badges {
  margin-bottom: 0.75rem;
}
.badge-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.badge-row:last-child {
  margin-bottom: 0;
}
.book-card-badge {
  display: inline-block;
  font-family: var(--font-button);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid;
}
.book-card-badge--lg {
  font-size: 0.65rem;
  padding: 0.22rem 0.65rem;
}
.book-card-badge--sm {
  font-size: 0.5rem;
  padding: 0.16rem 0.5rem;
}
.books-book-card--children .book-card-badge--orange {
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.2);
  background: rgba(234, 88, 12, 0.08);
}
.books-book-card--children .book-card-badge--gold {
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.12);
  background: rgba(180, 83, 9, 0.04);
}
.books-book-card--children .book-card-badge--cream {
  color: #7c2d12;
  border-color: rgba(180, 83, 9, 0.15);
  background: rgba(255, 248, 235, 0.5);
}
.books-book-card--scifi .book-card-badge--status {
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.2);
  background: rgba(192, 132, 252, 0.06);
}
.books-book-card .book-card-note {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--purple-400);
  font-style: italic;
  margin-bottom: 0.4rem;
}
.books-book-card .book-card-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.books-book-card .book-card-tag {
  font-family: var(--font-button);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}
.books-book-card--children .book-card-tag {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.15);
  background: rgba(217, 119, 6, 0.04);
}
.books-book-card--scifi .book-card-tag {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.15);
  background: rgba(192, 132, 252, 0.04);
}
.books-book-card .book-card-desc {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--purple-200);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.books-book-card .book-card-btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-button);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.books-book-card--children .book-card-btn {
  color: #d97706;
  border: 1.5px solid #d97706;
  background: transparent;
}
.books-book-card--children .book-card-btn:hover {
  background: #d97706;
  color: #1a0a2e;
}
.books-book-card--scifi .book-card-btn {
  color: #c084fc;
  border: 1.5px solid #c084fc;
  background: transparent;
}
.books-book-card--scifi .book-card-btn:hover {
  background: #c084fc;
  color: #1a0a2e;
}
.books-back {
  margin-top: 3rem;
}
.books-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-nav);
  color: var(--purple-400);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.books-back a:hover { color: #fff; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  max-width: 520px;
  margin: 2rem auto 0;
  background: rgba(45, 27, 78, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(167, 139, 250, 0.1);
  border-radius: 20px;
  padding: 2rem;
  text-align: left;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-family: var(--font-button);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-300);
  margin-bottom: 0.4rem;
}
.form-group label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--purple-400);
  opacity: 0.6;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #fff;
  background: rgba(15, 7, 32, 0.4);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(167, 139, 250, 0.3);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.form-group textarea {
  min-height: 110px;
  resize: vertical;
}
.submit-btn {
  display: block;
  width: 100%;
  padding: 0.8rem;
  font-family: var(--font-button);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.submit-btn:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.35);
}

/* ============================================================
   RESPONSIVE (shared)
   ============================================================ */
@media (max-width: 768px) {
  nav { padding: 0.8rem 1.25rem; }
  nav ul {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(15, 7, 32, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  }
  .theme-children nav ul {
    background: rgba(232, 223, 245, 0.95);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
  }
  nav ul.open { display: flex; }
  nav ul a {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(167, 139, 250, 0.05);
  }
  nav ul a::after { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 6rem 1.25rem 3rem; }
  .planets { gap: 1.5rem; }
  .planet-card {
    flex: 1 1 100%;
    max-width: 400px;
  }
  .hero-artwork { max-width: 400px; }

  .theme-children .hero-artwork-wrapper { max-width: 400px; }
  .theme-children .featured-book-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .theme-children .featured-cover { width: 130px; }

  .world-section { padding: 5rem 1.25rem 3rem; }
  .page-section { padding: 3rem 1.25rem; }

  .series-hero { padding: 6rem 1.25rem 3rem; }
  .scifi-book-card { padding: 1.5rem; }
  .book-card-horizontal { flex-direction: column; align-items: center; }
  .book-cover { width: 140px; }
  .progress-section { margin-top: 3rem; padding: 0 1rem; }

  .books-grid { flex-direction: column; align-items: center; }
  .books-book-card { max-width: 100%; }
  .books-book-card .book-card-cover { width: 160px; }
  .books-book-card .book-card-tags { justify-content: center; }
  .contact-form { padding: 1.5rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .planet-card { flex: 1 1 240px; }
}
