/* ============================================================================
   estilos/exposicion.css — «Misioneros abulenses por el mundo».
   Zonas por prefijo:  st-* sitio · pz-* puzle · mq-* MISIOquiz · ad-* admin.
   ========================================================================= */

:root {
  color-scheme: light;
  --bg: #faf7f2;             /* crema cálido */
  --panel: #ffffff;
  --panel-2: #f3eee6;
  --line: #e3dccf;
  --txt: #2c2620;
  --txt-dim: #6e675c;
  --accent: #e35c12;         /* naranja DOMUND, oscurecido para fondo claro */
  --accent-suave: #e35c1220;
  --ok: #1e9e5c;
  --warn: #c77700;
  --err: #d64545;
  --oceano: #d3e7f3;
  --tierra: #eae4d8;
  --continente-america: #1f9d55;
  --continente-africa: #c77700;
  --continente-asia: #0e8fa5;
  --continente-europa: #7a4fd8;
  --continente-oceania: #d6336c;
  --radio: 14px;
  --alto-cabecera: 58px;
  --fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mq-azul: #2563ab;        /* los 4 colores del MissioQuiz */
  --mq-amarillo: #e3a50f;
  --mq-verde: #2e9e52;
  --mq-rojo: #c8392b;
  --velo: rgba(255, 255, 255, .9);   /* paneles translúcidos sobre mapa/imagen */
  --halo: rgba(255, 255, 255, .85);  /* halo de los títulos sobre el globo */
}

/* ── modo oscuro global — lo alterna el botón 🌙/☀️ (motor/tema.js) ─────── */
html[data-tema="oscuro"] {
  color-scheme: dark;
  --bg: #16120e;
  --panel: #211b15;
  --panel-2: #2b241c;
  --line: #423a2d;
  --txt: #f1eae0;
  --txt-dim: #a89d8c;
  --accent: #ff7a33;
  --accent-suave: #ff7a3329;
  --ok: #3dbb7a;
  --warn: #e0912a;
  --err: #e66a6a;
  --oceano: #122230;
  --tierra: #332c22;
  --mq-azul: #4d8dd6;
  --mq-amarillo: #e8b63a;
  --mq-verde: #46b56e;
  --mq-rojo: #e05a4b;
  --velo: rgba(26, 21, 16, .88);
  --halo: rgba(0, 0, 0, .75);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
/* a pantalla completa el mapa manda y la página no hace scroll */
body.mapa-pantalla { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1em;
}

/* ------------------------------------------------------------- comunes -- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  font-size: 0.92em;
  white-space: nowrap;
}
.chip strong { font-variant-numeric: tabular-nums; }
.bolita { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radio);
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s, background .12s, border-color .12s;
}
.boton:active { transform: scale(.96); }
.boton:hover { border-color: var(--accent); }
.boton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }

.credito {
  text-align: center;
  font-size: 12px;
  color: var(--txt-dim);
  opacity: .8;
  padding: 18px 12px 22px;
}
.credito-admin { text-decoration: none; }
.credito-admin:hover { color: var(--accent); }
.naranja { color: var(--accent); }

/* ------------------------------------------------------- sitio: cabecera -- */

.st-cabecera {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--alto-cabecera);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--velo);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--line);
}
.st-marca {
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}
.st-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.st-nav::-webkit-scrollbar { display: none; }
.st-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--txt-dim);
  white-space: nowrap;
  transition: color .12s, background .12s;
}
.st-nav a:hover { color: var(--txt); }
.st-nav a.activo { color: #fff; background: var(--accent); }

/* en móvil el menú es un desplegable bajo la cabecera (más intuitivo que scroll) */
.st-nav-boton { display: none; }
@media (max-width: 700px) {
  .st-nav-boton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
  }
  .st-nav-boton .flechita { color: var(--accent); transition: transform .2s; }
  .st-nav-boton[aria-expanded="true"] .flechita { transform: rotate(180deg); }
  .st-nav {
    position: absolute;
    top: var(--alto-cabecera);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    background: var(--panel);
    border-bottom: 1.5px solid var(--line);
    box-shadow: 0 14px 30px #0002;
    padding: 8px 10px 12px;
  }
  .st-nav.abierto { display: flex; }
  .st-nav a { padding: 13px 14px; border-radius: 10px; font-size: 15.5px; }
}

/* ------------------------------------------------- sitio: secciones base -- */

.st-seccion { min-height: calc(100vh - var(--alto-cabecera)); }
.st-columna {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 20px 56px;
}
.st-columna h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin-bottom: 6px; }
.st-columna h2 { font-size: clamp(20px, 2.6vw, 26px); margin: 30px 0 12px; }
.st-entradilla { color: var(--txt-dim); font-size: clamp(15px, 1.9vw, 18px); margin-bottom: 18px; }
.st-parrafos p { margin-bottom: 14px; font-size: clamp(15.5px, 1.9vw, 17.5px); }

/* -------------------------------------------------------- sitio: hero -- */

.st-hero {
  position: relative;
  height: min(62vh, 580px);
  min-height: 380px;
  overflow: hidden;
  border-top: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
}
.st-hero-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-hero-capa {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 5vh;
  gap: 14px;
  text-align: center;
  pointer-events: none;
  background: linear-gradient(transparent 45%, var(--bg) 88%);
  padding-left: 16px;
  padding-right: 16px;
}
.st-hero-titulo { font-size: clamp(26px, 5vw, 52px); font-weight: 800; text-shadow: 0 2px 16px var(--halo); line-height: 1.1; }
.st-hero-sub { color: var(--txt-dim); font-size: clamp(14px, 2vw, 18px); }
.st-hero-destino {
  min-height: 1.5em;
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 600;
  color: var(--txt);
  background: var(--velo);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 18px;
  transition: opacity .3s;
  text-decoration: none;
  pointer-events: auto;
}
.st-hero-destino:hover { color: var(--accent); }
.st-hero-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.st-hero-capa .boton { pointer-events: auto; }

/* ------------------------------------------------------ sitio: tarjetas -- */

.st-tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
/* los cuatro accesos de la portada, siempre en una sola fila */
.st-tarjetas.cuatro { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.st-tarjeta {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-tarjetas.cuatro .st-tarjeta { padding: 16px 15px; gap: 6px; }
.st-tarjetas.cuatro .st-tarjeta h3 { font-size: 15.5px; line-height: 1.25; }
.st-tarjetas.cuatro .st-tarjeta p { font-size: 13px; line-height: 1.4; }
.st-tarjetas.cuatro .st-tarjeta .icono { font-size: 27px; }
@media (max-width: 900px) { .st-tarjetas.cuatro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .st-tarjetas.cuatro { grid-template-columns: 1fr; } }
.st-tarjeta .icono { font-size: 34px; }
.st-tarjeta h3 { font-size: 17px; }
.st-tarjeta p { font-size: 14.5px; color: var(--txt-dim); }
.st-tarjeta .boton { margin-top: auto; align-self: flex-start; }
a.st-tarjeta { text-decoration: none; transition: transform .12s, border-color .12s; }
a.st-tarjeta:hover { transform: translateY(-3px); border-color: var(--accent); }

/* ---------------------------------------------------------- sitio: mapa -- */

.st-mapa-marco {
  position: relative;
  height: calc(100vh - var(--alto-cabecera) - 172px);
  height: calc(100dvh - var(--alto-cabecera) - 172px);
  min-height: 360px;
  overflow: hidden;
}
body.mapa-pantalla .st-mapa-marco {
  height: calc(100vh - var(--alto-cabecera));
  height: calc(100dvh - var(--alto-cabecera));
}
body.mapa-pantalla .st-bajo-mapa { display: none; }

/* botón de pantalla completa, junto a los controles de zoom */
.st-mapa-pantalla {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 6;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--velo);
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}
.st-mapa-pantalla:hover { border-color: var(--accent); color: var(--accent); }

/* los dos accesos de debajo del mapa: historias y pueblos */
.st-bajo-mapa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px 26px;
}
.st-acceso {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  padding: 14px 16px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.st-acceso:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.st-acceso .icono { font-size: 30px; flex: none; }
.st-acceso .datos { flex: 1; min-width: 0; }
.st-acceso h2 { font-size: 17px; margin-bottom: 2px; }
.st-acceso p { font-size: 13.5px; color: var(--txt-dim); line-height: 1.35; margin-bottom: 6px; }
.st-acceso .chip { font-size: 12px; padding: 2px 10px; }
.st-acceso .flecha { color: var(--accent); font-size: 20px; font-weight: 800; flex: none; }
.st-volver-mapa { margin-bottom: 14px; }

@media (max-width: 720px) {
  .st-bajo-mapa { grid-template-columns: 1fr; }
  .st-mapa-marco {
    height: calc(100vh - var(--alto-cabecera) - 250px);
    height: calc(100dvh - var(--alto-cabecera) - 250px);
  }
}
.st-mapa-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.st-mapa-contadores {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 5;
  max-width: 96%;
}
.st-mapa-contadores .chip { font-size: 12px; padding: 3px 10px; background: var(--velo); }
.st-mapa-pista {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--txt-dim);
  font-size: 13px;
  background: var(--velo);
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity .6s;
  white-space: nowrap;
  z-index: 5;
}

/* buscador del mapamundi */
.st-busca {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, 92vw);
  z-index: 6;
}
.st-busca-input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--txt);
  background: var(--velo);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
}
.st-busca-input:focus { outline: none; border-color: var(--accent); }
.st-busca-resultados {
  margin-top: 6px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  overflow: hidden;
  max-height: 46vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(90, 75, 55, .22);
}
.st-busca-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
}
.st-busca-fila:hover, .st-busca-fila:focus { background: var(--panel-2); outline: none; }
.st-busca-fila .bandera { font-size: 18px; }
.st-busca-fila .detalle { color: var(--txt-dim); font-size: 12.5px; }
.st-busca-fila .historia { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-busca-nada { padding: 12px 14px; color: var(--txt-dim); font-size: 13.5px; }

/* controles de zoom del mapa */
.st-zoom {
  position: absolute;
  right: 14px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
}
.st-zoom button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--velo);
  font-size: 18px;
  font-weight: 700;
}
.st-zoom button:hover { border-color: var(--accent); }

/* aviso flotante (enlace copiado, etc.) */
.st-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ok);
  color: #fff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  z-index: 60;
  transition: opacity .4s;
}

/* panel del país: lateral en pantalla grande, hoja inferior en móvil */
.st-pais {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 92vw);
  background: var(--panel);
  border-left: 1.5px solid var(--line);
  z-index: 10;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform .28s ease;
}
.st-pais.abierto { transform: translateX(0); }
.st-pais-cabecera {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1.5px solid var(--line);
}
.st-pais-bandera { font-size: 38px; line-height: 1; }
.st-pais-cabecera h2 { font-size: 21px; line-height: 1.1; }
.st-pais-cuenta { color: var(--txt-dim); font-size: 13.5px; margin-top: 2px; }
.st-pais-cerrar {
  margin-left: auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  font-size: 16px;
  flex-shrink: 0;
}
.st-pais-lista { overflow-y: auto; padding: 10px 12px 18px; }
.st-persona {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  text-decoration: none;
}
.st-persona + .st-persona { margin-top: 4px; }
.st-persona .datos { flex: 1; min-width: 0; }
.st-persona .nombre { font-weight: 700; font-size: 15px; line-height: 1.25; }
.st-persona .origen { font-size: 12.5px; color: var(--txt-dim); }
.st-persona .cruz { color: var(--txt-dim); font-size: 13px; }
.st-persona.con-informe { background: var(--panel-2); border-color: var(--line); }
.st-persona.con-informe:hover { border-color: var(--accent); }
.st-persona .flecha { color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }

@media (max-width: 700px) {
  /* contadores en UNA línea desplazable: no roban pantalla al mapa */
  .st-mapa-contadores {
    left: 8px;
    right: 8px;
    transform: none;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .st-mapa-contadores::-webkit-scrollbar { display: none; }
  .st-busca { top: 48px; }
  .st-busca-resultados { max-height: 38vh; } /* que el teclado no los tape */
  .st-mapa-pista {
    left: 10px;
    right: 74px; /* hueco para los botones de zoom */
    transform: none;
    white-space: normal;
    text-align: center;
    font-size: 12px;
    bottom: 14px;
  }
  /* cabecera del sitio más compacta */
  .st-cabecera { gap: 8px; padding: 0 10px; }
  .st-marca { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* que el botón del tema quepa siempre */
  .st-marca { font-size: 14px; }
}

@media (max-width: 640px) {
  .st-pais {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto;
    max-height: 62%;
    border-left: none;
    border-top: 1.5px solid var(--line);
    border-radius: 18px 18px 0 0;
    transform: translateY(108%);
    box-shadow: 0 -8px 30px #0002;
  }
  .st-pais.abierto { transform: translateY(0); }
  /* asa visual de «hoja»: invita a entender que se superpone al mapa */
  .st-pais::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--line);
  }
  .st-pais-cabecera { padding-top: 20px; }
}

/* los efectos hover solo donde hay ratón de verdad (evita estados «pegados» al tocar) */
@media (hover: none) {
  .boton:hover { border-color: var(--line); }
  .boton.principal:hover { border-color: var(--accent); }
  a.st-tarjeta:hover, .st-historia:hover, a.st-record:hover { transform: none; border-color: var(--line); }
  .st-persona.con-informe:hover { border-color: var(--line); }
  .pz-pieza:hover { transform: none; border-color: var(--line); }
  .st-nav a:hover { color: var(--txt-dim); }
  .st-nav a.activo:hover { color: #fff; }
  .credito-admin:hover { color: var(--txt-dim); }
}

/* ------------------------------------------------ sitio: ficha misionero -- */

.st-ficha { max-width: 820px; margin: 0 auto; padding: 30px 20px 50px; }
.st-ficha-volver { margin-bottom: 22px; display: inline-flex; }
.st-ficha-cabecera {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.st-ficha-retrato {
  width: 128px; height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  background: var(--panel-2);
  flex-shrink: 0;
}
.st-ficha-nombre { font-size: clamp(26px, 4.5vw, 40px); line-height: 1.05; letter-spacing: .02em; }
.st-ficha-rotulo { color: var(--accent); font-weight: 800; letter-spacing: .12em; font-size: clamp(14px, 2vw, 18px); margin-top: 4px; }
.st-ficha-origen { color: var(--txt-dim); font-size: 14.5px; margin-top: 6px; }
.st-ficha-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.st-ficha-chips a.chip { text-decoration: none; transition: border-color .12s; }
.st-ficha-chips a.chip:hover { border-color: var(--accent); }

.st-ficha-viaje {
  width: 100%;
  height: 200px;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--oceano);
  margin-top: 18px;
}
@media (max-width: 560px) { .st-ficha-viaje { height: 150px; } }

.st-ficha-cita {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: calc(clamp(19px, 2.7vw, 25px) * var(--letra, 1));
  line-height: 1.4;
  color: var(--txt);
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 18px;
  margin: 24px 0 4px;
}
.st-ficha-cita::before { content: '« '; color: var(--accent); font-weight: 700; }
.st-ficha-cita::after { content: ' »'; color: var(--accent); font-weight: 700; }

.st-ficha { --letra: 1; }
.st-ficha-cuerpo { margin-top: 22px; border-top: 1.5px solid var(--line); padding-top: 22px; }
.st-ficha-cuerpo p {
  margin-bottom: 16px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: calc(clamp(16px, 2vw, 18.5px) * var(--letra));
  line-height: 1.65;
}
.st-ficha-cuerpo > p:first-of-type::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: .85;
  padding: 4px 8px 0 0;
  font-weight: 700;
  color: var(--accent);
  font-family: Georgia, serif;
}
.st-ficha-foto { margin: 20px 0; }
.st-ficha-foto img { border-radius: var(--radio); border: 1.5px solid var(--line); width: 100%; }
.st-ficha-foto figcaption { font-size: 13px; color: var(--txt-dim); margin-top: 6px; text-align: center; }
.st-ficha-otros {
  margin-top: 28px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 18px;
}
.st-ficha-otros h3 { font-size: 15px; color: var(--accent); margin-bottom: 10px; letter-spacing: .04em; }
.st-ficha-otros ul { list-style: none; columns: 2; column-gap: 24px; }
.st-ficha-otros li { padding: 4px 0; font-size: calc(14.5px * var(--letra, 1)); break-inside: avoid; }
.st-ficha-otros li .origen { color: var(--txt-dim); font-size: 12.5px; }
.st-ficha-otros a { color: var(--accent); text-decoration: none; font-weight: 600; }
@media (max-width: 560px) { .st-ficha-otros ul { columns: 1; } }

/* audio del testimonio */
.st-audio {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 14px 16px;
  margin-top: 18px;
}
.st-audio .icono { font-size: 26px; }
.st-audio .rotulo { font-weight: 700; font-size: 14.5px; }
.st-audio audio { flex: 1; min-width: 220px; height: 38px; }

/* texto con formato — clases que admite motor/texto-rico.js (sitio y admin) */
.rt-p { font-size: .85em; }
.rt-g { font-size: 1.22em; }
.rt-xg { font-size: 1.45em; line-height: 1.4; }
.rt-serif { font-family: 'Iowan Old Style', Georgia, 'Times New Roman', serif; }
.rt-mano { font-family: 'Bradley Hand', 'Segoe Print', 'Comic Sans MS', cursive; }
.rt-naranja { color: var(--accent); }

/* conmutador de modo claro/oscuro (cabecera del sitio y del admin) */
.st-tema {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.st-tema:hover { border-color: var(--accent); }

/* editor con formato del admin */
.ad-rico { border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel-2); overflow: hidden; flex: 1; min-width: 0; }
.ad-rico-barra {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.ad-rico-boton {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--txt);
  border-radius: 6px;
  min-width: 26px;
  height: 24px;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0 6px;
}
.ad-rico-boton:hover { border-color: var(--accent); color: var(--accent); }
.ad-rico-boton.activo { background: var(--accent); border-color: var(--accent); color: #fff; }
.ad-rico-boton.bold { font-weight: 800; }
.ad-rico-boton.italic { font-style: italic; }
.ad-rico-boton.underline { text-decoration: underline; }
.ad-rico-boton.strikeThrough { text-decoration: line-through; }
.ad-rico-select {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--txt);
  border-radius: 6px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
}
.ad-rico-campo {
  padding: 8px 10px;
  min-height: 40px;
  font-size: 14px;
  color: var(--txt);
  line-height: 1.5;
  outline: none;
}
.ad-rico-campo.compacto { min-height: 28px; padding: 5px 8px; font-size: 12.5px; }
.ad-rico-campo:focus { background: var(--panel); }
.ad-rico-campo:empty::before { content: attr(data-placeholder); color: var(--txt-dim); pointer-events: none; }

/* presentación: el texto y, a su lado, el vídeo del DOMUND */
.st-intro { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: start; }
.st-intro .st-parrafos { min-width: 0; }
.st-intro-lateral { display: flex; flex-direction: column; min-width: 0; }
.st-intro .st-video { margin-top: 4px; padding: 0; border: none; background: none; }

/* carátula del vídeo: se pulsa y se abre a lo grande */
.st-video-avance {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--panel-2);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.st-video-avance:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0, 0, 0, .17); }
.st-video-avance img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-video-avance .play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .14s;
}
.st-video-avance:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.st-video-avance .rotulo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 12px 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}

/* el modal del vídeo */
.st-video-capa {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(18, 14, 10, .88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mq-aparecer .18s ease-out;
}
.st-video-grande { width: min(94vw, 1100px); aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.st-video-grande iframe, .st-video-grande video { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 820px) {
  .st-intro { grid-template-columns: 1fr; gap: 18px; }
}

/* vídeo (portada y ficha del misionero) */
.st-video {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 14px 16px;
  margin-top: 18px;
}
.st-video .rotulo { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.st-video video { display: block; width: 100%; max-height: 460px; border-radius: 12px; background: #000; }
.st-video-youtube { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.st-video-youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* galería de fotos de la sala dentro de cada parada de la guía */
.st-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.st-galeria button {
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--panel-2, var(--panel));
  aspect-ratio: 4 / 3;
}
.st-galeria img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.st-galeria button:hover img { transform: scale(1.07); }

/* galería deslizable de la ficha (varias fotos de la misión) */
.st-galeria-ficha { position: relative; margin: 26px 0; }
.st-galeria-ficha .st-tira {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.st-galeria-ficha .st-tira::-webkit-scrollbar { display: none; }
.st-galeria-ficha figure { flex: 0 0 100%; scroll-snap-align: center; margin: 0; }
.st-galeria-ficha img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radio);
  display: block;
  background: var(--panel-2);
}
.st-galeria-ficha figcaption { font-size: 13.5px; color: var(--txt-dim); margin-top: 8px; text-align: center; font-style: italic; }
.st-tira-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--velo);
  box-shadow: 0 3px 14px rgba(0, 0, 0, .18);
  color: var(--txt);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
}
.st-tira-flecha:hover { background: var(--panel); color: var(--accent); }
.st-tira-flecha.izq { left: 12px; }
.st-tira-flecha.der { right: 12px; }
.st-tira-puntos { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.st-tira-puntos span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.st-tira-puntos span.activo { background: var(--accent); transform: scale(1.25); }
@media (hover: none) {
  .st-tira-flecha { display: none; }              /* en táctil se desliza con el dedo */
  .st-galeria-ficha figure { flex-basis: 88%; }   /* asoma la siguiente: invita al swipe */
}

/* aviso del modo previsualización (iframe del admin) */
.st-previsualizacion-aviso { display: none; }
.modo-previsualizacion .st-previsualizacion-aviso {
  display: block;
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  background: var(--txt);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
  pointer-events: none;
  white-space: nowrap;
}

/* modal de previsualización del admin */
.ad-vista {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(24, 18, 10, .8);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}
.ad-vista-cabecera { display: flex; align-items: center; gap: 12px; color: #f6efe4; font-size: 15px; }
.ad-vista-cabecera .boton { margin-left: auto; }
.ad-vista iframe { flex: 1; border: none; border-radius: var(--radio); background: var(--bg); box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }

/* visita virtual: visor a pantalla completa */
.st-visita {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(24, 18, 10, .93);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.st-visita figure { margin: 0; max-width: min(94vw, 1200px); text-align: center; }
.st-visita img { max-width: 88vw; max-height: 78vh; border-radius: 12px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }
.st-visita figcaption { color: #f6efe4; margin-top: 12px; font-size: 15.5px; font-weight: 600; }
.st-visita .vv-cuenta { opacity: .65; font-weight: 400; margin-left: 8px; }
.vv-cerrar, .vv-flecha {
  border: none;
  cursor: pointer;
  color: #f6efe4;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.vv-cerrar:hover, .vv-flecha:hover { background: rgba(255, 255, 255, .24); }
.vv-cerrar { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; font-size: 20px; }
.vv-flecha { width: 52px; height: 52px; font-size: 34px; line-height: 1; flex: none; padding-bottom: 4px; }
@media (max-width: 640px) {
  .vv-flecha { position: absolute; bottom: 18px; }
  .vv-flecha.izq { left: 22vw; }
  .vv-flecha.der { right: 22vw; }
  .st-visita img { max-width: 94vw; }
}

/* tamaño de letra en la ficha */
.st-letra { display: inline-flex; gap: 4px; }
.st-letra button {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  font-weight: 800;
}
.st-letra button:hover { border-color: var(--accent); }

/* ------------------------------------------------------- sitio: pueblos -- */

.st-pueblo {
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  margin-top: 10px;
  overflow: hidden;
}
.st-pueblo-cabecera {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  font-size: 15.5px;
  font-weight: 700;
}
.st-pueblo-cabecera:hover { background: var(--panel-2); }
.st-pueblo-cabecera .chip { margin-left: auto; }
.st-pueblo-cabecera .caret { color: var(--txt-dim); transition: transform .2s; }
.st-pueblo.abierto .caret { transform: rotate(90deg); }
.st-pueblo-lista { border-top: 1.5px solid var(--line); padding: 6px 10px 10px; }

/* --------------------------------------------------- sitio: curiosidades -- */

.st-record {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  transition: transform .12s, border-color .12s;
}
a.st-record:hover { transform: translateY(-3px); border-color: var(--accent); }
.st-record .icono { font-size: 30px; }
.st-record .valor { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--accent); line-height: 1.1; }
.st-record .etiqueta { font-weight: 700; font-size: 15px; }
.st-record .detalle { font-size: 13.5px; color: var(--txt-dim); }

/* -------------------------------------------------- juego ¿dónde está? -- */

.st-donde-cabecera {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--velo);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 10px 18px;
  max-width: 94%;
}
.st-donde-pregunta { font-size: clamp(16px, 2.4vw, 22px); font-weight: 800; }
.st-donde-feedback {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: var(--velo);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 15.5px;
  transition: opacity .3s;
}
.st-donde-resultado {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(250, 247, 242, .94);
  text-align: center;
  padding: 20px;
}
.st-donde-resultado .estrellas { font-size: 42px; letter-spacing: 5px; }
.st-donde-resultado h2 { font-size: 26px; }

/* ------------------------------------------------------ diploma del quiz -- */


#qzDiploma { display: none; }
#adCartelas { display: none; }
@media print {
  body.modo-diploma > * { display: none !important; }
  body.modo-diploma #qzDiploma {
    display: block !important;
    position: static;
  }
  body.modo-cartelas > * { display: none !important; }
  body.modo-cartelas #adCartelas { display: block !important; position: static; }
}
.diploma {
  border: 6px double var(--accent);
  border-radius: 18px;
  padding: 40px 30px;
  text-align: center;
  font-family: Georgia, serif;
  color: #2c2620;
  max-width: 640px;
  margin: 30px auto;
  background: #fff;
}
.diploma .escudo { font-size: 46px; }
.diploma h1 { font-size: 26px; letter-spacing: .14em; margin: 10px 0 4px; }
.diploma .otorgado { font-size: 14px; color: #6e675c; margin-top: 14px; }
.diploma .nombre { font-size: 34px; font-style: italic; margin: 8px 0; border-bottom: 1.5px solid #e3dccf; display: inline-block; padding: 0 24px 4px; }
.diploma .logro { font-size: 15px; margin-top: 10px; }
.diploma .estrellas { font-size: 26px; letter-spacing: 6px; margin-top: 10px; }
.diploma .pie { font-size: 12px; color: #6e675c; margin-top: 22px; }

/* cartelas con QR (se imprimen desde el admin) */
.cartelas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; }
.cartela {
  border: 2px solid #2c2620;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  page-break-inside: avoid;
  background: #fff;
  color: #2c2620;
}
.cartela .datos { flex: 1; }
.cartela .cabecera { font-size: 9.5px; letter-spacing: .12em; color: #6e675c; text-transform: uppercase; }
.cartela .nombre { font-size: 18px; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.cartela .rotulo { font-size: 11.5px; font-weight: 700; color: #b3490d; letter-spacing: .06em; margin-top: 2px; }
.cartela .pueblo { font-size: 11.5px; color: #6e675c; margin-top: 2px; }
.cartela .escanea { font-size: 9.5px; color: #6e675c; margin-top: 8px; }
.cartela img { width: 100px; height: 100px; flex-shrink: 0; }

/* más historias + anterior/siguiente */
.st-historias { margin-top: 30px; }
.st-historias h3 { font-size: 16px; margin-bottom: 12px; }
.st-historias-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.st-historia {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 12px;
  text-decoration: none;
  transition: transform .12s, border-color .12s;
}
.st-historia:hover { transform: translateY(-2px); border-color: var(--accent); }
.st-historia img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: var(--panel-2);
  flex-shrink: 0;
}
.st-historia .nombre { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.st-historia .donde { font-size: 12px; color: var(--txt-dim); }
.st-historia-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* impresión: la ficha en papel, limpia (para profesores) */
@media print {
  .st-cabecera, .st-ficha-volver, .st-ficha button, .st-historias,
  .st-historia-nav, .st-ficha-viaje, .credito { display: none !important; }
  body { background: #fff; }
  .st-seccion { min-height: auto; }
  .st-ficha { padding: 0; max-width: none; }
  .st-ficha-retrato { border-color: #999; }
  .st-ficha-otros { border: 1px solid #bbb; }
}

/* ---------------------------------------------------- sitio: materiales -- */

.st-material {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 18px;
  margin-top: 14px;
}
.st-material .icono { font-size: 34px; }
.st-material .datos { flex: 1; }
.st-material h3 { font-size: 17px; }
.st-material p { font-size: 14.5px; color: var(--txt-dim); margin-top: 4px; }
.st-material .boton { flex-shrink: 0; }
@media (max-width: 560px) {
  .st-material { flex-wrap: wrap; }
  .st-material .boton { width: 100%; }
}
.st-vacio {
  margin-top: 14px;
  padding: 16px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radio);
  color: var(--txt-dim);
  font-size: 14.5px;
}

/* ------------------------------- enlaces oficiales de la presentación -- */

.st-enlaces { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.st-enlace {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  padding: 11px 14px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.st-enlace:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 18px rgba(0, 0, 0, .09); }
.st-enlace .icono { font-size: 24px; flex: none; }
.st-enlace .datos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.st-enlace strong { font-size: 15px; }
.st-enlace .dominio { font-size: 12.5px; color: var(--txt-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-enlace .flecha { color: var(--accent); font-size: 17px; font-weight: 800; flex: none; }

/* ------------------------------- la exposición: el lugar de la visita -- */

.st-lugar {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  overflow: hidden;
  margin: 6px 0 26px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}
.st-lugar-foto { margin: 0; position: relative; min-height: 260px; background: var(--panel-2); }
.st-lugar-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-lugar-foto figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 14px 8px;
  font-size: 11.5px;
  color: #fff;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.st-lugar-datos { padding: 22px 24px 24px; display: flex; flex-direction: column; }
.st-lugar-datos h2 { font-size: clamp(21px, 2.8vw, 28px); line-height: 1.15; }
.st-lugar-datos .direccion { color: var(--txt-dim); font-size: 15px; margin: 4px 0 16px; }
.st-lugar-datos dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: baseline; margin-bottom: 18px; }
.st-lugar-datos dt { font-size: 12.5px; font-weight: 700; color: var(--txt-dim); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.st-lugar-datos dd { font-size: 16px; font-weight: 700; }
.st-lugar-datos .botones { display: flex; gap: 10px; flex-wrap: wrap; }
.st-lugar-datos .colegios { font-size: 13.5px; color: var(--txt-dim); line-height: 1.45; margin-top: 14px; }
.st-lugar-llegar { margin-top: 14px; border-top: 1.5px dashed var(--line); padding-top: 12px; }
.st-lugar-llegar summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
.st-lugar-llegar summary::marker { color: var(--accent); }
.st-lugar-llegar ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.st-lugar-llegar li { font-size: 14px; color: var(--txt-dim); line-height: 1.45; padding-left: 16px; position: relative; }
.st-lugar-llegar li::before { content: '›'; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }

/* ------------------------------ la exposición en digital: las plantas -- */

.st-plantas { margin-top: 10px; }
.st-plantas h2 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 4px; }
.st-plantas-pestanas { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 12px; }
.st-planta-pestana {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  transition: border-color .12s, background .12s;
}
.st-planta-pestana .nombre { font-weight: 800; font-size: 15.5px; }
.st-planta-pestana .cuenta { font-size: 12px; color: var(--txt-dim); }
.st-planta-pestana:hover { border-color: var(--accent); }
.st-planta-pestana.activa { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-planta-pestana.activa .cuenta { color: #ffffffcc; }
.st-plantas-nota { color: var(--txt-dim); font-size: 14.5px; margin-bottom: 12px; }
.st-plantas-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.st-cuadro {
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  padding: 10px;
  cursor: zoom-in;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.st-cuadro:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.st-cuadro img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--panel-2); }
.st-cuadro figcaption { font-size: 13.5px; font-weight: 600; text-align: center; margin-top: 8px; }

@media (max-width: 760px) {
  .st-lugar { grid-template-columns: 1fr; }
  .st-lugar-foto { min-height: 180px; max-height: 240px; }
  .st-lugar-datos { padding: 18px; }
  .st-plantas-rejilla { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* -------------------------------------------------------------- puzle -- */

.pz-marco { max-width: 1060px; margin: 0 auto; padding: 24px 16px 50px; }
.pz-barra { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pz-titulo { font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; margin-right: auto; }

/* elegir continente */
.pz-continentes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 6px; }
.pz-continente {
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.pz-continente:hover { transform: translateY(-3px); border-color: var(--color); box-shadow: 0 8px 20px rgba(0, 0, 0, .1); }
.pz-continente .mini { width: 100%; height: 64px; display: block; }
.pz-continente .mini svg { width: 100%; height: 100%; }
.pz-mini { fill: var(--color); opacity: .85; }
.pz-continente .nombre { font-weight: 800; font-size: 16px; }
.pz-continente .detalle { font-size: 12.5px; color: var(--txt-dim); }
.pz-continente .marca { font-size: 12px; font-weight: 800; color: var(--ok); }
.pz-continente.hecho { border-color: var(--ok); }
.pz-diploma-campos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.pz-diploma-campos input {
  padding: 12px 14px;
  border-radius: var(--radio);
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--txt);
  font-family: inherit;
  font-size: 15px;
  min-width: 240px;
}
.pz-diploma-campos input:focus { outline: none; border-color: var(--accent); }

/* el tablero */
.pz-cabecera { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pz-cabecera h2 { font-size: clamp(18px, 2.4vw, 24px); margin-right: auto; }
.pz-tablero-caja {
  position: relative;
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 8px;
}
#pzTablero { width: 100%; height: auto; display: block; }
.pz-fondo { fill: var(--tierra); stroke: var(--line); stroke-width: var(--trazo, 1); }          /* la imagen de fondo */
.pz-hueco {
  fill: var(--bg);
  stroke: var(--txt-dim);
  stroke-width: calc(var(--trazo, 1) * 1.1);
  stroke-dasharray: 7 5;
  opacity: .85;
  cursor: pointer;
  transition: fill .15s, opacity .15s;
}
.pz-hueco:hover { fill: var(--accent-suave); }
.pz-hueco.esperando { animation: pz-latir 1.1s infinite; }
.pz-hueco.pista { fill: var(--accent-suave); stroke: var(--accent); stroke-width: calc(var(--trazo, 1) * 2.4); }
.pz-hueco.error { fill: #d6454533; stroke: var(--err); }
.pz-hueco.puesta { display: none; }
@keyframes pz-latir { 50% { opacity: 1; stroke: var(--accent); } }
.pz-colocada {
  fill: var(--color);
  stroke: var(--panel);
  stroke-width: calc(var(--trazo, 1) * 1.2);
  cursor: pointer;
  animation: pz-encajar .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pz-encajar { from { opacity: 0; transform: translateY(-10px) scale(1.06) } }
.pz-chincheta circle { fill: var(--panel); stroke: var(--accent); cursor: pointer; }
.pz-chincheta text { text-anchor: middle; font-weight: 800; fill: var(--txt); pointer-events: none; }
.pz-chincheta.activa circle { fill: var(--accent); stroke: var(--panel); }
.pz-chincheta.activa text { fill: #fff; }
.pz-completado {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  background: var(--velo);
  border: 1.5px solid var(--ok);
  border-radius: 999px;
  padding: 8px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.pz-completado span { color: var(--txt-dim); }

/* la bandeja de piezas */
.pz-piezas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.pz-pieza {
  width: 108px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 8px 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.pz-pieza:hover { transform: translateY(-2px); border-color: var(--accent); }
.pz-pieza.tomada { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-suave); transform: translateY(-3px); }
.pz-pieza svg { width: 100%; height: 52px; }
.pz-pieza-forma { fill: var(--color); stroke: rgba(0, 0, 0, .25); stroke-width: 1; }
.pz-pieza span { font-size: 11.5px; font-weight: 700; line-height: 1.2; text-align: center; }

/* panel de misioneros del país, con el continente ya montado */
.pz-panel {
  margin-top: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  padding: 14px 16px;
}
.pz-panel h3 { font-size: 18px; margin-bottom: 8px; }
.pz-panel h3 small { font-weight: 600; color: var(--txt-dim); font-size: 13.5px; }
.pz-panel ul { list-style: none; columns: 2; column-gap: 24px; margin-bottom: 12px; }
.pz-panel li { break-inside: avoid; padding: 3px 0; font-size: 14.5px; }
.pz-panel .origen { color: var(--txt-dim); font-size: 12.5px; }
.qz-confeti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

@media (max-width: 640px) {
  .pz-panel ul { columns: 1; }
  .pz-pieza { width: 88px; }
  .pz-pieza svg { height: 42px; }
}

/* ---------------------------------------------------------- missioquiz -- */

.mq-marco { max-width: 980px; margin: 0 auto; padding: 22px 16px 46px; }
.mq-barra-arriba { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mq-titulo { font-size: clamp(24px, 4vw, 36px); font-weight: 900; letter-spacing: .03em; margin-right: auto; }
.mq-titulo .c1 { color: var(--mq-rojo); }
.mq-titulo .c2 { color: var(--mq-azul); }
.mq-titulo .c3 { color: var(--mq-amarillo); }
.mq-titulo .c4 { color: var(--mq-verde); }
.mq-titulo .mq-quiz { color: var(--txt); font-weight: 700; }

/* bolitas de color reutilizadas en botones, marcadores y rótulos */
.mq-pregunta-color .bola, .mq-sentido .bola, .mq-equipo .bola {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: -2px;
}
.bola.mq-azul { background: var(--mq-azul); }
.bola.mq-amarillo { background: var(--mq-amarillo); }
.bola.mq-verde { background: var(--mq-verde); }
.bola.mq-rojo { background: var(--mq-rojo); }
.bola.mq-gris { background: var(--txt-dim); }
.bola.mq-centro { background: conic-gradient(var(--mq-azul), var(--mq-amarillo), var(--mq-verde), var(--mq-rojo), var(--mq-azul)); }

/* configuración */
.mq-config { max-width: 640px; }
.mq-config-fila { margin: 16px 0; }
.mq-config-fila .rotulo { display: block; font-weight: 800; margin-bottom: 8px; }
.mq-config-equipos { display: flex; gap: 8px; flex-wrap: wrap; }
.mq-num {
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 700;
}
.mq-num.activo { background: var(--accent); border-color: var(--accent); color: #fff; }

/* la partida: marcador + tablero + mando */
.mq-partida { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(300px, 500px) minmax(190px, 1fr); gap: 20px; align-items: start; }
.mq-marcador h2 { font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); margin-bottom: 10px; }
.mq-leyenda { font-size: 12.5px; color: var(--txt-dim); margin-top: 10px; line-height: 1.45; }
.mq-equipos { display: flex; flex-direction: column; gap: 8px; }
.mq-equipo {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 9px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.mq-equipo.turno { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-suave), 0 4px 14px rgba(0, 0, 0, .1); }
.mq-equipo .cabecera { display: flex; align-items: baseline; gap: 10px; }
.mq-equipo .nombre { font-weight: 800; font-size: 14.5px; margin-right: auto; }
.mq-equipo .puntos { font-size: 12.5px; color: var(--txt-dim); white-space: nowrap; }
.mq-equipo .puntos strong { color: var(--accent); font-size: 15px; }
.mq-equipo .mundos { display: flex; gap: 6px; margin-top: 7px; align-items: center; }
.mq-equipo .mundos .bola { width: 14px; height: 14px; opacity: .16; }
.mq-equipo .mundos .bola.ganada { opacity: 1; box-shadow: 0 0 0 2px var(--accent-suave); }
.mq-equipo .aciertos { margin-left: auto; font-size: 12px; color: var(--txt-dim); }
.mq-equipo .es-turno { margin-top: 7px; font-size: 11.5px; font-weight: 800; color: var(--accent); letter-spacing: .04em; }

.mq-tablero-caja { width: 100%; position: relative; }
#mqTablero { width: 100%; height: auto; display: block; }
.mq-brillo { pointer-events: none; }
.mq-casilla { stroke: rgba(0, 0, 0, .25); stroke-width: .4; }
.mq-casilla.mq-azul { fill: var(--mq-azul); }
.mq-casilla.mq-amarillo { fill: var(--mq-amarillo); }
.mq-casilla.mq-verde { fill: var(--mq-verde); }
.mq-casilla.mq-rojo { fill: var(--mq-rojo); }
.mq-casilla.mq-gris { fill: var(--line); }
.mq-casilla.mundo { stroke: var(--txt); stroke-width: .9; }
.mq-casilla.destino { animation: mq-late 1s infinite; cursor: pointer; }
@keyframes mq-late { 50% { stroke: var(--accent); stroke-width: 2; } }
.mq-emoji { font-size: 4.6px; text-anchor: middle; pointer-events: none; }
.mq-centro { fill: var(--panel-2); stroke: var(--line); stroke-width: .8; }
.mq-ficha { font-size: 5.2px; text-anchor: middle; transition: x .3s ease, y .3s ease; paint-order: stroke; stroke: var(--panel); stroke-width: .7; }

.mq-mando { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mq-aviso { font-size: 15px; text-align: center; min-height: 3em; }
.mq-dado {
  position: absolute;             /* justo en el centro del tablero */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(58px, 17%, 88px);
  aspect-ratio: 1;
  border-radius: 18%;
  border: 2px solid var(--line);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .22), inset 0 2px 5px rgba(255, 255, 255, .5);
  transition: transform .12s, box-shadow .12s;
}
.mq-dado-cara { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 11%; width: 66%; height: 66%; }
.mq-punto { width: 100%; height: 100%; border-radius: 50%; background: var(--txt); box-shadow: inset 0 -1px 1px rgba(255, 255, 255, .35); }
.mq-dado:not(:disabled):hover { transform: translate(-50%, -50%) scale(1.07); border-color: var(--accent); }
.mq-dado:not(:disabled):active { transform: translate(-50%, -50%) scale(.93); }
.mq-dado:disabled { opacity: .75; cursor: default; }
.mq-sentidos { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mq-sentido { justify-content: space-between; }

/* la pregunta */
.mq-pregunta-capa {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(24, 18, 10, .62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: mq-aparecer .18s ease-out;
}
@keyframes mq-aparecer { from { opacity: 0 } }
.mq-pregunta {
  width: min(94vw, 560px);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 20px;
  border-top: 9px solid var(--line);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .5);
  padding: 20px 22px 22px;
  animation: mq-flotar .26s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes mq-flotar { from { transform: translateY(22px) scale(.94); opacity: 0 } }
.mq-pregunta.borde-azul { border-top-color: var(--mq-azul); }
.mq-pregunta.borde-amarillo { border-top-color: var(--mq-amarillo); }
.mq-pregunta.borde-verde { border-top-color: var(--mq-verde); }
.mq-pregunta.borde-rojo { border-top-color: var(--mq-rojo); }
.mq-pregunta-color { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-dim); display: flex; align-items: center; gap: 7px; }
.mq-pregunta-texto { font-size: clamp(17px, 2.4vw, 21px); font-weight: 700; margin: 10px 0 14px; line-height: 1.35; }
.mq-opciones { display: flex; flex-direction: column; gap: 8px; }
.mq-opcion {
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 15.5px;
  font-weight: 600;
}
.mq-opcion:not(:disabled):hover { border-color: var(--accent); }
.mq-opcion.acierto { border-color: var(--ok); background: #1e9e5c1c; }
.mq-opcion.fallo { border-color: var(--err); background: #d6454518; }
.mq-veredicto { margin-top: 12px; font-weight: 800; text-align: center; font-size: 16px; }
.mq-veredicto.bien { color: var(--ok); }
.mq-veredicto.mal { color: var(--err); }

/* victoria */
.mq-victoria { text-align: center; padding: 40px 16px; }
.mq-victoria .estrellas { font-size: 44px; letter-spacing: 8px; }
.mq-victoria h2 { margin: 12px 0 8px; }
.mq-victoria p { color: var(--txt-dim); margin-bottom: 18px; }

@media (max-width: 860px) {
  /* móvil: marcador arriba en fila, tablero a todo el ancho, mando debajo */
  .mq-partida { grid-template-columns: 1fr; }
  .mq-equipos { flex-direction: row; flex-wrap: wrap; }
  .mq-equipo { flex: 1; min-width: 150px; }
  .mq-leyenda { display: none; }
}

/* ------------------------------------------------------- administración -- */

.ad-pantalla { overflow: auto; height: 100vh; display: flex; flex-direction: column; }
.ad-cabecera {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--panel);
  border-bottom: 1.5px solid var(--line);
  flex-wrap: wrap;
}
.ad-cabecera h1 { font-size: 17px; margin-right: auto; flex: 1; min-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-pestanas { display: flex; gap: 4px; flex-wrap: wrap; }
.ad-pestanas button {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--txt-dim);
}
.ad-pestanas button.activa { color: #fff; background: var(--accent); }
.ad-estado { font-size: 13px; color: var(--txt-dim); }
.ad-estado.pendiente { color: var(--warn); font-weight: 700; }

.ad-cuerpo { display: flex; flex: 1; min-height: 0; }
.ad-lista {
  width: 300px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.ad-buscador {
  font-family: inherit;
  font-size: 14px;
  color: var(--txt);
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
}
.ad-buscador:focus { outline: none; border-color: var(--accent); }
.ad-filtros { display: flex; gap: 5px; flex-wrap: wrap; }
.ad-filtros button {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-dim);
}
.ad-filtros button.activo { border-color: var(--accent); color: var(--txt); background: var(--accent-suave); }
.ad-progreso { font-size: 12px; color: var(--txt-dim); }
.ad-progreso .barra {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 4px;
}
.ad-progreso .lleno { height: 100%; background: var(--ok); border-radius: 999px; transition: width .3s; }

.ad-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}
.ad-banner.pendiente { border-color: var(--warn); background: #c7770012; }
.ad-banner.ok { border-color: var(--ok); background: #1e9e5c12; }
.ad-banner p { flex: 1; min-width: 200px; }

.ad-paso {
  border-left: 3px solid var(--accent);
  padding: 10px 14px 12px;
  margin: 14px 0;
}
.ad-paso h3 { font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ad-paso .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  flex-shrink: 0;
}
.ad-pegar textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--txt);
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  resize: vertical;
}
.ad-pegar textarea:focus { outline: none; border-color: var(--accent); }
.ad-tarjeta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.ad-tarjeta.activa { border-color: var(--accent); background: var(--accent-suave); }
.ad-tarjeta .bandera { font-size: 22px; }
.ad-tarjeta .nombre { font-weight: 700; font-size: 13px; line-height: 1.2; }
.ad-tarjeta .lugar { font-size: 12px; color: var(--txt-dim); }
.ad-tarjeta .marcas { margin-left: auto; font-size: 12px; white-space: nowrap; }

.ad-editor { flex: 1; padding: 18px 22px 60px; overflow-y: auto; max-width: 1000px; }
.ad-seccion {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radio);
  padding: 16px;
  margin-bottom: 16px;
}
.ad-seccion h2 { font-size: 15px; margin-bottom: 12px; color: var(--accent); }
.ad-fila { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ad-campo { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 150px; }
.ad-campo.corto { flex: 0 0 120px; min-width: 120px; }
.ad-campo label { font-size: 11.5px; color: var(--txt-dim); text-transform: uppercase; letter-spacing: .05em; }
.ad-campo input, .ad-campo textarea, .ad-campo select {
  font-family: inherit;
  font-size: 14px;
  color: var(--txt);
  background: var(--panel-2);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
}
/* inputs y selects, exactamente al mismo alto (el select nativo descuadra) */
.ad-campo input, .ad-campo select {
  box-sizing: border-box;
  height: 38px;
}
.ad-campo select { padding-top: 0; padding-bottom: 0; }
.ad-campo textarea { resize: vertical; min-height: 64px; }
.ad-campo input:focus, .ad-campo textarea:focus, .ad-campo select:focus { outline: none; border-color: var(--accent); }
.ad-campo input[readonly] { opacity: .6; }
/* el id: compacto, monoespaciado y claramente «solo lectura» una vez creado */
#miId { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
#miId[readonly] { border-style: dashed; background: transparent; cursor: default; }
/* separador entre los grupos de una misma tarjeta */
.ad-separador { border-top: 1.5px dashed var(--line); margin: 16px 0 14px; }
.ad-ayuda { font-size: 12px; color: var(--txt-dim); margin-top: 6px; }
.ad-conmutador { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ad-conmutador input { width: 17px; height: 17px; accent-color: var(--accent); }

.ad-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ad-chips .chip button { font-size: 12px; padding: 0 2px; color: var(--err); }

.ad-mapa-lienzo {
  width: 100%;
  height: 300px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--oceano);
  cursor: crosshair;
  touch-action: none;
  margin-bottom: 10px;
}

.ad-fotos { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-foto {
  position: relative;
  width: 130px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
}
.ad-foto img { width: 100%; height: 86px; object-fit: cover; }
.ad-foto .pie { font-size: 10.5px; padding: 4px 6px; color: var(--txt-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-foto .quitar {
  position: absolute;
  top: 4px; right: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #000a;
  color: #fff;
  font-size: 12px;
}
.ad-subir {
  width: 130px;
  height: 112px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--txt-dim);
  font-size: 12px;
}
.ad-subir:hover { border-color: var(--accent); color: var(--accent); }

.ad-item { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.ad-item textarea, .ad-item input { flex: 1; font-family: inherit; font-size: 14px; color: var(--txt); background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.ad-item .quitar { flex-shrink: 0; padding: 8px 12px; }
.ad-pregunta { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.ad-pregunta .opcion { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.ad-pregunta .opcion input[type="radio"] { accent-color: var(--accent); width: 17px; height: 17px; }
.ad-pregunta .opcion input[type="text"] { flex: 1; }

.ad-peligro { border-color: #d6454555; }
.ad-peligro h2 { color: var(--err); }
.boton.peligro { border-color: #d6454588; color: var(--err); }

.ad-errores {
  border: 1.5px solid var(--err);
  border-radius: var(--radio);
  background: #d6454510;
  color: var(--err);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  white-space: pre-wrap;
}
.ad-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ok);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  z-index: 60;
  transition: opacity .4s;
}

@media (max-width: 760px) {
  .ad-cuerpo { flex-direction: column; }
  .ad-lista { width: auto; border-right: none; border-bottom: 1.5px solid var(--line); max-height: 40vh; }
}

/* —— móvil: cabecera del juego «¿Dónde está…?» (va al final para ganar a las base) —— */
@media (max-width: 700px) {
  .st-donde-cabecera { top: 6px; padding: 5px 8px; gap: 5px; left: 8px; right: 8px; transform: none; max-width: none; }
  .st-donde-cabecera .boton { padding: 4px 9px; font-size: 13px; border-radius: 9px; }
  .st-donde-pregunta { font-size: 14.5px; }
  .st-donde-cabecera .chip { font-size: 10.5px; padding: 2px 7px; }
  .st-donde-feedback { bottom: 84px; font-size: 13.5px; max-width: 92%; white-space: normal; text-align: center; }
}
