/* ═══ Montar la aventura (montar.html) ══════════════════════════════════════
   Un asistente de pasos, para el móvil del adulto o el ordenador. Toma los
   colores de la aventura elegida (montar.js pone las variables). */

body.montar { padding-bottom: 110px; transition: background-color .5s; }
.montar-cuerpo { max-width: 640px; }

/* ── la cabecera con los pasos ── */
.cabeza-montar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.cabeza-montar.terminada .atras, .cabeza-montar.terminada .cuenta-paso { visibility: hidden; }
.atras {
  width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--linea);
  background: var(--tinta-2); color: var(--texto); font-size: 20px; cursor: pointer;
}
.cuenta-paso { font-family: var(--mono); font-size: 13px; color: var(--texto-tenue); width: 34px; text-align: right; }
.puntos-pasos { flex: 1; display: flex; margin: 0; padding: 0; list-style: none; justify-content: space-between; }
.puntos-pasos li { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; font-size: 10px; color: var(--texto-tenue); }
.puntos-pasos li::before {
  content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 3px; background: var(--linea);
}
.puntos-pasos li:first-child::before { display: none; }
.puntos-pasos li.hecho::before, .puntos-pasos li.ahora::before { background: var(--ambar); }
.puntos-pasos li i {
  position: relative; width: 15px; height: 15px; border-radius: 50%; background: var(--tinta-2);
  border: 3px solid var(--linea); transition: all .3s;
}
.puntos-pasos li.hecho i { background: var(--ambar); border-color: var(--ambar); }
.puntos-pasos li.ahora i { border-color: var(--ambar); box-shadow: 0 0 0 5px rgba(var(--ambar-rgb), .25); transform: scale(1.15); }
.puntos-pasos li span { margin-top: 5px; letter-spacing: .03em; }
.puntos-pasos li.ahora span { color: var(--ambar); font-weight: 700; }
@media (max-width: 420px) { .puntos-pasos li span { display: none; } }

/* ── cada paso ── */
.paso-montar.entra { animation: paso-entra .38s cubic-bezier(.2, .8, .3, 1) both; }
.paso-montar.entra-atras { animation: paso-entra-atras .38s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes paso-entra { from { opacity: 0; transform: translateY(18px) scale(.98); } }   /* en vertical: de lado ensancharía la página en el móvil */
@keyframes paso-entra-atras { from { opacity: 0; transform: translateY(-18px) scale(.98); } }
.cabecera-paso { text-align: center; margin: 22px 0 18px; }
.emoji-paso { display: inline-block; font-size: 46px; animation: emoji-flota 3s ease-in-out infinite; }
@keyframes emoji-flota { 50% { transform: translateY(-6px) rotate(-6deg); } }
.cabecera-paso h1 { font-family: var(--titulos); font-size: 28px; margin: 6px 0 4px; color: var(--texto); }
.cabecera-paso p { margin: 0; color: var(--texto-tenue); font-size: 15px; }
.ayuda { font-size: 13px; color: var(--texto-tenue); line-height: 1.4; margin-top: 5px; }

/* ── el pie con el botón grande ── */
.pie-montar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--tinta) 40%);
}
.pie-montar .boton { display: block; box-sizing: border-box; width: 100%; max-width: 608px; margin: 0 auto; font-size: 18px; padding: 17px; text-align: center; font-weight: 800;
  box-shadow: 0 10px 30px rgba(var(--ambar-rgb), .35); transition: opacity .2s, transform .2s; }
.pie-montar .boton.apagado { opacity: .5; box-shadow: none; }
.pie-montar .boton.final { animation: late-boton 1.8s ease-in-out infinite; }
.pie-montar .boton.cargando { animation: none; opacity: .8; }
@keyframes late-boton { 50% { box-shadow: 0 10px 40px rgba(var(--ambar-rgb), .7); transform: scale(1.015); } }

.aviso-flotante {
  position: fixed; left: 50%; bottom: 96px; z-index: 30; transform: translateX(-50%); width: min(92vw, 520px);
  padding: 13px 16px; border-radius: 14px; background: #2a1414; border: 1px solid var(--rojo); color: #ffd9d4;
  font-size: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.aviso-flotante.entra { animation: aviso-sube .3s ease-out both; }
@keyframes aviso-sube { from { opacity: 0; transform: translate(-50%, 20px); } }

/* ── 1 · aventuras ── */
.aventuras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .aventuras { grid-template-columns: 1fr; } }
.aventura {
  position: relative; padding: 0; border-radius: 18px; overflow: hidden; cursor: pointer; text-align: left;
  border: 2px solid var(--l); background: var(--f); color: var(--t);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.aventura:hover { transform: translateY(-3px); }
.aventura.elegida { border-color: var(--a); box-shadow: 0 0 0 4px var(--a), 0 14px 34px rgba(0, 0, 0, .5); transform: scale(1.02); }
.aventura .ilustracion svg { display: block; width: 100%; height: auto; }
.aventura .ilustracion { transition: transform 4s ease; }
.aventura:hover .ilustracion, .aventura.elegida .ilustracion { transform: scale(1.06); }
.texto-aventura { padding: 12px 14px 15px; display: flex; flex-direction: column; gap: 3px; position: relative; background: var(--f); }
.nombre-aventura { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--a); }
.texto-aventura b { font-size: 19px; line-height: 1.15; }
.gancho { font-family: var(--sans); font-size: 13.5px; line-height: 1.4; opacity: .8; }
.marca-elegida {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--a); color: var(--f); font-weight: 900; font-size: 18px;
  transform: scale(0); transition: transform .3s cubic-bezier(.2, 1.8, .4, 1);
}
.aventura.elegida .marca-elegida { transform: scale(1); }

/* ── 2 · equipo ── */
.equipo { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.jugador-tarjeta {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 12px 14px; border-radius: 18px; background: var(--tinta-2); border: 1px solid var(--linea);
}
.retrato-montar svg { display: block; border-radius: 50%; box-shadow: 0 0 0 3px var(--ambar), 0 8px 18px rgba(0, 0, 0, .4); }
.nombre-jugador { text-align: center; font-family: var(--sans); font-size: 17px; font-weight: 700; padding: 10px; }
.quitar {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--linea);
  background: transparent; color: var(--texto-tenue); font-size: 18px; cursor: pointer;
}
.jugador-tarjeta.anadir {
  justify-content: center; min-height: 250px; border: 2px dashed var(--linea); background: transparent;
  color: var(--texto-tenue); font-size: 16px; cursor: pointer;
}
.jugador-tarjeta.anadir span { font-size: 46px; line-height: 1; color: var(--ambar); }

.si-no { display: flex; border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; }
.si-no button {
  flex: 1; padding: 11px 14px; border: 0; background: var(--tinta-2); color: var(--texto-tenue);
  font-family: var(--sans); font-size: 15px; cursor: pointer; transition: background .2s, color .2s;
}
.si-no button.activo { background: var(--ambar); color: var(--sobre-acento); font-weight: 800; }
.pequeno-si-no { width: 100%; }
.edad-menor { margin-top: 14px; }
.edad-menor .si-no button { padding: 13px 6px; font-size: 16px; }
.pequeno-si-no button { padding: 8px; font-size: 14px; }

.pasador { display: flex; align-items: center; gap: 6px; }
.pasador button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--linea); background: var(--tinta);
  color: var(--ambar); font-size: 22px; font-weight: 700; cursor: pointer;
}
.pasador button:active { transform: scale(.9); }
.pasador output { min-width: 30px; text-align: center; font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--texto); }
.pasador span { font-size: 13px; color: var(--texto-tenue); }

/* ── 3 · casa ── */
.pregunta-casa { font-weight: 700; font-size: 17px; margin-bottom: 12px; color: var(--texto); }
.pregunta-casa small { display: block; font-weight: 400; font-size: 13px; color: var(--texto-tenue); margin-top: 3px; }
.animales { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 10px; }
.animal {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 14px;
  border: 1px solid var(--linea); background: var(--tinta); color: var(--texto-tenue); font-size: 12.5px; cursor: pointer;
}
.animal span { font-size: 30px; line-height: 1.1; }
.animal.activo { border-color: var(--ambar); background: rgba(var(--ambar-rgb), .14); color: var(--texto); box-shadow: 0 0 0 2px var(--ambar); }
.sugerencias { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.sugerencia {
  padding: 7px 12px; border-radius: 20px; border: 1px solid var(--linea); background: var(--tinta);
  color: var(--texto-tenue); font-size: 13px; cursor: pointer;
}
.sugerencia:active { background: var(--ambar); color: var(--sobre-acento); }
.casilla-legal { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.casilla-legal input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--ambar); }
.casilla-legal a { color: var(--ambar); }

/* ── 4 · escondites ── */
.barra-escondites {
  position: sticky; top: 62px; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 12px; border-radius: 16px; background: var(--tinta-2);
  border: 1px solid var(--linea); box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.anillo { position: relative; width: 48px; height: 48px; flex: none; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 5; }
.fondo-anillo { stroke: var(--linea); }
.lleno-anillo { stroke: var(--ambar); stroke-linecap: round; stroke-dasharray: 0 200; transition: stroke-dasharray .35s; }
.anillo b { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--mono); font-size: 17px; }
.anillo.completo .lleno-anillo { stroke: var(--verde); }
.anillo.completo { animation: salta .6s ease; }

.habitacion { margin-bottom: 16px; }
.titulo-habitacion { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin: 0 0 8px 2px; color: var(--texto); }
.titulo-habitacion span { font-size: 22px; }
.titulo-habitacion small {
  margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ambar); color: var(--sobre-acento); font-size: 13px;
}
.titulo-habitacion small:empty { display: none; }
.sitios { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.sitio {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px 10px;
  min-height: 98px; border-radius: 16px; border: 1px solid var(--linea); background: var(--tinta-2);
  color: var(--texto); cursor: pointer; transition: transform .15s, background .2s, border-color .2s, opacity .2s;
}
.sitio:active { transform: scale(.95); }
.icono-sitio { font-size: 32px; line-height: 1.1; transition: transform .25s; }
.nombre-sitio { font-size: 12.5px; line-height: 1.25; text-align: center; color: var(--texto-tenue); }
.sitio.elegido { background: rgba(var(--ambar-rgb), .18); border-color: var(--ambar); box-shadow: 0 0 0 2px var(--ambar), 0 8px 18px rgba(var(--ambar-rgb), .2); }
.sitio.elegido .nombre-sitio { color: var(--texto); font-weight: 700; }
.sitio.elegido .icono-sitio { transform: scale(1.12); }
.sitio.elegido::after {
  content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ambar); color: var(--sobre-acento); font-size: 13px; font-weight: 900;
}
.sitio.apagado { opacity: .35; }
.sitio.ojo { border-color: var(--rojo); box-shadow: 0 0 0 2px var(--rojo); }
.ojo-sitio { position: absolute; top: 6px; left: 8px; font-size: 14px; }

/* ── 5 · repaso ── */
.resumen { padding: 14px; border-radius: 18px; background: var(--tinta-2); border: 1px solid var(--linea); margin-bottom: 12px; }
.resumen-aventura { display: flex; align-items: center; gap: 12px; }
.resumen-aventura b { display: block; font-family: var(--titulos); font-size: 19px; color: var(--texto); }
.mini-escena { width: 110px; flex: none; border-radius: 10px; overflow: hidden; }
.mini-escena svg { display: block; width: 100%; height: auto; }
.resumen-equipo { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.resumen-equipo div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; }
.resumen-equipo svg { border-radius: 50%; }
.resumen-casa { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.resumen-casa span { padding: 6px 11px; border-radius: 20px; background: var(--tinta); font-size: 13.5px; }
.ajustes .ajuste { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ajustes .ajuste + .ajuste { border-top: 1px solid var(--linea); padding-top: 14px; margin-top: 6px; }
.ajustes .si-no { flex: none; }
.titulo-camino { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; font-size: 18px; }
.camino-montar { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.camino-montar::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; border-left: 3px dashed var(--linea); }
.etapa {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 0; margin-bottom: 8px;
  border-radius: 14px; cursor: pointer; transition: background .2s;
}
.etapa.marcada { background: rgba(var(--ambar-rgb), .16); box-shadow: 0 0 0 2px var(--ambar); }
.num-etapa {
  position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--ambar); color: var(--sobre-acento); font-family: var(--mono); font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 4px var(--tinta);
}
.icono-etapa { font-size: 26px; line-height: 36px; }
.etapa b { display: block; color: var(--texto); font-size: 15.5px; padding-top: 7px; }
.para-etapa { font-size: 12px; color: var(--texto-tenue); margin-top: 2px; }
.pista-etapa { font-size: 13.5px; font-style: italic; color: var(--ambar); margin-top: 5px; line-height: 1.4; }

/* ── terminado ── */
.lista-hecha { text-align: center; padding: 26px 0 10px; }
.sello-lista {
  width: 110px; height: 110px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 54px;
  background: radial-gradient(circle at 35% 30%, #fff6c8, var(--ambar)); box-shadow: 0 0 50px rgba(var(--ambar-rgb), .6);
  animation: trofeo-cae .8s cubic-bezier(.2, 1.4, .4, 1) both;
}
.lista-hecha h1 { font-family: var(--titulos); font-size: 32px; margin: 16px 0 4px; color: var(--texto); }
.lista-hecha p { margin: 0; color: var(--texto-tenue); }
.tres-pasos { list-style: none; padding: 0; margin: 18px 0 0; }
.tres-pasos li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; animation: paso-entra .5s ease both; }
.tres-pasos li:nth-child(2) { animation-delay: .12s; }
.tres-pasos li:nth-child(3) { animation-delay: .24s; }
.tres-pasos b { font-size: 18px; color: var(--texto); }
.tres-pasos p { margin: 3px 0 10px; font-size: 14px; color: var(--texto-tenue); line-height: 1.4; }
.num-grande {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--ambar); color: var(--sobre-acento); font-family: var(--mono); font-weight: 900; font-size: 22px;
}
.enlace-suave { display: block; margin-top: 10px; font-size: 14px; color: var(--texto-tenue); }
.enlace-ninos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 11px; border-radius: 12px; background: var(--tinta); }
.enlace-ninos .etiqueta { width: 100%; }
.enlace-ninos .mono { flex: 1; min-width: 0; word-break: break-all; color: var(--ambar); font-size: 14px; }
.guarda p { margin: 6px 0 0; line-height: 1.55; font-size: 14px; color: var(--texto-tenue); }
.guarda .mono { color: var(--ambar); }
.ultima { display: flex; align-items: center; gap: 12px; margin-top: 12px; border-color: var(--ambar); }
.ultima > span { font-size: 28px; }
.privacidad { margin: 26px 0 0; font-size: 12px; color: var(--texto-tenue); line-height: 1.5; }
.privacidad a { color: inherit; }
a.boton { text-decoration: none; }
.barra-escondites .boton, .titulo-camino .boton { width: auto; flex: none; white-space: nowrap; margin: 0; }
.etapa.salida { cursor: default; opacity: .85; }
.etapa.salida .num-etapa { background: var(--tinta-2); color: var(--ambar); border: 2px solid var(--ambar); }

@media (prefers-reduced-motion: reduce) {
  .paso-montar.entra, .paso-montar.entra-atras, .emoji-paso, .pie-montar .boton.final, .tres-pasos li { animation: none; }
}
