﻿/* ============================================================
   El viaje de la cigÃ¼eÃ±a MarÃ­a â€” estilos (JAM STUDIO)
   Paleta cÃ¡lida tipo pasaporte: verde Las Rozas, crema y terracota.
   Todo en rem para que los 3 tamaÃ±os de letra escalen bien.
   ============================================================ */

:root {
  --verde: #1d4e46;
  --verde-claro: #2f7d6b;
  --verde-suave: #e2efe9;
  --crema: #f7f0dd;
  --crema-2: #fbf7ec;
  --tinta: #253029;
  --tinta-suave: #55645c;
  --terracota: #c1592f;
  --dorado: #d9a441;
  --blanco: #ffffff;
  --sombra: 0 10px 30px rgba(29, 78, 70, 0.18);
  --radio: 20px;
}

html { font-size: 17px; scroll-behavior: smooth; }
html[data-tam="grande"] { font-size: 20px; }
html[data-tam="xl"] { font-size: 24px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--tinta);
  background:
    linear-gradient(180deg, rgba(12,31,62,.30) 0%, rgba(12,31,62,.12) 45%, rgba(8,20,40,.42) 100%),
    url("../img/fondo-rozas.jpg") center top / cover no-repeat #0c1f3e;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3 { font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; font-weight: 800; line-height: 1.2; margin: 0 0 .4em; }

.skiplink {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--crema); color: var(--verde); padding: .7rem 1rem;
  border-radius: 0 0 12px 0; font-size: 1.1rem;
}
.skiplink:focus { left: 0; }

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem clamp(.7rem, 3vw, 2rem) 3rem;
  outline: none;
}

/* ---------- botones ---------- */
.btn {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: .8rem 1.5rem;
  cursor: pointer;
  background: var(--blanco);
  color: var(--verde);
  box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
  min-height: 52px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.16); }
.btn-verde { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde-claro); }
.btn-crema { background: var(--crema); color: var(--verde); }
.btn:focus-visible, .btn-icono:focus-visible, .sello:focus-visible,
.tecla:focus-visible, .opcion:focus-visible, .op-ajuste:focus-visible {
  outline: 3px solid var(--dorado); outline-offset: 3px;
}

.btn-icono {
  font: inherit; font-size: 1.35rem; line-height: 1;
  width: 52px; height: 52px; min-width: 52px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--verde);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
.btn-icono:hover { background: #fff; }

/* botón de instalar con etiqueta (píldora) */
.btn-instalar {
  width: auto; min-width: 0; border-radius: 999px;
  padding: 0 .9rem; gap: .45rem;
}
.btn-instalar .ico-instalar { font-size: 1.35rem; line-height: 1; }
.btn-instalar .txt-instalar { font-size: .95rem; font-weight: 700; white-space: nowrap; }

/* ---------- marca JAM (arriba, centrada) ---------- */
.marca-jam { display: flex; justify-content: center; margin: 0 auto 1.1rem; }
.logo-jam {
  height: clamp(64px, 12vh, 118px);
  width: auto; max-width: 90%;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.35));
}

/* ---------- cabecera ---------- */
.cabecera {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.cab-marca { display: flex; align-items: center; gap: .8rem; }
.cab-marca h1 { color: #fff; font-size: 1.5rem; margin: 0; text-shadow: 0 1px 3px rgba(0,0,0,.7), 0 3px 10px rgba(0,0,0,.5); }
.cab-marca p { margin: 0; color: #eaf1fb; font-size: .95rem; opacity: .96; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.cab-acciones { display: flex; gap: .5rem; }

/* ---------- la cigüeña ---------- */
.ciguena { display: block; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.22)); }
.ciguena-mini { width: 60px; min-width: 60px; height: 60px; }
.ciguena-media { width: 160px; max-width: 60%; height: auto; max-height: 200px; margin: 0 auto .55rem; }

/* ---------- saludo ---------- */
.saludo { display: grid; gap: .8rem; margin-bottom: 1.4rem; justify-items: start; }
.bocadillo {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--crema-2);
  border: 2px solid rgba(29,78,70,.15);
  border-radius: var(--radio);
  padding: 1rem 1.2rem;
  box-shadow: var(--sombra);
  position: relative;
}
.bocadillo .texto { font-size: 1.1rem; }
.bocadillo .texto b { color: var(--terracota); }

/* ---------- pasaporte ---------- */
.pasaporte {
  background: rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 3px solid var(--verde);
  border-radius: 26px;
  padding: 1.2rem;
  box-shadow: var(--sombra), inset 0 0 0 6px rgba(255,255,255,.18);
}
.pasaporte-tapa {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  border-bottom: 2px dashed rgba(29,78,70,.35);
  padding-bottom: .7rem; margin-bottom: 1rem;
}
.pasaporte-titulo {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; font-weight: 700; letter-spacing: .22em;
  color: #fff; font-size: 1.35rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 3px 10px rgba(0,0,0,.5);
}
.pasaporte-sub {
  color: #ffe6c2; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 2px 6px rgba(0,0,0,.45);
}
.pasaporte-progreso {
  margin-left: auto; background: var(--verde); color: #fff;
  padding: .35rem .9rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
}

.sellos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.sello {
  font: inherit; cursor: pointer; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .4rem; border-radius: 16px; position: relative;
}
.sello .sello-circulo {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: #efe7d2;
  border: 3px dashed rgba(29,78,70,.4);
  box-shadow: inset 0 0 0 4px #fff;
  position: relative; overflow: hidden;
  transition: transform .15s;
}
.sello:hover .sello-circulo { transform: scale(1.05); }
.sello-nombre { font-weight: 700; color: #fff; text-align: center; font-size: .9rem; text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 2px 6px rgba(0,0,0,.45); }
.sello-num {
  position: absolute; top: 2px; right: 8px;
  font-size: .8rem; font-weight: 700; color: #fff; opacity: .9;
  text-shadow: 0 1px 3px rgba(0,0,0,.75);
}

.sello.bloqueada .sello-circulo { filter: grayscale(1); opacity: .55; }
.sello.bloqueada .sello-nombre { color: rgba(255,255,255,.72); }

.sello.actual .sello-circulo {
  border: 3px solid var(--terracota); animation: latido 1.6s ease-in-out infinite;
}
.sello.actual .sello-nombre { color: #ffcf9e; }

.sello.sellada .sello-circulo {
  border: 3px solid var(--terracota);
  background-image: var(--foto);
  background-size: cover; background-position: center;
}
.sello.sellada .sello-circulo::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(193,89,47,.15), rgba(29,78,70,.62));
  mix-blend-mode: multiply;
}
.sello.sellada .sello-emoji { position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
@keyframes latido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); } }

.pie { text-align: center; color: var(--crema); opacity: .95; margin-top: 1.6rem; font-size: .9rem; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* ---------- etapa ---------- */
.barra-sup {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: .7rem; margin-bottom: .8rem;
}
.barra-sup > :first-child { justify-self: start; }
.barra-sup > :last-child { justify-self: end; }
.barra-datos { text-align: center; min-width: 0; }
.barra-lugar { color: #fff; font-weight: 700; opacity: .95; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

.hero {
  position: relative; height: clamp(190px, 34vw, 300px);
  border-radius: 24px; overflow: hidden;
  background-size: cover; background-position: center;
  box-shadow: var(--sombra); border: 3px solid rgba(255,255,255,.35);
}
.hero-degradado {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(18,53,47,.85) 0%, rgba(18,53,47,.15) 55%, transparent 100%);
}
.hero-texto {
  position: absolute; left: 0; bottom: 0; padding: 1.1rem 1.3rem;
  display: flex; align-items: center; gap: .7rem; color: #fff;
}
.hero-emoji { font-size: 2.2rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.hero-texto h1 { margin: 0; font-size: clamp(1.3rem, 3.5vw, 2rem); text-shadow: 0 2px 8px rgba(0,0,0,.55); }

.instruccion { margin: 1rem 0; display: grid; gap: .7rem; }
.instruccion .texto { font-size: 1.15rem; }
.instruccion-acciones { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- zona de juego ---------- */
.zona { display: grid; gap: 1rem; }
.consigna {
  font-size: 1.15rem; font-weight: 700; color: var(--verde);
  background: var(--crema); border-radius: 14px; padding: .7rem 1rem; margin: 0;
  border-left: 6px solid var(--dorado);
}
.escenario {
  position: relative; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.5), transparent 40%),
    linear-gradient(160deg, #eaf4ec 0%, #d7e9db 100%);
  border: 3px solid rgba(29,78,70,.18);
  box-shadow: inset 0 4px 18px rgba(29,78,70,.12);
  touch-action: none;
}
.tiembla { animation: tiembla .4s; }
@keyframes tiembla {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* mover / clic / destello */
.blanco-movil, .blanco-clic {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 2.2rem; background: transparent; border: none; cursor: pointer;
  padding: .3rem; border-radius: 50%; transition: transform .12s;
}
.blanco-movil { pointer-events: auto; }
.blanco-clic:hover { transform: translate(-50%,-50%) scale(1.1); }
.blanco-clic { animation: flota 2.4s ease-in-out infinite; }
@keyframes flota { 0%,100% { margin-top: 0; } 50% { margin-top: -12px; } }
.blanco-clic.golpeado { animation: pop .3s forwards; pointer-events: none; }
@keyframes pop { to { transform: translate(-50%,-50%) scale(1.8); opacity: 0; } }

.destello {
  position: absolute; transform: translate(-50%,-50%);
  font-size: 2rem; pointer-events: none; animation: sube .75s ease-out forwards;
}
@keyframes sube { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -140%) scale(1.6); } }

/* arrastrar */
.pieza {
  position: absolute; font-size: 2.2rem; background: transparent; border: none;
  cursor: grab; padding: 0; line-height: 1; touch-action: none;
  transition: filter .15s;
}
.pieza.agarrada { cursor: grabbing; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); }
.cesta {
  position: absolute; right: 6%; bottom: 5%;
  font-size: 3.4rem; display: flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 18px;
  background: rgba(255,255,255,.6); border: 3px dashed var(--verde-claro);
  animation: latido 2s infinite;
}
.cesta-icono { pointer-events: none; }

/* escribir */
.escenario-escribir { display: grid; place-content: center; gap: 1rem; padding: 1.5rem; }
.modelo-palabra { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.letra {
  width: 2.4rem; height: 3rem; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 700; color: var(--tinta-suave);
  background: #fff; border-radius: 10px; border: 2px solid rgba(29,78,70,.2);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.letra.bien { color: #fff; background: var(--verde-claro); border-color: var(--verde); }
.campo {
  font: inherit; font-size: 1.5rem; text-align: center; letter-spacing: .15em;
  padding: .7rem; border-radius: 12px; border: 3px solid var(--verde-claro);
  background: #fff; width: min(80vw, 460px); margin: 0 auto;
}
.campo:focus { outline: 3px solid var(--dorado); outline-offset: 2px; }
.campo.completo { border-color: var(--terracota); background: #fdeee6; }
.escenario-escribir .campo { display: block; }

/* elegir */
.escenario-elegir { padding: 1.3rem; display: grid; gap: 1rem; }
.pregunta { font-size: 1.25rem; font-weight: 700; color: var(--verde); margin: 0; }
.opciones { display: grid; gap: .8rem; }
.opcion {
  font: inherit; font-size: 1.15rem; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.1rem; border-radius: 16px; border: 3px solid rgba(29,78,70,.2);
  background: #fff; color: var(--tinta); min-height: 64px;
  box-shadow: 0 3px 0 rgba(0,0,0,.1);
}
.opcion:hover { border-color: var(--verde-claro); }
.opcion-letra {
  width: 42px; height: 42px; min-width: 42px; border-radius: 50%;
  background: var(--verde-suave); color: var(--verde); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.opcion.correcta { border-color: var(--verde); background: #e6f4ea; animation: latido .6s; }
.opcion.correcta .opcion-letra { background: var(--verde); color: #fff; }
.opcion.fallada { border-color: var(--terracota); background: #fdeee6; }
.opcion.fallada .opcion-letra { background: var(--terracota); color: #fff; }

/* ventanas */
.escenario-ventanas { background: linear-gradient(160deg, #bcd7e0, #7fb0c4); }
.ventana {
  position: absolute; width: 30%; min-width: 190px; max-width: 340px;
  background: #fff; border-radius: 10px 10px 4px 4px; overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  animation: aparece .2s ease-out;
}
@keyframes aparece { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ventana.cerrada { animation: cierra .25s forwards; }
@keyframes cierra { to { transform: scale(.7); opacity: 0; } }
.ventana-barra {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--verde); color: #fff; padding: .25rem .3rem .25rem .7rem;
}
.ventana-titulo { font-size: .9rem; font-weight: 700; }
.ventana-cerrar {
  width: 34px; height: 34px; border: none; cursor: pointer; border-radius: 6px;
  background: var(--terracota); color: #fff; font-size: 1rem; font-weight: 700;
}
.ventana-cerrar:hover { background: #a5461f; }
.ventana-cuerpo { height: 84px; background: repeating-linear-gradient(180deg, #f4f7f8 0 14px, #e7eef0 14px 15px); }

/* teclado */
.escenario-tecla { display: grid; gap: 1rem; padding: 1.2rem; place-content: center; }
.tecla-aviso { text-align: center; font-size: 1.35rem; color: var(--verde); }
.tecla-aviso b { font-size: 1.9rem; background: var(--dorado); color: #3a2c07; padding: 0 .5rem; border-radius: 8px; }
.teclado { display: grid; gap: .5rem; justify-content: center; }
.teclado-fila { display: flex; gap: .5rem; justify-content: center; }
.tecla {
  font: inherit; font-size: clamp(.78rem, 2.4vw, 1.05rem); font-weight: 700; cursor: pointer;
  width: clamp(28px, 7.6vw, 52px); height: clamp(32px, 9vw, 52px); border-radius: 10px;
  border: 2px solid rgba(29,78,70,.25); background: #fff; color: var(--verde);
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
.tecla:hover { background: var(--verde-suave); }
.tecla.bien { background: var(--verde); color: #fff; transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }

.tecla-titulo { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; max-width: 100%; }
.tecla-letra {
  width: clamp(1.5rem, 3.6vw, 2.2rem); height: clamp(1.9rem, 4.6vw, 2.7rem);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: clamp(.95rem, 2.6vw, 1.35rem); color: var(--tinta-suave);
  background: #fff; border-radius: 8px; border: 2px solid rgba(29,78,70,.2);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.tecla-letra.hecha { color: #fff; background: var(--verde-claro); border-color: var(--verde); }
.tecla-letra.siguiente { color: var(--terracota); border-color: var(--dorado); box-shadow: 0 0 0 3px rgba(217,164,65,.5); }
.tecla-espacio { border: none; background: transparent; }

/* buscar */
.escenario-buscar { padding: 1rem; }
.escenario-buscar .navegador { margin: 0; }
.navegador {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 3px solid rgba(29,78,70,.2); box-shadow: var(--sombra);
}
.nav-barra {
  display: flex; align-items: center; gap: .4rem;
  background: #eef2f0; padding: .6rem .8rem;
}
.nav-punto { width: 12px; height: 12px; border-radius: 50%; background: #cdd6d1; }
.nav-punto:nth-child(1) { background: #e57c6b; }
.nav-punto:nth-child(2) { background: #e3c063; }
.nav-punto:nth-child(3) { background: #86c39a; }
.nav-direccion {
  flex: 1; margin-left: .5rem; background: #fff; border-radius: 999px;
  padding: .35rem .9rem; font-size: .95rem; color: var(--tinta-suave);
  border: 1px solid #dfe6e2;
}
.nav-cuerpo { padding: 1.2rem; }
.buscador-falso { display: flex; gap: .6rem; }
.campo-buscar {
  flex: 1; font: inherit; font-size: 1.15rem; padding: .75rem 1rem;
  border-radius: 999px; border: 3px solid var(--verde-claro); background: #fff;
}
.campo-buscar:focus { outline: 3px solid var(--dorado); outline-offset: 2px; }
.btn-buscar {
  font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  border: none; border-radius: 999px; padding: 0 1.4rem;
  background: var(--verde); color: #fff; min-height: 52px;
}
.resultado-falso {
  margin-top: 1rem; padding: 1rem; border-radius: 12px;
  background: var(--verde-suave); border-left: 6px solid var(--verde-claro);
  font-size: 1.15rem; animation: aparece .25s ease-out;
}

/* scroll */
.escenario-scroll { padding: 0; }
.pergamino {
  max-height: 320px; overflow-y: auto; padding: 1.3rem 1.4rem;
  background: repeating-linear-gradient(180deg, #fdf9ef 0 46px, #f6efdd 46px 48px);
  scrollbar-width: thick;
}
.pergamino:focus { outline: none; }
.pergamino-texto { font-size: 1.12rem; color: #3a3a2e; }
.pergamino-fin { display: grid; place-items: center; padding: 1.2rem 0 2rem; }
.maria-escondida {
  font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: 1rem 1.6rem; border-radius: 20px; border: 3px dashed rgba(29,78,70,.4);
  background: #fff; color: var(--verde); opacity: .4; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.maria-escondida.visible { opacity: 1; pointer-events: auto; animation: latido 1.4s infinite; }
.maria-emoji { font-size: 3rem; }
.flecha-scroll {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: rgba(29,78,70,.85); color: #fff; padding: .4rem 1rem; border-radius: 999px;
  font-size: .95rem; animation: flota 1.6s infinite; transition: opacity .3s;
}
.flecha-scroll.oculta { opacity: 0; }

/* ---------- overlay / diÃ¡logos ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18, 45, 40, .68);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: aparece .2s ease-out; overflow-y: auto;
}
.dialogo {
  background: var(--crema-2); border-radius: 26px; padding: 1.6rem;
  max-width: 620px; width: 100%; text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,.4); border: 3px solid var(--verde);
  margin: auto;
}
.dialogo h2 { color: var(--verde); font-size: 1.6rem; }
.dialogo p { font-size: 1.12rem; }
.fila-botones { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: 1.2rem; }

.confeti { font-size: 2rem; letter-spacing: .3rem; animation: flota 1.8s infinite; }
.sello-premio { display: flex; justify-content: center; margin: .4rem 0 .6rem; }
.sello-circulo.grande {
  width: 128px; height: 128px; font-size: 3.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 4px dashed var(--terracota); overflow: hidden; position: relative;
  background-image: var(--foto); background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 5px #fff, 0 8px 20px rgba(0,0,0,.25);
}
.sello-circulo.grande::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(217,164,65,.25), rgba(193,89,47,.55));
  mix-blend-mode: multiply;
}
.sello-circulo.grande .sello-emoji { position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0,0,0,.6); }

.dato {
  background: #fff; border-radius: 16px; padding: 1rem 1.2rem; text-align: left;
  border-left: 6px solid var(--dorado); margin-top: 1rem;
}
.dato-titulo { font-weight: 700; color: var(--terracota); display: block; margin-bottom: .3rem; }
.dato p { margin: 0; font-size: 1.05rem; }

.diploma {
  background:
    repeating-linear-gradient(45deg, rgba(217,164,65,.08) 0 12px, transparent 12px 24px),
    #fff;
  border: 4px double var(--dorado); border-radius: 16px;
  padding: 1.3rem; margin-top: 1rem;
}
.diploma-titulo {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; letter-spacing: .25em; font-weight: 700;
  color: var(--terracota); display: block; margin-bottom: .5rem;
}
.diploma-texto { margin: 0 0 .8rem; font-size: 1.1rem; }
.mini-sellos { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.mini-sello {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; background: #eee;
  color: #bbb; border: 2px dashed #ccc;
}
.mini-sello.hecho { background: var(--verde-suave); color: var(--verde); border: 2px solid var(--verde); }

/* ajustes */
.dialogo-ajustes { text-align: left; }
.panel-ajustes { display: grid; gap: 1.1rem; margin: 1rem 0; }
.ajuste-grupo h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--verde); }
.fila-ajustes { display: flex; gap: .5rem; flex-wrap: wrap; }
.op-ajuste {
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  padding: .6rem 1.1rem; border-radius: 999px; min-height: 48px;
  border: 3px solid rgba(29,78,70,.25); background: #fff; color: var(--verde);
}
.op-ajuste.activo { background: var(--verde); color: #fff; border-color: var(--verde); }

/* crÃ©ditos */
.dialogo-creditos { text-align: left; max-width: 680px; }
.creditos-intro { font-size: 1rem; color: var(--tinta-suave); }
.creditos-lista { display: grid; gap: .6rem; max-height: 46vh; overflow-y: auto; margin: 1rem 0; }
.credito {
  background: #fff; border-radius: 12px; padding: .7rem .9rem;
  display: grid; gap: .1rem; border-left: 5px solid var(--verde-claro);
}
.credito b { color: var(--verde); }
.credito span { font-size: .9rem; color: var(--tinta-suave); }
.credito a { color: var(--terracota); }

/* ---------- alto contraste ---------- */
body[data-contraste="alto"] { background: #000; }
body[data-contraste="alto"] .app { color: #fff; }
body[data-contraste="alto"] .pasaporte,
body[data-contraste="alto"] .bocadillo,
body[data-contraste="alto"] .dialogo { background: #000; color: #fff; border-color: #ffd400; }
body[data-contraste="alto"] .cab-marca h1,
body[data-contraste="alto"] .cab-marca p,
body[data-contraste="alto"] .barra-lugar,
body[data-contraste="alto"] .sello-nombre,
body[data-contraste="alto"] .consigna,
body[data-contraste="alto"] .pasaporte-titulo,
body[data-contraste="alto"] .dialogo h2 { color: #ffd400; }
body[data-contraste="alto"] .consigna { background: #222; border-left-color: #ffd400; }
body[data-contraste="alto"] .btn,
body[data-contraste="alto"] .opcion,
body[data-contraste="alto"] .op-ajuste,
body[data-contraste="alto"] .tecla,
body[data-contraste="alto"] .tecla-letra,
body[data-contraste="alto"] .campo,
body[data-contraste="alto"] .campo-buscar { background: #111; color: #ffd400; border-color: #ffd400; }
body[data-contraste="alto"] .escenario { background: #111; border-color: #ffd400; }
body[data-contraste="alto"] .ventana,
body[data-contraste="alto"] .ventana-cuerpo,
body[data-contraste="alto"] .navegador,
body[data-contraste="alto"] .nav-cuerpo,
body[data-contraste="alto"] .dato,
body[data-contraste="alto"] .credito,
body[data-contraste="alto"] .diploma { background: #000; color: #fff; }
body[data-contraste="alto"] .pergamino { background: #111; }
body[data-contraste="alto"] .pergamino-texto { color: #f5f5f5; }
body[data-contraste="alto"] .mini-sello.hecho { background: #ffd400; color: #000; }

/* ---------- móvil / tablet ---------- */
@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .app { padding: .85rem .7rem 2.4rem; }
  .logo-jam { height: clamp(56px, 14vw, 96px); }
  .cabecera { justify-content: center; text-align: center; }
  .cab-marca { justify-content: center; }
  .cab-marca h1 { font-size: 1.25rem; }
  .cab-acciones { justify-content: center; }
  .barra-sup {
    grid-template-columns: 1fr auto;
    grid-template-areas: "volver voz" "lugar lugar";
    row-gap: .5rem;
  }
  .barra-sup > :first-child { grid-area: volver; }
  .barra-sup > :last-child { grid-area: voz; }
  .barra-datos { grid-area: lugar; }
  .barra-lugar { font-size: .98rem; }
  .bocadillo { padding: .85rem 1rem; }
  .pergamino { max-height: 52vh; }
  .dialogo { padding: 1.2rem; border-radius: 22px; }
  .fila-botones { flex-direction: column; }
  .fila-botones .btn,
  .fila-botones .btn-icono { width: 100%; }
  .buscador-falso { flex-wrap: wrap; }
  .btn-buscar { width: 100%; padding: .8rem 1rem; }
  .ventana { min-width: 0; }
  .overlay { padding: .6rem; }
}

@media (max-width: 480px) {
  .pasaporte { padding: .9rem; border-radius: 20px; }
  .pasaporte-titulo { font-size: 1.15rem; letter-spacing: .14em; }
  .pasaporte-progreso { margin-left: 0; }

  .sellos { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: .7rem; }
  .sello .sello-circulo { width: 74px; height: 74px; font-size: 2rem; }
  .sello-nombre { font-size: .82rem; }
  .sello-num { right: 4px; }

  .hero { border-radius: 18px; }
  .hero-emoji { font-size: 1.8rem; }
  .hero-texto { padding: .8rem 1rem; }

  .teclado { gap: .32rem; }
  .teclado-fila { gap: .3rem; }
  .tecla { border-radius: 8px; }

  .letra { width: 2rem; height: 2.6rem; font-size: 1.4rem; }
  .opcion { font-size: 1.02rem; padding: .8rem .9rem; min-height: 56px; }
  .opcion-letra { width: 36px; height: 36px; min-width: 36px; }

  .cesta { width: 76px; height: 76px; font-size: 2.6rem; }
  .blanco-movil, .blanco-clic, .pieza { font-size: 1.9rem; }

  .nav-cuerpo { padding: .85rem; }
  .nav-direccion { font-size: .85rem; }
  .campo-buscar { font-size: 1.05rem; padding: .65rem .85rem; }

  .sello-circulo.grande { width: 104px; height: 104px; font-size: 3rem; }
  .maria-escondida { padding: .85rem 1.1rem; }
  .dialogo h2 { font-size: 1.35rem; }
  .creditos-lista { max-height: 52vh; }
}

@media (max-width: 360px) {
  .sellos { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: .55rem; }
  .sello .sello-circulo { width: 66px; height: 66px; font-size: 1.8rem; }
  .maria-emoji { font-size: 2.4rem; }
  .teclado { gap: .26rem; }
  .teclado-fila { gap: .22rem; }
}
