/* ════════════════════════════════════════════════════
   MEMORIAL — Personas Buscadoras
   Estilos globales, componentes y responsive
   ════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
  --color-fondo:          #1a1528;
  --color-violeta:        #483D8B;
  --color-violeta-suave:  #9D8FCD;
  --color-gris:           #708090;
  --color-oro:            #C5B358;
  --color-blanco:         #FFFFFF;
  --color-asesinato:      #C5B358;
  --color-desaparicion:   #708090;
  --font-titulo:          'Tilt Warp', sans-serif;
  --font-cuerpo:          'Roboto', sans-serif;
  --radio:                8px;
  --borde-oro:            1px solid rgba(197, 179, 88, 0.3);
  --sombra-card:          0 4px 24px rgba(0, 0, 0, 0.4);
  --max-ancho:            1400px;
  /* ── Espaciado consistente entre secciones ──────── */
  --seccion-pad-x:        1.5rem;
  --seccion-pad-top:      2.5rem;
  --seccion-titulo-mb:    0.6rem;
}

/* ── Reset mínimo ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base del documento ────────────────────────────── */
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

body {
  background-color: var(--color-fondo);
  color: var(--color-blanco);
  font-family: var(--font-cuerpo);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Tipografía Tilt Warp ──────────────────────────── */
h1, h2, .titulo-tilt {
  font-family: var(--font-titulo);
  font-optical-sizing: auto;
  font-weight: 400;
  font-variation-settings: "XROT" 0, "YROT" 0;
  text-wrap: balance;
}

/* ── Scrollbar (webkit) ────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-fondo); }
::-webkit-scrollbar-thumb { background: var(--color-violeta); border-radius: 3px; }

/* ── Utilitarias ───────────────────────────────────── */
.texto-oro    { color: var(--color-oro); }
.texto-gris   { color: var(--color-gris); }
.texto-blanco { color: var(--color-blanco); }
.oculto       { display: none !important; }
.visible      { display: block !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════
   NAVEGACIÓN FIJA
   ══════════════════════════════════════════════════════ */
#nav-principal {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem var(--seccion-pad-x);
  pointer-events: none;
}

#nav-links {
  list-style: none;
  display: flex;
  gap: 0.3rem;
  pointer-events: all;
}

.nav-link {
  font-family: var(--font-cuerpo);
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 16px;
  transition: color 0.25s, background 0.25s;
  letter-spacing: 0.03em;
}

.nav-link:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(72,61,139,0.35);
}

.nav-link.activo {
  color: var(--color-oro);
  background: rgba(72,61,139,0.4);
}

/* Hamburguesa */
#nav-hamburguesa {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  pointer-events: all;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

#nav-hamburguesa span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

#nav-hamburguesa.abierto span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#nav-hamburguesa.abierto span:nth-child(2) {
  opacity: 0;
}
#nav-hamburguesa.abierto span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Dots de navegación ────────────────────────────── */
#nav-dots {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent;
  cursor: pointer;
  padding: 7px;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.dot:hover {
  border-color: rgba(255,255,255,0.6);
  transform: scale(1.3);
}

.dot.activo {
  background: var(--color-oro);
  border-color: var(--color-oro);
}

/* ── Focus visible global ──────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-oro);
  outline-offset: 2px;
}

/* ── Títulos de sección — consistentes ─────────────── */
.titulo-seccion {
  font-size: 1.4rem;
  color: var(--color-blanco);
  text-align: center;
  text-wrap: balance;
  padding: var(--seccion-pad-top) var(--seccion-pad-x) var(--seccion-titulo-mb);
  max-width: var(--max-ancho);
  margin: 0 auto;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════ */
#hero {
  position: relative; min-height: 100vh; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

#canvas-particulas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}

.hero-contenido {
  position: relative; z-index: 1;
  text-align: center; padding: 0 var(--seccion-pad-x); max-width: 800px;
}

.titulo-principal {
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: #FFFFFF; line-height: 1.2; margin-bottom: 0.5rem;
  text-wrap: balance;
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.75) 0%,
    #FFFFFF 20%,
    #C5B358 40%,
    #FFFFFF 60%,
    rgba(255,255,255,0.75) 80%,
    #C5B358 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: luciernagas-titulo 6s ease-in-out infinite;
}

@keyframes luciernagas-titulo {
  0%   { background-position: 100% 50%; }
  50%  { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.titulo-principal::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(197,179,88,0.5),
    rgba(255,255,255,0.8),
    rgba(197,179,88,0.5),
    transparent
  );
  background-size: 200% 100%;
  animation: luciernagas-linea 4s ease-in-out infinite;
}

@keyframes luciernagas-linea {
  0%   { background-position: -100% 0; opacity: 0.3; }
  50%  { background-position: 200% 0; opacity: 0.8; }
  100% { background-position: -100% 0; opacity: 0.3; }
}

.hero-subtitulo {
  font-size: clamp(0.85rem, 1.8vw, 1.1rem);
  color: var(--color-oro);
  font-weight: 400; letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}

.contador { text-align: center; }

.hero-credito {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.6rem;
  letter-spacing: 0.03em;
}
.hero-credito a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.hero-credito a:hover {
  color: var(--color-oro);
}

/* Indicador de scroll */
.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1; color: rgba(255,255,255,0.55);
  font-size: 0.75rem; text-align: center;
  letter-spacing: 0.15em; text-transform: uppercase;
  animation: hint-bounce 2.5s ease-in-out infinite;
}
.hero-scroll-hint::after {
  content: ''; display: block;
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, rgba(197,179,88,0.5), transparent);
  margin: 6px auto 0;
}
@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.35; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.6; }
}

.scroll-top-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1; color: rgba(255,255,255,0.55);
  font-size: 0.75rem; text-align: center;
  letter-spacing: 0.15em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  animation: hint-bounce-up 2.5s ease-in-out infinite;
}
.scroll-top-hint::before {
  content: ''; display: block;
  width: 1px; height: 28px;
  background: linear-gradient(to top, rgba(197,179,88,0.5), transparent);
  margin: 0 auto 6px;
}
@keyframes hint-bounce-up {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.35; }
  50% { transform: translateX(-50%) translateY(-6px); opacity: 0.6; }
}

/* ══════════════════════════════════════════════════════
   VELA / CANDLE — Draggable
   ══════════════════════════════════════════════════════ */
@keyframes burn {
  0%, 100% { border-radius: 5% 87% 45% 85%; width: 8vmin; }
  10% { border-radius: 5% 85% 49% 82%; }
  20% { border-radius: 0% 85% 45% 87%; width: 8.3vmin; }
  30%, 90% { border-radius: 5% 85% 49% 82%; }
  40% { border-radius: 0% 85% 45% 87%; width: 8.6vmin; }
  50% { border-radius: 2% 87% 42% 90%; }
  60% { border-radius: 5% 97% 45% 88%; }
  70% { border-radius: 2% 87% 42% 90%; width: 8.3vmin; }
  80% { border-radius: 5% 97% 45% 88%; }
}

.match {
  animation: burn 4s infinite;
  width: 8vmin;
  aspect-ratio: 1;
  background:
    radial-gradient(100% 100% at 90% 90%, var(--color-fondo), #251c2733 20%, #251c2700 50%),
    radial-gradient(farthest-side at 110% 120%, var(--color-fondo), #631, #cb6c3b88, #0000),
    radial-gradient(at 100% 100%, #fc08, #cb6c3b, #eebd7600 60%),
    linear-gradient(135deg, #fff0 20%, #ff0);
  background-color: #ffe;
  border-radius: 2% 87% 45% 85%;
  box-shadow:
    inset 0.8vmin 0.8vmin 0.8vmin -0.6vmin #f808,
    inset -0.4vmin -0.4vmin 1.5vmin -1vmin #00f7,
    inset 0vmin -0.4vmin 1.5vmin -1vmin #00f8,
    inset -0.4vmin -0.4vmin 0.8vmin -0.8vmin var(--color-fondo),
    inset -0.4vmin -0.4vmin 1vmin -0.4vmin var(--color-fondo),
    inset -0.4vmin -0.4vmin 0.8vmin #fc08,
    -0.2vmin -0.2vmin 0.4vmin #ff08,
    -0.4vmin -0.4vmin 0.8vmin #ce8c47,
    -0.8vmin -0.8vmin 4vmin 0.4vmin var(--color-fondo),
    -2vmin -2vmin 12vmin 1.5vmin #fa04;
  filter: blur(0.1vmin);
  transform: rotate(45deg);
  margin: 3rem auto 0;
  /* Draggable */
  cursor: grab;
  pointer-events: all;
  touch-action: none;
  user-select: none;
  position: relative;
  z-index: 10;
  transition: filter 0.2s;
}
.match:active { cursor: grabbing; }
.match.dragging {
  position: fixed;
  margin: 0;
  z-index: 9999;
  filter: blur(0.05vmin);
}

.match::after {
  content: "";
  display: block;
  width: 2vmin;
  height: 1.5vmin;
  background:
    linear-gradient(45deg, #f002, #fff0),
    linear-gradient(to right, #d68356, #e5653e 3%, #d0363b 20%, var(--color-fondo));
  top: 6.5vmin;
  left: 6.5vmin;
  border-radius: 100% / 120% 80% 80% 120%;
  position: absolute;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 1.5vmin 1vmin rgba(26,21,40,0.7), inset -0.4vmin 0 0.6vmin var(--color-fondo);
}

.match::before {
  content: "";
  display: block;
  width: 6vmin;
  height: 1vmin;
  background: linear-gradient(to right, #d605, #321, var(--color-fondo));
  top: 9vmin;
  left: 9vmin;
  position: absolute;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 1.5vmin 1vmin rgba(26,21,40,0.7), inset -0.4vmin 0 0.6vmin rgba(26,21,40,0.7);
}

/* Hint de arrastre — tooltip on hover */
.match-hint {
  position: absolute;
  bottom: -2.2rem;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-size: 0.68rem;
  color: var(--color-oro);
  white-space: nowrap;
  letter-spacing: 0.06em;
  background: rgba(26,21,40,0.85);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(197,179,88,0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.match:hover .match-hint {
  opacity: 1;
}

/* Glow que sigue a la vela cuando es dragged */
.match-glow {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,50,0.06) 0%, rgba(255,150,0,0.03) 30%, transparent 70%);
  transform: translate(-50%, -50%);
  display: none;
}
.match-glow.visible { display: block; }

/* ══════════════════════════════════════════════════════
   FILTROS
   ══════════════════════════════════════════════════════ */
#filtros-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26,21,40,0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: none;
  margin-top: 0;
  padding: 10px var(--seccion-pad-x);
  display: flex; align-items: center;
  justify-content: center;
  gap: 1rem; flex-wrap: wrap;
}

.filtros-grupo { display: flex; align-items: center; gap: 6px; }

.filtros-label {
  font-size: 0.72rem; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.1em; margin-right: 2px;
}

.filtro-select {
  background: rgba(72,61,139,0.25);
  border: 1px solid rgba(197,179,88,0.3);
  border-radius: 6px; padding: 6px 10px;
  color: #FFFFFF; font-family: var(--font-cuerpo);
  font-size: 0.8rem; outline: none;
  cursor: pointer; transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(197,179,88,0.6)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  min-height: 36px;
}
.filtro-select:focus { border-color: var(--color-oro); }
.filtro-select option {
  background: #1f1a35; color: #FFFFFF;
}

#input-busqueda {
  background: rgba(72,61,139,0.25);
  border: 1px solid rgba(197,179,88,0.3);
  border-radius: 6px; padding: 6px 10px;
  color: #FFFFFF; font-family: var(--font-cuerpo);
  font-size: 0.8rem; outline: none; width: 320px;
  transition: border-color 0.2s;
  min-height: 36px;
}
#input-busqueda:focus { border-color: var(--color-oro); }
#input-busqueda::placeholder { color: rgba(255,255,255,0.4); }

.busqueda-wrap {
  position: relative;
}

.sugerencias {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin-top: 4px;
  background: rgba(26,21,40,0.97);
  border: 1px solid rgba(197,179,88,0.35);
  border-radius: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.sugerencias.visible { display: block; }

.sugerencia-item {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sugerencia-item:hover,
.sugerencia-item.activa {
  background: rgba(72,61,139,0.4);
}

.sugerencia-item mark {
  background: none;
  color: var(--color-oro);
  font-weight: 500;
}

.sugerencia-vacia {
  padding: 8px 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

#conteo-filtros {
  font-size: 0.75rem; color: rgba(255,255,255,0.55);
  font-variant-numeric: tabular-nums;
}

#btn-reset-filtros {
  padding: 5px 14px; border-radius: 20px;
  background: transparent; color: rgba(197,179,88,0.6);
  border: 1px solid rgba(197,179,88,0.25);
  font-family: var(--font-cuerpo); font-size: 0.78rem;
  cursor: pointer; transition: all 0.2s;
  min-height: 36px;
}
#btn-reset-filtros:hover { color: var(--color-oro); border-color: var(--color-oro); }

.btn-descargar {
  padding: 5px 14px; border-radius: 6px;
  background: rgba(72,61,139,0.25);
  color: var(--color-oro);
  border: 1px solid rgba(197,179,88,0.3);
  font-family: var(--font-cuerpo); font-size: 0.78rem;
  text-decoration: none; transition: border-color 0.2s;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.btn-descargar:hover { border-color: var(--color-oro); }

/* ── Contadores del dashboard ──────────────────────── */
#dashboard-contadores {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 0.3rem var(--seccion-pad-x) 0.5rem;
  max-width: var(--max-ancho);
  margin: 0 auto;
}

.contador-numero {
  font-size: 1.8rem;
}

.contador-etiqueta {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.65);
}

/* ── Pantallas snap — espaciado consistente ──────────── */
.pantalla-snap {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 0 var(--seccion-pad-x) var(--seccion-pad-x);
}

/* ══════════════════════════════════════════════════════
   PANTALLA 3 — LUCIÉRNAGAS (cita)
   ══════════════════════════════════════════════════════ */
.cita-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 750px;
  margin: 0 auto;
  padding: 0 var(--seccion-pad-x);
  text-align: center;
}

.cita-typewriter {
  font-family: var(--font-cuerpo);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 2;
  color: rgba(255,255,255,0.75);
  min-height: 12rem;
}

.cita-typewriter .tw-cursor {
  color: var(--color-oro);
  animation: tw-blink 0.7s step-end infinite;
}

.cita-autor {
  font-family: var(--font-cuerpo);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-top: 1.5rem;
  opacity: 0;
  transition: opacity 1s ease;
}

.cita-autor.visible {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════
   PANTALLA 4 — MOSAICO DE ROSTROS
   ══════════════════════════════════════════════════════ */
#mosaico-container {
  position: relative;
  flex: 1;
  max-width: var(--max-ancho);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#mosaico-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(6, 1fr);
  grid-auto-flow: dense;
  gap: 2px;
  width: 100%;
  flex: 1;
  max-height: calc(100vh - 6rem);
  overflow: hidden;
  background: rgba(200,195,185,0.25);
  border-radius: 10px;
}

#grid-light-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  border-radius: 10px;
}

.foto-celda.span-h {
  grid-column-end: span 2;
}

.foto-celda.span-v {
  grid-row-end: span 2;
}

/* ══════════════════════════════════════════════════════
   CARTOGRAFÍA (mapa)
   ══════════════════════════════════════════════════════ */
#mapa-container {
  position: relative;
  flex: 1;
  max-width: var(--max-ancho);
  margin: 0 auto;
  width: 100%;
  min-height: 0;
}

#mapa { height: 100%; max-height: calc(100vh - 14rem); border-radius: var(--radio); }

/* ══════════════════════════════════════════════════════
   GRÁFICAS — Panel compartido
   ══════════════════════════════════════════════════════ */
#panel-charts,
#panel-charts-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  max-width: var(--max-ancho);
  width: 100%;
  flex: 1;
  max-height: calc(100vh - 6rem);
  margin: 0 auto;
}

#panel-charts > div,
#panel-charts-2 > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(72,61,139,0.12);
  border: var(--borde-oro); border-radius: var(--radio);
  padding: 12px 14px;
}

#panel-charts > div svg,
#panel-charts-2 > div svg {
  flex: 1;
  width: 100%;
}

/* ══════════════════════════════════════════════════════
   MURO DE MEMORIA
   ══════════════════════════════════════════════════════ */
#muro-nombres {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--seccion-pad-top) var(--seccion-pad-x);
  text-align: center;
  overflow: hidden;
  scroll-snap-align: start;
}

#muro-nombres .muro-inner {
  background: rgba(72,61,139,0.15);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.06), 0 0 50px rgba(255,255,255,0.03);
  padding: 1.2rem 1.8rem;
  max-width: 95%;
  width: 100%;
  line-height: 2;
}

.nombre-muro {
  font-family: 'Shadows Into Light', cursive;
  font-weight: 400;
  font-size: clamp(0.85rem, 1.3vw, 1.35rem);
  color: rgba(255,255,255,0.5);
  cursor: default;
  transition: color 1.8s ease, text-shadow 1.8s ease;
  display: inline;
  padding: 0 0.1rem;
}

.nombre-muro:hover {
  color: #FFFFFF !important;
  text-shadow: 0 0 16px rgba(255,255,255,0.7), 0 0 30px rgba(255,255,255,0.3);
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.nombre-muro.veladora {
  color: var(--color-oro);
  text-shadow: 0 0 14px rgba(197,179,88,0.6);
}

.nombre-muro.nombre-activo {
  color: #FFFFFF !important;
  text-shadow: 0 0 18px rgba(255,255,255,0.7);
}

.btn-descargar-muro {
  background: transparent;
  border: 1px solid rgba(197,179,88,0.25);
  color: rgba(255,255,255,0.55);
  font-family: var(--font-cuerpo);
  font-size: 0.72rem;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 1rem;
  transition: color 0.2s, border-color 0.2s;
  z-index: 2;
  position: relative;
  min-height: 36px;
}
.btn-descargar-muro:hover {
  color: var(--color-oro);
  border-color: var(--color-oro);
}

.sep-muro {
  color: rgba(255,255,255,0.55);
  font-size: clamp(0.35rem, 0.5vw, 0.55rem);
  margin: 0 clamp(0.2rem, 0.4vw, 0.5rem);
  user-select: none;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════
   MAPA LEAFLET
   ══════════════════════════════════════════════════════ */
.leaflet-container { background: var(--color-fondo) !important; }

.leaflet-tooltip {
  background: rgba(26,21,40,0.95) !important;
  border: 1px solid var(--color-oro) !important;
  color: #FFFFFF !important;
  font-family: var(--font-cuerpo) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}
.leaflet-tooltip-left::before, .leaflet-tooltip-right::before,
.leaflet-tooltip-top::before, .leaflet-tooltip-bottom::before { display: none; }

.marker-buscadora {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 10px; color: var(--color-fondo);
  font-weight: 700; border: 1.5px solid rgba(255,255,255,0.7);
  cursor: pointer; transition: transform 0.2s ease;
}
.marker-buscadora:hover { transform: scale(1.3); }

.cluster-icon {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--color-violeta);
  border: 2px solid rgba(197,179,88,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.cluster-icon span {
  font-family: var(--font-cuerpo); font-weight: 700;
  color: var(--color-oro); font-size: 13px;
}

.choropleth-toggle {
  background: rgba(26,21,40,0.9); border: var(--borde-oro);
  color: var(--color-gris); font-family: var(--font-cuerpo);
  font-size: 0.75rem; padding: 6px 12px; border-radius: 4px;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
  min-height: 32px;
}
.choropleth-toggle:hover { color: var(--color-oro); border-color: var(--color-oro); }

/* ══════════════════════════════════════════════════════
   PLAYER
   ══════════════════════════════════════════════════════ */
#player-control {
  display: flex; align-items: center; gap: 5px;
  border-left: 1px solid rgba(197,179,88,0.2);
  padding-left: 10px;
  margin-left: 2px;
}

#player-control button {
  background: rgba(72,61,139,0.25);
  color: var(--color-oro);
  border: 1px solid rgba(197,179,88,0.3);
  border-radius: 6px;
  padding: 6px 10px; cursor: pointer;
  font-family: var(--font-cuerpo); font-size: 0.8rem;
  transition: border-color 0.2s, background 0.2s; line-height: 1;
  min-width: 36px; min-height: 36px;
}
#player-control button:hover {
  border-color: var(--color-oro);
  background: rgba(72,61,139,0.5);
}

#slider-tiempo {
  width: 80px;
  -webkit-appearance: none; appearance: none;
  height: 3px; background: rgba(197,179,88,0.25);
  border-radius: 2px; outline: none;
  vertical-align: middle;
}
#slider-tiempo::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-oro); cursor: pointer;
}
#slider-tiempo::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-oro); border: none; cursor: pointer;
}
#etiqueta-play {
  position: absolute;
  top: 12px; left: 50px;
  z-index: 800;
  font-family: var(--font-titulo);
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--color-oro);
  background: rgba(26,21,40,0.8);
  border-radius: 6px;
  padding: 8px 18px;
  pointer-events: none;
  display: none;
}
#etiqueta-play.visible { display: block; }

/* Animaciones play */
@keyframes pulso-ring {
  0%   { transform: translate(-50%,-50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2.5); opacity: 0; }
}
.pulso-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid;
  animation: pulso-ring 0.9s ease-out forwards;
  pointer-events: none;
}
@keyframes marker-entrada {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.marker-play { animation: marker-entrada 0.35s ease-out forwards; }

.burbuja-play {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: width 0.4s ease, height 0.4s ease;
}
.burbuja-play span {
  font-family: var(--font-cuerpo); font-weight: 700;
  font-size: 0.65rem; color: var(--color-oro);
}
.marker-wrapper { background: transparent !important; border: none !important; }

/* ══════════════════════════════════════════════════════
   CHARTS D3
   ══════════════════════════════════════════════════════ */
.chart-header {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; position: relative;
}

.chart-titulo {
  font-family: var(--font-cuerpo); font-weight: 500;
  font-size: 0.78rem; color: var(--color-oro);
  text-transform: uppercase; letter-spacing: 0.1em;
  text-align: center;
}

.chart-download-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: transparent; border: 1px solid rgba(197,179,88,0.25);
  color: rgba(255,255,255,0.55); border-radius: 4px;
  width: 28px; height: 28px; font-size: 0.7rem;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.chart-download-btn:hover {
  color: var(--color-oro); border-color: var(--color-oro);
}
.tick text {
  fill: rgba(255,255,255,0.5) !important;
  font-family: var(--font-cuerpo) !important;
  font-size: 0.72rem !important;
}
.domain { display: none; }
.tick line { stroke: rgba(255,255,255,0.1); }

.tooltip-d3 {
  position: absolute;
  background: rgba(26,21,40,0.96);
  border: 1px solid var(--color-oro); border-radius: 6px;
  padding: 8px 12px; color: #FFFFFF;
  font-family: var(--font-cuerpo); font-size: 0.8rem;
  pointer-events: none; opacity: 0;
  transition: opacity 0.2s; z-index: 500; max-width: 280px;
}

/* ══════════════════════════════════════════════════════
   MOSAICO — celdas y overlay
   ══════════════════════════════════════════════════════ */
.foto-celda {
  position: relative;
  overflow: hidden; border-radius: 0; cursor: pointer;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  min-height: 0; min-width: 0;
}
.foto-celda.celda-visible { opacity: 1; transform: scale(1); }

.foto-celda img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: center 20%;
  filter: grayscale(100%) contrast(1.1) brightness(0.9) sepia(15%);
  transition: filter 0.4s ease, transform 0.3s ease;
}

.foto-celda:hover img {
  filter: grayscale(100%) contrast(1.1) brightness(1) sepia(15%);
  transform: scale(1.04);
}

/* Ajustes individuales de encuadre para rostros cortados */
.foto-celda[data-id="3"] img  { object-position: 35% 20%; }
.foto-celda[data-id="32"] img { object-position: center 50%; }
.foto-celda[data-id="18"] img { object-position: center 2%; }
.foto-celda[data-id="4"] img  { object-position: center 40%; }
.foto-celda[data-id="43"] img { object-position: center 70%; }

.overlay-foto {
  position: absolute; inset: 0;
  background: rgba(26,21,40,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 3px; opacity: 0; transition: opacity 0.3s ease;
  text-align: center;
}
.foto-celda:hover .overlay-foto { opacity: 1; }

.overlay-nombre {
  font-weight: 500; font-size: 0.58rem; color: #FFFFFF;
  line-height: 1.2; word-break: break-word;
}

.celda-activa {
  outline: 2px solid var(--color-oro); outline-offset: 2px;
  transform: scale(1.06) !important;
}
.celda-activa img { filter: none !important; }

.placeholder-foto {
  width: 100%; height: 100%; background: #2a2040;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.placeholder-silueta { position: absolute; width: 60%; height: 60%; opacity: 0.12; }
.placeholder-iniciales {
  position: relative; font-family: var(--font-cuerpo);
  font-weight: 700; font-size: 1.4rem; color: var(--color-violeta-suave); z-index: 1;
}

#velo-inicial {
  position: absolute; inset: 0; background: #FFFFFF;
  z-index: 5; pointer-events: none; transition: opacity 1.4s ease-out;
}

/* ══════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════ */
#modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,8,20,0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#modal-overlay.abierto { opacity: 1; pointer-events: all; }

#modal-card {
  position: relative; background: #1f1a35;
  border: 1px solid rgba(197,179,88,0.45);
  border-radius: 12px; padding: 2rem;
  max-width: 560px; width: 92%; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.92); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#modal-card.abierto { transform: scale(1); opacity: 1; }

#modal-cerrar {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.55); font-size: 1.4rem;
  cursor: pointer; transition: color 0.2s; z-index: 1; line-height: 1;
  min-width: 36px; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
}
#modal-cerrar:hover { color: var(--color-oro); }

.modal-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 8px 4px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 1;
  min-width: 36px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.modal-nav:hover { color: var(--color-oro); }
.modal-nav--prev { left: 8px; }
.modal-nav--next { right: 8px; }

.modal-header {
  display: flex; gap: 1.2rem;
  align-items: flex-start; margin-bottom: 1.2rem;
}
#modal-foto-wrap {
  width: 110px; height: 110px; flex-shrink: 0;
  border-radius: 50%; border: 3px solid var(--color-oro);
  overflow: hidden; background: #2a2040;
  display: flex; align-items: center; justify-content: center;
}
#modal-foto-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: none; }

.modal-meta h2 { font-size: 1.15rem; color: #FFFFFF; margin-bottom: 6px; }
.modal-meta p { font-size: 0.82rem; color: rgba(255,255,255,0.65); margin-bottom: 3px; }

.historia-pendiente { font-style: italic; color: rgba(255,255,255,0.55); font-size: 0.85rem; }

/* ── Audio player ────────────────────────────────────────── */
.audio-player {
  margin-top: 1.2rem;
  background: linear-gradient(135deg, rgba(72,61,139,0.3) 0%, rgba(26,21,40,0.6) 100%);
  border: 1px solid rgba(197,179,88,0.25);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.audio-player--empty {
  background: rgba(72,61,139,0.12);
  border-color: rgba(255,255,255,0.08);
  padding: 1.2rem;
}
.audio-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-oro);
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.audio-waveform {
  width: 100%;
  height: 30px;
  margin-bottom: 0.6rem;
  display: block;
  border-radius: 4px;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.audio-btn-play {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--color-oro);
  background: transparent;
  color: var(--color-oro);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.audio-btn-play:hover {
  background: var(--color-oro);
  color: #1a1528;
  box-shadow: 0 0 14px rgba(197,179,88,0.4);
}
.audio-btn-play.playing {
  background: rgba(197,179,88,0.15);
  box-shadow: 0 0 10px rgba(197,179,88,0.2);
}
.audio-progress-wrap {
  flex: 1;
  cursor: pointer;
  padding: 6px 0;
}
.audio-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-oro), #e8d97e);
  border-radius: 2px;
  transition: width 0.15s linear;
  position: relative;
}
.audio-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: -3px;
  width: 10px; height: 10px;
  background: var(--color-oro);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(197,179,88,0.5);
}
.audio-time {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 74px;
  text-align: right;
}

/* ── Botones Compartir / Copiar link ──────────────────────── */
.modal-acciones {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
}
.btn-compartir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(197,179,88,0.35);
  background: linear-gradient(135deg, rgba(197,179,88,0.08), rgba(197,179,88,0.02));
  color: var(--color-oro);
  font-family: var(--font-cuerpo);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 44px;
}
.btn-compartir:hover {
  background: linear-gradient(135deg, rgba(197,179,88,0.18), rgba(197,179,88,0.08));
  border-color: rgba(197,179,88,0.6);
  box-shadow: 0 0 16px rgba(197,179,88,0.15);
}
.btn-compartir:active {
  transform: scale(0.97);
}
.btn-compartir:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-compartir svg {
  flex-shrink: 0;
}

/* Spinner de carga para compartir */
.compartir-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(197,179,88,0.25);
  border-top-color: var(--color-oro);
  border-radius: 50%;
  animation: spin-compartir 0.6s linear infinite;
}
@keyframes spin-compartir {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
#pie {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(72,61,139,0.1);
  border-top: 1px solid rgba(197,179,88,0.2);
  padding: 3rem var(--seccion-pad-x);
  text-align: center;
  margin-top: 0;
}
.pie-contenido {
  max-width: 640px;
}

.pie-actualizacion {
  font-size: 0.75rem; color: rgba(255,255,255,0.55);
  margin-bottom: 2rem; letter-spacing: 0.05em;
}

.pie-frase {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  line-height: 1.8; margin-bottom: 2rem;
  min-height: 3.5rem;
}

.tw-frase {
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.tw-exigencia {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-oro);
  letter-spacing: 0.08em;
}

.tw-cursor {
  color: var(--color-oro);
  animation: tw-blink 0.7s step-end infinite;
}

@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.pie-dataset {
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem; line-height: 1.7;
}
.pie-dataset a {
  color: var(--color-oro); text-decoration: none;
  border-bottom: 1px solid rgba(197,179,88,0.4);
  transition: border-color 0.2s;
}
.pie-dataset a:hover { border-color: var(--color-oro); }

.pie-fuentes {
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem; line-height: 1.8;
  text-align: left;
}
.pie-fuentes p { margin-bottom: 0.3rem; }
.pie-fuentes em { color: rgba(255,255,255,0.65); font-style: normal; }
.pie-fuentes a {
  color: var(--color-oro); text-decoration: none; transition: opacity 0.2s;
}
.pie-fuentes a:hover { opacity: 0.75; }

.pie-credito {
  font-size: 0.82rem; color: rgba(255,255,255,0.6);
  margin-top: 1.5rem; margin-bottom: 0.5rem;
}
.pie-credito a {
  color: var(--color-oro); text-decoration: none;
  border-bottom: 1px solid rgba(197,179,88,0.4);
  transition: border-color 0.2s;
}
.pie-credito a:hover { border-color: var(--color-oro); }

.pie-legal {
  font-size: 0.7rem; color: rgba(255,255,255,0.45);
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   ══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-scroll-hint { animation: none; }
  .foto-celda { opacity: 1; transform: none; }
  .match { animation: none; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */

/* Pantallas grandes: contener el ancho */
@media (min-width: 1440px) {
  #mapa { height: 560px; }
}

/* ── Responsive nav (tablet y menor) ─────────────────── */
@media (max-width: 768px) {
  #nav-hamburguesa {
    display: flex;
  }

  #nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,21,40,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  #nav-links.abierto {
    display: flex;
  }

  #nav-links .nav-link {
    font-size: 1.2rem;
    padding: 10px 24px;
  }

  #nav-dots {
    display: none;
  }
}

/* ── Tablet portrait (768px) ─────────────────────────── */
@media (max-width: 768px) {
  :root {
    --seccion-pad-x: 1rem;
    --seccion-pad-top: 2rem;
  }

  /* Mosaico: de 11 a 6 columnas para rostros reconocibles */
  #mosaico-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto;
    height: auto;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
  #mosaico-container { height: auto; max-height: none; }

  /* Mapa */
  #mapa { height: 350px; max-height: 350px; }

  /* Charts: mantener 2 columnas */
  #panel-charts, #panel-charts-2 {
    grid-template-columns: 1fr 1fr;
    max-height: none;
  }

  /* Desactivar snap completo en móvil — evita atasco en secciones altas */
  html { scroll-snap-type: none; }
  .pantalla-snap { min-height: auto; scroll-snap-align: none; }
  #hero { scroll-snap-align: none; }
  #pantalla-cartografia, #pantalla-graficas, #pantalla-anatomia { min-height: auto; }

  /* Muro: liberar altura fija, hacer responsivo */
  #muro-nombres {
    height: auto;
    min-height: auto;
    scroll-snap-align: none;
    overflow: visible;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  #muro-nombres .muro-inner {
    line-height: 1.6;
    padding: 1rem 1.2rem;
  }
  .nombre-muro {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
  }
  .sep-muro {
    margin: 0 0.15rem;
  }

  /* Player */
  #player-control {
    border-left: none;
    padding-left: 0;
    width: 100%;
  }

  /* Modal */
  .modal-header {
    flex-direction: column; align-items: center; text-align: center;
  }
  #modal-card { padding: 1.5rem; width: 96%; }
  #modal-foto-wrap { width: 90px; height: 90px; }
  .audio-controls { gap: 0.5rem; }
  .audio-btn-play { width: 34px; height: 34px; }
  .audio-time { font-size: 0.65rem; min-width: 64px; }

  .contador-numero { font-size: 1.8rem; }

  /* Filtros */
  #filtros-bar { padding: 8px 0.8rem; gap: 6px; }
  .filtros-grupo { flex-wrap: wrap; }
  #input-busqueda { width: 200px; }
}

/* ── Móvil grande (480px) ──────────────────────────── */
@media (max-width: 480px) {
  .titulo-seccion { font-size: 1.1rem; }

  /* Muro: más compacto */
  #muro-nombres .muro-inner {
    line-height: 1.5;
    padding: 0.8rem 1rem;
  }
  .nombre-muro { font-size: clamp(0.7rem, 2.2vw, 0.9rem); }

  /* Mosaico: 4 columnas para que los rostros se vean bien */
  #mosaico-grid {
    grid-template-columns: repeat(4, 1fr);
    max-height: 70vh;
  }
  .foto-celda.span-h { grid-column-end: span 1; }
  .foto-celda.span-v { grid-row-end: span 1; }

  /* Mapa más pequeño */
  #mapa { height: 280px; max-height: 280px; }

  /* Charts: 1 columna */
  #panel-charts, #panel-charts-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  #panel-charts > div,
  #panel-charts-2 > div {
    min-height: 200px;
  }

  /* Filtros */
  #input-busqueda { width: 100%; }
  .filtros-busqueda { width: 100%; }
  .filtro-select { font-size: 0.75rem; padding: 5px 8px; padding-right: 22px; }
  #filtros-bar { gap: 4px; }

  .contador-numero { font-size: 1.5rem; }
  .contador-etiqueta { font-size: 0.6rem; }

  /* Modal nav más accesible */
  .modal-nav { font-size: 1.6rem; padding: 12px 8px; }
  .modal-acciones { flex-direction: column; gap: 8px; }
  .btn-compartir { width: 100%; justify-content: center; }

  /* Vela más pequeña en móvil */
  .match { width: 6vmin; }
}

/* ── Móvil estándar (375px) ──────────────────────────── */
@media (max-width: 375px) {
  .titulo-principal { font-size: 1.6rem; }
  #mapa { height: 240px; max-height: 240px; }

  #mosaico-grid {
    grid-template-columns: repeat(3, 1fr);
    max-height: 60vh;
  }

  #muro-nombres .muro-inner { line-height: 1.4; }
  .nombre-muro { font-size: 0.7rem; }

  .cita-typewriter { font-size: 0.95rem; line-height: 1.8; }
}

/* ── Móvil pequeño (320px) ──────────────────────────── */
@media (max-width: 320px) {
  :root {
    --seccion-pad-x: 0.75rem;
  }

  .titulo-principal { font-size: 1.4rem; }
  .hero-subtitulo { font-size: 0.75rem; }

  #mosaico-grid {
    grid-template-columns: repeat(3, 1fr);
    max-height: 50vh;
  }

  #mapa { height: 200px; max-height: 200px; }

  #panel-charts > div,
  #panel-charts-2 > div {
    min-height: 180px;
  }

  .filtro-select { font-size: 0.7rem; }
  #input-busqueda { font-size: 0.75rem; }
}
