/* Huellitas SOS — Design System HubOne adaptado.
   Mobile-first de verdad: todo el CSS base es para 375px de ancho.
   Los @media solo AGREGAN a partir de tablet. */

:root {
  /* Marca HubOne */
  --primario: #4D42F8;
  --primario-oscuro: #3a30d4;
  --primario-suave: #ecebff;
  --fondo: #f7f8fc;
  --card: #ffffff;

  /* Texto */
  --texto: #1a1c2e;
  --texto-medio: #5a5f7d;
  --texto-suave: #8b90a8;
  --borde: #e4e7f2;

  /* Colores de estado — uno por tipo de reporte, iguales en toda la app:
     badges, pines del mapa y filtros. Todos con contraste AA sobre blanco. */
  --lost: #d92d3c;          /* busco mi mascota */
  --lost-bg: #fdeced;
  --found: #0d8a72;         /* la tengo conmigo */
  --found-bg: #e3f6f1;
  --sighting: #9a6200;      /* la vi suelta */
  --sighting-bg: #fdf1dc;
  --resolved: #4D42F8;      /* reencuentro */
  --resolved-bg: #ecebff;

  --sombra: 0 1px 3px rgba(26, 28, 46, .06), 0 4px 16px rgba(26, 28, 46, .05);
  --sombra-alta: 0 4px 12px rgba(26, 28, 46, .1), 0 12px 32px rgba(26, 28, 46, .08);
  --radio: 14px;
  --radio-sm: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--primario); }

.contenedor { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.oculto { display: none !important; }
.centro { text-align: center; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.cabecera-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--texto); text-decoration: none; }
.logo-img { width: 38px; height: 38px; flex: none; border-radius: 10px; display: block; }
.logo-texto { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.logo-texto strong {
  font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 1.08rem;
  line-height: 1.05; letter-spacing: -.02em;
}
.logo-texto strong span { color: var(--primario); }
/* La firma no debe competir con el nombre: pequena y en gris.
   Sin text-transform: en mayusculas se pierde la capitalizacion de HubOne. */
.logo-texto small {
  font-size: .63rem; line-height: 1; color: var(--texto-suave);
  font-weight: 500; letter-spacing: .01em; white-space: nowrap;
}
.logo-huella { width: 28px; height: 28px; flex: none; }

.nav-links { display: none; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radio-sm); text-decoration: none;
  color: var(--texto-medio); font-size: .92rem; font-weight: 500;
}
.nav-links a:hover, .nav-links a.activo { background: var(--primario-suave); color: var(--primario); }

/* Navegación inferior fija: patrón nativo en celular, el pulgar la alcanza. */
.nav-movil {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  display: flex; background: #fff; border-top: 1px solid var(--borde);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-movil a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; text-decoration: none; color: var(--texto-suave);
  font-size: .68rem; font-weight: 600;
}
.nav-movil a.activo { color: var(--primario); }
.nav-movil svg { width: 21px; height: 21px; }
body { padding-bottom: 64px; }

/* ---------- Banner de emergencia ---------- */
.banner-emergencia {
  background: linear-gradient(135deg, #d92d3c, #b31f2d);
  color: #fff; padding: 12px 0; font-size: .9rem; font-weight: 500;
}
.banner-emergencia .contenedor { display: flex; gap: 10px; align-items: flex-start; }
.banner-emergencia svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--radio-sm); border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .1s;
  min-height: 48px;  /* objetivo tactil comodo */
}
.btn:active { transform: scale(.985); }
.btn-primario { background: var(--primario); color: #fff; }
.btn-primario:hover { background: var(--primario-oscuro); }
.btn-secundario { background: #fff; color: var(--texto); border-color: var(--borde); }
.btn-secundario:hover { border-color: var(--primario); color: var(--primario); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1da851; }
.btn-bloque { width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--card); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 18px;
}
.seccion { padding: 28px 0; }
.seccion-titulo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.seccion-titulo h2 { margin: 0; }
.seccion-titulo a { font-size: .88rem; font-weight: 600; text-decoration: none; }

/* ---------- Badges de estado ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .01em; text-transform: uppercase;
  white-space: nowrap; max-width: calc(100% - 16px); overflow: hidden;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-lost     { background: var(--lost-bg); color: var(--lost); }
.badge-found    { background: var(--found-bg); color: var(--found); }
.badge-sighting { background: var(--sighting-bg); color: var(--sighting); }
.badge-resolved { background: var(--resolved-bg); color: var(--resolved); }

/* ---------- Contadores de la home ---------- */
.contadores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.contador { background: #fff; border-radius: var(--radio); padding: 16px 14px; box-shadow: var(--sombra); border-left: 4px solid var(--borde); }
.contador-num { font-family: 'Roboto', sans-serif; font-size: 1.85rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.contador-label { font-size: .78rem; color: var(--texto-medio); margin-top: 5px; font-weight: 500; }
.contador.c-found    { border-left-color: var(--found); }
.contador.c-found .contador-num { color: var(--found); }
.contador.c-lost     { border-left-color: var(--lost); }
.contador.c-lost .contador-num { color: var(--lost); }
.contador.c-sighting { border-left-color: var(--sighting); }
.contador.c-sighting .contador-num { color: var(--sighting); }
.contador.c-resolved { border-left-color: var(--resolved); }
.contador.c-resolved .contador-num { color: var(--resolved); }

/* ---------- Acciones principales ---------- */
.acciones { display: grid; gap: 10px; }
.accion {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: #fff; border-radius: var(--radio); box-shadow: var(--sombra);
  text-decoration: none; color: var(--texto); border: 2px solid transparent;
  transition: border-color .15s, transform .1s;
}
.accion:active { transform: scale(.99); }
.accion-icono { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.accion-icono svg { width: 24px; height: 24px; }
.accion-texto strong { display: block; font-family: 'Roboto', sans-serif; font-size: 1rem; }
.accion-texto span { font-size: .82rem; color: var(--texto-medio); }
.accion.a-lost .accion-icono     { background: var(--lost-bg); color: var(--lost); }
.accion.a-lost:hover             { border-color: var(--lost); }
.accion.a-found .accion-icono    { background: var(--found-bg); color: var(--found); }
.accion.a-found:hover            { border-color: var(--found); }
.accion.a-sighting .accion-icono { background: var(--sighting-bg); color: var(--sighting); }
.accion.a-sighting:hover         { border-color: var(--sighting); }

/* ---------- Los dos botones grandes ----------
   Rellenos de color, altos y con flecha: tienen que leerse como botones a
   primera vista. Antes eran tarjetas blancas y la gente las tomaba por texto. */
.acciones-grandes { display: grid; gap: 12px; }
.accion-grande {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 16px; border: none; border-radius: var(--radio);
  font-family: inherit; text-align: left; cursor: pointer; color: #fff;
  box-shadow: 0 4px 14px rgba(26, 28, 46, .16);
  transition: transform .12s, box-shadow .12s, filter .12s;
  min-height: 82px;
}
.accion-grande:hover { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(26, 28, 46, .22); }
.accion-grande:active { transform: scale(.985); }
.accion-grande:focus-visible { outline: 3px solid var(--texto); outline-offset: 3px; }
.ag-lost  { background: linear-gradient(135deg, #e8404f, #c31f2d); }
.ag-found { background: linear-gradient(135deg, #10a086, #067a63); }

.ag-icono {
  width: 48px; height: 48px; flex: none; border-radius: 13px;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center;
}
.ag-icono svg { width: 25px; height: 25px; stroke-width: 2.2; }
.ag-texto { flex: 1; min-width: 0; }
.ag-texto strong {
  display: block; font-family: 'Roboto', sans-serif; font-size: 1.16rem;
  line-height: 1.2; letter-spacing: -.02em;
}
.ag-texto small { display: block; font-size: .82rem; opacity: .9; margin-top: 2px; line-height: 1.3; }
.ag-flecha { flex: none; opacity: .85; }
.ag-flecha svg { width: 20px; height: 20px; display: block; }

/* Version reducida para buscar.html y mapa.html */
.acciones-grandes.compactas .accion-grande { min-height: 64px; padding: 13px 14px; gap: 11px; }
.acciones-grandes.compactas .ag-icono { width: 38px; height: 38px; border-radius: 10px; }
.acciones-grandes.compactas .ag-icono svg { width: 20px; height: 20px; }
.acciones-grandes.compactas .ag-texto strong { font-size: 1rem; }
.acciones-grandes.compactas .ag-texto small { display: none; }

.nav-cta { display: none; }

/* ---------- Popup de reporte ---------- */
body.sin-scroll { overflow: hidden; }

.modal-fondo {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 22, 40, .55);
  display: none; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.modal-fondo.visible { display: flex; opacity: 1; }

.modal {
  background: var(--fondo); width: 100%; max-height: 94vh;
  border-radius: var(--radio) var(--radio) 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  animation: subir .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes subir { from { transform: translateY(4%); } to { transform: none; } }

.modal-cabecera {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px 13px; background: #fff; border-bottom: 1px solid var(--borde); flex: none;
}
.modal-cabecera h2 { margin: 0; font-size: 1.24rem; }
.modal-etiqueta {
  display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px;
}
.modal-etiqueta.et-lost  { background: var(--lost-bg); color: var(--lost); }
.modal-etiqueta.et-found { background: var(--found-bg); color: var(--found); }
.modal-cerrar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--borde);
  background: #fff; color: var(--texto-medio); cursor: pointer; display: grid; place-items: center;
}
.modal-cerrar:hover { background: var(--fondo); color: var(--texto); }
.modal-cerrar svg { width: 19px; height: 19px; }

.modal-cuerpo { padding: 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-cuerpo .card { box-shadow: none; border: 1px solid var(--borde); }

/* Grupos del formulario: la persona ve de un vistazo que le estan pidiendo
   datos de la mascota, del sitio o suyos, en vez de una lista mezclada. */
.grupo {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 16px 15px 4px; margin-bottom: 14px;
}
.grupo-titulo {
  display: flex; align-items: center; gap: 9px;
  font-size: 1.02rem; margin: 0 0 14px; padding-bottom: 11px;
  border-bottom: 1px solid var(--borde);
}
.grupo-num {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  background: var(--primario-suave); color: var(--primario);
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
}

.btn-grande { min-height: 54px; font-size: 1rem; margin-top: 4px; }
.dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req { color: var(--lost); }
.opcional { font-weight: 400; color: var(--texto-suave); }
.drop-ico { width: 30px; margin: 0 auto 6px; }
.op-ico { display: block; }
.op-ico svg { width: 22px; height: 22px; }
.op-tenencia label { font-size: .88rem; }

/* ---------- Grid de reportes ---------- */
.grid-reportes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reporte-card {
  background: #fff; border-radius: var(--radio); overflow: hidden;
  box-shadow: var(--sombra); text-decoration: none; color: var(--texto);
  display: flex; flex-direction: column; transition: box-shadow .15s, transform .1s;
}
.reporte-card:active { transform: scale(.99); }
.reporte-card:hover { box-shadow: var(--sombra-alta); }
.reporte-foto { position: relative; aspect-ratio: 4 / 3; background: var(--primario-suave); overflow: hidden; }
.reporte-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reporte-foto .sin-foto { width: 100%; height: 100%; display: grid; place-items: center; color: #b9b6ee; }
.reporte-foto .sin-foto svg { width: 44px; height: 44px; }
.reporte-foto .badge { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.95); backdrop-filter: blur(4px); }
.reporte-body { padding: 11px 12px 13px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.reporte-nombre { font-family: 'Roboto', sans-serif; font-weight: 700; font-size: .95rem; line-height: 1.25; }
.reporte-meta { font-size: .78rem; color: var(--texto-medio); }
.reporte-zona { font-size: .78rem; color: var(--texto-suave); display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 5px; }
.reporte-zona svg { width: 13px; height: 13px; flex: none; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 15px; }
.campo label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.campo .ayuda { font-size: .78rem; color: var(--texto-suave); font-weight: 400; margin-top: 4px; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--borde); border-radius: var(--radio-sm);
  font-family: inherit; font-size: 16px;  /* 16px evita el zoom automatico de iOS */
  background: #fff; color: var(--texto); min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primario); box-shadow: 0 0 0 3px var(--primario-suave); }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

/* Selector visual de tipo/especie: botones grandes, no radios diminutos */
.opciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opciones input { position: absolute; opacity: 0; pointer-events: none; }
.opciones label {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border: 2px solid var(--borde); border-radius: var(--radio-sm);
  background: #fff; cursor: pointer; text-align: center; font-size: .82rem;
  font-weight: 600; margin: 0; min-height: 48px; justify-content: center;
}
.opciones label svg { width: 22px; height: 22px; }
.opciones input:checked + label { border-color: var(--primario); background: var(--primario-suave); color: var(--primario); }
.opciones.op-2 { grid-template-columns: repeat(2, 1fr); }
.opciones.op-tipo input[value=lost]:checked + label     { border-color: var(--lost); background: var(--lost-bg); color: var(--lost); }
.opciones.op-tipo input[value=found]:checked + label    { border-color: var(--found); background: var(--found-bg); color: var(--found); }
.opciones.op-tipo input[value=sighting]:checked + label { border-color: var(--sighting); background: var(--sighting-bg); color: var(--sighting); }

/* Lo opcional va colapsado: el formulario visible se ve corto */
.desplegable { border: 1px solid var(--borde); border-radius: var(--radio-sm); background: #fff; margin-bottom: 15px; }
.desplegable summary { padding: 13px 15px; font-weight: 600; font-size: .9rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.desplegable summary::-webkit-details-marker { display: none; }
.desplegable summary::after { content: '+'; font-size: 1.3rem; color: var(--texto-suave); font-weight: 400; }
.desplegable[open] summary::after { content: '−'; }
.desplegable-body { padding: 0 15px 8px; border-top: 1px solid var(--borde); padding-top: 15px; }

.pasos { display: flex; gap: 6px; margin-bottom: 18px; }
.paso { flex: 1; height: 4px; border-radius: 2px; background: var(--borde); }
.paso.activo { background: var(--primario); }

.error-caja { background: var(--lost-bg); color: var(--lost); border-radius: var(--radio-sm); padding: 12px 14px; font-size: .88rem; margin-bottom: 15px; }
.error-caja ul { margin: 6px 0 0; padding-left: 18px; }
.aviso-caja { background: var(--sighting-bg); color: var(--sighting); border-radius: var(--radio-sm); padding: 12px 14px; font-size: .88rem; margin-bottom: 15px; }
.ok-caja { background: var(--found-bg); color: var(--found); border-radius: var(--radio-sm); padding: 12px 14px; font-size: .88rem; margin-bottom: 15px; }

/* Fotos */
.fotos-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.foto-mini { position: relative; width: 74px; height: 74px; border-radius: var(--radio-sm); overflow: hidden; border: 1px solid var(--borde); }
.foto-mini img { width: 100%; height: 100%; object-fit: cover; }
.foto-mini button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; display: grid; place-items: center; }
.zona-drop {
  border: 2px dashed var(--borde); border-radius: var(--radio-sm); padding: 20px 14px;
  text-align: center; color: var(--texto-medio); font-size: .9rem; cursor: pointer; background: #fff;
}
.zona-drop:hover { border-color: var(--primario); color: var(--primario); }
.zona-drop strong { display: block; font-weight: 600; color: var(--texto); }
.zona-drop:hover strong { color: var(--primario); }
.drop-sub { font-size: .78rem; color: var(--texto-suave); margin-top: 2px; }
#m-btn-camara svg { width: 18px; height: 18px; }

/* Ubicacion: se escribe a mano, o se toma del GPS y se rellena sola */
#m-btn-ubicacion svg { width: 17px; height: 17px; }
.nota-detalles {
  background: var(--primario-suave); color: #3a30d4; border-radius: var(--radio-sm);
  padding: 12px 14px; font-size: .85rem; line-height: 1.45; margin-bottom: 14px;
}

/* ---------- Filtros ---------- */
.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--borde);
  background: #fff; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--texto-medio);
  white-space: nowrap; font-family: inherit; min-height: 38px;
}
.chip.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
/* select e input dentro de los filtros: sin esto el select se come toda la fila */
.filtros select.chip, .filtros input.chip { max-width: 150px; min-height: 38px; padding: 6px 12px; }
.chip.activo.c-lost     { background: var(--lost); border-color: var(--lost); }
.chip.activo.c-found    { background: var(--found); border-color: var(--found); }
.chip.activo.c-sighting { background: var(--sighting); border-color: var(--sighting); }

/* ---------- Mapa ---------- */
#mapa { height: 62vh; min-height: 340px; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); width: 22px; height: 22px; }
.pin-lost { background: var(--lost); }
.pin-found { background: var(--found); }
.pin-sighting { background: var(--sighting); }
.pin-resolved { background: var(--resolved); }
.leaflet-popup-content { margin: 10px 12px; font-family: 'Inter', sans-serif; }

/* ---------- Detalle ---------- */
.detalle-galeria { border-radius: var(--radio); overflow: hidden; background: var(--primario-suave); aspect-ratio: 4/3; }
.detalle-galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detalle-miniaturas { display: flex; gap: 6px; margin-top: 8px; }
.detalle-miniaturas img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.detalle-miniaturas img.activa { border-color: var(--primario); }
.datos { list-style: none; padding: 0; margin: 0; }
.datos li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); font-size: .9rem; }
.datos li:last-child { border-bottom: none; }
.datos span:first-child { color: var(--texto-medio); }
.datos span:last-child { font-weight: 600; text-align: right; }

/* ---------- Emergencias y legal ---------- */
.emergencias { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }
.emergencias-lista { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.emergencia-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--fondo); border-radius: var(--radio-sm); text-decoration: none; color: var(--texto);
}
.emergencia-num { font-family: 'Roboto', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--lost); flex: none; }
.emergencia-nom { font-size: .78rem; color: var(--texto-medio); line-height: 1.25; }

.legal {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--sighting-bg); color: #7a4e00; border-radius: var(--radio);
  padding: 13px 15px; font-size: .83rem; line-height: 1.5;
}
.legal svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }

.pie { background: #fff; border-top: 1px solid var(--borde); padding: 24px 0; margin-top: 32px; font-size: .84rem; color: var(--texto-medio); }
.pie a { color: var(--texto-medio); }
.pie-marca { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pie-marca img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.pie-marca strong { display: block; font-family: 'Roboto', sans-serif; font-size: .98rem; color: var(--texto); line-height: 1.1; }
.pie-marca small { font-size: .72rem; color: var(--texto-suave); }

/* ---------- Estados de carga / vacío ---------- */
.skeleton { background: linear-gradient(90deg, #eef0f7 25%, #f7f8fc 50%, #eef0f7 75%); background-size: 200% 100%; animation: brillo 1.3s infinite; border-radius: var(--radio); }
@keyframes brillo { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.vacio { text-align: center; padding: 40px 20px; color: var(--texto-suave); }
.vacio svg { width: 52px; height: 52px; margin-bottom: 10px; opacity: .45; }

/* ---------- Tablet: 640px ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.45rem; }
  .contenedor { padding: 0 24px; }
  .contadores { grid-template-columns: repeat(4, 1fr); }
  .grid-reportes { grid-template-columns: repeat(3, 1fr); }
  .acciones-grandes { grid-template-columns: 1fr 1fr; }
  .emergencias-lista { grid-template-columns: repeat(3, 1fr); }
  .seccion { padding: 36px 0; }
}

/* ---------- Escritorio: 960px ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .nav-movil { display: none; }
  .nav-links { display: flex; align-items: center; }
  .nav-cta { display: inline-flex; margin-left: 8px; }
  .cabecera-inner { height: 66px; }
  /* El popup se centra como dialogo en vez de subir desde abajo */
  .modal-fondo { align-items: center; }
  .modal { max-width: 620px; border-radius: var(--radio); max-height: 88vh; }
  .grid-reportes { grid-template-columns: repeat(4, 1fr); }
  .emergencias-lista { grid-template-columns: repeat(5, 1fr); }
  .dos-columnas { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
  .form-estrecho { max-width: 620px; margin: 0 auto; }
  #mapa { height: 68vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
