/* venezuelainfo.org — estilos. Paleta inspirada en la bandera de Venezuela. */
:root {
  --amarillo: #FCDD09;
  --azul: #00247D;
  --rojo: #CF142B;
  --tinta: #14213d;
  --gris: #5b6472;
  --fondo: #f7f8fb;
  --tarjeta: #ffffff;
  --borde: #e6e8ef;
  /* --enlace: color de TEXTO azul (enlaces/titulos). Igual a --azul en claro,
     mas claro en oscuro. --azul queda solo para fondos (botones, thead). */
  --enlace: #00247D;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  line-height: 1.6;
}

a { color: var(--enlace); }

/* ---- Header ---- */
.flag-stripe {
  height: 6px;
  background: linear-gradient(to bottom,
    var(--amarillo) 0 33.33%,
    var(--azul) 33.33% 66.66%,
    var(--rojo) 66.66% 100%);
}
.site-header {
  background: var(--tarjeta);
  border-bottom: 1px solid var(--borde);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--enlace);
  letter-spacing: -0.5px;
}
.brand span { color: var(--rojo); }
.site-header nav a {
  margin-left: 18px;
  text-decoration: none;
  font-weight: 600;
  color: var(--tinta);
}
.site-header nav a:hover { color: var(--rojo); }

/* ---- Contenedor ---- */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--azul), #021a5c);
  color: #fff;
  border-radius: 16px;
  padding: 44px 32px;
  margin-bottom: 36px;
}
.hero h1 { margin: 0 0 8px; font-size: 2.2rem; }
.hero .lede { margin: 0 0 20px; color: #d7e0f5; font-size: 1.1rem; }
.cta {
  display: inline-block;
  background: var(--amarillo);
  color: var(--tinta);
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 9px;
  text-decoration: none;
}
.cta:hover { filter: brightness(0.95); }

/* ---- Clima ---- */
.weather {
  background: linear-gradient(135deg, #0a3d91, #021a5c);
  color: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.weather-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-head h2 { margin: 0; font-size: 1.15rem; }
.w-city {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
}
.w-city option { color: #14213d; }
.weather-body { margin-top: 10px; }
.w-main { display: flex; align-items: center; gap: 12px; }
.w-emoji { font-size: 2.4rem; line-height: 1; }
.w-temp { font-size: 2.4rem; font-weight: 800; }
.w-desc { font-size: 1.05rem; color: #d7e0f5; }
.w-meta { margin-top: 4px; font-size: .85rem; color: #aebde6; }
.weather-card { display: block; text-decoration: none; color: #fff; transition: transform .12s ease; }
.weather-card:hover { transform: translateY(-2px); }
.w-city-name { color: #d7e0f5; font-weight: 600; }
.weather-more { margin-top: 10px; font-weight: 700; color: var(--amarillo); font-size: .9rem; }

/* ---- Pagina /clima ---- */
.clima h1 { color: var(--enlace); margin: 6px 0 2px; }
.clima .lede { color: var(--gris); margin-top: 0; }
.clima-buscar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.clima-buscar input { flex: 1 1 200px; padding: 9px 12px; border: 1px solid var(--borde); border-radius: 8px; font: inherit; }
.clima-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.c-res { text-align: left; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 8px; padding: 9px 12px; cursor: pointer; font: inherit; color: var(--tinta); }
.c-res:hover { border-color: var(--enlace); }
.c-res small { color: var(--gris); }
.clima-title { color: var(--enlace); margin: 14px 0 6px; }
.clima-h3 { color: var(--tinta); margin: 22px 0 8px; font-size: 1.05rem; }
.clima-actual { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 16px; }
.ca-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ca-emoji { font-size: 2.6rem; }
.ca-temp { font-size: 2.4rem; font-weight: 800; color: var(--tinta); }
.ca-desc { color: var(--gris); font-size: 1.05rem; }
.ca-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.ca-grid > div { background: var(--fondo); border-radius: 8px; padding: 8px 10px; }
.ca-grid span { display: block; color: var(--gris); font-size: .72rem; }
.ca-grid b { color: var(--tinta); }
.ca-sun { margin-top: 12px; color: var(--gris); font-size: .88rem; }
.clima-horas { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.ch-item { flex: 0 0 auto; width: 64px; text-align: center; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; padding: 8px 4px; }
.ch-h { display: block; font-size: .75rem; color: var(--gris); }
.ch-e { display: block; font-size: 1.3rem; }
.ch-t { display: block; font-weight: 700; }
.ch-p { display: block; font-size: .72rem; color: var(--enlace); }
.clima-dias { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.cd-item { text-align: center; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; padding: 10px 4px; }
.cd-d { display: block; font-weight: 700; color: var(--enlace); }
.cd-e { display: block; font-size: 1.5rem; margin: 2px 0; }
.cd-mx { font-weight: 700; }
.cd-mn { color: var(--gris); margin-left: 4px; }
.cd-p { display: block; font-size: .72rem; color: var(--enlace); }
.ca-aqi { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--tarjeta); border: 2px solid var(--borde); border-radius: 12px; padding: 12px 16px; }
.aqi-num { font-size: 2rem; font-weight: 800; }
.aqi-lab { font-weight: 700; color: var(--tinta); }
.aqi-pm { color: var(--gris); font-size: .85rem; }

/* ---- Finanzas (dolar BCV) ---- */
.finanzas {
  background: linear-gradient(135deg, #0f5132, #146c43);
  color: #fff; border-radius: 16px; padding: 20px 24px; margin-bottom: 28px;
}
.fin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fin-head h2 { margin: 0; font-size: 1.15rem; }
.fin-tag { background: rgba(255,255,255,.18); padding: 3px 9px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.fin-body { margin-top: 10px; }
.fin-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.fin-row:last-of-type { border-bottom: 0; }
.fin-lab { color: #d7f0e2; }
.fin-val { font-size: 1.5rem; font-weight: 800; }
.fin-brecha { margin-top: 6px; color: #ffe08a; font-weight: 700; font-size: .9rem; }
.fin-meta { margin-top: 4px; color: #aed7be; font-size: .82rem; }
.finanzas-card { display: block; text-decoration: none; color: #fff; transition: transform .12s ease; }
.finanzas-card:hover { transform: translateY(-2px); }

/* Pagina /finanzas */
.finz h1 { color: var(--enlace); margin: 6px 0 2px; }
.finz .lede { color: var(--gris); margin-top: 0; }
.finz-h { color: var(--tinta); margin: 22px 0 8px; font-size: 1.1rem; }
.finz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fz-item { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; }
.fz-l { display: block; color: var(--gris); font-size: .78rem; }
.fz-v { display: block; font-size: 1.4rem; font-weight: 800; color: var(--tinta); }
.fz-s { display: block; color: var(--rojo); font-size: .78rem; font-weight: 600; }
.finz-ibc { background: #0f5132; color: #fff; border-radius: 10px; padding: 12px 16px; font-weight: 700; margin-bottom: 10px; }

/* ---- Calculadora de finanzas ---- */
.fz-calc { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.calc-head .finz-h { margin: 0; }
.calc-actions { display: flex; gap: 8px; }
.calc-share, .calc-copy { background: transparent; color: var(--enlace); border: 1.5px solid currentColor; border-radius: 8px; padding: 5px 12px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.calc-share:hover, .calc-copy:hover { color: var(--rojo); }
/* Enlace a la calculadora desde /finanzas */
.finz-calc-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 6px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; text-decoration: none; color: var(--tinta); }
.finz-calc-link:hover { border-color: var(--azul); }
.finz-calc-ico { font-size: 1.6rem; line-height: 1; }
.finz-calc-txt { display: flex; flex-direction: column; flex: 1 1 auto; }
.finz-calc-txt strong { color: var(--enlace); }
.finz-calc-txt span { color: var(--gris); font-size: .85rem; }
.finz-calc-arrow { color: var(--enlace); font-size: 1.3rem; }
/* Enlace discreto "Instalar como app" (/calculadora) */
.calc-install-link { display: inline-block; margin: 0 0 12px; padding: 0; border: 0; background: none; color: var(--enlace); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.calc-install-link:hover { color: var(--rojo); }
/* Hint de instalación en iOS (/calculadora) */
.calc-ios-hint { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; font-size: .9rem; color: var(--tinta); }
.calc-ios-hint span { flex: 1 1 auto; }
.calc-ios-hint strong { color: var(--enlace); }
.calc-ios-hint button { flex: 0 0 auto; border: 0; background: transparent; color: var(--gris); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.calc-panel { display: flex; align-items: center; gap: 8px; border: 1px solid var(--borde); border-radius: 10px; padding: 4px 10px; background: var(--tarjeta); }
.calc-amt { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--tinta); font: inherit; font-size: 1.5rem; font-weight: 700; padding: 8px 2px; outline: none; }
.calc-result { flex: 1 1 auto; min-width: 0; font-size: 1.5rem; font-weight: 800; color: var(--enlace); padding: 8px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-rate-sel { display: block; width: 100%; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--borde); border-radius: 8px; font: inherit; font-weight: 600; background: var(--tarjeta); color: var(--tinta); cursor: pointer; }
.calc-sels { display: flex; gap: 8px; align-items: flex-start; }
.calc-sels .calc-rate-sel { flex: 1 1 auto; }
.calc-day-wrap { flex: 0 0 auto; }
.calc-day-wrap .calc-rate-sel { width: auto; }
.pay-share-row { margin-top: 10px; font-size: .9rem; color: var(--gris); }
.pay-sel { font: inherit; padding: 4px 8px; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); color: var(--tinta); }
.pay-box { margin-top: 14px; border: 1px solid var(--borde); border-radius: 12px; padding: 10px 14px; background: var(--tarjeta); }
.pay-box summary { cursor: pointer; font-weight: 700; color: var(--enlace); }
.pay-note { font-size: .8rem; color: var(--gris); margin: 8px 0; }
.pay-lab { display: block; font-size: .85rem; font-weight: 600; color: var(--tinta); margin-top: 10px; }
.pay-ta { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 8px; font: inherit; background: var(--fondo); color: var(--tinta); resize: vertical; box-sizing: border-box; }
.pay-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pay-save { padding: 8px 16px; border: 0; border-radius: 8px; background: var(--azul); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pay-status { font-size: .85rem; color: var(--verde, #1a7f37); font-weight: 700; }
.calc-unit { flex: 0 0 auto; min-width: 2.2em; text-align: right; font-weight: 700; color: var(--gris); }
/* Mini-calculadora de expresión */
.mc-toggle { flex: 0 0 auto; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); font-size: 1.1rem; line-height: 1; padding: 7px 9px; cursor: pointer; }
.mc-toggle:hover { border-color: var(--azul); }
.mc-panel { display: none; margin: 8px 0 2px; padding: 10px; border: 1px solid var(--borde); border-radius: 10px; background: var(--tarjeta); }
.mc-panel.open { display: block; }
.mc-row { display: flex; gap: 8px; }
.mc-expr { flex: 1 1 auto; min-width: 0; padding: 9px 10px; border: 1px solid var(--borde); border-radius: 8px; font: inherit; font-size: 1.1rem; background: var(--fondo); color: var(--tinta); }
.mc-eq { flex: 0 0 auto; border: 1px solid var(--azul); border-radius: 8px; background: var(--azul); color: #fff; font-weight: 800; padding: 0 16px; cursor: pointer; }
.mc-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mc-ops button { flex: 1 1 auto; min-width: 40px; border: 1px solid var(--borde); border-radius: 8px; background: var(--fondo); color: var(--tinta); font: inherit; font-size: 1rem; padding: 8px 0; cursor: pointer; }
.mc-ops button:hover { border-color: var(--azul); }
.mc-out { margin-top: 8px; color: var(--enlace); font-weight: 700; min-height: 1.1em; }
.calc-swap-wrap { display: flex; justify-content: center; margin: 6px 0; }
.calc-swap { width: 40px; height: 40px; border: 1px solid var(--azul); border-radius: 50%; background: var(--tarjeta); color: var(--enlace); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.calc-swap:hover { background: var(--azul); color: #fff; }
.calc-rate { margin-top: 10px; color: var(--gris); font-size: .85rem; }
.calc-wait { color: var(--gris); font-size: 1rem; font-weight: 400; }

/* ---- Articulos ---- */
.articles h2 { font-size: 1.4rem; margin-bottom: 18px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  display: block;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(20,33,61,.08);
  border-color: var(--amarillo);
}
.card h3 { margin: 0 0 6px; color: var(--enlace); }
.card-date { font-size: .82rem; color: var(--gris); }
.card p { margin: 8px 0 0; color: var(--gris); }

/* ---- Articulo ---- */
.article { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 32px; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.article-title { margin: 0 0 4px; color: var(--enlace); }
.article-date { color: var(--gris); margin: 0 0 22px; font-size: .9rem; }
.article-body h1, .article-body h2, .article-body h3 { color: var(--tinta); margin-top: 1.5em; }
.article-body a { color: var(--rojo); }
.article-body pre {
  background: #0f1b3d; color: #e7ecf7; padding: 16px; border-radius: 10px; overflow-x: auto;
}
.article-body code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }

/* ---- Sismos ---- */
.sismos h1 { color: var(--enlace); margin-bottom: 4px; }
.sismos .lede { color: var(--gris); margin-top: 0; }
#sismos-map {
  height: 400px;
  width: 100%;
  border: 1px solid var(--borde);
  border-radius: 12px;
  margin: 18px 0 12px;
  z-index: 0;
}
.sismo-detalle {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-left: 4px solid var(--azul);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--tinta);
  font-size: .95rem;
}
.sismo-detalle.show { border-left-color: var(--rojo); }
.sismos .hint { color: var(--gris); font-size: .85rem; margin: 8px 0 0; }

/* barra de filtros */
.filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 0;
  font-size: .9rem;
}
.filtros label { color: var(--tinta); display: inline-flex; align-items: center; gap: 6px; }
.filtros select, .filtros input {
  padding: 6px 8px;
  border: 1px solid var(--borde);
  border-radius: 7px;
  font: inherit;
}
.filtros input[type="number"] { width: 110px; }
.filtros input:disabled { background: #f1f2f6; color: #9aa0ab; }
.geo-btn {
  background: var(--azul);
  color: #fff;
  border: 0;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.geo-btn:hover { filter: brightness(1.08); }
.geo-status { color: var(--gris); font-size: .82rem; }
.f-count { margin-left: auto; color: var(--gris); font-size: .82rem; }
.f-dist-val { color: var(--enlace); font-weight: 600; font-size: .82rem; min-width: 88px; display: inline-block; }
.quakes td.dist { white-space: nowrap; color: var(--enlace); font-weight: 600; }
.quakes tbody tr { cursor: pointer; }
/* Anchos de columna: Profundidad (3) y Distancia (5) estrechas; Lugar (4) se lleva el resto */
.quakes th:nth-child(1), .quakes td:nth-child(1) { white-space: nowrap; width: 1%; }
.quakes th:nth-child(2), .quakes td:nth-child(2) { white-space: nowrap; width: 1%; text-align: center; }
.quakes th:nth-child(3), .quakes td:nth-child(3) { white-space: nowrap; width: 1%; text-align: right; }
.quakes th:nth-child(4), .quakes td:nth-child(4) { width: 100%; white-space: normal; }
.quakes th:nth-child(5), .quakes td:nth-child(5) { white-space: nowrap; width: 1%; text-align: right; }
.quakes tbody tr.sel { background: #fff6f6; box-shadow: inset 3px 0 0 var(--rojo); }
.tabla-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.quakes {
  width: 100%;
  border-collapse: collapse;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 18px;
}
.quakes th, .quakes td { padding: 3px 9px; text-align: left; border-bottom: 1px solid var(--borde); vertical-align: middle; }
/* Magnitud (2) y Distancia (5) mas estrechas */
.quakes th:nth-child(2), .quakes td:nth-child(2),
.quakes th:nth-child(5), .quakes td:nth-child(5) { padding-left: 5px; padding-right: 5px; }
.quakes .mag { font-size: .92rem; }
.quakes td.dist { font-size: .82rem; }
.quakes td.fh { line-height: 1.1; }
.quakes td.fh .f-dia { display: block; font-weight: 600; }
.quakes td.fh .f-hora { display: block; color: var(--gris); font-size: .8rem; }
.quakes thead th { background: var(--azul); color: #fff; font-weight: 600; }
.quakes tbody tr:hover { background: #fcfcff; }
.quakes .mag { font-weight: 700; color: var(--rojo); }
.error { background: #fff3f3; border: 1px solid #f3c2c2; color: #8a1f1f; padding: 14px 16px; border-radius: 10px; }

/* ---- Sismos: encabezado, paginacion, detalle ---- */
.sismos-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin: 6px 0 14px;
}
.s-count { font-weight: 700; color: var(--enlace); }
.s-updated { color: var(--gris); font-size: .85rem; }
.filtros-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--tarjeta); border: 1px solid var(--borde); color: var(--enlace);
  padding: 6px 12px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.filtros-btn:hover { border-color: var(--enlace); }
.filtros-btn.on { background: var(--azul); color: #fff; border-color: var(--enlace); }
.filtros[hidden] { display: none; }

/* Avisos push (widget global en el pie) */
.push-foot {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin: 0 auto 12px; padding: 10px 14px; max-width: 100%;
  background: var(--tarjeta); border: 2px solid var(--enlace); border-radius: 10px;
  font-size: .88rem;
}
.push-foot[hidden] { display: none; }
.push-foot-lbl { font-weight: 700; color: var(--enlace); }
.push-foot label { display: inline-flex; align-items: center; gap: 5px; }
.push-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--azul); color: #fff; border: 1px solid var(--enlace);
  padding: 7px 18px; border-radius: 8px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 6px rgba(20, 33, 61, .22);
  animation: push-pulse 2.4s ease-in-out infinite;
}
.push-btn:hover { filter: brightness(1.08); animation: none; }
.push-btn.on {
  background: var(--tarjeta); color: var(--enlace);
  box-shadow: none; animation: none;
}
@keyframes push-pulse {
  0%, 100% { box-shadow: 0 1px 6px rgba(20, 33, 61, .22); }
  50% { box-shadow: 0 0 0 4px rgba(20, 33, 61, .14), 0 1px 6px rgba(20, 33, 61, .22); }
}
@media (prefers-reduced-motion: reduce) {
  .push-btn { animation: none; }
}
.push-topics-btn {
  background: none; border: none; color: var(--enlace); cursor: pointer;
  font-size: .85rem; padding: 4px 6px;
}
.push-topics { display: inline-flex; gap: 12px; flex-wrap: wrap; flex-basis: 100%; justify-content: center; }
.push-topics[hidden] { display: none; }
.push-status { color: var(--gris); font-size: .82rem; }
/* Banda de detalle desplegada dentro de la misma fila */
.detalle-row > td { background: #fff6f6; padding: 0; }
.detalle-band { padding: 14px 16px; border-left: 4px solid var(--rojo); line-height: 1.6; }
.detalle-band .detalle-acciones { margin-top: 10px; }
.sismo-detalle[hidden] { display: none; }
.detalle-acciones { margin-top: 12px; }
.btn-map {
  display: inline-block; background: var(--azul); color: #fff;
  padding: 9px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.btn-map:hover { filter: brightness(1.08); }
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 16px 0 6px;
}
.pg-btn {
  background: var(--tarjeta); border: 1px solid var(--borde); color: var(--enlace);
  padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.pg-btn:disabled { color: #aab; cursor: default; opacity: .6; }
.p-info { color: var(--gris); font-size: .9rem; min-width: 56px; text-align: center; }

/* ---- Pagina de detalle de un sismo ---- */
.sismo-detail h1 { color: var(--enlace); margin: 6px 0 2px; }
.sismo-detail .lede { color: var(--gris); margin-top: 0; }
.qmap {
  height: 62vh; min-height: 360px; width: 100%;
  border: 1px solid var(--borde); border-radius: 12px; margin: 14px 0; z-index: 0;
}
.detail-info {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 8px;
}
.detail-info > div {
  background: var(--tarjeta); border: 1px solid var(--borde);
  border-radius: 10px; padding: 10px 14px;
}
.detail-info span { display: block; color: var(--gris); font-size: .78rem; }
.detail-info strong { color: var(--tinta); font-size: 1.05rem; }

/* ---- Tarjeta de sismo destacado (mas fuerte 24 h) ---- */
.destacado {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #8a1020, var(--rojo));
  color: #fff; border-radius: 12px; padding: 12px 16px; margin: 10px 0 14px;
  text-decoration: none;
}
.destacado[hidden] { display: none; }
.destacado-tag {
  background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 6px;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.destacado-mag { font-size: 1.5rem; font-weight: 800; }
.destacado-info { color: #ffe9ec; font-size: .9rem; }
.destacado.vacio {
  background: var(--tarjeta); color: var(--gris); border: 1px solid var(--borde);
}
.destacado.vacio .destacado-tag { background: var(--borde); color: var(--tinta); }

/* ---- Noticias ---- */
.news h1 { color: var(--enlace); margin: 6px 0 2px; }
.news .lede { color: var(--gris); margin-top: 0; }
.news-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.news-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline;
  gap: 10px; background: var(--tarjeta); border: 1px solid var(--borde);
  border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit;
}
.news-item:hover { border-color: var(--enlace); }
.news-src {
  align-self: center; background: var(--azul); color: #fff; font-size: .68rem;
  font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.news-title { color: var(--tinta); font-weight: 600; }
.news-item:hover .news-title { color: var(--enlace); }
.news-date { color: var(--gris); font-size: .75rem; white-space: nowrap; }
.news-sum { grid-column: 2 / 4; color: var(--gris); font-size: .88rem; margin-top: 2px; }
.news-fuentes { color: var(--gris); font-size: .8rem; }
/* detalle expandible de noticia */
.news-list .news-item { cursor: pointer; }
.news-detail { display: none; grid-column: 1 / -1; margin-top: 8px; }
.news-item.open .news-detail { display: block; }
.news-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.news-full { color: var(--tinta); line-height: 1.6; margin: 0 0 12px; }

/* avance de noticias en la portada */
.news-preview { margin-bottom: 28px; }
.np-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.np-head h2 { margin: 0; color: var(--enlace); font-size: 1.4rem; }
.np-head a { font-weight: 700; text-decoration: none; }
.news-list.compact .news-item { padding: 9px 12px; }

/* configuracion/orden de tarjetas de la portada */
.cards-cfg { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.cfg-btn { background: var(--tarjeta); border: 1px solid var(--borde); color: var(--enlace); border-radius: 50%; width: 38px; height: 38px; font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cfg-btn:hover { border-color: var(--enlace); }
.cfg-btn.on { background: var(--azul); color: #fff; border-color: var(--enlace); }
.home-card { position: relative; }
#home-cards.editing .home-card { outline: 2px dashed var(--amarillo); outline-offset: 3px; border-radius: 14px; cursor: grab; }
#home-cards.editing .home-card:active { cursor: grabbing; }
.home-card.dragging { opacity: .5; }
.card-move { display: none; }
#home-cards.editing .card-move { display: flex; flex-direction: column; gap: 6px; position: absolute; top: 8px; right: 8px; z-index: 6; }
.cm-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--azul); background: var(--tarjeta); color: var(--enlace); font-size: .95rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.cm-btn:active { background: var(--azul); color: #fff; }
/* botones del header (Compartir + Instalar app) */
.header-actions { display: flex; align-items: center; gap: 8px; }
.pwa-install { background: var(--amarillo); color: var(--tinta); border: 0; border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.pwa-install:hover { filter: brightness(.96); }
/* boton Compartir: outline que se adapta a claro/oscuro (--enlace) */
.pwa-share { background: transparent; color: var(--enlace); border: 1.5px solid currentColor; border-radius: 8px; padding: 5.5px 13px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pwa-share:hover { color: var(--rojo); }

/* tarjetas rotatorias (portada): noticias y sismos */
.rot-card {
  display: block; text-decoration: none; color: inherit; margin-bottom: 22px;
  background: var(--tarjeta); border: 1px solid var(--borde); border-left: 5px solid var(--azul);
  border-radius: 14px; padding: 16px 18px; transition: transform .12s ease, box-shadow .12s ease;
}
.rot-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,33,61,.08); }
.news-rot { border-left-color: var(--enlace); }
.sismos-card { border-left-color: var(--rojo); }
.rot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rot-ico { font-size: 1.3rem; line-height: 1; display: inline-flex; align-items: center; }
.rot-head h2 { margin: 0; color: var(--tinta); font-size: 1.3rem; }
.rot-hint { margin-left: auto; font-weight: 700; font-size: .85rem; }
.news-rot .rot-hint { color: var(--enlace); }
.sismos-card .rot-hint { color: var(--rojo); }
.rot-stage { min-height: 48px; }
.rot-slide { display: none; align-items: center; gap: 10px; }
.rot-stage .rot-slide:first-child { display: flex; }
/* Rotador controlado por veninfo.wasm: .rot-live apaga el fallback estático
   de :first-child y manda la clase .on que Nyx va moviendo */
.rot-stage.rot-live .rot-slide:first-child { display: none; }
.rot-stage.rot-live .rot-slide.on { display: flex; }
.rot-stage.rot-live .rot-slide.on:first-child { display: flex; }
.rot-title { font-weight: 600; color: var(--tinta); }
.mag-badge { background: var(--rojo) !important; }
.rot-slide .news-date { color: var(--gris); font-size: .75rem; white-space: nowrap; margin-left: auto; }
@media (max-width: 560px) { .rot-slide { flex-wrap: wrap; } .rot-slide .news-date { margin-left: 0; } }

@media (max-width: 560px) {
  .news-item { grid-template-columns: auto 1fr; }
  .news-date { grid-column: 2; }
  .news-sum { grid-column: 1 / 3; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--borde);
  background: var(--tarjeta);
  padding: 22px 20px;
  text-align: center;
  color: var(--gris);
  font-size: .9rem;
}

/* ── Chat colectivo ─────────────────────────────────────────────── */
.chat-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  color: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 28px;
}
.chat-card-ico { font-size: 2rem; line-height: 1; }
.chat-card-txt h3 { margin: 0 0 4px; font-size: 1.1rem; }
.chat-card-txt p { margin: 0 0 6px; font-size: .88rem; opacity: .9; }
.chat-card-cta { font-size: .82rem; font-weight: 700; opacity: .95; }

.chat-log {
  background: var(--tarjeta); border: 1px solid var(--borde);
  border-radius: 12px; padding: 12px; height: 55vh; min-height: 260px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.chat-empty { color: var(--gris); text-align: center; margin: auto; font-size: .92rem; }
.chat-msg { background: var(--fondo); border-radius: 10px; padding: 8px 12px; }
.chat-msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.chat-msg-nick { font-weight: 700; color: var(--enlace); font-size: .85rem; word-break: break-word; }
.chat-msg-time { color: var(--gris); font-size: .72rem; flex: 0 0 auto; }
.chat-msg-body { color: var(--tinta); font-size: .95rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }

.chat-form { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-nick { border: 1px solid var(--borde); border-radius: 8px; padding: 8px 10px; font: inherit; max-width: 260px; }
.chat-row { display: flex; gap: 8px; align-items: stretch; }
.chat-text { flex: 1; border: 1px solid var(--borde); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.chat-send {
  flex: 0 0 auto; background: var(--azul); color: #fff; border: 0;
  border-radius: 8px; padding: 0 20px; font-weight: 700; cursor: pointer;
}
.chat-send:active { transform: translateY(1px); }
.chat-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--gris); }
.chat-status { color: var(--rojo); font-weight: 600; }

/* ── Nav superior responsive ────────────────────────────────────── */
.header-inner { flex-wrap: wrap; gap: 8px 0; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; }
.site-nav a { margin-left: 18px; text-decoration: none; font-weight: 600; color: var(--tinta); font-size: .95rem; }
.site-nav a:hover { color: var(--rojo); }

/* ── Barra de salas del chat ────────────────────────────────────── */
.chat-rooms-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: .9rem; color: var(--gris); }
.chat-room { font: inherit; padding: 6px 10px; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); color: var(--tinta); }

/* ── Baquiano: tarjeta de portada ───────────────────────────────── */
.baq-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; margin-bottom: 28px;
  background: linear-gradient(135deg, #065f46, #0f766e);
  color: #fff; border-radius: 14px; padding: 18px 20px;
}
.baq-card-head { display: flex; align-items: center; gap: 10px; }
.baq-card-head h2 { margin: 0; font-size: 1.15rem; }
.baq-card-ico { font-size: 1.6rem; line-height: 1; }
.baq-card-sub { margin: 0; font-size: .88rem; opacity: .92; }
.baq-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.baq-chip { background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 10px; font-size: .78rem; }
.baq-card-cta { font-size: .82rem; font-weight: 700; opacity: .95; margin-top: auto; }

/* ── Baquiano: paginas ──────────────────────────────────────────── */
.baquiano h1 { color: var(--enlace); margin: 6px 0 2px; }
.baquiano .lede { color: var(--gris); margin-top: 0; }
.baq-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.baq-zone-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px;
}
.baq-zone-card:hover { border-color: var(--enlace); }
.baq-zone-name { font-weight: 700; color: var(--tinta); }
.baq-zone-count { font-size: .8rem; color: var(--gris); }
.baq-sites { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.baq-site { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; }
.baq-site-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.baq-site-head h3 { margin: 0; color: var(--enlace); font-size: 1.05rem; }
.baq-cat { background: var(--amarillo); color: var(--tinta); border-radius: 999px; padding: 2px 10px; font-size: .72rem; font-weight: 700; }
.baq-site p { margin: 8px 0 0; color: var(--tinta); font-size: .95rem; }
.baq-site { display: flex; gap: 14px; align-items: flex-start; }
.baq-site-img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: var(--borde); }
.baq-site-body { flex: 1 1 auto; min-width: 0; }
.baq-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.baq-map, .baq-hotels { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--enlace); text-decoration: none; }
.baq-map:hover, .baq-hotels:hover { text-decoration: underline; }
.baquiano-zone img { max-width: 100%; }
.baq-hero { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin: 6px 0 4px; background: var(--borde); }
.baq-zone-links { margin: 8px 0 14px; }
.baq-credit { margin-top: 20px; font-size: .78rem; color: var(--gris); }
.admin-thumb { width: 40px; height: 30px; object-fit: cover; border-radius: 5px; vertical-align: middle; }
@media (max-width: 560px) { .baq-site { flex-direction: column; } .baq-site-img { width: 100%; height: 160px; } }
/* Zona enriquecida (guia turistica) */
.baquiano-zone h2 { margin: 26px 0 10px; font-size: 1.2rem; border-bottom: 2px solid var(--borde); padding-bottom: 4px; }
.baq-capital { color: var(--gris); font-size: .95rem; margin: 2px 0 14px; }
.baq-desc p { margin: 0 0 10px; color: var(--tinta); line-height: 1.6; }
.baq-facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.baq-facts dt { font-weight: 700; color: var(--enlace); margin-top: 10px; }
.baq-facts dd { margin: 2px 0 0; color: var(--tinta); line-height: 1.5; }
.baq-muni { width: 100%; border-collapse: collapse; font-size: .92rem; }
.baq-muni th, .baq-muni td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--borde); }
.baq-muni thead th { background: var(--azul); color: #fff; }
.baq-poblados { margin-top: 20px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 10px 16px; }
.baq-poblados summary { cursor: pointer; font-weight: 700; color: var(--enlace); }
.baq-poblados p { margin: 8px 0 0; color: var(--tinta); font-size: .9rem; line-height: 1.5; }

/* ── Panel admin ────────────────────────────────────────────────── */
.admin h1 { color: var(--enlace); margin: 6px 0; }
.admin .lede { color: var(--gris); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-err { background: #fdecea; color: var(--rojo); border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.admin-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 18px; }
.admin-form input, .admin-form textarea, .admin-form select { border: 1px solid var(--borde); border-radius: 8px; padding: 9px 11px; font: inherit; }
.admin-form button { background: var(--azul); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
.admin-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.admin-row input { flex: 1 1 160px; }
.admin-inline { display: inline; margin: 0; }
.admin-logout, .admin-del { background: var(--rojo); color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.admin-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 16px 0; }
.admin-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 18px; color: var(--tinta); }
.admin-tile:hover { border-color: var(--enlace); }
.admin-tile-ico { font-size: 1.8rem; }
.admin-tile small { color: var(--gris); }
.admin-zone, .admin-room { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.admin-zone-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-zone-head h3 { margin: 0; color: var(--enlace); }
.admin-zone-head small { color: var(--gris); font-weight: 400; }
.admin-site { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--borde); }
.admin-site-add { margin-top: 10px; }
.admin-room { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-room small { color: var(--gris); }
.admin-room-acts { display: flex; gap: 8px; }
.admin-login .admin-form { max-width: 320px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.visit-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 8px 0 18px; }
.visit-num { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 16px; text-align: center; }
.visit-num .vn-n { display: block; font-size: 2rem; font-weight: 800; color: var(--enlace); line-height: 1.1; }
.visit-num small { color: var(--gris); }
.visit-bars { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0 6px; }
.visit-bar { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.vb-n { font-size: .78rem; color: var(--gris); }
.vb-track { width: 100%; height: 100px; display: flex; align-items: flex-end; justify-content: center; }
.vb-fill { width: 70%; max-width: 34px; background: var(--azul); border-radius: 4px 4px 0 0; min-height: 2px; }
.vb-lab { font-size: .72rem; color: var(--gris); margin-top: 4px; text-align: center; }
/* Histórico de tasas (/finanzas) */
.rate-hist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0; }
.rate-chart { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; }
.rate-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.rate-head b { color: var(--enlace); }
.rate-val { font-weight: 800; font-size: 1.1rem; margin-left: auto; }
.rate-delta { font-size: .82rem; font-weight: 700; }
.rate-delta small { color: var(--gris); font-weight: 400; }
.rate-delta.up { color: #c0392b; }
.rate-delta.down { color: #1e8449; }
.rate-delta.flat { color: var(--gris); }
.rate-bars { display: flex; align-items: flex-end; gap: 3px; height: 72px; }
.rate-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.rate-fill { width: 80%; background: var(--azul); border-radius: 3px 3px 0 0; min-height: 2px; }
.rate-gap { opacity: .35; }
.rate-wait { color: var(--gris); }
.rate-agg { color: var(--gris); font-size: .8rem; margin-top: 6px; }
.rate-upd { color: var(--gris); font-size: .82rem; margin-top: 6px; }
.top-pages { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.top-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--borde); }
.top-path { font-weight: 600; color: var(--enlace); word-break: break-all; }
.top-n { flex: 0 0 auto; font-weight: 700; }
.visit-log { display: flex; flex-direction: column; gap: 2px; }
.visit-row { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; padding: 7px 0; border-top: 1px solid var(--borde); font-size: .9rem; }
.visit-row .vr-when { color: var(--gris); }
.visit-row .vr-path { font-weight: 600; color: var(--enlace); word-break: break-all; }
.visit-row .vr-meta { grid-column: 2; color: var(--gris); font-size: .82rem; word-break: break-all; }

@media (max-width: 560px) {
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 1.7rem; }
  .quakes th, .quakes td { padding: 9px 8px; font-size: .9rem; }
  /* Ocultar Profundidad en pantallas pequenas para dar mas sitio a Lugar y Distancia */
  .quakes th:nth-child(3), .quakes td:nth-child(3) { display: none; }
  .chat-log { height: 60vh; }
  .site-nav a { margin-left: 0; margin-right: 14px; }
}

/* ── Chat: indicador en vivo y aviso de mensajes nuevos ─────────── */
.chat-live { margin-left: auto; font-size: .78rem; color: var(--gris); }
.chat-live.on { color: #1a7f37; font-weight: 700; }
.chat-new {
  display: block; position: relative; z-index: 5;
  margin: -46px auto 10px; width: fit-content;
  background: var(--azul); color: #fff; border: 0; border-radius: 999px;
  padding: 7px 16px; font: inherit; font-size: .82rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

/* ── Accesibilidad: foco de teclado visible ─────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Accesibilidad: sin animaciones si el usuario lo pide ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Modo oscuro (automatico segun el sistema) ──────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --tinta: #e7ecf7;
    --gris: #9aa5b8;
    --fondo: #0d1220;
    --tarjeta: #171e31;
    --borde: #2a3149;
    --enlace: #8fb0ff;
    color-scheme: dark;
  }
  /* Texto oscuro fijo sobre fondos amarillos (el --tinta claro no contrasta) */
  .cta, .pwa-install, .baq-cat { color: #14213d; }
  .w-city option { color: var(--tinta); background: var(--tarjeta); }
  .filtros input:disabled { background: #1b2236; color: #6b7488; }
  .quakes tbody tr:hover { background: #1b2236; }
  .quakes tbody tr.sel, .detalle-row > td { background: #2a1520; }
  .error { background: #2a1520; border-color: #5c2733; color: #f3b9c0; }
  .admin-err { background: #2a1520; color: #f3b9c0; }
  .card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
  .rot-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
  .chat-live.on { color: #3fb950; }
}

/* ── Sismos: punto en el boton Filtros cuando hay filtros activos ── */
.filtros-btn.has-active::after {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--rojo); margin-left: 2px;
}
.filtros-btn.on.has-active::after { background: var(--amarillo); }
