/* ==========================================================================
   FAMILY ADVENTURE - HOJA DE ESTILOS PROFESIONAL Y RESPONSIVE
   Diseñado para niños y familias (móviles, tablets y computadoras)
   ========================================================================== */

:root {
  --color-leaf: #2d6a4f;
  --color-forest-dark: #1b4332;
  --color-forest: #2d6a4f;
  --color-emerald: #40916c;
  --color-mint: #52b788;
  --color-mint-light: #d8f3dc;
  
  --color-lake-deep: #03045e;
  --color-lake: #0077b6;
  --color-lake-cyan: #00b4d8;
  --color-lake-light: #caf0f8;
  
  --color-sun: #ffb703;
  --color-sun-orange: #fb8500;
  --color-warm-cream: #fdfbf7;
  --color-earth: #6b4226;
  
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Nunito', sans-serif;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 0 20px rgba(82, 183, 136, 0.4);
}

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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  inset: 0;
  font-family: var(--font-family);
  background-color: var(--color-warm-cream);
  color: #2b2d42;
  font-size: 16px;
  line-height: 1.4;
  -webkit-overflow-scrolling: touch;
}

#game-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #d8f3dc 0%, #caf0f8 60%, #e9ecef 100%);
}

/* --- BARRA SUPERIOR DE CONTROL --- */
.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(82, 183, 136, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-forest);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.brand-badge:hover {
  transform: scale(1.03);
}

.brand-icon {
  font-size: 1.7rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-full);
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-forest);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.nav-btn:hover, .nav-btn:active {
  transform: translateY(-2px);
  border-color: var(--color-mint);
  box-shadow: var(--shadow-md);
}

.nav-btn-icon-only {
  min-width: 44px;
  width: 44px;
  padding: 0;
}

.badge-counter {
  background: var(--color-sun-orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* --- CONTENEDOR PRINCIPAL DE PANTALLA --- */
.screen-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 0;
  width: 100%;
}

/* --- ESTILOS DE BOTONES GRANDES TÁCTILES --- */
.btn-primary {
  background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 32px;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(45, 106, 79, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 58px;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(45, 106, 79, 0.45);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-accent {
  background: linear-gradient(135deg, #fb8500 0%, #ffb703 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 30px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(251, 133, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  min-height: 56px;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(251, 133, 0, 0.45);
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-forest);
  border: 2px solid var(--color-mint);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 52px;
}

.btn-secondary:hover {
  background: var(--color-mint-light);
  transform: translateY(-2px);
}

/* --- PANTALLA 1: SELECTOR DE EDAD --- */
.age-screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  flex: 1;
}

.hero-title-group {
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--color-forest-dark);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #495057;
  margin-top: 8px;
  max-width: 650px;
}

.age-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 36px;
}

.age-card {
  background: #ffffff;
  border: 3px solid #e9ecef;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
}

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

.age-card.active {
  border-color: var(--color-mint);
  background: linear-gradient(180deg, #ffffff 0%, var(--color-mint-light) 100%);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 32px rgba(82, 183, 136, 0.3);
}

.age-card-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.age-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-forest-dark);
  margin-bottom: 6px;
}

.age-card-badge {
  background: var(--color-forest);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.age-card-desc {
  font-size: 0.95rem;
  color: #6c757d;
  line-height: 1.4;
}

/* --- PANTALLA 2: CONFIGURACIÓN DE FAMILIA --- */
.family-screen-content {
  padding: 24px 16px 40px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.family-header {
  text-align: center;
  margin-bottom: 24px;
}

.family-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--color-forest-dark);
}

.family-car-preview {
  background: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
  border: 3px dashed var(--color-mint);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.car-scene-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.car-icon-large {
  font-size: 4.5rem;
  animation: floatSubtle 3s ease-in-out infinite;
}

.car-passengers-badge-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.passenger-pill {
  background: #ffffff;
  border: 2px solid var(--color-mint);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-forest-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

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

.family-member-card {
  background: #ffffff;
  border: 2px solid #dee2e6;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.family-member-card.active {
  border-color: var(--color-mint);
  box-shadow: 0 4px 16px rgba(82, 183, 136, 0.2);
  background: #fdfefe;
}

.family-member-card.inactive {
  opacity: 0.55;
  background: #f8f9fa;
}

.member-avatar {
  font-size: 2.5rem;
  width: 58px;
  height: 58px;
  background: #f1f3f5;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.member-avatar:hover {
  transform: scale(1.1);
}

.member-info {
  flex: 1;
}

.member-role {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-emerald);
  letter-spacing: 0.5px;
}

.member-name-input {
  width: 100%;
  border: 1.5px solid #ced4da;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  outline: none;
  transition: border-color 0.2s ease;
}

.member-name-input:focus {
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.25);
}

.member-toggle-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mint);
  transition: transform 0.2s ease;
}

.member-toggle-btn:hover {
  transform: scale(1.2);
}

/* --- PANTALLA 3: CINEMÁTICA DE VIAJE EN AUTO --- */
.road-trip-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #343a40;
  height: 100%;
  max-height: 100%;
}

.scenic-sky {
  height: 40%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #90e0ef 0%, #caf0f8 100%);
  flex-shrink: 0;
}

.trip-sky-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--color-mint);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-forest-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  white-space: nowrap;
  max-width: 90%;
  z-index: 15;
  pointer-events: none;
}

.sun-bright {
  position: absolute;
  top: 15px;
  right: 35px;
  font-size: 3.5rem;
  animation: sunSpin 24s linear infinite;
}

.cloud-floating {
  position: absolute;
  font-size: 2.8rem;
  opacity: 0.85;
  animation: cloudMove 20s linear infinite;
}

.cloud-1 { top: 20px; left: -100px; animation-duration: 25s; }
.cloud-2 { top: 60px; left: -150px; animation-duration: 35s; animation-delay: 5s; font-size: 2rem; }

.scenic-mountains {
  position: absolute;
  bottom: 0;
  width: 200%;
  display: flex;
  font-size: 3.2rem;
  animation: sceneryScroll 12s linear infinite;
}

.road-surface {
  flex: 1;
  background: #343a40;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.road-stripes {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 8px;
  background: repeating-linear-gradient(90deg, #ffb703 0px, #ffb703 40px, transparent 40px, transparent 80px);
  animation: roadScroll 1s linear infinite;
  transform: translateY(-50%);
}

.trip-vehicle-wrap {
  position: relative;
  z-index: 10;
  text-align: center;
  cursor: pointer;
  animation: carBounce 0.4s ease-in-out infinite alternate;
  user-select: none;
  -webkit-user-select: none;
}

.trip-car-body {
  font-size: clamp(4.5rem, 12vw, 7.5rem);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.4));
  transition: transform 0.15s ease;
}

.trip-car-body:active {
  transform: scale(0.95);
}

.trip-car-passengers-bubble {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-mint);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  max-width: 90%;
  flex-wrap: nowrap;
  overflow-x: auto;
  font-size: 1.35rem;
}

.trip-horn-indicator {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-sun-orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  animation: pulsePill 1.5s infinite;
}

/* BARRA DE CONTROLES INFERIOR EN EL VIAJE (FUERA DE LA CALLE) */
.trip-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}

.trip-footer-btn {
  height: 40px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.trip-footer-btn:active {
  transform: scale(0.96);
}

.trip-footer-btn-arrive {
  height: 42px;
  padding: 0 22px;
  font-size: 0.95rem;
  font-weight: 900;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2d6a4f !important;
  background: linear-gradient(135deg, #40916c 0%, #1b4332 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.45);
  animation: pulseButton 2s infinite ease-in-out;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.trip-footer-btn-arrive:active {
  transform: scale(0.96);
}

.trip-hud {
  display: none;
}

.trip-banner {
  display: none;
}

/* --- PANTALLA 4: EXPLORADOR DEL PARQUE Y EL LAGO --- */
.park-explorer-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  background: linear-gradient(180deg, #b5e2fa 0%, #edede9 30%, #74c69d 30%, #2d6a4f 100%);
  overflow: hidden;
}

.park-sky-band {
  height: 18%;
  position: relative;
}

.park-landscape {
  flex: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 16px;
  gap: 12px;
}

/* Zona del Lago Hermoso */
.zone-lake-center {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: radial-gradient(ellipse at center, #00b4d8 0%, #0077b6 65%, #03045e 100%);
  border-radius: 50% 50% 45% 45% / 40% 40% 60% 60%;
  position: relative;
  border: 6px solid #b7e4c7;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 119, 182, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lake-ripples {
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 25px, rgba(255, 255, 255, 0.12) 28px, transparent 32px);
  animation: lakePulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Zonas de Bosque y Pradera */
.zone-forest-left {
  grid-column: 1;
  grid-row: 1 / span 2;
  background: rgba(45, 106, 79, 0.18);
  border-radius: var(--radius-lg);
  border: 3px dashed rgba(45, 106, 79, 0.4);
  position: relative;
  padding: 12px;
}

.zone-meadow-right {
  grid-column: 3;
  grid-row: 1 / span 2;
  background: rgba(116, 198, 157, 0.25);
  border-radius: var(--radius-lg);
  border: 3px dashed rgba(116, 198, 157, 0.6);
  position: relative;
  padding: 12px;
}

.zone-label-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--color-mint);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-forest-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 60;
  pointer-events: none;
}

/* Hotspots de Animales con Estética 3D y Micro-animación */
.animal-hotspot {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  animation: animalFloat 4s ease-in-out infinite alternate;
}

/* Posiciones fijas anticolición para cada uno de los 13 animales */
.spot-buho { top: 8%; left: 16%; }
.spot-carpintero { top: 34%; right: 14%; }
.spot-ardilla { top: 58%; left: 16%; }
.spot-oso { bottom: 8%; right: 18%; }

.spot-pato { top: 10%; left: 18%; }
.spot-cisne { top: 22%; right: 16%; }
.spot-trucha { top: 48%; left: 42%; }
.spot-rana { bottom: 10%; left: 14%; }
.spot-nutria { bottom: 10%; right: 16%; }

.spot-ciervo { top: 8%; left: 18%; }
.spot-zorro { top: 34%; right: 14%; }
.spot-erizo { top: 58%; left: 16%; }
.spot-tortuga { bottom: 8%; right: 18%; }

.animal-hotspot:nth-child(even) {
  animation-duration: 4.8s;
  animation-delay: -1.8s;
}

.animal-hotspot:hover {
  transform: scale(1.18) translateY(-4px);
  z-index: 50;
}

.animal-hotspot:active {
  transform: scale(0.95);
}

@keyframes animalFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.animal-avatar-bubble {
  font-size: clamp(2.3rem, 5.5vw, 3.2rem);
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f7f9fa 100%);
  border: 3.5px solid var(--color-sun);
  border-radius: var(--radius-full);
  width: clamp(58px, 9.5vw, 76px);
  height: clamp(58px, 9.5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.06);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animal-avatar-bubble::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 9px;
  width: 32%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 80%);
  pointer-events: none;
}

/* Temas 3D y colores por especie para niños */
[data-animal="buho"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ede7f6 100%);
  border-color: #9575cd;
}
[data-animal="carpintero"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #fff3e0 100%);
  border-color: #ffb74d;
}
[data-animal="ardilla"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ffe0b2 100%);
  border-color: #ff9800;
}
[data-animal="oso"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #efebe9 100%);
  border-color: #8d6e63;
}
[data-animal="pato"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0f2f1 100%);
  border-color: #26a69a;
}
[data-animal="cisne"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f3e5f5 100%);
  border-color: #ab47bc;
}
[data-animal="trucha"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e1f5fe 100%);
  border-color: #29b6f6;
}
[data-animal="rana"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e8f5e9 100%);
  border-color: #66bb6a;
}
[data-animal="nutria"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #fbe9e7 100%);
  border-color: #ff7043;
}
[data-animal="ciervo"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #fffde7 100%);
  border-color: #fbc02d;
}
[data-animal="zorro"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ffecb3 100%);
  border-color: #ff5722;
}
[data-animal="erizo"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1f8e9 100%);
  border-color: #8bc34a;
}
[data-animal="tortuga"] .animal-avatar-bubble {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0f2f1 100%);
  border-color: #26a69a;
}

.animal-hotspot.discovered .animal-avatar-bubble {
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.4), 0 8px 20px rgba(45, 106, 79, 0.25);
}

.animal-bubble-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--color-sun-orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1.5px solid #fff;
}

.animal-name-tag {
  background: rgba(18, 38, 28, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  z-index: 30;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* --- ELEMENTOS DE ÁRBOLES EN EL PARQUE (Capa de fondo) --- */
.park-tree {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2; /* Siempre detrás de animales y letreros */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: bottom center;
  opacity: 0.88;
}

.park-tree:hover {
  transform: scale(1.08) rotate(1deg);
  opacity: 1;
}

.park-tree.rustling {
  animation: treeRustle 0.6s ease-in-out;
}

.tree-oak {
  width: 130px;
  height: 165px;
  animation: gentleSway 6s ease-in-out infinite alternate;
}

.tree-pine {
  font-size: 3rem;
  opacity: 0.75;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
  animation: gentleSway 7s ease-in-out infinite alternate-reverse;
}

.tree-willow {
  width: 110px;
  height: 135px;
  animation: gentleSway 5s ease-in-out infinite alternate;
}

.tree-blossom {
  width: 120px;
  height: 145px;
  animation: gentleSway 6.5s ease-in-out infinite alternate;
}

@keyframes gentleSway {
  0% { transform: rotate(-1.5deg); }
  100% { transform: rotate(1.5deg); }
}

@keyframes treeRustle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-3deg); }
  50% { transform: scale(1.12) rotate(3deg); }
  75% { transform: scale(1.05) rotate(-2deg); }
}

/* --- PARADA Y DESFILE DE LA FAMILIA EN EL VIAJE Y PARQUE --- */
.trip-passengers-parade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--color-mint);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 12px;
}

.trip-passenger-card {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1.5px solid var(--color-mint);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-forest-dark);
  box-shadow: var(--shadow-sm);
  animation: passengerWave 1.2s ease-in-out infinite alternate;
}

@keyframes passengerWave {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-5px) rotate(2deg); }
}

/* Sendero de la Familia Caminando en el Parque */
.family-walking-trail {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 3px solid var(--color-mint);
  border-radius: var(--radius-lg);
  padding: 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 50;
  max-width: 95%;
}

.family-walkers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.family-walker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.family-walker-item:hover {
  transform: scale(1.15);
}

.family-walker-item.bouncing {
  animation: camperJump 0.5s ease-in-out;
}

.walker-avatar {
  font-size: 2.3rem;
  animation: walkerBob 0.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.walker-tag {
  background: var(--color-forest);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 2px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

@keyframes walkerBob {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-6px) rotate(3deg); }
}

@keyframes camperJump {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.3) translateY(-14px); }
}

.trail-family-icons {
  display: flex;
  gap: 4px;
  font-size: 1.4rem;
}

.trail-text {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-forest-dark);
}

/* --- MODAL DIÁLOGO CON EL ANIMAL (PREGUNTAS Y VOZ) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 4px solid var(--color-mint);
}

.dialog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--color-mint-light) 0%, #ffffff 100%);
  border-bottom: 2px solid #e9ecef;
}

.dialog-animal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-animal-icon-large {
  font-size: 3rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.dialog-animal-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-forest-dark);
}

.dialog-animal-sub {
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

.modal-close-btn {
  background: #e9ecef;
  border: none;
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #dee2e6;
  transform: scale(1.1);
}

.dialog-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Área de Habla del Animal */
.animal-speech-stage {
  background: #f8f9fa;
  border-radius: var(--radius-md);
  padding: 18px;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.animal-speaker-avatar {
  font-size: 4rem;
  position: relative;
  flex-shrink: 0;
}

.animal-speaker-avatar.talking {
  animation: talkJiggle 0.25s infinite alternate;
}

.speech-bubble {
  background: #ffffff;
  border: 2px solid var(--color-mint);
  border-radius: 18px;
  padding: 14px 18px;
  position: relative;
  flex: 1;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  color: #212529;
  box-shadow: var(--shadow-sm);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 24px;
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent var(--color-mint) transparent transparent;
}

.speech-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.repeat-voice-btn {
  background: var(--color-sun);
  color: #212529;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

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

/* Lista de Preguntas */
.questions-section h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-forest);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.questions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-btn {
  background: #ffffff;
  border: 2px solid #ced4da;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-forest-dark);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  min-height: 54px;
}

.question-btn:hover {
  border-color: var(--color-mint);
  background: var(--color-mint-light);
  transform: translateX(4px);
}

.question-btn.active {
  border-color: var(--color-mint);
  background: var(--color-mint-light);
  box-shadow: 0 0 0 2px var(--color-mint);
}

.question-icon {
  font-size: 1.4rem;
}

/* Mini Juego de Adivinanza (4-6 años) */
.quiz-box {
  background: #fff8e7;
  border: 2px solid var(--color-sun);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
}

.quiz-question-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #7f4f00;
  margin-bottom: 12px;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-opt-btn {
  background: #ffffff;
  border: 2px solid #e0b06b;
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #495057;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-opt-btn:hover {
  background: #fff3d6;
  border-color: var(--color-sun-orange);
}

.quiz-opt-btn.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

/* --- MODAL PASAPORTE DE LA FAMILIA --- */
.passport-content {
  padding: 24px;
  text-align: center;
}

.passport-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.passport-stamp {
  background: #f8f9fa;
  border: 2px dashed #ced4da;
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.passport-stamp.unlocked {
  background: #e8f5e9;
  border-color: #4caf50;
  border-style: solid;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-sm);
}

.passport-stamp-icon {
  font-size: 2.2rem;
  filter: grayscale(1);
  opacity: 0.4;
}

.passport-stamp.unlocked .passport-stamp-icon {
  filter: grayscale(0);
  opacity: 1;
}

.passport-stamp-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #495057;
}

/* --- ANIMACIONES KEYFRAMES --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes cloudMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(110vw); }
}

@keyframes sceneryScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes roadScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-80px); }
}

@keyframes lakePulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.04); opacity: 1; }
}

@keyframes pulsePill {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.08); }
}

@keyframes talkJiggle {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(4deg); }
  100% { transform: scale(1.05) rotate(-3deg); }
}

/* ==============================================================================
   RESPONSIVIDAD TOTAL PARA TELÉFONOS MÓVILES (TODO EN 1 SOLA PANTALLA)
   ============================================================================== */
.park-zone-tabs {
  display: none;
}

@media (max-width: 768px) {
  /* --- 1. MENÚ SUPERIOR 100% CENTRADO Y COMPACTO --- */
  .top-navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    flex-shrink: 0;
  }
  
  .brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    gap: 6px;
  }

  .brand-badge span {
    font-size: 1.05rem;
    font-weight: 900;
  }

  .brand-icon {
    font-size: 1.25rem;
  }

  .top-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 0 auto;
  }

  .nav-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    font-size: 0.78rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-shrink: 0;
  }

  .nav-btn-icon-only {
    min-width: 32px;
    width: 32px;
    padding: 0;
  }

  /* Ocultar botones de pantalla completa y RQ en teléfonos móviles */
  #nav-qr-btn,
  #nav-fullscreen-btn {
    display: none !important;
  }

  /* --- 2. PANTALLA 1: SELECTOR DE EDAD EN 1 SOLA PANTALLA --- */
  .age-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: 100%;
    max-height: 100%;
    padding: 6px 12px;
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    text-align: center;
  }

  .hero-title-group {
    margin-bottom: 4px;
  }

  .hero-title-group > div:first-child {
    font-size: 1.7rem !important;
    margin-bottom: 2px !important;
  }

  .hero-title {
    font-size: 1.3rem;
    line-height: 1.15;
    margin: 0;
  }

  .hero-subtitle {
    font-size: 0.75rem;
    line-height: 1.25;
    margin-top: 2px;
    max-width: 92%;
  }

  .age-screen-content > div:nth-child(2) {
    font-size: 0.85rem !important;
    margin-bottom: 6px !important;
  }

  .age-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 6px;
  }

  .age-card {
    padding: 8px 4px;
    border-radius: 14px;
    border-width: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }

  .age-card.active {
    transform: translateY(-2px) scale(1.02);
  }

  .age-card-icon {
    font-size: 1.7rem;
    margin-bottom: 2px;
  }

  .age-card-badge {
    font-size: 0.62rem;
    padding: 2px 5px;
    margin-bottom: 4px;
  }

  .age-card-title {
    font-size: 0.88rem;
    margin-bottom: 2px;
    font-weight: 800;
  }

  .age-card-desc {
    font-size: 0.66rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #6c757d;
  }

  .btn-primary {
    min-height: 40px;
    padding: 8px 20px;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
  }

  /* --- 3. PANTALLA 2: CONFIGURACIÓN FAMILIAR EN 1 SOLA PANTALLA --- */
  .family-screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: 100%;
    max-height: 100%;
    padding: 6px 10px;
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
    text-align: center;
  }

  .family-header {
    margin-bottom: 4px;
  }

  .family-header h2 {
    font-size: 1.1rem;
    line-height: 1.2;
    margin: 0;
  }

  .family-header p {
    font-size: 0.72rem;
    margin: 2px 0 0 0 !important;
  }

  .family-car-preview {
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
  }

  .car-scene-container {
    gap: 4px;
  }

  .car-icon-large {
    font-size: 2rem;
  }

  .car-scene-container > div:nth-child(2) {
    font-size: 0.8rem !important;
  }

  .car-passengers-badge-list {
    gap: 4px;
  }

  .passenger-pill {
    padding: 2px 8px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    max-width: 440px;
    margin-bottom: 6px;
  }

  .family-member-card {
    padding: 6px 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .member-avatar {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }

  .member-role {
    font-size: 0.68rem;
  }

  .member-name-input {
    padding: 2px 6px;
    font-size: 0.78rem;
    height: 26px;
  }

  .member-toggle-btn {
    font-size: 1.1rem;
    padding: 2px;
  }

  .btn-secondary {
    min-height: 38px;
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  /* --- 4. PANTALLA 3: VIAJE EN AUTO TOTALMENTE DESPEJADO --- */
  .road-trip-stage {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .scenic-sky {
    height: 36%;
  }

  .trip-sky-badge {
    top: 6px;
    padding: 4px 12px;
    font-size: 0.78rem;
  }

  .road-surface {
    flex: 1;
    min-height: 0;
  }

  .trip-footer-bar {
    padding: 6px 10px;
    gap: 6px;
  }

  .trip-footer-btn {
    height: 34px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .trip-footer-btn-arrive {
    height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .trip-car-body {
    font-size: clamp(4rem, 15vw, 6rem);
  }

  /* --- 5. PANTALLA 4: EXPLORADOR DEL PARQUE EN 1 SOLA PANTALLA --- */
  .park-explorer-stage {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .park-sky-band {
    height: 26px;
    min-height: 26px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }

  .park-zone-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
    z-index: 70;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    margin: 2px auto;
    width: fit-content;
  }

  .zone-tab-btn {
    background: #ffffff;
    border: 1.5px solid var(--color-mint);
    border-radius: var(--radius-full);
    padding: 3px 8px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--color-forest);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
  }

  .zone-tab-btn.active {
    background: var(--color-forest);
    color: #ffffff;
    border-color: var(--color-forest);
    transform: scale(1.04);
  }

  .park-landscape {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    grid-template-rows: 1fr;
    gap: 4px;
    padding: 4px 6px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }

  .zone-forest-left, .zone-lake-center, .zone-meadow-right {
    min-height: 0 !important;
    height: 100%;
    position: relative;
    border-radius: 14px;
    padding: 4px;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Vistas enfocadas por zona en teléfono */
  .park-landscape.show-zone-forest .zone-forest-left {
    grid-column: 1 / span 3;
    width: 100%;
    height: 100%;
    display: block;
  }
  .park-landscape.show-zone-forest .zone-lake-center,
  .park-landscape.show-zone-forest .zone-meadow-right {
    display: none;
  }

  .park-landscape.show-zone-lake .zone-lake-center {
    grid-column: 1 / span 3;
    width: 100%;
    height: 100%;
    display: flex;
  }
  .park-landscape.show-zone-lake .zone-forest-left,
  .park-landscape.show-zone-lake .zone-meadow-right {
    display: none;
  }

  .park-landscape.show-zone-meadow .zone-meadow-right {
    grid-column: 1 / span 3;
    width: 100%;
    height: 100%;
    display: block;
  }
  .park-landscape.show-zone-meadow .zone-forest-left,
  .park-landscape.show-zone-meadow .zone-lake-center {
    display: none;
  }

  .zone-label-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    top: 4px;
    left: 4px;
  }

  /* Coordenadas separadas anticolición para móviles en vista panorámica */
  .spot-buho { top: 6%; left: 12%; }
  .spot-carpintero { top: 32%; right: 10%; }
  .spot-ardilla { top: 56%; left: 12%; }
  .spot-oso { bottom: 6%; right: 12%; }

  .spot-pato { top: 8%; left: 14%; }
  .spot-cisne { top: 20%; right: 12%; }
  .spot-trucha { top: 46%; left: 40%; }
  .spot-rana { bottom: 8%; left: 10%; }
  .spot-nutria { bottom: 8%; right: 12%; }

  .spot-ciervo { top: 6%; left: 12%; }
  .spot-zorro { top: 32%; right: 10%; }
  .spot-erizo { top: 56%; left: 12%; }
  .spot-tortuga { bottom: 6%; right: 12%; }

  /* Coordenadas amplias y holgadas para vista de zona enfocada */
  .park-landscape.show-zone-forest .spot-buho { top: 10%; left: 22%; }
  .park-landscape.show-zone-forest .spot-carpintero { top: 32%; right: 22%; }
  .park-landscape.show-zone-forest .spot-ardilla { top: 56%; left: 22%; }
  .park-landscape.show-zone-forest .spot-oso { bottom: 10%; right: 24%; }

  .park-landscape.show-zone-lake .spot-pato { top: 12%; left: 22%; }
  .park-landscape.show-zone-lake .spot-cisne { top: 22%; right: 20%; }
  .park-landscape.show-zone-lake .spot-trucha { top: 46%; left: 45%; }
  .park-landscape.show-zone-lake .spot-rana { bottom: 12%; left: 18%; }
  .park-landscape.show-zone-lake .spot-nutria { bottom: 12%; right: 20%; }

  .park-landscape.show-zone-meadow .spot-ciervo { top: 10%; left: 22%; }
  .park-landscape.show-zone-meadow .spot-zorro { top: 32%; right: 22%; }
  .park-landscape.show-zone-meadow .spot-erizo { top: 56%; left: 22%; }
  .park-landscape.show-zone-meadow .spot-tortuga { bottom: 10%; right: 24%; }

  .park-tree {
    opacity: 0.35 !important;
    pointer-events: none !important;
  }

  .animal-avatar-bubble {
    width: 40px;
    height: 40px;
    font-size: 1.45rem;
    border-width: 2px;
  }

  .park-landscape[class*="show-zone-"] .animal-avatar-bubble {
    width: 54px;
    height: 54px;
    font-size: 2rem;
  }

  .animal-name-tag {
    font-size: 0.58rem;
    padding: 1px 4px;
    margin-top: 1px;
    white-space: nowrap;
    border-radius: 4px;
  }

  .family-walking-trail {
    height: 40px;
    min-height: 40px;
    flex-shrink: 0;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow: hidden;
  }

  .family-walking-trail > div:first-child {
    font-size: 0.72rem !important;
  }

  .family-walker-item {
    padding: 2px 5px;
    gap: 3px;
  }

  .walker-avatar {
    font-size: 1rem;
    width: 22px;
    height: 22px;
  }

  .walker-tag {
    font-size: 0.65rem;
  }

  /* --- 6. VENTANAS MODALES ADAPTADAS A 1 PANTALLA --- */
  .modal-overlay {
    padding: 8px;
  }

  .modal-dialog-box {
    max-height: 92dvh;
    padding: 12px;
    border-radius: 20px;
  }

  .dialog-modal-header {
    padding: 8px 12px;
  }

  .dialog-animal-icon-large {
    font-size: 2rem;
  }

  .dialog-animal-name {
    font-size: 1.15rem;
  }

  .dialog-animal-sub {
    font-size: 0.72rem;
  }

  .dialog-modal-body {
    padding: 10px;
    gap: 8px;
  }

  .animal-speaker-avatar {
    width: 46px;
    height: 46px;
    font-size: 1.8rem;
  }

  .speech-bubble {
    font-size: 0.84rem;
    padding: 8px 10px;
    min-height: 44px;
  }

  .repeat-voice-btn {
    padding: 3px 8px;
    font-size: 0.74rem;
  }

  .questions-section h4 {
    font-size: 0.8rem;
    margin: 4px 0;
  }

  .question-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
    min-height: 34px;
    gap: 6px;
  }

  .passport-content {
    padding: 12px 8px;
  }

  .passport-badge-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin: 10px 0;
  }

  .passport-stamp {
    padding: 6px 2px;
    gap: 2px;
  }

  .passport-stamp-icon {
    font-size: 1.6rem;
  }

  .passport-stamp-name {
    font-size: 0.68rem;
  }
}

/* En teléfonos en modo horizontal (Landscape) */
@media (max-height: 520px) and (orientation: landscape) {
  .top-navbar {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 2px 8px;
  }

  .brand-badge {
    width: auto;
    margin: 0;
  }

  .brand-badge span {
    font-size: 0.95rem;
  }

  .top-actions {
    width: auto;
    margin: 0;
    gap: 4px;
  }

  .nav-btn {
    height: 28px;
    min-width: 28px;
    padding: 0 6px;
    font-size: 0.75rem;
  }

  .nav-btn-icon-only {
    min-width: 28px;
    width: 28px;
  }

  /* Ocultar botones de pantalla completa y RQ en teléfonos móviles horizontal */
  #nav-qr-btn,
  #nav-fullscreen-btn {
    display: none !important;
  }

  .park-zone-tabs {
    display: none;
  }

  .park-landscape {
    display: grid !important;
    grid-template-columns: 1fr 1.3fr 1fr !important;
  }

  .zone-forest-left, .zone-lake-center, .zone-meadow-right {
    display: block !important;
  }

  /* Viaje en auto en landscape */
  .scenic-sky {
    height: 30%;
  }

  .trip-sky-badge {
    top: 2px;
    padding: 2px 10px;
    font-size: 0.72rem;
  }

  .trip-footer-bar {
    padding: 4px 8px;
    gap: 6px;
  }

  .trip-footer-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .trip-footer-btn-arrive {
    height: 30px;
    padding: 0 10px;
    font-size: 0.75rem;
  }
}

/* --- ESTILOS DEL BOTÓN DE IDIOMA --- */
#nav-lang-btn {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  border-color: #38bdf8;
  color: #0369a1;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#nav-lang-btn:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-color: #0284c7;
}

/* --- ESTILOS DEL BOTÓN Y MODAL DE CÓDIGO QR --- */
#nav-qr-btn {
  background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
  border-color: var(--color-mint);
  color: var(--color-forest);
}

#nav-qr-btn:hover {
  background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 100%);
  border-color: var(--color-forest);
  transform: translateY(-2px);
}

@media (max-width: 680px) {
  .desktop-only,
  #nav-qr-btn,
  #nav-fullscreen-btn {
    display: none !important;
  }
}



/* ==========================================================================
   Mobile UI/UX Enhancements for Family Adventure
   ========================================================================== */
@media (max-width: 640px) {
  /* Prevent Entrar al Parque button text cutoff */
  .road-trip-footer {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    padding: 6px !important;
    height: auto !important;
  }

  .trip-footer-btn-arrive {
    min-width: 180px !important;
    padding: 0 16px !important;
    height: 44px !important;
    font-size: 0.9rem !important;
  }

  .trip-footer-btn {
    padding: 0 12px !important;
    height: 38px !important;
    font-size: 0.8rem !important;
  }

  /* Separate animal map pins to avoid overlap */
  .park-landscape.show-zone-lake .spot-rana,
  .spot-rana {
    bottom: 22% !important;
    left: 8% !important;
  }

  .park-landscape.show-zone-lake .spot-nutria,
  .spot-nutria {
    bottom: 8% !important;
    right: 8% !important;
  }

  /* Make bottom family walking trail fit within phone screen */
  .family-walking-trail {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 10px auto !important;
    max-width: 96% !important;
    padding: 6px 10px !important;
  }

  .family-walkers-row {
    gap: 8px !important;
  }

  .family-walker-item .walker-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  .family-walker-item .walker-tag {
    font-size: 10px !important;
  }

  .park-container,
  #game-container {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* ==========================================================================
   FAMILY ADVENTURE MOBILE FIT & COLLISION FIXES
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent header collision with floating back button by giving it dedicated top clearance */
  .top-navbar {
    margin-top: 34px !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
    align-items: center !important;
    gap: 6px !important;
  }
  
  .brand-badge {
    justify-content: flex-start !important;
    margin: 0 !important;
    width: auto !important;
    text-align: left !important;
  }

  .brand-badge span {
    font-size: 0.88rem !important;
  }

  /* Trip Footer Button '¡Entrar al Parque! 🏞️' Text Fix */
  .trip-footer-bar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    height: auto !important;
    padding: 8px !important;
  }

  .trip-footer-btn-arrive {
    width: 100% !important;
    min-width: 100% !important;
    height: 44px !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    order: -1 !important;
    padding: 0 16px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .trip-footer-btn-arrive span {
    display: inline-block !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .trip-footer-bar .trip-footer-btn {
    flex: 1 !important;
    height: 38px !important;
  }
}


/* ==========================================================================
   FAMILY ADVENTURE DEFINITION & TRIP ARRIVE BUTTON VISIBILITY FIX
   ========================================================================== */
:root {
  --color-leaf: #2d6a4f;
}

.trip-footer-btn-arrive {
  background: #2d6a4f !important;
  background: linear-gradient(135deg, #40916c 0%, #1b4332 100%) !important;
  color: #ffffff !important;
}

.trip-footer-btn-arrive span {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}
