/* Pantalla del mapa del mundo */
.pantalla.mapa { display: block; padding: 0; min-height: 0; height: 100vh; height: 100dvh; background: #1E3B2A; position: relative; overflow: hidden; }
.pantalla.mapa[hidden] { display: none; }
/* En pantallas anchas (tablet en horizontal, ordenador), los lados se rellenan con el bosque desenfocado */
.pantalla.mapa::before {
  content: ""; position: absolute; inset: -40px;
  background: var(--fondo-mapa, none) center / cover; filter: blur(24px) brightness(.6);
}
#mapa-scroll { position: relative; }
/* Botón de padres: se llena mientras se mantiene pulsado */
.btn-padres { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.btn-padres::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--hoja); }
.btn-padres.cargando::after { width: 100%; transition: width 2s linear; }
.botones-padres { display: grid; gap: 4px; }
.botones-padres .btn { font-size: 18px; min-height: 52px; text-align: left; }

.mapa-barra {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(20, 45, 30, .85), rgba(20, 45, 30, 0));
  pointer-events: none;
}
.mapa-barra h1 { color: #fff; font-size: 30px; margin: 0; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.mapa-barra button { pointer-events: auto; }
.btn-padres {
  min-height: 48px; padding: 0 16px; border: none; border-radius: 16px;
  background: rgba(255, 251, 242, .92); color: var(--tinta); font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}

/* Hueco abajo para que el bocadillo de Luxi no tape la primera aventura */
#mapa-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 120px; }
/* En el móvil el mapa es más ancho que la pantalla (se recortan los lados) para que se vea grande */
#mapa-lienzo { position: relative; width: min(max(100%, 85vh), 720px); left: 50%; transform: translateX(-50%); }
#mapa-img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

/* Paradas del camino */
.parada {
  position: absolute; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid #fff; padding: 0;
  font-family: var(--letra-titulo); font-weight: 800; font-size: 22px; line-height: 1;
  color: #fff; background: #6B4423;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  z-index: 3;
}
.parada.hecha { background: var(--sol); color: #7A4B00; font-size: 26px; }
.parada.hoy {
  width: 62px; height: 62px; font-size: 28px; background: var(--coral); z-index: 4;
  animation: latir 1.6s ease-in-out infinite;
}
.parada.futura { background: rgba(60, 40, 25, .75); border-color: rgba(255, 255, 255, .7); color: rgba(255, 255, 255, .85); }
.parada:active { transform: translate(-50%, -50%) scale(.92); }

/* Luxi y su bocadillo */
#lumi {
  position: absolute; z-index: 2; width: 18%; max-width: 130px;
  transform: translateY(-78%); background: none; border: none; padding: 0;
  transition: left .6s, top .6s;
}
/* El niño en el mapa: retrato redondo encima de la aventura de hoy */
.yo { position: absolute; z-index: 5; width: 16%; max-width: 96px; transform: translate(-50%, -128%); pointer-events: none; }
.yo img { animation: flotar 3s ease-in-out infinite; }
.yo[hidden] { display: none; }
.yo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid var(--sol); background: #fff; box-shadow: 0 6px 12px rgba(0, 0, 0, .35); }
.yo::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -10px; border: 10px solid transparent; border-top-color: var(--sol); border-bottom: 0; }
/* Cuando el guía es alguien de la familia (dibujo o foto): retrato redondo con borde */
img.guia-familia { aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: 0 6px 12px rgba(0, 0, 0, .3); }
#lumi img { width: 100%; display: block; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); animation: flotar 3s ease-in-out infinite; }
#lumi-dice {
  position: absolute; left: 12px; right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 6;
  width: min(600px, calc(100% - 24px)); margin: 0 auto;
  background: var(--papel); color: var(--tinta); border-radius: 22px; padding: 14px 18px;
  font-size: 21px; font-weight: 700; line-height: 1.35; text-align: center;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
}
#lumi-dice.nuevo { animation: aparecer .35s cubic-bezier(.3, 1.4, .5, 1) both; }

@keyframes latir {
  0%, 100% { box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 201, 60, .9); }
  50% { box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 0 16px rgba(255, 201, 60, 0); }
}

/* Fondo de las pantallas de la cuenta: el bosque, un poco oscurecido para que se lea bien la tarjeta */
body { background: #1E3B2A; }
.fondo-bosque {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 214, 120, .55), transparent 70%),
    radial-gradient(ellipse 120% 60% at 50% 110%, #2F7A4B, transparent 70%),
    linear-gradient(180deg, #8FD3E8 0%, #BFE6C9 55%, #5FAF6E 100%);
}
.lumi-portada { display: block; width: 130px; margin: -70px auto 0; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); animation: flotar 3s ease-in-out infinite; }
[data-p="entrar"] .tarjeta { margin-top: 70px; }
