/* ============================================
   Byte-Sized AI — Design System & Styles v2
   "Big ideas, bite-sized adventures"
   Major visual overhaul — Feb 2026
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Quicksand:wght@400;500;600;700&family=Fredoka:wght@400;500;600;700&family=Grandstander:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors — refined palette */
  --purple: #6D28D9;
  --purple-light: #A78BFA;
  --purple-dark: #4C1D95;
  --purple-faint: #EDE9FE;
  --purple-glow: rgba(109, 40, 217, 0.15);
  --yellow: #F59E0B;
  --yellow-light: #FDE68A;
  --yellow-bright: #FBBF24;
  --yellow-warm: #FFF7E0;
  --teal: #14B8A6;
  --teal-light: #CCFBF1;
  --teal-faint: #F0FDFA;
  --white-warm: #FFFBF5;
  --card-bg: #F5F3FF;
  --green: #10B981;
  --green-light: #D1FAE5;
  --coral: #F87171;
  --coral-light: #FEE2E2;
  --text-dark: #1E1B4B;
  --text-medium: #5B5694;
  --text-light: #8B85B1;

  /* Typography */
  --font-display: 'Baloo 2', cursive, sans-serif;
  --font-body: 'Quicksand', sans-serif;

  /* Sizing — fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.9vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);
  --text-5xl: clamp(2.75rem, 2rem + 3vw, 4rem);

  /* Spacing (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Radii — more generous */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Layered shadows for depth */
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, 0.04), 0 1px 3px rgba(30, 27, 75, 0.06);
  --shadow-md: 0 2px 4px rgba(30, 27, 75, 0.04), 0 4px 12px rgba(30, 27, 75, 0.08);
  --shadow-lg: 0 4px 6px rgba(30, 27, 75, 0.04), 0 10px 24px rgba(30, 27, 75, 0.1);
  --shadow-xl: 0 8px 12px rgba(30, 27, 75, 0.06), 0 20px 40px rgba(30, 27, 75, 0.12);
  --shadow-glow-purple: 0 0 0 3px rgba(109, 40, 217, 0.12), 0 4px 16px rgba(109, 40, 217, 0.2);
  --shadow-glow-yellow: 0 0 0 3px rgba(245, 158, 11, 0.12), 0 4px 16px rgba(245, 158, 11, 0.25);
  --shadow-glow-teal: 0 0 0 3px rgba(20, 184, 166, 0.12), 0 4px 16px rgba(20, 184, 166, 0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Only use smooth scroll when not dragging — smooth scroll
   interferes with programmatic scrollBy during drag */
html:not(.dragging-active) {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white-warm);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Soft Clouds background image */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('./images/bg-clouds-mobile.jpg') center top / cover no-repeat;
  z-index: -2;
  pointer-events: none;
}

@media (min-width: 640px) {
  body::after {
    background-image: url('./images/bg-clouds.jpg');
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

/* ==========================================
   SPLASH / TITLE SCREEN  (Concept B — Playful Burst)
   ========================================== */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Edge colors sampled from the v3 hero image for seamless blending */
  background: linear-gradient(135deg, #a40b53 0%, #7a22ad 20%, #b04e94 40%, #ea6ba0 60%, #c95de4 80%, #bc72d4 100%);
  animation: splashFadeIn 0.6s var(--ease-out) forwards;
  padding: 0;
}

@keyframes splashFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.splash-screen.exiting {
  animation: splashExit 0.5s var(--ease-out) forwards;
}

@keyframes splashExit {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Hero image splash layout */
.splash-hero-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Hero always covers the viewport — no media query needed for landscape */

/* ===== Mobile portrait card layout (hidden by default) ===== */
.splash-mobile-card {
  display: none;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes robotFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.splash-mobile-card {
  position: relative;
  width: min(88vw, 400px);
  max-height: 82vh;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: clamp(20px, 4vh, 32px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 60px rgba(100, 50, 180, 0.12), 0 4px 16px rgba(100, 50, 180, 0.06);
  padding: 0 20px clamp(12px, 2vh, 28px);
  text-align: center;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(6vh, 10vh, 12vh);
  animation: cardFadeIn 0.6s ease-out both;
  z-index: 10;
  pointer-events: auto;
}

.splash-mobile-card .card-robot {
  width: min(50vw, 220px);
  max-height: 28vh;
  object-fit: contain;
  margin-top: min(-20vw, -90px);
  border-radius: 20px;
  filter: drop-shadow(0 15px 30px rgba(100, 50, 180, 0.2));
  animation: robotFloat 3s ease-in-out infinite;
  z-index: 2;
}

.splash-mobile-card .card-title-img {
  width: min(55vw, 230px);
  max-height: 16vh;
  object-fit: contain;
  margin-top: clamp(4px, 1vh, 10px);
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

.splash-mobile-card .card-tagline-img {
  width: min(52vw, 210px);
  max-height: 14vh;
  object-fit: contain;
  margin-top: clamp(0px, 0.5vh, 4px);
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

.splash-mobile-card .card-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #d4960e);
  border-radius: 3px;
  margin: clamp(6px, 1vh, 12px) 0;
}

.splash-mobile-card .card-cta {
  padding: clamp(10px, 1.5vh, 14px) clamp(36px, 10vw, 52px);
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-family: 'Fredoka', cursive, sans-serif;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.splash-mobile-card .card-cta:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45);
}
.splash-mobile-card .card-cta:active {
  transform: scale(0.93);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.splash-mobile-card .card-cta.pressing {
  animation: mobileBtnPress 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes mobileBtnPress {
  0%   { transform: scale(1);    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35); }
  35%  { transform: scale(0.90);  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2); }
  70%  { transform: scale(1.04);  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45); }
  100% { transform: scale(1);     box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35); }
}

.splash-mobile-card .card-features {
  display: flex;
  gap: clamp(4px, 2vw, 16px);
  margin-top: clamp(6px, 1vh, 14px);
  flex-wrap: wrap;
  justify-content: center;
}
.splash-mobile-card .card-feature {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(0.7rem, 2.8vw, 0.85rem);
  font-family: 'Baloo 2', cursive, sans-serif;
  color: #7a6a96;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.06);
  padding: 5px 10px;
  border-radius: 20px;
}

/* Decorative background circles for portrait mode */
.splash-bg-circle {
  display: none;
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #7c3aed;
  pointer-events: none;
}
.splash-bg-circle-1 { width: 300px; height: 300px; top: -80px; right: -60px; }
.splash-bg-circle-2 { width: 200px; height: 200px; bottom: -40px; left: -50px; }

/* Decorative icons for portrait mode */
.splash-deco {
  display: none;
  position: absolute;
  opacity: 0.10;
  pointer-events: none;
}
.splash-deco-gear { top: 4%; left: 6%; font-size: 2.5rem; animation: spin 20s linear infinite; }
.splash-deco-atom { bottom: 5%; right: 7%; font-size: 2.5rem; animation: float 4s ease-in-out infinite; }
.splash-deco-brain { top: 5%; right: 6%; font-size: 2rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Portrait screens — switch to card layout */
@media (max-aspect-ratio: 3/4) {
  .splash-hero-wrap {
    overflow: hidden;
  }
  /* Hide the landscape hero image and its overlay */
  .splash-hero-img {
    display: none;
  }
  .splash-overlay {
    display: none;
  }
  /* Show the card layout */
  .splash-mobile-card {
    display: flex;
  }
  .splash-bg-circle {
    display: block;
  }
  .splash-deco {
    display: block;
  }
}

.splash-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.splash-overlay-inner {
  position: absolute;
  inset: 0;
}

/* Clickable CTA positioned over the hero image's "Let's Go!" button.
   Uses JS to dynamically compute position based on object-fit: cover offset. */
.splash-cta-overlay {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50px;
  z-index: 10;
  pointer-events: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.splash-cta-overlay:hover,
.splash-cta-overlay:focus,
.splash-cta-overlay:focus-visible,
.splash-cta-overlay:active {
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}




/* ---- Sign-In Modal ---- */
.signin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 75, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}

.signin-backdrop.visible {
  opacity: 1;
}

.signin-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(380px, calc(100vw - 48px));
  background: var(--white-warm);
  border-radius: var(--radius-2xl);
  padding: var(--space-8) var(--space-6) var(--space-6);
  z-index: 101;
  opacity: 0;
  transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-spring);
  box-shadow: 0 24px 48px rgba(30, 27, 75, 0.18), 0 0 0 1px rgba(109, 40, 217, 0.08);
  text-align: center;
}

.signin-modal.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.signin-modal.exiting {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
}

.signin-mascot-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--white-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.12);
  border: 3px solid rgba(109, 40, 217, 0.1);
}

.signin-mascot {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(109, 40, 217, 0.15));
}

.signin-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--purple);
  margin: var(--space-6) 0 var(--space-1) 0;
  line-height: 1.2;
}

.signin-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-medium);
  margin: 0 0 var(--space-6) 0;
}

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

.signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid rgba(30, 27, 75, 0.1);
  position: relative;
  overflow: hidden;
}

.signin-btn span {
  transition: opacity var(--transition-fast);
}

.signin-btn-icon {
  flex-shrink: 0;
}

/* Google button */
.signin-btn-google {
  background: #fff;
  color: var(--text-dark);
  border-color: rgba(30, 27, 75, 0.12);
}

.signin-btn-google:hover {
  background: #f8f8ff;
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.12);
}

/* Apple button */
.signin-btn-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}

.signin-btn-apple:hover {
  background: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Email button */
.signin-btn-email {
  background: var(--purple-faint);
  color: var(--purple);
  border-color: rgba(109, 40, 217, 0.15);
}

.signin-btn-email:hover {
  background: rgba(109, 40, 217, 0.12);
  border-color: rgba(109, 40, 217, 0.3);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.12);
}

/* Divider */
.signin-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-1) 0;
}

.signin-divider::before,
.signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(30, 27, 75, 0.08);
}

.signin-divider span {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-light);
  text-transform: lowercase;
}

/* Footer text */
.signin-footer {
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.6rem + 0.25vw, 0.75rem);
  font-weight: 500;
  color: var(--text-light);
  margin: var(--space-4) 0 0 0;
  line-height: 1.5;
  opacity: 0.8;
}

/* Loading state */
.signin-btn-loading {
  pointer-events: none;
  opacity: 0.7;
}

.signin-btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spinLoader 600ms linear infinite;
  right: var(--space-4);
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

/* Clerk sign-in container inside modal */
.clerk-signin-container {
  width: 100%;
  min-height: 60px;
}

/* Override Clerk's component styles to blend with our modal */
.clerk-signin-container .cl-rootBox {
  width: 100% !important;
}

.clerk-signin-container .cl-card {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.clerk-signin-container .cl-header {
  display: none !important;
}

.clerk-signin-container .cl-footer {
  display: none !important;
}

.clerk-signin-container .cl-internal-b3fm6y {
  display: none !important;
}

/* Clerk UserButton on map page */
.clerk-user-btn-wrap {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 20;
}

/* Splash content — Concept B */
/* Old splash element styles removed — now using hero image layout */

/* ==========================================
   APP SHELL
   ========================================== */

/* Readability overlay on top of background image */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 251, 245, 0.4);
  pointer-events: none;
  z-index: -1;
}

#app {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.screen {
  display: none;
  opacity: 0;
  padding: var(--space-8);
  padding-bottom: var(--space-16);
  position: relative;
}

.screen.active {
  display: block;
  animation: screenFadeIn 0.4s var(--ease-out) forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* --- Background Decoration (hidden — replaced by clouds background) --- */
.bg-shapes {
  display: none;
}

.bg-shape {
  position: absolute;
  opacity: 0.035;
  font-size: 2rem;
  animation: floatShape 22s ease-in-out infinite;
}

.bg-shape:nth-child(1) { top: 10%; left: 8%; animation-delay: 0s; }
.bg-shape:nth-child(2) { top: 25%; right: 12%; animation-delay: -4s; font-size: 1.5rem; }
.bg-shape:nth-child(3) { top: 50%; left: 5%; animation-delay: -8s; }
.bg-shape:nth-child(4) { top: 70%; right: 8%; animation-delay: -12s; font-size: 1.8rem; }
.bg-shape:nth-child(5) { top: 85%; left: 15%; animation-delay: -16s; font-size: 1.3rem; }
.bg-shape:nth-child(6) { top: 40%; left: 80%; animation-delay: -6s; font-size: 2.2rem; }

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-14px) rotate(6deg); }
  66% { transform: translateY(8px) rotate(-3deg); }
}

/* ==========================================
   NAME ENTRY SCREEN
   ========================================== */

.name-screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-6);
  background: linear-gradient(180deg, #E8DEFF 0%, #F0E8FF 40%, #F5F0FF 100%);
}

.name-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.name-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
  width: 100%;
  animation: nameCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes nameCardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.name-mascot {
  width: clamp(120px, 30vw, 180px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(109, 40, 217, 0.2));
  margin-bottom: -10px;
  z-index: 2;
  position: relative;
  animation: byteBob 3s ease-in-out infinite;
}

.name-bubble {
  position: relative;
  background: linear-gradient(180deg, #FFFBF0, #FFFFFF);
  border: 1.5px solid rgba(245, 158, 11, 0.12);
  border-radius: 22px;
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-6);
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(109, 40, 217, 0.06),
    0 8px 32px rgba(109, 40, 217, 0.08);
  width: 100%;
  text-align: center;
}

.name-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #F59E0B, #FBBF24, #F59E0B, transparent);
  border-radius: 0 0 4px 4px;
}

.name-bubble::after {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid #FFFBF0;
  filter: drop-shadow(0 -1px 0 rgba(245, 158, 11, 0.15));
}

.name-bubble-text {
  font-family: 'Grandstander', cursive;
  font-weight: 500;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-dark);
}

.name-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.name-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2.5px solid var(--purple-faint);
  background: white;
  font-family: 'Grandstander', cursive;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.06);
}

.name-input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.name-input:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15), 0 2px 8px rgba(109, 40, 217, 0.06);
}

.name-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--purple), #8B5CF6);
  color: white;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.3);
}

.name-submit:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(109, 40, 217, 0.4);
}

.name-submit:not(:disabled):active {
  transform: translateY(0);
}

.name-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.name-submit img {
  width: 28px;
  height: 28px;
}

.name-skip {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s;
}

.name-skip:hover {
  color: var(--purple);
}

/* ==========================================
   HOME SCREEN — Concept C: Spotlight + Grid
   ========================================== */

/* Home screen overrides — Concept C handles its own padding */
#home-screen {
  padding: 0;
  padding-bottom: 0;
  background: #FAFAFF;
  position: relative;
  z-index: 1;
}

/* --- Sticky Header --- */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 30px;
  width: auto;
}

.header-greeting {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--purple-dark);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.star-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-warm));
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.rewards-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(167, 139, 250, 0.2);
  background: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--purple);
  cursor: pointer;
  transition: all 150ms ease;
}

.rewards-btn-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.rewards-btn:hover {
  background: var(--purple-faint);
  border-color: var(--purple-light);
}

/* --- Featured Hero Card --- */
.featured {
  margin: 20px 28px 0;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 50%, #7C3AED 100%);
  display: flex;
  align-items: stretch;
  min-height: 220px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 32px rgba(109, 40, 217, 0.2);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(109, 40, 217, 0.28);
}

.featured:active {
  transform: scale(0.99);
}

.featured-bg-deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.featured-content {
  flex: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.featured-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.featured-label-rocket {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.featured-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.15;
  color: white;
  margin-bottom: 8px;
}

.featured-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 360px;
}

.featured-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--purple-dark);
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow));
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
  width: fit-content;
  transition: transform 150ms ease;
}

.featured-btn:hover {
  transform: scale(1.05);
}

.featured-img-wrap {
  width: 260px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

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

@keyframes byteBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Quick Stats --- */
.home-stats {
  display: flex;
  gap: 12px;
  margin: 20px 28px 0;
}

.stat-card {
  flex: 1;
  border-radius: 20px;
  padding: 20px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.6);
  pointer-events: none;
}

.stat-card:nth-child(1) {
  background: linear-gradient(145deg, rgba(109,40,217,0.1) 0%, rgba(167,139,250,0.15) 100%);
  box-shadow: 0 4px 20px rgba(109,40,217,0.08);
}
.stat-card:nth-child(2) {
  background: linear-gradient(145deg, rgba(245,158,11,0.1) 0%, rgba(251,191,36,0.15) 100%);
  box-shadow: 0 4px 20px rgba(245,158,11,0.08);
}
.stat-card:nth-child(3) {
  background: linear-gradient(145deg, rgba(20,184,166,0.1) 0%, rgba(94,234,212,0.15) 100%);
  box-shadow: 0 4px 20px rgba(20,184,166,0.08);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  line-height: 1;
}

.stat-number.purple { color: var(--purple); }
.stat-number.yellow { color: var(--yellow); }
.stat-number.teal { color: var(--teal); }

.stat-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  color: rgba(30,27,75,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* --- Section Header --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--purple-dark);
}

/* --- Adventure Grid --- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 28px 32px;
}

.g-card {
  border-radius: 18px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 12px rgba(109, 40, 217, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  animation: cardEnter 0.45s var(--ease-out) both;
}

/* Staggered entrance */
.g-card:nth-child(1) { animation-delay: 0.03s; }
.g-card:nth-child(2) { animation-delay: 0.06s; }
.g-card:nth-child(3) { animation-delay: 0.09s; }
.g-card:nth-child(4) { animation-delay: 0.12s; }
.g-card:nth-child(5) { animation-delay: 0.15s; }
.g-card:nth-child(6) { animation-delay: 0.18s; }
.g-card:nth-child(7) { animation-delay: 0.21s; }
.g-card:nth-child(8) { animation-delay: 0.24s; }
.g-card:nth-child(9) { animation-delay: 0.27s; }
.g-card:nth-child(10) { animation-delay: 0.30s; }

@keyframes cardEnter {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.g-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.12);
}

.g-card:active {
  transform: scale(0.98);
}

.g-card-img-wrap {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: var(--purple-faint);
}

.g-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease-out);
}

.g-card:hover .g-card-img {
  transform: scale(1.06);
}

.g-card-number {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.g-card-new {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--teal), #0D9488);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.35);
  animation: badgeGlow 2.5s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(20, 184, 166, 0.35); }
  50% { box-shadow: 0 2px 14px rgba(20, 184, 166, 0.55); }
}

.g-card-body {
  padding: 12px 14px 14px;
}

.g-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-card-stars {
  display: flex;
  gap: 2px;
  font-size: 0.78rem;
}

.g-card-star {
  color: #D4D0E8;
  transition: color 180ms ease;
}

.g-card-star.filled {
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.35);
}

/* Progress bar on card */
.g-card-progress {
  height: 3px;
  background: var(--purple-faint);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.g-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 3px;
  width: 0%;
  transition: width 600ms var(--ease-out);
}

/* --- Home Footer --- */
.home-footer {
  text-align: center;
  padding: 24px 28px 40px;
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  margin-top: 16px;
}

.footer-byte {
  width: 60px;
  opacity: 0.3;
  margin: 0 auto 8px;
  display: block;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.footer-help-link {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  color: rgba(167, 139, 250, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-help-link:hover {
  color: rgba(167, 139, 250, 0.85);
  text-decoration: underline;
}

/* ==========================================
   ADVENTURE SCREEN
   ========================================== */

/* --- Top Bar (Frosted Glass) --- */
.adventure-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 56px;
  margin-bottom: var(--space-5);
  position: sticky;
  top: 0;
  background: linear-gradient(135deg,
    rgba(167, 139, 250, 0.12) 0%,
    rgba(255, 255, 255, 0.70) 30%,
    rgba(237, 233, 254, 0.50) 60%,
    rgba(253, 230, 138, 0.08) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
  border-radius: 24px;
  box-shadow:
    0 2px 8px rgba(109, 40, 217, 0.07),
    0 8px 24px rgba(109, 40, 217, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(167, 139, 250, 0.25);
  min-height: 72px;
  position: relative;
  overflow: visible;
}

/* Subtle top highlight shimmer */
.adventure-top-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.8) 30%,
    rgba(167, 139, 250, 0.3) 50%,
    rgba(255, 255, 255, 0.8) 70%,
    transparent);
  pointer-events: none;
}

/* Rainbow Spin Ring Back Button */
.back-btn-wrap {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.back-btn-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--yellow), var(--teal), var(--purple-light, #A78BFA), var(--yellow)
  );
  animation: homeSpinBorder 3s linear infinite;
  z-index: 1;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0;
  background: linear-gradient(135deg, #C084FC 0%, #8B5CF6 100%);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin: 2px;
  box-shadow:
    0 4px 12px rgba(139, 92, 246, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: transform 150ms ease;
}

.back-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-btn:hover {
  transform: scale(1.12);
}

.back-btn:active {
  transform: scale(0.92);
}

.adventure-bar-title {
  font-family: 'Fredoka', var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 0.8rem + 1.5vw, 1.65rem);
  text-align: center;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

/* Option 2: Soft gradient — purple to pink with white glow */
.adventure-bar-text {
  background: linear-gradient(180deg, #6D28D9 0%, #8B5CF6 35%, #C026D3 70%, #E879A8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter:
    drop-shadow(0 2px 0 rgba(109, 40, 217, 0.4))
    drop-shadow(0 0 12px rgba(167, 139, 250, 0.35))
    drop-shadow(0 0 3px rgba(109, 40, 217, 0.2));
}

.adventure-bar-title-img {
  height: 36px;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 1;
  filter: drop-shadow(0 1px 3px rgba(109, 40, 217, 0.15));
}

.adventure-bar-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
}

.reward-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.bar-stars {
  display: none;
}

/* Rainbow Spin Ring Home Button */
.home-btn-wrap {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.home-btn-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--yellow), var(--teal), var(--purple-light, #A78BFA), var(--yellow)
  );
  animation: homeSpinBorder 3s linear infinite;
  z-index: 1;
}

@keyframes homeSpinBorder {
  to { transform: rotate(360deg); }
}

.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0;
  background: linear-gradient(135deg, #C084FC 0%, #8B5CF6 100%);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin: 2px;
  box-shadow:
    0 4px 12px rgba(139, 92, 246, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: transform 150ms ease;
}

.home-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-btn:hover {
  transform: scale(1.12);
}

.home-btn:active {
  transform: scale(0.92);
}

/* --- Comic Panel (Gradient Glow) --- */
.comic-panel {
  background: linear-gradient(165deg, 
    rgba(167, 139, 250, 0.18) 0%, 
    rgba(237, 233, 254, 0.45) 25%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(253, 230, 138, 0.12) 85%,
    rgba(245, 158, 11, 0.08) 100%);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: 
    0 2px 8px rgba(109, 40, 217, 0.06),
    0 8px 24px rgba(109, 40, 217, 0.10),
    0 20px 48px rgba(109, 40, 217, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-8);
  animation: panelSlideIn 0.45s var(--ease-out);
  border: 1.5px solid rgba(167, 139, 250, 0.25);
  position: relative;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Ambient glow overlay */
.comic-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 15%, rgba(167, 139, 250, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 85%, rgba(245, 158, 11, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

/* Sparkle accent on card */
.comic-panel::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(167, 139, 250, 0.5) 30%, 
    rgba(255, 255, 255, 0.8) 50%, 
    rgba(167, 139, 250, 0.5) 70%, 
    transparent);
  border-radius: 1px;
  pointer-events: none;
}

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

.panel-scene {
  position: relative;
  padding: var(--space-10) var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  z-index: 1;
}

.panel-byte-img {
  width: clamp(120px, 28vw, 180px);
  animation: byteBob 3s ease-in-out infinite;
  filter: drop-shadow(0 6px 20px rgba(109, 40, 217, 0.22)) drop-shadow(0 2px 6px rgba(109, 40, 217, 0.10));
  margin-bottom: var(--space-5);
}

/* Scene illustration image - replaces byte image when available */
.panel-scene-img {
  width: clamp(200px, 70vw, 360px);
  border-radius: 16px;
  margin-bottom: var(--space-5);
  box-shadow:
    0 4px 16px rgba(109, 40, 217, 0.15),
    0 8px 32px rgba(109, 40, 217, 0.10);
  border: 2px solid rgba(167, 139, 250, 0.2);
  animation: sceneFadeIn 0.6s ease-out;
}

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

.has-scene-image {
  padding-top: var(--space-6);
}

/* Speech bubble (Warm Gold Card + Grandstander) */
.speech-bubble {
  position: relative;
  background: linear-gradient(180deg, #FFFBF0, #FFFFFF);
  border: 1.5px solid rgba(245, 158, 11, 0.12);
  border-radius: 22px;
  padding: var(--space-6) var(--space-8);
  margin: 0 var(--space-4) var(--space-6);
  font-family: 'Grandstander', cursive;
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-dark);
  max-width: 600px;
  text-align: center;
  overflow: hidden;
  box-shadow:
    0 2px 12px rgba(109, 40, 217, 0.06),
    0 8px 32px rgba(109, 40, 217, 0.08);
}

/* Golden accent bar at top */
.speech-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #F59E0B, #FBBF24, #F59E0B, transparent);
  border-radius: 0 0 4px 4px;
  pointer-events: none;
}

/* Triangle pointer — warm gold tint */
.speech-bubble::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid #FFFBF0;
  filter: drop-shadow(0 -1px 0 rgba(245, 158, 11, 0.15));
}

/* Panel progress dots */
.panel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) 0;
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple-faint);
  transition: all var(--transition-fast);
}

.panel-dot.active {
  background: var(--purple);
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(109, 40, 217, 0.3);
}

.panel-dot.completed {
  background: var(--purple-light);
}

/* --- Buttons --- */
.next-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-8);
  font-family: 'Fredoka', var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: #5B21B6;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(237, 233, 254, 0.55) 50%,
    rgba(255, 255, 255, 0.65) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1.5px solid rgba(167, 139, 250, 0.35);
  box-shadow:
    0 2px 8px rgba(109, 40, 217, 0.10),
    0 8px 24px rgba(109, 40, 217, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  min-height: 60px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.next-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 30%;
  height: 45%;
  background: linear-gradient(160deg, rgba(255,255,255,0.5), transparent);
  border-radius: 20px 20px 50% 50%;
  pointer-events: none;
}

.next-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(109, 40, 217, 0.15),
    0 12px 32px rgba(109, 40, 217, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.next-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 4px rgba(109, 40, 217, 0.10),
    0 4px 12px rgba(109, 40, 217, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================
   ACTIVITIES
   ========================================== */

.activity-container {
  animation: panelSlideIn 0.45s var(--ease-out);
  text-align: center;
}

.activity-instruction {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--purple-dark);
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.35;
}

.activity-instruction-img {
  display: block;
  max-width: 500px;
  width: 100%;
  margin: 0 auto 8px;
}

.activity-byte {
  width: 220px;
  margin: 0 auto 4px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(109, 40, 217, 0.12));
}

/* --- Sort Activity --- */
.sort-buckets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.sort-bucket {
  background: linear-gradient(135deg, var(--card-bg), rgba(255,255,255,0.8));
  border: 2.5px dashed var(--purple-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  text-align: center;
  min-height: 88px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sort-bucket:hover {
  border-color: var(--purple);
  background: var(--purple-faint);
  transform: translateY(-2px);
}

.sort-bucket.selected {
  border-color: var(--purple);
  border-style: solid;
  background: var(--purple-faint);
  box-shadow: var(--shadow-glow-purple);
}

.bucket-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--purple-dark);
}

.bucket-emoji {
  font-size: 1.6rem;
  margin-bottom: var(--space-2);
}

.bucket-count {
  font-size: var(--text-sm);
  color: var(--text-medium);
  margin-top: var(--space-1);
  font-weight: 600;
}

/* --- Illustrated Sort Buckets --- */
.sort-bucket.sort-bucket-illustrated {
  background: transparent;
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  min-height: auto;
  position: relative;
}

.sort-bucket.sort-bucket-illustrated .bucket-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 13px;
  pointer-events: none;
}

.sort-bucket.sort-bucket-illustrated .bucket-count {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 4px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--purple-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.sort-bucket.sort-bucket-illustrated:hover {
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.3);
  background: transparent;
}

.sort-bucket.sort-bucket-illustrated.selected {
  border-color: var(--purple);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.3), 0 6px 20px rgba(109, 40, 217, 0.35);
  background: transparent;
}

/* --- Drag & Drop States --- */
.sort-card.dragging {
  opacity: 0.35;
  transform: scale(0.95);
}

.sort-card.drag-clone {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.92;
  transform: rotate(3deg) scale(1.05);
  box-shadow: 0 12px 40px rgba(109, 40, 217, 0.4);
  transition: none;
}

.sort-bucket.drag-over {
  border-color: var(--purple) !important;
  border-style: solid !important;
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.3), 0 0 24px rgba(139, 92, 246, 0.25);
  transform: scale(1.03);
}

.sort-bucket.sort-bucket-illustrated.drag-over {
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.4), 0 0 30px rgba(139, 92, 246, 0.3);
  transform: scale(1.03);
  background: transparent;
}

.sort-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.sort-card {
  background: white;
  border: 2px solid rgba(109, 40, 217, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-dark);
  cursor: grab;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 56px;
  box-shadow: var(--shadow-sm), 0 2px 0 rgba(109, 40, 217, 0.06);
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.sort-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.sort-card:active {
  transform: scale(0.97) translateY(0);
}

.sort-card.selected {
  border-color: var(--purple);
  background: var(--purple-faint);
  box-shadow: var(--shadow-glow-purple);
}

.sort-card.correct {
  border-color: var(--green);
  background: var(--green-light);
  animation: correctPop 0.5s var(--ease-spring);
}

.sort-card.wrong {
  border-color: var(--coral);
  background: var(--coral-light);
  animation: shake 0.4s var(--ease-out);
}

.sort-card.sorted {
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.94);
}

.sort-card .card-emoji {
  font-size: 1.3rem;
}

/* --- Illustrated Sort Cards --- */
.sort-card.sort-card-illustrated {
  background: transparent;
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  min-height: auto;
  width: calc(50% - var(--space-3));
  max-width: 200px;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.2);
  flex-direction: column;
}

.sort-card.sort-card-illustrated .sort-card-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 13px;
  pointer-events: none;
}

.sort-card.sort-card-illustrated:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.35);
  border-color: rgba(139, 92, 246, 0.5);
}

.sort-card.sort-card-illustrated:active {
  transform: scale(0.96) translateY(0);
}

.sort-card.sort-card-illustrated.selected {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.3), 0 8px 28px rgba(109, 40, 217, 0.35);
}

.sort-card.sort-card-illustrated.correct {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  animation: correctPop 0.5s var(--ease-spring);
}

.sort-card.sort-card-illustrated.wrong {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.3);
  animation: shake 0.4s var(--ease-out);
}

.sort-card.sort-card-illustrated.sorted {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
  filter: grayscale(0.5);
}

/* --- Fill in the Blank Activity --- */
.fillblank-sentence {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--text-dark);
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.45;
  padding: var(--space-8);
  background: linear-gradient(135deg, rgba(245,243,255,0.6), white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(109, 40, 217, 0.05);
}

.fillblank-blank {
  display: inline-block;
  min-width: 100px;
  border-bottom: 3px dashed var(--purple);
  padding: 0 var(--space-2);
  color: var(--purple);
  transition: all var(--transition-normal);
}

.fillblank-blank.filled {
  border-bottom-color: var(--green);
  color: var(--green);
  border-bottom-style: solid;
  animation: correctPop 0.5s var(--ease-spring);
}

.fillblank-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.fillblank-option {
  background: white;
  border: 2.5px solid rgba(109, 40, 217, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 56px;
  box-shadow: var(--shadow-sm), 0 3px 0 rgba(109, 40, 217, 0.08);
}

.fillblank-option:hover {
  transform: translateY(-3px);
  border-color: var(--purple);
  box-shadow: var(--shadow-md);
}

.fillblank-option:active {
  transform: scale(0.96) translateY(0);
}

.fillblank-option.correct {
  border-color: var(--green);
  background: var(--green-light);
  color: #065F46;
}

.fillblank-option.wrong {
  border-color: var(--coral);
  background: var(--coral-light);
  animation: shake 0.4s var(--ease-out);
}

.fillblank-explanation {
  text-align: center;
  font-size: var(--text-base);
  color: var(--text-medium);
  margin-top: var(--space-5);
  font-weight: 600;
  animation: fadeIn 0.3s var(--ease-out);
  padding: var(--space-3) var(--space-4);
  background: rgba(109, 40, 217, 0.04);
  border-radius: var(--radius-lg);
}

/* --- Match Activity --- */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

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

.match-item {
  background: white;
  border: 2.5px solid rgba(109, 40, 217, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 56px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm), 0 2px 0 rgba(109, 40, 217, 0.05);
}

.match-item:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.match-item:active {
  transform: scale(0.97);
}

.match-item.selected {
  border-color: var(--purple);
  background: var(--purple-faint);
  box-shadow: var(--shadow-glow-purple);
}

.match-item.matched {
  border-color: var(--green);
  background: var(--green-light);
  opacity: 0.7;
  pointer-events: none;
}

/* --- Illustrated Match Items --- */
.match-item-has-img {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-3);
  gap: var(--space-2);
}

.match-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.match-item-has-img .match-item-label {
  font-size: var(--text-xs);
  line-height: 1.3;
  font-weight: 600;
}

.match-item-has-img.selected .match-item-img {
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.match-item-has-img.matched .match-item-img {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* --- Spot the Mistake Activity --- */
.spotmistake-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.spotmistake-item {
  background: white;
  border: 2.5px solid rgba(109, 40, 217, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.spotmistake-item:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.spotmistake-item:active {
  transform: scale(0.98);
}

.spotmistake-item .item-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.spotmistake-item.selected {
  border-color: var(--coral);
  background: var(--coral-light);
  border-style: solid;
}

.spotmistake-item.correct-spot {
  border-color: var(--green);
  background: var(--green-light);
}

.spotmistake-item.revealed-wrong {
  border-color: var(--coral);
  background: var(--coral-light);
  opacity: 0.7;
}

.spotmistake-item.revealed-right {
  border-color: var(--green);
  background: var(--green-light);
  opacity: 0.7;
}

/* --- Spot the Mistake Card Layout --- */
.spotmistake-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.spotmistake-card-item {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: auto;
  position: relative;
}

.spotmistake-card-item .item-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 1rem;
  z-index: 2;
}

.spot-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.spot-card-text {
  padding: var(--space-3) var(--space-3) var(--space-4);
  font-family: 'Grandstander', cursive;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  display: block;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.spotmistake-card-item.selected {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 4px 16px rgba(239, 68, 68, 0.15);
}

.spotmistake-card-item.revealed-wrong {
  border-color: #EF4444;
  opacity: 0.8;
}

.spotmistake-card-item.revealed-right {
  border-color: var(--green);
  opacity: 0.8;
}

/* --- Guess Activity --- */
.guess-image-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.guess-image {
  display: block;
  max-width: 340px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md), 0 4px 20px rgba(139, 92, 246, 0.15);
  border: 3px solid rgba(139, 92, 246, 0.15);
}

.guess-description {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-dark);
  text-align: center;
  margin-bottom: var(--space-3);
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(245,243,255,0.6), white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  line-height: 1.45;
  border: 1px solid rgba(109, 40, 217, 0.05);
}

.guess-funny-detail {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-medium);
  text-align: center;
  margin-bottom: var(--space-6);
  font-style: italic;
  font-weight: 600;
}

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

.guess-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(139, 92, 246, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.08);
  text-align: left;
}

.guess-option:hover {
  border-color: #8B5CF6;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.2);
}

.guess-option:active {
  transform: scale(0.97);
}

.guess-option-letter {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8B5CF6, #a78bfa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.guess-option-text {
  font-family: 'Fredoka', var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #3B0764;
}

.guess-option.correct {
  background: rgba(220, 252, 231, 0.9);
  border-color: #22c55e;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2);
  animation: correctPop 0.5s var(--ease-spring);
}

.guess-option.correct .guess-option-letter {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.guess-option.correct .guess-option-text {
  color: #166534;
}

.guess-option.wrong {
  background: rgba(254, 226, 226, 0.9);
  border-color: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
  animation: shake 0.4s var(--ease-out);
}

.guess-option.wrong .guess-option-letter {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.guess-option.wrong .guess-option-text {
  color: #991b1b;
}

/* --- Sequence Activity --- */
.sequence-slots {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.sequence-slot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 60px;
}

.slot-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-faint);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-base);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.slot-number.filled {
  background: var(--green);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.slot-content {
  flex: 1;
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-dark);
  animation: correctPop 0.4s var(--ease-spring);
}

.slot-placeholder {
  flex: 1;
  background: linear-gradient(135deg, var(--card-bg), rgba(255,255,255,0.5));
  border: 2px dashed var(--purple-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-light);
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.sequence-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.sequence-choice {
  background: white;
  border: 2.5px solid rgba(109, 40, 217, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm), 0 2px 0 rgba(109, 40, 217, 0.05);
}

.sequence-choice:hover {
  border-color: var(--purple-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.sequence-choice:active {
  transform: scale(0.97);
}

.sequence-choice.used {
  opacity: 0.25;
  pointer-events: none;
  transform: scale(0.94);
}

.sequence-choice.wrong {
  animation: shake 0.4s var(--ease-out);
  border-color: var(--coral);
  background: var(--coral-light);
}

/* Sequence choice with image — matches Adventure 1 sort card style */
.sequence-choice.has-img {
  background: transparent;
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  min-height: auto;
  width: calc(50% - var(--space-3));
  max-width: 180px;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.2);
  flex-direction: column;
  gap: 0;
}

.sequence-choice.has-img:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.35);
  border-color: rgba(139, 92, 246, 0.5);
}

.sequence-choice.has-img:active {
  transform: scale(0.96) translateY(0);
}

.sequence-choice.has-img.used {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
  filter: grayscale(0.5);
}

.seq-choice-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.sequence-choice.has-img span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.25;
  padding: 8px 10px 10px;
  text-align: center;
}

.seq-slot-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* --- Pattern activity (Episode 2 special sort) --- */
.pattern-container {
  margin-bottom: var(--space-8);
}

.pattern-question {
  background: linear-gradient(135deg, rgba(245,243,255,0.6), white);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  text-align: center;
  border: 1px solid rgba(109, 40, 217, 0.05);
}

.pattern-sequence {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.pattern-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

.pattern-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.pattern-blank {
  width: 56px;
  height: 56px;
  border: 3px dashed var(--purple);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  background: var(--purple-faint);
  transition: all var(--transition-fast);
}

.pattern-blank.filled {
  border-color: var(--green);
  border-style: solid;
  background: var(--green-light);
}

.pattern-options {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

.pattern-option {
  width: 72px;
  height: 72px;
  background: white;
  border: 2.5px solid rgba(109, 40, 217, 0.1);
  border-radius: var(--radius-lg);
  font-size: var(--text-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm), 0 2px 0 rgba(109, 40, 217, 0.06);
}

.pattern-option:hover {
  transform: scale(1.1);
  border-color: var(--purple-light);
  box-shadow: var(--shadow-md);
}

.pattern-option:active {
  transform: scale(0.95);
}

.pattern-option.correct {
  border-color: var(--green);
  background: var(--green-light);
}

.pattern-option.wrong {
  border-color: var(--coral);
  animation: shake 0.4s var(--ease-out);
}

.pattern-hint {
  font-size: var(--text-sm);
  color: var(--text-medium);
  text-align: center;
  margin-top: var(--space-2);
  font-style: italic;
  font-weight: 600;
}

/* --- Activity Feedback --- */
.activity-feedback {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-2xl);
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  animation: feedbackPop 0.4s var(--ease-spring);
}

@keyframes feedbackPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.activity-feedback.success {
  background: linear-gradient(135deg, var(--green-light), #ECFDF5);
  color: #065F46;
  border: 2px solid var(--green);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.activity-feedback.error {
  background: linear-gradient(135deg, var(--coral-light), #FEF2F2);
  color: #991B1B;
  border: 2px solid var(--coral);
}

.activity-score {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-medium);
  margin-top: var(--space-3);
}

/* Check answers button for spotmistake */
.check-btn {
  display: block;
  margin: var(--space-8) auto 0;
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: white;
  background: linear-gradient(180deg, var(--yellow), #D97706);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), 0 4px 0 #B45309;
  transition: all var(--transition-fast);
  min-height: 56px;
  position: relative;
  overflow: hidden;
}

.check-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  pointer-events: none;
}

.check-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 7px 0 #B45309;
}

.check-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-sm), 0 1px 0 #B45309;
}

/* ==========================================
   ADVENTURE COMPLETE
   ========================================== */

.complete-screen {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  animation: screenFadeIn 0.5s var(--ease-out);
}

.complete-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  color: var(--purple-dark);
  margin-bottom: var(--space-5);
}

.complete-byte {
  width: clamp(150px, 32vw, 220px);
  margin: 0 auto var(--space-8);
  animation: celebrateBounce 0.6s var(--ease-spring);
  filter: drop-shadow(0 10px 24px rgba(109, 40, 217, 0.18));
}

@keyframes celebrateBounce {
  0% { transform: scale(0.4) rotate(-5deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.complete-stars {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
  font-size: 3rem;
}

.complete-star {
  animation: starPop 0.5s var(--ease-spring) both;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.5));
}

.complete-star:nth-child(1) { animation-delay: 0.2s; }
.complete-star:nth-child(2) { animation-delay: 0.5s; }
.complete-star:nth-child(3) { animation-delay: 0.8s; }

@keyframes starPop {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  50% { transform: scale(1.4) rotate(15deg); }
  75% { transform: scale(0.9) rotate(-5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Confetti-like particles behind stars */
.complete-stars::before {
  content: '✨';
  position: absolute;
  font-size: 1.5rem;
  animation: confettiFloat 1.5s var(--ease-out) 0.4s both;
  opacity: 0;
}

@keyframes confettiFloat {
  0% { transform: translateY(0) scale(0); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: translateY(-40px) scale(1.2); opacity: 0; }
}

/* Brain Boost */
.brain-boost {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-warm));
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  text-align: left;
  border: 1.5px solid rgba(245, 158, 11, 0.15);
  box-shadow: var(--shadow-sm);
}

.brain-boost-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--text-dark);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brain-boost-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.brain-boost-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1.5;
}

.brain-boost-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Complete buttons */
.complete-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.parent-card-btn {
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--purple);
  background: white;
  border: 2.5px solid var(--purple-light);
  border-radius: var(--radius-xl);
  transition: all var(--transition-fast);
  min-height: 56px;
  box-shadow: var(--shadow-sm);
}

.parent-card-btn:hover {
  background: var(--purple-faint);
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.map-btn {
  padding: var(--space-4) var(--space-10);
  font-family: 'Fredoka', var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: #5B21B6;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(237, 233, 254, 0.55) 50%,
    rgba(255, 255, 255, 0.65) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1.5px solid rgba(167, 139, 250, 0.35);
  box-shadow:
    0 2px 8px rgba(109, 40, 217, 0.10),
    0 8px 24px rgba(109, 40, 217, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  min-height: 60px;
  position: relative;
  overflow: hidden;
}

.map-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 30%;
  height: 45%;
  background: linear-gradient(160deg, rgba(255,255,255,0.5), transparent);
  border-radius: 20px 20px 50% 50%;
  pointer-events: none;
}

.map-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(109, 40, 217, 0.15),
    0 12px 32px rgba(109, 40, 217, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.map-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 4px rgba(109, 40, 217, 0.10),
    0 4px 12px rgba(109, 40, 217, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================
   PARENT CARD (Modal)
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 75, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.25s var(--ease-out);
  backdrop-filter: blur(6px);
}

.modal-card {
  background: white;
  border-radius: var(--radius-3xl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-10);
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.4s var(--ease-spring);
}

@keyframes modalSlideUp {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--text-dark);
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-medium);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--card-bg);
  color: var(--text-dark);
  transform: scale(1.05);
}

.modal-section {
  margin-bottom: var(--space-8);
}

.modal-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-3);
}

.modal-text {
  font-size: var(--text-base);
  color: var(--text-dark);
  line-height: 1.65;
  font-weight: 500;
}

.concept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.concept-tag {
  background: var(--purple-faint);
  color: var(--purple-dark);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.modal-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-base);
  line-height: 1.55;
  font-weight: 500;
}

.modal-list li::before {
  content: '→';
  color: var(--purple);
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================
   REWARDS SCREEN
   ========================================== */

.rewards-header {
  text-align: center;
  padding: var(--space-10) 0 var(--space-6);
}

.rewards-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  color: var(--purple-dark);
  margin-bottom: var(--space-2);
}

.rewards-title-img {
  display: block;
  max-width: 340px;
  width: 80%;
  height: auto;
  margin: 0 auto var(--space-2);
  filter: drop-shadow(0 2px 8px rgba(109, 40, 217, 0.15));
}

.rewards-subtitle {
  font-size: var(--text-lg);
  color: var(--text-medium);
  font-weight: 600;
}

/* Star pill */
.rewards-total {
  text-align: center;
  margin: var(--space-6) 0;
}

.rewards-star-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  padding: 10px 24px;
  border-radius: 16px;
  border: 2px solid rgba(245, 158, 11, 0.15);
}

.rewards-star-pill-icon {
  font-size: 28px;
}

.rewards-star-pill-num {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 28px;
  color: #92400E;
}

.rewards-star-pill-of {
  font-size: 13px;
  color: #A16207;
  font-weight: 600;
}

/* Progress bar */
.rewards-progress {
  background: white;
  border-radius: 18px;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-5) 0;
  border: 2px solid rgba(109, 40, 217, 0.06);
  box-shadow: 0 2px 12px rgba(109, 40, 217, 0.04);
}

.rewards-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rewards-progress-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: #4A3366;
}

.rewards-progress-pct {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--purple);
  background: #F3E8FF;
  padding: 2px 10px;
  border-radius: 10px;
}

.progress-bar-bg {
  background: #F0EAFF;
  border-radius: var(--radius-full);
  height: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(109, 40, 217, 0.06);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #A78BFA, #14B8A6);
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
  border-radius: var(--radius-full);
}

/* Episode list — Concept C: Soft Bubbles */
.rewards-episodes {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.reward-episode {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(109, 40, 217, 0.05);
  border: 1.5px solid rgba(109, 40, 217, 0.04);
  transition: all 0.2s ease;
}

.reward-episode:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.1);
  border-color: rgba(109, 40, 217, 0.1);
}

.reward-icon-bubble {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reward-icon-bubble img {
  width: 32px;
  height: 32px;
}

.reward-ep-content {
  flex: 1;
  min-width: 0;
}

.reward-episode-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: #2D1B4E;
  line-height: 1.2;
  margin-bottom: 4px;
  display: block;
}

.reward-ep-starbar {
  display: flex;
  align-items: center;
  gap: 3px;
}

.reward-ep-starbar .node-star {
  font-size: 14px;
  color: #DDD2F0;
}

.reward-ep-starbar .node-star.filled {
  color: #F59E0B;
}

.reward-ep-star-label {
  font-size: 11px;
  color: #A393BD;
  font-weight: 600;
  margin-left: 6px;
}

.reward-ep-chevron {
  font-size: 22px;
  color: #C4B5D9;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
}

/* Nav for rewards */
.rewards-nav {
  display: flex;
  justify-content: center;
  padding: var(--space-8) 0;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes correctPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  70% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes sparkle {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Phone portrait */
@media (max-width: 480px) {
  .screen {
    padding: var(--space-5);
    padding-bottom: var(--space-12);
  }

  /* Concept C mobile: single column grid, stacked featured card */
  .home-header {
    padding: 10px 16px;
  }

  .header-greeting {
    font-size: 0.8rem;
  }

  .featured {
    flex-direction: column;
    margin: 12px 16px 0;
    min-height: auto;
  }

  .featured-img-wrap {
    width: 100%;
    height: 140px;
  }

  .featured-content {
    padding: 20px 20px 24px;
  }

  .featured-title {
    font-size: 1.35rem;
  }

  .home-stats {
    margin: 12px 16px 0;
    gap: 8px;
  }

  .stat-card {
    padding: 14px 8px;
  }

  .section-header {
    padding: 18px 16px 8px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px 24px;
  }

  .g-card-img-wrap {
    height: 140px;
  }

  .home-footer {
    padding: 20px 16px 32px;
  }

  .adventure-top-bar {
    padding: 10px 48px;
    min-height: 56px;
  }

  .adventure-bar-title-img {
    height: 28px;
  }

  .adventure-bar-icon {
    width: 28px;
    height: 28px;
  }

  .back-btn-wrap {
    left: 6px;
    width: 38px;
    height: 38px;
  }

  .back-btn-wrap::before {
    display: none;
  }

  .back-btn {
    width: 36px;
    height: 36px;
    margin: 1px;
  }

  .home-btn-wrap {
    right: 6px;
    width: 38px;
    height: 38px;
  }

  .home-btn-wrap::before {
    display: none;
  }

  .home-btn {
    width: 36px;
    height: 36px;
    margin: 1px;
  }

  .sort-buckets {
    grid-template-columns: 1fr;
  }

  .sort-card.sort-card-illustrated {
    width: calc(50% - 8px);
    max-width: 160px;
  }

  .match-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .match-column::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-medium);
    margin-bottom: var(--space-1);
  }

  .speech-bubble {
    margin: 0 var(--space-2) var(--space-4);
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
  }

  .panel-scene {
    padding: var(--space-6) var(--space-4) var(--space-4);
  }

  .modal-card {
    padding: var(--space-6);
    max-height: 90vh;
    border-radius: var(--radius-2xl);
  }

  .complete-stars {
    font-size: 2.2rem;
    gap: var(--space-4);
  }

  .complete-byte {
    width: clamp(130px, 28vw, 180px);
  }

  .fillblank-sentence {
    padding: var(--space-5);
    font-size: var(--text-xl);
  }

  .fillblank-options {
    gap: var(--space-3);
  }

  /* Old splash responsive overrides removed — hero image handles scaling */
}

/* Short viewport splash handling removed — hero image scales via object-fit */

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .sort-buckets {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet: 2-column adventure grid */
@media (min-width: 640px) and (max-width: 899px) {
  .home-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rewards-episodes {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tablet+: keep featured side-by-side, 2-col grid */
@media (min-width: 640px) {
  .featured {
    flex-direction: row;
  }

  .featured-img-wrap {
    width: 240px;
    height: auto;
  }
}

/* Desktop: 3-column grid */
@media (min-width: 900px) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-img-wrap {
    width: 260px;
  }
}

/* Touch device optimization */
@media (hover: none) {
  .sort-card:hover,
  .fillblank-option:hover,
  .match-item:hover,
  .guess-option:hover,
  .sequence-choice:hover,
  .g-card:hover,
  .featured:hover,
  .reward-episode:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

/* (Home nav moved to header — kept for legacy compat) */

/* Sound toggle */
/* Single audio toggle button — controls all sounds + music */
.audio-toggle-btn {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 50;
  transition: all var(--transition-fast);
  border: 2px solid var(--purple-faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.audio-toggle-btn:hover {
  background: var(--purple-faint);
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.audio-toggle-btn:active {
  transform: scale(0.92);
}

@media (max-width: 480px) {
  .audio-toggle-btn {
    width: 42px;
    height: 42px;
    bottom: var(--space-3);
    right: var(--space-3);
    font-size: 1.1rem;
  }
}

/* Sign in link for home screen header */
.home-signin {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-light);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  z-index: 5;
}

.home-signin:hover {
  color: var(--purple);
  background: rgba(109, 40, 217, 0.06);
}

/* ---- Locked Episode Cards ---- */
.g-card-locked {
  opacity: 0.65;
  filter: grayscale(0.3);
}
.g-card-locked:hover {
  opacity: 0.8;
}
