/* ==========================================================================
   MatmaZoo Design System - Pastel & Candy Modern Gamified Theme
   ========================================================================== */

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Vibrant & Pastel Colors */
  --primary: #ec4899;
  --primary-hover: #db2777;
  --primary-light: #fdf2f8;
  --primary-border: #be185d;

  --secondary: #8b5cf6;
  --secondary-hover: #7c3aed;
  --secondary-light: #f5f3ff;
  --secondary-border: #6d28d9;

  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #059669;

  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-border: #dc2626;

  --amber: #f59e0b;
  --amber-light: #fffbeb;
  --cyan: #06b6d4;
  --cyan-light: #ecfeff;

  --bg-gradient: linear-gradient(135deg, #fff1f2 0%, #fdf4ff 50%, #eff6ff 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(244, 114, 182, 0.2);
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(236, 72, 153, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(236, 72, 153, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* Background Themes with Illustrated Seamless Textures */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  background-color: #fafafa;
  background-image: linear-gradient(135deg, rgba(255, 241, 242, 0.85) 0%, rgba(253, 244, 255, 0.85) 50%, rgba(239, 246, 255, 0.85) 100%), url('textures/math_paper.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
}

body.theme-sakura {
  background-image: radial-gradient(circle at top, rgba(253, 242, 248, 0.82) 0%, rgba(252, 231, 243, 0.82) 40%, rgba(251, 207, 232, 0.88) 100%), url('textures/math_paper.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
}

body.theme-galaxy {
  background-image: radial-gradient(circle at top, rgba(30, 27, 75, 0.88) 0%, rgba(15, 23, 42, 0.94) 70%, rgba(2, 6, 23, 0.98) 100%), url('textures/space.jpg');
  background-size: auto, 420px 420px;
  background-repeat: no-repeat, repeat;
  color: #f8fafc;
  --text-dark: #f8fafc;
  --text-muted: #cbd5e1;
  --card-bg: rgba(30, 27, 75, 0.85);
  --card-border: rgba(168, 85, 247, 0.35);
}

body.theme-candyland {
  background-image: radial-gradient(circle at top, rgba(255, 241, 242, 0.75) 0%, rgba(254, 215, 170, 0.75) 50%, rgba(251, 207, 232, 0.8) 100%), url('textures/candyland.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
}

body.theme-bedroom {
  background-image: radial-gradient(circle at top, rgba(254, 243, 199, 0.82) 0%, rgba(254, 215, 170, 0.82) 50%, rgba(252, 231, 243, 0.88) 100%), url('textures/math_paper.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(244, 114, 182, 0.2);
  box-shadow: var(--shadow-sm);
}

body.theme-galaxy .app-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(168, 85, 247, 0.3);
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  font-size: 30px;
  filter: drop-shadow(0 2px 4px rgba(236, 72, 153, 0.3));
  animation: gentle-bounce 3s infinite ease-in-out;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-main-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 2px solid #e2e8f0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: transform 0.15s ease;
}

body.theme-galaxy .stat-pill {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 0 #0f172a;
  color: white;
}

.stat-pill:hover {
  transform: translateY(-2px);
}

.streak-pill {
  border-color: #fde68a;
  box-shadow: 0 2px 0 #f59e0b;
  color: #b45309;
}

.flame-icon {
  animation: flicker 1.8s infinite ease-in-out;
}

.gems-pill {
  border-color: #cffafe;
  box-shadow: 0 2px 0 #06b6d4;
  color: #0891b2;
}

.stars-pill {
  border-color: #fed7aa;
  box-shadow: 0 2px 0 #ea580c;
  color: #c2410c;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.icon-btn {
  background: white;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 0 #cbd5e1;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
}

body.theme-galaxy .icon-btn {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 0 #0f172a;
  color: white;
}

.icon-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.zen-btn {
  border-color: #fbcfe8;
  box-shadow: 0 2px 0 #f472b6;
  color: #db2777;
}

/* ==========================================================================
   BOTTOM / TOP NAVIGATION
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  z-index: 90;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(244, 114, 182, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(236, 72, 153, 0.15);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .bottom-nav {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.25);
}

.nav-tab {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab:hover {
  background: rgba(244, 114, 182, 0.12);
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-tab.active {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
  transform: translateY(-2px) scale(1.05);
}

body.theme-galaxy .nav-tab.active {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.5);
}

.tab-icon {
  font-size: 22px;
}

.badge-pill {
  position: absolute;
  top: 4px;
  right: 10px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 2px solid white;
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary-border);
  box-shadow: 0 4px 0 var(--primary-border);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--primary-border);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 0 #94a3b8;
  background: #cbd5e1;
  border-color: #94a3b8;
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success-border);
  box-shadow: 0 4px 0 var(--success-border);
}

.btn-success:hover {
  filter: brightness(1.06);
}

.btn-success:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger-border);
  box-shadow: 0 4px 0 var(--danger-border);
}

.btn-danger:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-outline {
  background: white;
  color: var(--text-dark);
  border-color: #cbd5e1;
  box-shadow: 0 3px 0 #94a3b8;
}

.btn-outline:hover {
  background: #f8fafc;
}

.btn-outline:active {
  transform: translateY(3px);
  box-shadow: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 0 var(--primary-border);
}

.btn-sm:active {
  transform: translateY(2px);
  box-shadow: none;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-lg);
  box-shadow: 0 5px 0 var(--primary-border);
}

.btn-lg:active {
  transform: translateY(5px);
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   MAIN APP CONTENT & PANELS
   ========================================================================== */
.app-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 100px 20px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.view-panel.active {
  display: block;
}

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

/* ==========================================================================
   1. DASHBOARD VIEW (PET HERO & LESSON MAP)
   ========================================================================== */
.pet-hero-card {
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--card-border);
  border-radius: 28px;
  padding: 24px 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(236, 72, 153, 0.08);
  margin-bottom: 28px;
  position: relative;
  overflow: visible;
}

.pet-hero-avatar-wrap {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 10px 22px rgba(236, 72, 153, 0.25));
}

.pet-hero-avatar-wrap:hover {
  transform: scale(1.1) rotate(4deg);
}

.pet-hero-avatar-wrap:active {
  transform: scale(0.95) rotate(-3deg);
}

.pet-character-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pet-speech-bubble {
  flex: 1;
  background: white;
  border: 2.5px solid #fed7aa;
  border-radius: 22px;
  padding: 20px 24px;
  position: relative;
  box-shadow: 0 6px 20px rgba(251, 146, 60, 0.08);
}

body.theme-galaxy .pet-speech-bubble {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.pet-speech-bubble::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -14px;
  transform: translateY(-50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 14px solid #fed7aa;
}

.pet-speech-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 11px solid white;
}

body.theme-galaxy .pet-speech-bubble::before {
  border-right-color: #475569;
}

body.theme-galaxy .pet-speech-bubble::after {
  border-right-color: #1e293b;
}

.speech-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pet-name-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

body.theme-galaxy .pet-name-badge {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.speech-sparkle {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.speech-text {
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 16px;
  font-weight: 600;
}

.speech-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.speech-actions .btn {
  border-radius: var(--radius-full);
  font-size: 13px;
  padding: 8px 18px;
  box-shadow: 0 3px 0 #cbd5e1;
}

.speech-actions .btn-outline {
  background: #fffaf0;
  border-color: #fed7aa;
  color: #9a3412;
  box-shadow: 0 3px 0 #fdba74;
}

.speech-actions .btn-outline:hover {
  background: #ffedd5;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #fdba74;
}

.speech-actions .btn-outline:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 transparent !important;
}

.speech-actions .btn-primary {
  box-shadow: 0 3px 0 var(--primary-border);
}

.speech-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--primary-border);
}

.speech-actions .btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 transparent !important;
}

/* Category Chips */
.section-title-wrap {
  margin-bottom: 18px;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.category-tabs-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 16px 4px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.cat-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 4px 0 #cbd5e1, 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

body.theme-galaxy .cat-chip {
  background: #1e293b;
  border-color: #334155;
  color: white;
  box-shadow: 0 4px 0 #0f172a;
}

.cat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 0 #cbd5e1, 0 6px 14px rgba(236, 72, 153, 0.15);
}

.cat-chip:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent !important;
}

.cat-chip.active {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  border-color: var(--primary-border);
  color: white;
  box-shadow: 0 5px 0 var(--primary-border), 0 8px 20px rgba(236, 72, 153, 0.35);
  transform: translateY(-2px) scale(1.03);
}

body.theme-galaxy .cat-chip.active {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border-color: #6d28d9;
  box-shadow: 0 5px 0 #4c1d95, 0 8px 20px rgba(168, 85, 247, 0.4);
}

/* ==========================================================================
   THEMED BIOMES & PROGRESSION MAP
   ========================================================================== */
.lesson-map-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 24px 16px 52px 16px;
  margin-top: 20px;
  border: 2.5px solid transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  min-height: 480px;
}

/* Biome 1: Słoneczna Łąka (Meadow) */
.lesson-map-container.biome-meadow {
  background-color: #ecfdf5;
  background-image: linear-gradient(180deg, rgba(236, 253, 245, 0.65) 0%, rgba(209, 250, 229, 0.72) 50%, rgba(187, 247, 208, 0.8) 100%), url('textures/meadow.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #86efac;
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.18);
}

/* Biome 2: Cukierkowa Kraina (Candyland) */
.lesson-map-container.biome-candyland {
  background-color: #fff1f2;
  background-image: linear-gradient(180deg, rgba(255, 241, 242, 0.65) 0%, rgba(255, 228, 230, 0.72) 50%, rgba(251, 207, 232, 0.8) 100%), url('textures/candyland.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #f472b6;
  box-shadow: 0 16px 40px rgba(236, 72, 153, 0.18);
}

/* Biome 3: Magiczny Las (Forest) */
.lesson-map-container.biome-forest {
  background-color: #f0fdf4;
  background-image: linear-gradient(180deg, rgba(240, 253, 244, 0.62) 0%, rgba(220, 252, 231, 0.7) 50%, rgba(167, 243, 208, 0.8) 100%), url('textures/forest.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #34d399;
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.18);
}

/* Biome 4: Kryształowa Dolina (Crystal) */
.lesson-map-container.biome-crystal {
  background-color: #faf5ff;
  background-image: linear-gradient(180deg, rgba(250, 245, 255, 0.65) 0%, rgba(243, 232, 255, 0.72) 50%, rgba(233, 213, 255, 0.82) 100%), url('textures/crystals.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #c084fc;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.2);
}

/* Biome 5: Neonowa Oaza (Geometry) */
.lesson-map-container.biome-geometry {
  background-color: #ecfeff;
  background-image: linear-gradient(180deg, rgba(236, 254, 255, 0.65) 0%, rgba(207, 250, 254, 0.72) 50%, rgba(165, 243, 252, 0.82) 100%), url('textures/blueprint.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #67e8f9;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.18);
}

/* Biome 6: Podniebne Królestwo (Sky) */
.lesson-map-container.biome-sky {
  background-color: #f0f9ff;
  background-image: linear-gradient(180deg, rgba(240, 249, 255, 0.62) 0%, rgba(224, 242, 254, 0.7) 50%, rgba(186, 230, 253, 0.8) 100%), url('textures/clouds.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #7dd3fc;
  box-shadow: 0 16px 40px rgba(2, 132, 199, 0.18);
}

/* Biome 7: Kosmiczna Kolejka (Space) */
.lesson-map-container.biome-space {
  background-color: #0f172a;
  background-image: linear-gradient(180deg, rgba(30, 27, 75, 0.55) 0%, rgba(15, 23, 42, 0.72) 60%, rgba(2, 6, 23, 0.88) 100%), url('textures/space.jpg');
  background-size: auto, 400px 400px;
  background-repeat: no-repeat, repeat;
  border-color: #818cf8;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.32);
  color: #f8fafc;
}

/* Biome 8: Archipelag Skali (Archipelago) */
.lesson-map-container.biome-archipelago {
  background-color: #fff7ed;
  background-image: linear-gradient(180deg, rgba(255, 247, 237, 0.65) 0%, rgba(255, 237, 213, 0.72) 50%, rgba(254, 215, 170, 0.82) 100%), url('textures/archipelago.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #fdba74;
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.18);
}

/* Biome 9: Karnawał Szans (Carnival) */
.lesson-map-container.biome-carnival {
  background-color: #fdf4ff;
  background-image: linear-gradient(180deg, rgba(253, 244, 255, 0.65) 0%, rgba(250, 232, 255, 0.72) 50%, rgba(245, 208, 254, 0.82) 100%), url('textures/carnival.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #f0abfc;
  box-shadow: 0 16px 40px rgba(217, 70, 239, 0.2);
}

/* Biome 10: Akademia Mistrzów (Academy) */
.lesson-map-container.biome-academy {
  background-color: #f0fdfa;
  background-image: linear-gradient(180deg, rgba(240, 253, 250, 0.62) 0%, rgba(204, 251, 241, 0.7) 50%, rgba(153, 246, 228, 0.82) 100%), url('textures/academy.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #5eead4;
  box-shadow: 0 16px 40px rgba(20, 184, 166, 0.18);
}

/* Biome 11: Tęczowy Ogród (Rainbow) */
.lesson-map-container.biome-rainbow {
  background-color: #fff1f2;
  background-image: linear-gradient(180deg, rgba(255, 241, 242, 0.62) 0%, rgba(254, 243, 199, 0.65) 35%, rgba(224, 231, 255, 0.68) 70%, rgba(251, 207, 232, 0.75) 100%), url('textures/rainbow.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #e879f9;
  box-shadow: 0 16px 40px rgba(236, 72, 153, 0.24);
}

/* Galaxy dark mode variants */
body.theme-galaxy .lesson-map-container.biome-meadow {
  background-image: linear-gradient(180deg, rgba(6, 78, 59, 0.82) 0%, rgba(2, 44, 34, 0.92) 80%), url('textures/meadow.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #059669;
}
body.theme-galaxy .lesson-map-container.biome-candyland {
  background-image: linear-gradient(180deg, rgba(131, 24, 67, 0.82) 0%, rgba(80, 7, 36, 0.92) 80%), url('textures/candyland.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #db2777;
}
body.theme-galaxy .lesson-map-container.biome-forest {
  background-image: linear-gradient(180deg, rgba(6, 95, 70, 0.82) 0%, rgba(2, 44, 34, 0.92) 80%), url('textures/forest.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #10b981;
}
body.theme-galaxy .lesson-map-container.biome-crystal {
  background-image: linear-gradient(180deg, rgba(88, 28, 135, 0.8) 0%, rgba(46, 16, 101, 0.92) 80%), url('textures/crystals.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #9333ea;
}
body.theme-galaxy .lesson-map-container.biome-geometry {
  background-image: linear-gradient(180deg, rgba(22, 78, 99, 0.82) 0%, rgba(8, 51, 68, 0.92) 80%), url('textures/blueprint.jpg');
  background-size: auto, 360px 360px;
  background-repeat: no-repeat, repeat;
  border-color: #0891b2;
}
body.theme-galaxy .lesson-map-container.biome-sky {
  background-image: linear-gradient(180deg, rgba(12, 74, 110, 0.82) 0%, rgba(8, 47, 73, 0.92) 80%), url('textures/clouds.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #0284c7;
}
body.theme-galaxy .lesson-map-container.biome-space {
  background-image: linear-gradient(180deg, rgba(30, 27, 75, 0.6) 0%, rgba(9, 9, 11, 0.85) 80%), url('textures/space.jpg');
  background-size: auto, 400px 400px;
  background-repeat: no-repeat, repeat;
  border-color: #6366f1;
}
body.theme-galaxy .lesson-map-container.biome-archipelago {
  background-image: linear-gradient(180deg, rgba(124, 45, 18, 0.82) 0%, rgba(67, 20, 7, 0.92) 80%), url('textures/archipelago.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #ea580c;
}
body.theme-galaxy .lesson-map-container.biome-carnival {
  background-image: linear-gradient(180deg, rgba(112, 26, 117, 0.82) 0%, rgba(74, 4, 78, 0.92) 80%), url('textures/carnival.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #c026d3;
}
body.theme-galaxy .lesson-map-container.biome-academy {
  background-image: linear-gradient(180deg, rgba(19, 78, 74, 0.82) 0%, rgba(4, 47, 46, 0.92) 80%), url('textures/academy.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #0d9488;
}
body.theme-galaxy .lesson-map-container.biome-rainbow {
  background-image: linear-gradient(180deg, rgba(88, 28, 135, 0.82) 0%, rgba(59, 7, 100, 0.92) 80%), url('textures/rainbow.jpg');
  background-size: auto, 380px 380px;
  background-repeat: no-repeat, repeat;
  border-color: #d946ef;
}

/* Biome Atmosphere Header Banner */
.biome-banner {
  width: 100%;
  max-width: 680px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
  position: relative;
  z-index: 3;
}

body.theme-galaxy .biome-banner {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

.biome-banner-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.biome-banner-icon {
  font-size: 38px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.biome-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.biome-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.biome-badge-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-border);
  letter-spacing: 0.5px;
}

body.theme-galaxy .biome-badge-pill {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.biome-progress-tag {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

body.theme-galaxy .biome-progress-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.biome-banner-title {
  font-size: 20px;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-dark);
}

.biome-banner-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}

.biome-banner-ambient {
  display: flex;
  gap: 6px;
  font-size: 20px;
  opacity: 0.85;
}

.ambient-particle {
  animation: float-ambient 3s infinite ease-in-out alternate;
}
.ambient-particle:nth-child(2) { animation-delay: 0.8s; }
.ambient-particle:nth-child(3) { animation-delay: 1.6s; }

@keyframes float-ambient {
  0% { transform: translateY(0) scale(0.9); }
  100% { transform: translateY(-6px) scale(1.1); }
}

/* SVG Path Overlay */
.biome-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Nodes Flow Container */
.biome-nodes-flow {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
  padding-top: 14px;
}

.biome-scenery-prop {
  position: absolute;
  font-size: 28px;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  animation: float-prop 3.5s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes float-prop {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(8deg); }
}

.lesson-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.lesson-node-wrap:hover {
  transform: scale(1.08) !important;
}

.lesson-node-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 4.5px solid var(--node-border, var(--primary));
  box-shadow: 0 8px 0 var(--node-shadow, var(--primary-border)), 0 12px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}

body.theme-galaxy .lesson-node-circle {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.lesson-node-circle:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 var(--node-shadow, var(--primary-border)), 0 18px 30px rgba(0, 0, 0, 0.18);
}

.lesson-node-circle:active {
  transform: translateY(6px) !important;
  box-shadow: 0 2px 0 var(--node-shadow, var(--primary-border)) !important;
}

.lesson-node-circle.locked {
  background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
  border-color: #94a3b8 !important;
  box-shadow: 0 6px 0 #64748b, inset 0 2px 4px rgba(255, 255, 255, 0.6) !important;
  opacity: 0.9;
  cursor: not-allowed;
  filter: grayscale(0.7);
}

body.theme-galaxy .lesson-node-circle.locked {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #475569 !important;
  box-shadow: 0 6px 0 #1e293b !important;
}

.lesson-node-circle.locked:hover {
  transform: none;
  box-shadow: 0 6px 0 #64748b !important;
}

/* Current Active Node with Floating Start Banner & Pulsing Ring */
.lesson-node-circle.current-node {
  animation: node-breath 2.2s infinite ease-in-out;
}

@keyframes node-breath {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.04);
  }
}

.lesson-node-circle.current-node::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 50%;
  border: 3.5px dashed var(--node-border, var(--primary));
  opacity: 0.85;
  animation: beacon-rotate 10s linear infinite;
  pointer-events: none;
}

@keyframes beacon-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.node-start-badge {
  position: absolute;
  top: -34px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.45);
  animation: float-start-badge 1.8s ease-in-out infinite alternate;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}

.node-start-badge::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #e11d48;
}

@keyframes float-start-badge {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

.node-stars-badge {
  position: absolute;
  bottom: -8px;
  background: linear-gradient(135deg, #fef08a 0%, #facc15 100%);
  border: 2px solid #ca8a04;
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 900;
  color: #713f12;
  box-shadow: 0 3px 8px rgba(202, 138, 4, 0.35);
  display: flex;
  align-items: center;
  gap: 2px;
}

.lesson-node-circle.completed-node {
  background: linear-gradient(180deg, #fefce8 0%, #fef08a 100%);
}

body.theme-galaxy .lesson-node-circle.completed-node {
  background: linear-gradient(180deg, #422006 0%, #713f12 100%);
}

.node-title-card {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 7px 16px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  color: #1e293b;
  text-align: center;
  max-width: 230px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  line-height: 1.35;
}

.lesson-map-container.biome-space .node-title-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(129, 140, 248, 0.45);
  color: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

body.theme-galaxy .node-title-card {
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

/* Biome Trail SVG styling */
.biome-trail-casing {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.08));
}

.biome-trail-path {
  transition: stroke 0.4s ease;
}

/* Biome Final Boss / Mastery Chest */
.biome-chest-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  position: relative;
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.biome-chest-wrap:hover {
  transform: scale(1.08) !important;
}

.biome-chest-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 4.5px solid var(--chest-border, #f59e0b);
  box-shadow: 0 8px 0 var(--chest-shadow, #d97706), 0 12px 28px rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .biome-chest-circle {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
}

.biome-chest-circle:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 var(--chest-shadow, #d97706), 0 18px 32px rgba(245, 158, 11, 0.35);
}

.biome-chest-circle:active {
  transform: translateY(6px) !important;
  box-shadow: 0 2px 0 var(--chest-shadow, #d97706) !important;
}

.biome-chest-circle.glowing {
  animation: chest-glow 2s infinite alternate;
}

@keyframes chest-glow {
  from {
    box-shadow: 0 8px 0 #ca8a04, 0 0 18px rgba(250, 204, 21, 0.5);
  }
  to {
    box-shadow: 0 8px 0 #ca8a04, 0 0 36px rgba(250, 204, 21, 0.9);
  }
}

.biome-chest-title {
  border-color: #f59e0b;
  color: #b45309;
}

body.theme-galaxy .biome-chest-title {
  color: #fde68a;
  border-color: #d97706;
}

/* ==========================================================================
   2. REPETITION & MISTAKE CLINIC VIEW
   ========================================================================== */
.clinic-header-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  border: 2px solid #06b6d4;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

body.theme-galaxy .clinic-header-card {
  background: linear-gradient(135deg, #164e63 0%, #083344 100%);
  border-color: #06b6d4;
}

.clinic-icon-large {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(6, 182, 212, 0.3));
}

.clinic-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #0891b2;
  margin-bottom: 8px;
}

body.theme-galaxy .clinic-info h2 {
  color: #67e8f9;
}

.clinic-info p {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.clinic-stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.mini-stat {
  background: white;
  border: 2px solid #a5f3fc;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
}

body.theme-galaxy .mini-stat {
  background: #0e3b43;
  border-color: #0891b2;
}

.mini-stat-num {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #0891b2;
}

.mini-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.repetition-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.repetition-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.rep-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rep-term-pl {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.rep-term-en {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.rep-streak-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #f87171;
}

.rep-streak-badge.healing {
  background: #fef3c7;
  color: #d97706;
  border-color: #f59e0b;
}

.rep-streak-badge.mastered {
  background: #d1fae5;
  color: #059669;
  border-color: #10b981;
}

/* ==========================================================================
   3. BOUTIQUE / DRESSING ROOM VIEW
   ========================================================================== */
.boutique-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
}

@media (max-width: 850px) {
  .boutique-layout {
    grid-template-columns: 1fr;
  }
}

.boutique-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pet-stage-box {
  background: white;
  border: 3px solid #fbcfe8;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

body.theme-galaxy .pet-stage-box {
  background: #1e1b4b;
  border-color: #a855f7;
}

.stage-pet-container {
  width: 220px;
  height: 220px;
  z-index: 2;
  animation: pet-sway 4s infinite ease-in-out;
}

@keyframes pet-sway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

.pet-selector-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.pet-selector-card h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
}

.pet-selector-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pet-pick-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  background: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 0 #cbd5e1;
  transition: all 0.15s;
}

.pet-pick-btn:hover {
  transform: scale(1.1);
}

.pet-pick-btn.active {
  border-color: var(--primary);
  box-shadow: 0 3px 0 var(--primary-border);
  transform: scale(1.12);
  background: var(--primary-light);
}

/* Shop Wardrobe */
.boutique-shop-wrap {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shop-header h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}

.shop-gems-display {
  font-size: 14px;
  font-weight: 700;
}

.gem-badge {
  background: #ecfeff;
  border: 2px solid #06b6d4;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  color: #0891b2;
}

.shop-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.shop-tab-btn {
  flex-shrink: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

body.theme-galaxy .shop-tab-btn {
  background: #1e293b;
  border-color: #334155;
  color: white;
}

.shop-tab-btn.active {
  background: var(--secondary);
  border-color: var(--secondary-border);
  color: white;
  box-shadow: 0 3px 0 var(--secondary-border);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.shop-item-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

body.theme-galaxy .shop-item-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shop-item-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.18), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.shop-item-icon {
  font-size: 42px;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
  transition: transform 0.2s ease;
}

.shop-item-card:hover .shop-item-icon {
  transform: scale(1.1) rotate(5deg);
}

.shop-item-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.shop-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  min-height: 32px;
  line-height: 1.35;
}

.shop-item-footer {
  width: 100%;
  margin-top: 6px;
}

/* Locked Item Card in Shop */
.shop-item-card.locked-level {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  opacity: 0.85;
}

body.theme-galaxy .shop-item-card.locked-level {
  background: #111827;
  border-color: #374151;
}

.shop-item-card.locked-level:hover {
  transform: translateY(-2px);
  border-color: #94a3b8;
}

.item-tier-badge {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 2px;
}

.item-tier-badge.tier-1 { background: #e0f2fe; color: #0369a1; }
.item-tier-badge.tier-2 { background: #dcfce7; color: #15803d; }
.item-tier-badge.tier-3 { background: #fef9c3; color: #a16207; }
.item-tier-badge.tier-4 { background: #ffedd5; color: #c2410c; }
.item-tier-badge.tier-5 { background: #f3e8ff; color: #7e22ce; }
.item-tier-badge.tier-6 { background: #fdf2f8; color: #be185d; border: 1px solid #f472b6; }

.item-level-lock-tag {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

body.theme-galaxy .item-level-lock-tag {
  background: #1e293b;
  color: #94a3b8;
}

.btn-locked {
  background: #e2e8f0 !important;
  color: #64748b !important;
  border: 2px solid #cbd5e1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  font-weight: 700;
}

body.theme-galaxy .btn-locked {
  background: #1e293b !important;
  color: #64748b !important;
  border-color: #334155 !important;
}

.shop-player-level-badge {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  color: #b45309;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.theme-galaxy .shop-player-level-badge {
  background: #2a2215;
  color: #fbbf24;
}

/* ==========================================================================
   4. DICTIONARY & SEARCH VIEW
   ========================================================================== */
.dict-header-wrap {
  margin-bottom: 24px;
}

.dict-header-wrap h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.dict-search-box {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #f472b6;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  box-shadow: var(--shadow-sm);
  margin: 18px 0 14px 0;
  gap: 12px;
}

body.theme-galaxy .dict-search-box {
  background: #1e293b;
  border-color: #a855f7;
}

.search-icon {
  font-size: 20px;
}

#dict-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  color: inherit;
}

.btn-clear-search {
  background: #e2e8f0;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dict-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.dict-filter-btn {
  flex-shrink: 0;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

body.theme-galaxy .dict-filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: white;
}

.dict-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary-border);
  color: white;
}

.dict-results-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dict-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.dict-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.dict-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dict-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dict-category-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #fdf2f8;
  color: #ec4899;
  border: 1px solid #fbcfe8;
}

.dict-term-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dict-pl {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.dict-en {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--secondary);
}

.dict-symbol {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  align-self: flex-start;
}

body.theme-galaxy .dict-symbol {
  background: #334155;
  border-color: #475569;
}

.dict-example {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-dark);
}

.dict-example-en {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.dict-audio-btns {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-audio-mini {
  background: white;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.theme-galaxy .btn-audio-mini {
  background: #1e293b;
  border-color: #475569;
  color: white;
}

.btn-audio-mini:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   5. FLASHCARDS VIEW
   ========================================================================== */
.flashcards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
  gap: 24px;
}

.flashcards-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.flashcard-counter {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
}

.flashcard-scene {
  width: 100%;
  height: 340px;
  perspective: 1000px;
}

.flashcard-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.flashcard-card.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--primary);
  background: white;
}

body.theme-galaxy .flashcard-face {
  background: #1e1b4b;
  border-color: #a855f7;
}

.flashcard-back {
  transform: rotateY(180deg);
  border-color: var(--secondary);
}

.card-badge-top {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.card-icon {
  font-size: 48px;
}

.card-term-pl {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.card-term-en {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--secondary);
}

.card-symbol {
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  background: #f1f5f9;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
}

.card-actions-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-audio-circle {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.card-hint-click {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.flashcard-rating-actions {
  display: flex;
  gap: 16px;
  width: 100%;
}

.flashcard-rating-actions .btn {
  flex: 1;
}

/* ==========================================================================
   INTERACTIVE LESSON MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.lesson-player-container {
  background: white;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 3px solid #fbcfe8;
}

body.theme-galaxy .lesson-player-container {
  background: #0f172a;
  border-color: #a855f7;
  color: #f8fafc;
}

.lesson-top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 2px solid #f1f5f9;
}

body.theme-galaxy .lesson-top-bar {
  border-bottom-color: #334155;
}

.btn-close-lesson {
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
}

.lesson-progress-wrap {
  flex: 1;
  height: 14px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

body.theme-galaxy .lesson-progress-wrap {
  background: #334155;
}

.lesson-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-hearts {
  font-size: 18px;
  letter-spacing: 2px;
}

.repetition-notice-banner {
  background: #fef3c7;
  border-bottom: 2px solid #f59e0b;
  color: #b45309;
  padding: 10px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse-banner 1s ease-in-out;
}

.lesson-content-body {
  flex: 1 1 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.intro-term-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  gap: 12px;
}

.intro-term-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.intro-term-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.intro-term-text {
  display: flex;
  flex-direction: column;
}

.intro-term-pl {
  font-size: 17px;
  color: var(--primary);
}

.intro-term-sep {
  display: none;
}

.intro-term-en {
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary);
}

.intro-term-tip {
  font-size: 12px;
  color: #b45309;
  margin-top: 4px;
}

.intro-term-audio-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Question Types Styles */
.q-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
  text-align: center;
}

.q-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.q-option-btn {
  background: white;
  border: 2.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-dark);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 #cbd5e1;
  transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

body.theme-galaxy .q-option-btn {
  background: #1e293b;
  border-color: #334155;
  color: white;
  box-shadow: 0 4px 0 #0f172a;
}

.q-option-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #f472b6;
}

.q-option-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent !important;
}

.q-option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 0 var(--primary-border);
  transform: translateY(-2px);
}

.q-option-btn.correct {
  border-color: var(--success) !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  color: #065f46 !important;
  box-shadow: 0 4px 0 var(--success-border) !important;
  animation: correct-pop 0.3s ease-out;
}

.q-option-btn.wrong {
  border-color: var(--danger) !important;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
  color: #991b1b !important;
  box-shadow: 0 4px 0 var(--danger-border) !important;
  animation: shake 0.4s ease-in-out;
}

@keyframes correct-pop {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Matching Game */
.matching-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.matching-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-tile {
  background: white;
  border: 2.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 0 #cbd5e1;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

body.theme-galaxy .match-tile {
  background: #1e293b;
  border-color: #334155;
  color: white;
  box-shadow: 0 4px 0 #0f172a;
}

.match-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 0 #f472b6;
}

.match-tile:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent !important;
}

.match-tile.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 0 var(--primary-border), 0 4px 14px rgba(236, 72, 153, 0.25);
  transform: translateY(-2px) scale(1.03);
}

.match-tile.matched {
  opacity: 0.35;
  pointer-events: none;
  border-color: #86efac !important;
  background: #f0fdf4 !important;
  box-shadow: 0 2px 0 #bbf7d0 !important;
  text-decoration: line-through;
}

/* Lesson Footer */
.lesson-footer {
  padding: 18px 24px;
  border-top: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fafafa;
}

body.theme-galaxy .lesson-footer {
  background: #1e293b;
  border-top-color: #334155;
}

.footer-feedback {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.feedback-icon {
  font-size: 32px;
}

.feedback-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
}

.feedback-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Exit Confirmation Modal & App Notice Modal */
.exit-modal-card, .notice-modal-card {
  background: white;
  border: 3px solid #f472b6;
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 210;
}

body.theme-galaxy .exit-modal-card,
body.theme-galaxy .notice-modal-card {
  background: #0f172a;
  border-color: #c084fc;
  color: white;
}

.exit-modal-avatar-box, .notice-modal-icon {
  font-size: 52px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fdf2f8;
  border: 2px solid #fbcfe8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 14px rgba(236, 72, 153, 0.15);
  animation: bounce-subtle 2s infinite alternate ease-in-out;
}

body.theme-galaxy .exit-modal-avatar-box,
body.theme-galaxy .notice-modal-icon {
  background: #1e1b4b;
  border-color: #a855f7;
}

.exit-modal-title, .notice-modal-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

body.theme-galaxy .exit-modal-title,
body.theme-galaxy .notice-modal-title {
  color: #f8fafc;
}

.exit-modal-desc, .notice-modal-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 24px;
}

body.theme-galaxy .exit-modal-desc,
body.theme-galaxy .notice-modal-desc {
  color: #cbd5e1;
}

.exit-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Celebration Modal */
.celebration-card {
  background: white;
  border: 3px solid #f472b6;
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .celebration-card {
  background: #0f172a;
  border-color: #c084fc;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.celebration-pet-stage {
  width: 160px;
  height: 160px;
  margin-bottom: 12px;
}

.celebration-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.celebration-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.rewards-row {
  display: flex;
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.reward-box {
  flex: 1;
  background: #fdf2f8;
  border: 2px solid #fbcfe8;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.theme-galaxy .reward-box {
  background: #1e1b4b;
  border-color: #4338ca;
}

.reward-icon {
  font-size: 26px;
}

.reward-val {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.reward-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.celebration-joke-box {
  background: #fffbeb;
  border: 2px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 24px;
  text-align: left;
}

body.theme-galaxy .celebration-joke-box {
  background: #2e1065;
  border-color: #6b21a8;
  color: #fef08a;
}

/* ==========================================================================
   LEVEL TAG & STAR ROAD MODAL
   ========================================================================== */
.level-tag-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.4);
  transition: transform 0.15s ease;
}

.stat-pill.stars-pill:hover .level-tag-pill {
  transform: scale(1.08);
}

/* Celebration Level-Up Banner */
.celebration-levelup-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  animation: gentle-bounce 2s infinite ease-in-out;
}

.levelup-icon {
  font-size: 32px;
}

.levelup-text h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 2px;
}

.levelup-text p {
  font-size: 12px;
  color: #b45309;
  margin: 0;
}

/* Star Road Modal */
.star-road-card {
  background: white;
  border: 3px solid #fbbf24;
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .star-road-card {
  background: #0f172a;
  border-color: #f59e0b;
  color: white;
}

.star-road-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 2px solid #fde68a;
}

body.theme-galaxy .star-road-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom-color: #334155;
}

.star-road-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.star-road-badge-icon {
  font-size: 38px;
  filter: drop-shadow(0 4px 6px rgba(245, 158, 11, 0.35));
}

.star-road-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 2px;
}

body.theme-galaxy .star-road-header h2 {
  color: #fbbf24;
}

.star-road-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.star-road-progress-box {
  padding: 16px 24px;
  background: #fafaf9;
  border-bottom: 2px solid #e7e5e4;
}

body.theme-galaxy .star-road-progress-box {
  background: #1e1e2e;
  border-bottom-color: #27273a;
}

.star-road-xp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.star-road-xp-val strong {
  font-family: var(--font-heading);
  font-size: 20px;
  color: #d97706;
}

.star-road-bar-wrap {
  height: 14px;
  background: #e7e5e4;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.star-road-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #e11d48);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-road-bar-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
  font-weight: 600;
}

.star-road-milestones-container {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.star-road-milestones-container h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-dark);
}

body.theme-galaxy .star-road-milestones-container h3 {
  color: white;
}

.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

body.theme-galaxy .milestone-item {
  background: #1e293b;
  border-color: #334155;
}

.milestone-item.current {
  border-color: #f59e0b;
  background: #fffdf5;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

body.theme-galaxy .milestone-item.current {
  background: #2a2215;
}

.milestone-item.unlocked {
  border-color: #22c55e;
}

.milestone-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.milestone-badge {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef3c7;
  border-radius: var(--radius-full);
}

.milestone-info h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.milestone-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.milestone-reward-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}

.milestone-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.milestone-cost {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #ea580c;
}

.btn-claim-reward {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
  animation: pulse-glow 1.8s infinite;
  transition: transform 0.15s ease;
}

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

.claimed-badge {
  font-size: 12px;
  font-weight: 800;
  color: #16a34a;
  background: #dcfce7;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.locked-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   CLINIC ACTIONS & RETENTION DOMAINS
   ========================================================================== */
.clinic-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.retention-section {
  margin-bottom: 32px;
}

.retention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.retention-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.retention-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.ret-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ret-cat-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ret-percent-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.ret-high { background: #dcfce7; color: #15803d; }
.ret-mid { background: #fef9c3; color: #a16207; }
.ret-low { background: #fee2e2; color: #b91c1c; }

.ret-bar-wrap {
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

body.theme-galaxy .ret-bar-wrap {
  background: #334155;
}

.ret-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.ret-fill-high { background: linear-gradient(90deg, #22c55e, #16a34a); }
.ret-fill-mid { background: linear-gradient(90deg, #eab308, #ca8a04); }
.ret-fill-low { background: linear-gradient(90deg, #ef4444, #dc2626); }

.ret-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ret-status-text {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-ret-practice {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: white;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ret-practice:hover {
  background: var(--primary);
  color: white;
}

body.theme-galaxy .btn-ret-practice {
  background: #1e293b;
  border-color: #ec4899;
  color: #f472b6;
}

/* ==========================================================================
   PROGRESS, STATS VIEW & DAILY STREAK
   ========================================================================== */
.dashboard-progress-card {
  background: var(--card-bg);
  border: 2.5px solid rgba(244, 114, 182, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(236, 72, 153, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.dashboard-progress-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ec4899, #f59e0b, #8b5cf6, #ec4899);
  background-size: 300% 100%;
  animation: rainbow-shimmer 6s linear infinite;
}

@keyframes rainbow-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

body.theme-galaxy .dashboard-progress-card {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 16px rgba(168, 85, 247, 0.2);
}

.dash-prog-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-goal-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-goal-badge .goal-icon {
  font-size: 28px;
}

.dash-goal-badge .goal-text strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.dash-goal-badge .goal-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 1px 0 0 0;
}

.dash-streak-pill-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.streak-flame-tag {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 2px solid #fed7aa;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.15);
}

body.theme-galaxy .streak-flame-tag {
  background: #271406;
  border-color: #7c2d12;
  color: #fdba74;
}

.streak-bonus-hint {
  font-size: 11px;
  color: #d97706;
  font-weight: 800;
}

.dash-prog-right {
  flex: 1;
  min-width: 280px;
}

#dash-prog-fill {
  background: linear-gradient(90deg, #ec4899 0%, #f43f5e 50%, #8b5cf6 100%) !important;
  position: relative;
  overflow: hidden;
}

#dash-prog-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.25) 75%,
    transparent 75%,
    transparent
  );
  background-size: 24px 24px;
  animation: progress-stripes 1.8s linear infinite;
}

@keyframes progress-stripes {
  from { background-position: 0 0; }
  to { background-position: 48px 0; }
}

.dash-prog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dash-prog-val {
  color: var(--primary);
  font-weight: 800;
}

.dash-prog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.btn-text-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Stats View Header Card */
.stats-header-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.stats-header-icon {
  font-size: 42px;
  flex-shrink: 0;
}

.stats-header-info h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.stats-header-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.stats-pace-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pace-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.pace-btn {
  background: white;
  border: 2px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

body.theme-galaxy .pace-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.pace-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pace-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
}

body.theme-galaxy .pace-btn.active {
  background: rgba(236, 72, 153, 0.25);
  border-color: #f472b6;
  color: #f472b6;
}

/* Stats KPI Cards */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stats-kpi-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.stats-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stats-kpi-card .kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stats-kpi-card.card-pink .kpi-icon-wrap { background: #fdf2f8; color: #ec4899; }
.stats-kpi-card.card-blue .kpi-icon-wrap { background: #eff6ff; color: #3b82f6; }
.stats-kpi-card.card-green .kpi-icon-wrap { background: #f0fdf4; color: #16a34a; }
.stats-kpi-card.card-orange .kpi-icon-wrap { background: #fff7ed; color: #ea580c; }

body.theme-galaxy .stats-kpi-card.card-pink .kpi-icon-wrap { background: #3b0720; }
body.theme-galaxy .stats-kpi-card.card-blue .kpi-icon-wrap { background: #082f49; }
body.theme-galaxy .stats-kpi-card.card-green .kpi-icon-wrap { background: #052e16; }
body.theme-galaxy .stats-kpi-card.card-orange .kpi-icon-wrap { background: #3b1604; }

.stats-kpi-card .kpi-info {
  flex: 1;
}

.stats-kpi-card .kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

.stats-kpi-card .kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
  margin: 2px 0;
}

.stats-kpi-card .kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Category Breakdown Grid */
.stats-section-box {
  margin-bottom: 32px;
}

.stats-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.stat-cat-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.stat-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-icon-badge {
  font-size: 24px;
}

.cat-name-box strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.cat-name-box span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.cat-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.status-completed {
  background: #dcfce7;
  color: #15803d;
}

.status-progress {
  background: #fef9c3;
  color: #a16207;
}

.status-notstarted {
  background: #f1f5f9;
  color: #64748b;
}

body.theme-galaxy .status-completed { background: #052e16; color: #4ade80; }
body.theme-galaxy .status-progress { background: #3b2804; color: #fde047; }
body.theme-galaxy .status-notstarted { background: #1e293b; color: #94a3b8; }

.cat-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.cat-metrics-row .cat-lessons-count {
  color: var(--text-main);
}

.cat-metrics-row .cat-remaining-text {
  color: var(--primary);
  font-weight: 800;
}

.cat-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-cat-jump {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cat-jump:hover {
  background: var(--primary);
  color: white;
}

body.theme-galaxy .btn-cat-jump {
  border-color: #f472b6;
  color: #f472b6;
}

body.theme-galaxy .btn-cat-jump:hover {
  background: #ec4899;
  color: white;
}

/* Streak Milestones Grid */
.streak-milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.streak-ms-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.streak-ms-card.achieved {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

body.theme-galaxy .streak-ms-card.achieved {
  background: #271e06;
  border-color: #d97706;
}

.streak-ms-badge {
  font-size: 32px;
  margin-bottom: 6px;
}

.streak-ms-days {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.streak-ms-rewards {
  font-size: 12px;
  font-weight: 800;
  color: #d97706;
  margin: 6px 0;
  display: block;
}

.streak-ms-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.streak-ms-card.achieved .streak-ms-status {
  color: #16a34a;
  font-weight: 800;
}

/* Celebration Streak Banner */
.celebration-streak-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  border: 2px solid #f97316;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  text-align: left;
  animation: pulseGlow 2s infinite ease-in-out;
}

.celebration-streak-banner .streak-banner-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.celebration-streak-banner .streak-banner-text h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #9a3412;
}

.celebration-streak-banner .streak-banner-text p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #c2410c;
  font-weight: 700;
}

/* ==========================================================================
   Pet Companionship & Interaction Animations (Petting, Treats, Toys & Auras)
   ========================================================================== */

/* Pet Cheer Jump & Bounce */
.pet-cheer-jump {
  animation: petCheerJump 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes petCheerJump {
  0% { transform: scale(1) translateY(0); }
  25% { transform: scale(1.15, 0.85) translateY(4px); }
  55% { transform: scale(0.92, 1.22) translateY(-24px) rotate(4deg); }
  75% { transform: scale(1.08, 0.95) translateY(-6px) rotate(-2deg); }
  100% { transform: scale(1) translateY(0) rotate(0deg); }
}

.stage-pet-container {
  cursor: pointer;
  position: relative;
}

.stage-pet-container:hover {
  transform: scale(1.04);
}

/* Floating Emotion Particles (Hearts, Treats, Stars) */
.floating-heart-particle {
  position: absolute;
  pointer-events: none;
  font-size: 26px;
  z-index: 9999;
  user-select: none;
  filter: drop-shadow(0 4px 8px rgba(244, 63, 94, 0.35));
  animation: floatHeartPop 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatHeartPop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  40% {
    opacity: 1;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% - 40px)) scale(1.3) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px) * 1.6), calc(-50% - 100px)) scale(0.7) rotate(calc(var(--rot, 15deg) * 2));
  }
}

/* SVG Accessory & Toy Animations */
.item-acc.animate-bob {
  animation: itemBob 2.2s infinite ease-in-out;
  transform-origin: 155px 150px;
}

@keyframes itemBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}

.item-toy.animate-gentle {
  animation: toyGentle 3s infinite ease-in-out;
  transform-origin: 45px 165px;
}

@keyframes toyGentle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}

.item-aura.animate-pulse-slow {
  animation: auraPulse 2.8s infinite ease-in-out;
  transform-origin: 100px 105px;
}

@keyframes auraPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

.item-aura.animate-spin-slow {
  animation: auraSpin 14s infinite linear;
  transform-origin: 100px 105px;
}

@keyframes auraSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.item-aura.animate-float-slow {
  animation: auraFloat 3.5s infinite ease-in-out;
  transform-origin: 100px 105px;
}

@keyframes auraFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

/* ==========================================================================
   STREAK FREEZE (DUOLINGO SYSTEM ❄️)
   ========================================================================== */
.header-freeze-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(14, 165, 233, 0.12);
  border: 1.5px solid #7dd3fc;
  color: #0284c7;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  transition: all 0.25s ease;
}

.header-freeze-tag.empty {
  opacity: 0.55;
  background: rgba(148, 163, 184, 0.15);
  border-color: #cbd5e1;
  color: #64748b;
}

body.theme-galaxy .header-freeze-tag {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.dash-freeze-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1.5px solid #38bdf8;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  width: fit-content;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.2);
}

.dash-freeze-badge.empty {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: none;
}

body.theme-galaxy .dash-freeze-badge {
  background: #082f49;
  border-color: #0284c7;
  color: #7dd3fc;
}

/* Streak Freeze Card in Stats View */
.streak-freeze-card {
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.95) 0%, rgba(224, 242, 254, 0.8) 100%);
  border: 2px solid #7dd3fc;
  box-shadow: 0 8px 24px -4px rgba(56, 189, 248, 0.16);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

body.theme-galaxy .streak-freeze-card {
  background: linear-gradient(135deg, #0c1a2d 0%, #082f49 100%);
  border-color: #0369a1;
}

.freeze-card-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.freeze-card-badge-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
  flex-shrink: 0;
  animation: freezeFloat 3s infinite ease-in-out;
}

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

.freeze-card-details {
  flex: 1;
}

.freeze-card-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.freeze-card-header-row h3 {
  margin: 0;
  font-size: 20px;
  font-family: var(--font-heading);
  color: #0369a1;
}

body.theme-galaxy .freeze-card-header-row h3 {
  color: #7dd3fc;
}

.freeze-status-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #0284c7;
  color: white;
}

.freeze-status-badge.empty {
  background: #94a3b8;
}

.freeze-card-details p {
  margin: 0 0 14px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}

body.theme-galaxy .freeze-card-details p {
  color: #cbd5e1;
}

.freeze-slots-container {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.freeze-slot {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 2px dashed #93c5fd;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.25s ease;
}

.freeze-slot.filled {
  border-style: solid;
  border-color: #38bdf8;
  background: white;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.18);
}

body.theme-galaxy .freeze-slot {
  background: rgba(15, 23, 42, 0.6);
  border-color: #1e3a5f;
}

body.theme-galaxy .freeze-slot.filled {
  background: #0c1a2d;
  border-color: #0284c7;
}

.freeze-slot-icon {
  font-size: 26px;
}

.freeze-slot-info {
  display: flex;
  flex-direction: column;
}

.freeze-slot-info strong {
  font-size: 13px;
  color: #0369a1;
}

body.theme-galaxy .freeze-slot-info strong {
  color: #7dd3fc;
}

.freeze-slot-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.freeze-card-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(14, 165, 233, 0.15);
  flex-wrap: wrap;
  align-items: center;
}

/* Streak Freeze Modal */
.freeze-modal-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  border: 3px solid #7dd3fc;
  box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.35);
  animation: freezePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .freeze-modal-card {
  background: #0c1a2d;
  border-color: #0284c7;
  color: white;
}

@keyframes freezePop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.freeze-modal-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: freezeFloat 2.5s infinite ease-in-out;
}

.freeze-modal-card h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #0369a1;
  margin: 0 0 10px 0;
}

body.theme-galaxy .freeze-modal-card h2 {
  color: #7dd3fc;
}

.freeze-modal-sub {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 20px 0;
}

body.theme-galaxy .freeze-modal-sub {
  color: #cbd5e1;
}

.freeze-modal-info-box {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  justify-content: space-around;
  margin-bottom: 18px;
}

body.theme-galaxy .freeze-modal-info-box {
  background: #082f49;
  border-color: #0369a1;
}

.freeze-modal-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.freeze-modal-stat .lbl {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

body.theme-galaxy .freeze-modal-stat .lbl {
  color: #94a3b8;
}

.freeze-modal-stat strong {
  font-size: 18px;
  color: #0284c7;
  font-family: var(--font-heading);
}

body.theme-galaxy .freeze-modal-stat strong {
  color: #38bdf8;
}

.freeze-modal-tip {
  font-size: 12px;
  color: #0284c7;
  margin: 0 0 22px 0;
  line-height: 1.4;
}

body.theme-galaxy .freeze-modal-tip {
  color: #7dd3fc;
}

/* ==========================================================================
   CLOUD SYNC & MOBILE CONNECT
   ========================================================================== */
.sync-pill {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.sync-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2);
}

body.theme-galaxy .sync-pill {
  background: #052e16;
  border-color: #15803d;
  color: #86efac;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.sync-status-dot.offline {
  background: #94a3b8;
  box-shadow: none;
}

.sync-status-dot.syncing {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-sync 1s infinite alternate;
}

@keyframes pulse-sync {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}

.sync-modal-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(134, 239, 172, 0.4);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 24px;
}

body.theme-galaxy .sync-modal-card {
  background: #0f172a;
  border-color: #059669;
}

.sync-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.sync-modal-icon-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sync-title-icon {
  font-size: 36px;
}

.sync-modal-header h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text-dark);
}

.sync-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sync-active-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

body.theme-galaxy .sync-active-profile-card {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  border-color: #047857;
}

.profile-avatar-badge {
  font-size: 36px;
  background: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.theme-galaxy .profile-avatar-badge {
  background: #1e293b;
}

.profile-info-wrap {
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-label {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-current-name {
  font-size: 18px;
  color: #065f46;
  font-family: var(--font-heading);
}

body.theme-galaxy .profile-current-name {
  color: #6ee7b7;
}

.profile-stats-row {
  font-size: 13px;
  font-weight: 600;
  color: #047857;
  margin: 4px 0;
}

body.theme-galaxy .profile-stats-row {
  color: #a7f3d0;
}

.profile-sync-time {
  font-size: 11px;
  color: #6b7280;
}

.sync-connect-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .sync-connect-grid {
    grid-template-columns: 1fr;
  }
}

.sync-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.08);
}

body.theme-galaxy .sync-qr-section {
  background: #1e293b;
  border-color: #334155;
}

.sync-qr-section h4, .sync-link-section h4, .sync-profiles-list-section h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.sync-qr-container {
  width: 140px;
  height: 140px;
  background: white;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-qr-container img, .sync-qr-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.sync-qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.3;
}

.sync-url-copy-box, .sync-profile-switch-box {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.sync-url-input, .sync-input-id {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dark);
  outline: none;
}

body.theme-galaxy .sync-url-input, body.theme-galaxy .sync-input-id {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.sync-copy-feedback {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
  margin-bottom: 6px;
}

.sync-help-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: block;
}

.sync-profiles-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.sync-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid #cbd5e1;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

body.theme-galaxy .sync-profile-chip {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.sync-profile-chip.active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
}

/* ==========================================================================
   WORD PROBLEM & CKE VOCABULARY HINTS STYLING
   ========================================================================== */
.q-cke-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

body.theme-galaxy .q-cke-badge {
  background: linear-gradient(135deg, #78350f, #451a03);
  color: #fde68a;
  border-color: #d97706;
}

.q-story-box {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(244, 114, 182, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  line-height: 1.6;
}

body.theme-galaxy .q-story-box {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(168, 85, 247, 0.35);
}

.q-story-text-pl {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.q-story-text-en {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.q-vocab-hints-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
}

body.theme-galaxy .q-vocab-hints-box {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
  border-color: #0284c7;
}

.vocab-hints-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

body.theme-galaxy .vocab-hints-header {
  color: #7dd3fc;
}

.vocab-hints-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vocab-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.15s ease;
}

body.theme-galaxy .vocab-hint-chip {
  background: #0f172a;
  border-color: #38bdf8;
}

.vocab-hint-chip:hover {
  transform: translateY(-1px);
}

.vocab-hint-chip .vh-pl {
  font-weight: 700;
  color: #0f172a;
}

body.theme-galaxy .vocab-hint-chip .vh-pl {
  color: #f8fafc;
}

.vocab-hint-chip .vh-arrow {
  color: #0284c7;
  font-weight: bold;
}

body.theme-galaxy .vocab-hint-chip .vh-arrow {
  color: #38bdf8;
}

.vocab-hint-chip .vh-en {
  color: #0369a1;
  font-weight: 500;
}

body.theme-galaxy .vocab-hint-chip .vh-en {
  color: #bae6fd;
}

/* ==========================================================================
   FAMILY PIN LOCK OVERLAY (0609)
   ========================================================================== */
.pin-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.3s ease-out;
}

.pin-lock-card {
  background: white;
  border: 3px solid #f472b6;
  border-radius: 32px;
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

body.theme-galaxy .pin-lock-card {
  background: #0f172a;
  border-color: #c084fc;
  color: white;
}

.pin-avatar-badge {
  font-size: 44px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fdf2f8;
  border: 2px solid #fbcfe8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.2);
  animation: bounce-subtle 2s infinite alternate ease-in-out;
}

body.theme-galaxy .pin-avatar-badge {
  background: #1e1b4b;
  border-color: #a855f7;
}

.pin-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.pin-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

body.theme-galaxy .pin-subtitle {
  color: #94a3b8;
}

.pin-dots-container {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  justify-content: center;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid #cbd5e1;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-galaxy .pin-dot {
  border-color: #475569;
}

.pin-dot.filled {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: #ec4899;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

.pin-dot.success {
  background: #10b981 !important;
  border-color: #059669 !important;
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
}

.pin-dot.error {
  background: #ef4444 !important;
  border-color: #dc2626 !important;
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 270px;
  margin-bottom: 14px;
}

.pin-key {
  aspect-ratio: 1;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 4px 0 #cbd5e1;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

body.theme-galaxy .pin-key {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 0 #0f172a;
  color: white;
}

.pin-key:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #cbd5e1;
  border-color: #f472b6;
}

.pin-key:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #cbd5e1;
}

.pin-key-action {
  font-size: 16px;
  color: var(--text-muted);
  background: #f8fafc;
}

body.theme-galaxy .pin-key-action {
  background: #0f172a;
  color: #94a3b8;
}

.pin-footer-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sync Footer Actions & Danger Button */
.btn-outline-danger {
  background: transparent;
  border: 2px solid #fca5a5;
  color: #dc2626;
  font-weight: 700;
}

.btn-outline-danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

body.theme-galaxy .btn-outline-danger {
  border-color: #7f1d1d;
  color: #f87171;
}

body.theme-galaxy .btn-outline-danger:hover {
  background: #450a0a;
}

.sync-footer-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  flex-wrap: wrap;
}

/* ==========================================================================
   MOBILE RESPONSIVE OVERHAUL (max-width: 768px & max-width: 480px)
   ========================================================================== */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    padding: 8px 12px;
    gap: 8px;
  }

  .header-main-row {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .header-left .logo-sub {
    display: none;
  }

  .header-left .logo-icon {
    font-size: 24px;
  }

  .header-left .logo-title {
    font-size: 19px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .zen-text {
    display: none;
  }

  .header-actions .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions .sync-pill {
    padding: 4px 10px;
    font-size: 12px;
    gap: 4px;
  }

  .header-stats-row {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .header-stats-row .stat-pill {
    flex: 1;
    justify-content: center;
    padding: 5px 6px;
    font-size: 13px;
    gap: 4px;
  }

  .header-stats-row .stat-label {
    display: none;
  }

  .header-freeze-tag {
    font-size: 10px;
    padding: 1px 4px;
  }

  .level-tag-pill {
    font-size: 10px;
    padding: 1px 5px;
  }

  /* Bottom Navigation Mobile */
  .bottom-nav {
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 6px 8px;
    gap: 4px;
  }

  .nav-tab {
    padding: 6px 4px;
    font-size: 10px;
    gap: 2px;
    flex: 1;
  }

  .tab-icon {
    font-size: 18px;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end; /* Sheet style on mobile */
  }

  .lesson-player-container {
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 24px 24px 16px 16px;
    min-height: auto;
  }

  .lesson-top-bar {
    padding: 12px 16px;
    gap: 12px;
  }

  .lesson-content-body {
    padding: 16px 14px;
  }

  .lesson-footer {
    padding: 12px 16px;
  }

  .intro-term-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .intro-term-audio-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Boutique on Mobile */
  .boutique-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pet-stage-box {
    padding: 16px;
    min-height: 220px;
  }

  .stage-pet-container {
    width: 170px;
    height: 170px;
  }

  .shop-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-item-card {
    padding: 12px 10px;
  }

  .shop-item-icon {
    font-size: 32px;
  }

  .shop-item-name {
    font-size: 12px;
  }

  /* Star Road on Mobile */
  .star-road-card, .sync-modal-card {
    padding: 20px 16px;
    max-height: 94vh;
    max-height: 94dvh;
    overflow-y: auto;
  }
}





