/* =============================================================================
   LíneaNogales — Tema claro "servicio informativo", mobile-first
   Paleta sobria y confiable (estilo servicio público / periódico local),
   con semáforo de tráfico en tonos serios (verde bosque, ámbar cálido, rojo tinto).
   ========================================================================== */

:root {
  --bg: #f4f6f9;        /* fondo de página: gris muy claro */
  --bg-2: #ffffff;      /* segundo tono (tarjetas / degradados) */
  --panel: #ffffff;     /* fondo de tarjeta: blanco limpio */
  --panel-2: #eef2f7;   /* inset suave (carriles, tiles internos) */
  --line: #d8dee7;      /* borde gris claro sutil */
  --line-soft: #e6eaf0; /* borde aún más suave */
  --text: #1a2230;      /* texto principal: gris muy oscuro / casi negro */
  --text-dim: #4b5568;  /* texto secundario legible */
  --text-faint: #6b7686;/* leyendas / notas (contraste suficiente en claro) */

  /* Semáforo de tiempos — tonos de señalización de tráfico, NO neón */
  --green: #1c7e45;               /* verde bosque */
  --green-glow: rgba(28, 126, 69, 0.12);
  --amber: #c2760c;               /* ámbar / naranja cálido */
  --amber-glow: rgba(194, 118, 12, 0.14);
  --red: #b0303f;                 /* rojo tinto */
  --red-glow: rgba(176, 48, 63, 0.12);
  --blue: #1e5aa8;                /* azul institucional (acento serio) */
  --grey: #aab4c2;                /* gris neutro (semáforo apagado) */

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.06);

  --font-cond: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -220px, #ffffff 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ------------------------------------------------------------- banner aviso */
.banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff4e2;
  color: #8a5a00;
  font-size: 13px;
  text-align: center;
  padding: 7px 14px;
  border-bottom: 1px solid #f0d9a8;
  letter-spacing: 0.02em;
}
.banner[hidden] { display: none; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px calc(12px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.banner:not([hidden]) + .site-header { top: 34px; }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  color: var(--green);
  font-size: 14px;
  transform: translateY(-1px);
}
.brand-name {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--text-dim);
}
.brand-name strong { color: var(--text); font-weight: 700; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.clock-time {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.updated {
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.updated.stale { color: var(--amber); }

.lang-toggle {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-faint);
  cursor: pointer;
  letter-spacing: 0.03em;
  display: flex;
  gap: 3px;
  align-items: center;
}
.lang-toggle .lang-opt.active { color: var(--text); }
.lang-toggle .lang-sep { color: var(--line); }

/* --------------------------------------------------------------- layout */
.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.dir-section { margin-bottom: 24px; }
.dir-title {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 4px 2px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dir-title.small { font-size: 17px; }
.dir-title .arrow {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.dir-title .arrow.up { color: var(--green); }
.dir-title .arrow.down { color: var(--blue); }
.walk-ico { font-size: 16px; }

.cards { display: flex; flex-direction: column; gap: 14px; }

/* --------------------------------------------------------------- card */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.card-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.card-sub {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* cámara */
.cam {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05080c;
  overflow: hidden;
}
.cam video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #05080c;
}
.cam-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.cam-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,94,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255,77,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); }
}
.cam-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #dfe7f0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.cam-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: repeating-linear-gradient(45deg, #0a0e13, #0a0e13 10px, #0c1119 10px, #0c1119 20px);
  color: #c3ccd8;
  font-size: 13px;
  text-align: center;
  padding: 16px;
  cursor: pointer;
}
.cam-overlay .ico { font-size: 26px; opacity: 0.6; }
.cam-overlay .retry { font-size: 11px; color: #8b97a8; }
.cam-overlay[hidden] { display: none; }
.cam-spinner {
  width: 26px; height: 26px;
  border: 2.5px solid rgba(255,255,255,0.18);
  border-top-color: #c3ccd8;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* tiempo grande + semáforo */
.time-block {
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.signal {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--grey);
}
.signal.green { background: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.signal.amber { background: var(--amber); box-shadow: 0 0 12px var(--amber-glow); }
.signal.red { background: var(--red); box-shadow: 0 0 12px var(--red-glow); }

.time-main { display: flex; align-items: baseline; gap: 6px; }
.time-num {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 54px;
  line-height: 0.9;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.time-num.green { color: var(--green); }
.time-num.amber { color: var(--amber); }
.time-num.red { color: var(--red); }
.time-num.closed { color: var(--text-faint); font-size: 34px; }
.time-unit {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-dim);
}

/* nota de fuente + hora real de CBP (discreta) */
.source-note {
  padding: 2px 16px 8px;
  line-height: 1.35;
}
.source-note .sn-source {
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.source-note .sn-cbp {
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 1px;
}
.source-note .sn-time {
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.source-note .sn-time.outdated { color: var(--amber); }
.source-note .sn-outdated {
  color: var(--amber);
  opacity: 0.85;
}
/* aviso de ÚLTIMO DATO CONOCIDO (stale): ámbar tenue; fuerte si +2h */
.source-note .sn-stale {
  font-size: 10.5px;
  color: var(--amber);
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.source-note .sn-stale.strong {
  color: #8a5a00;
  font-weight: 700;
}

/* fila de carriles — en Nogales solo GENERAL y SENTRI (sin Ready) */
.lanes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 16px 14px;
}
/* garitas con un solo carril (p.ej. Mariposa: solo GENERAL) -> ocupa todo el ancho */
.lanes.single {
  grid-template-columns: 1fr;
}
.lane {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
}
.lane-name {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.lane-val {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lane-val small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 2px;
}
.lane-val.green { color: var(--green); }
.lane-val.amber { color: var(--amber); }
.lane-val.red { color: var(--red); }
.lane-val.closed { color: var(--text-faint); font-size: 14px; }
/* carriles/puertas abiertos: dato útil, grande y en negrita oscura */
.lane-meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
/* marca "dato anterior" (último conocido) en un carril */
.lane-stale {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--amber);
  margin-top: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lane-stale.strong { color: #8a5a00; }
/* horario del carril (p.ej. SENTRI en DeConcini), igual estilo que el peatonal */
.lane-hours {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

/* fila peatonal dentro de card */
.card-ped {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.card-ped .ped-left { display: flex; align-items: center; gap: 8px; }
.card-ped .ped-title {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card-ped .ped-hours { font-size: 11px; color: var(--text-faint); }
.card-ped .ped-val {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 18px;
}
.card-ped .ped-val-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.ped-stale {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}
.ped-stale.strong { color: #8a5a00; }

/* estado píldora */
.pill {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.pill.open { color: var(--green); background: var(--green-glow); }
.pill.closed { color: var(--text-faint); background: rgba(99,116,138,0.14); }
.pill.pending { color: var(--amber); background: var(--amber-glow); }

/* --------------------------------------------------- resumen peatonal */
.ped-section { margin-bottom: 24px; }
.ped-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ped-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.ped-card .pc-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ped-card .pc-val {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ped-card .pc-val.green { color: var(--green); }
.ped-card .pc-val.amber { color: var(--amber); }
.ped-card .pc-val.red { color: var(--red); }
.ped-card .pc-val.closed { color: var(--text-faint); font-size: 17px; }
.ped-card .pc-unit { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.ped-card .pc-hours { font-size: 10px; color: var(--text-faint); margin-top: 6px; }
.ped-card .pc-stale {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}
.ped-card .pc-stale.strong { color: #8a5a00; }
.ped-card .pill { margin-top: 6px; display: inline-block; }

/* --------------------------------------------------- nota dentro de tarjeta */
.cam-ico { font-size: 17px; }
.cam-note {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  margin: 0;
  padding: 12px 16px 14px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
/* (legacy) */
.mx-note {
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  margin: 10px 6px 0;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------- patrocinadores (compacto) */
.sponsors-section { margin: 14px 0 10px; }
.sponsors-title {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin: 0 0 8px;
}
/* Móvil: carrusel horizontal deslizable (una sola fila) para no tapar las cámaras. */
.sponsors-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; /* aire para la barra de scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sponsors-grid::-webkit-scrollbar { height: 5px; }
.sponsors-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.sponsors-grid > .sponsor { scroll-snap-align: start; }
.sponsor {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.1s;
}
.sponsor:active { transform: scale(0.98); }
.sponsor::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent, var(--blue));
}
.sponsor .sp-slot {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 3px;
}
.sponsor .sp-value {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  margin-bottom: 2px;
}
.sponsor .sp-value-label {
  font-size: 9.5px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
/* pizarrón de casa de cambio: Dólar / Dollar · COMPRA/BUY · VENTA/SELL */
.sponsor .fx-board {
  margin: 1px 0 4px;
}
.sponsor .fx-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 3px;
}
.sponsor .fx-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
}
.sponsor .fx-label {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.sponsor .fx-val {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.sponsor .fx-val.fx-buy { color: var(--green); }
.sponsor .fx-val.fx-sell { color: var(--amber); }

.sponsor .sp-name {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.sponsor .sp-tag {
  font-size: 9.5px;
  color: var(--text-faint);
  margin-top: 2px;
  line-height: 1.25;
}
.sponsor .sp-note {
  font-size: 9.5px;
  color: var(--text-faint);
  margin-top: 1px;
  letter-spacing: 0.01em;
}
/* "espacio disponible" — discreto, separado con una línea sutil */
.sponsor .sp-available {
  font-size: 9px;
  color: var(--text-faint);
  opacity: 0.8;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--line);
  line-height: 1.25;
  font-style: italic;
}

/* --------------------------------- ¿Qué puedo cruzar? (acordeón informativo) */
.bring-section { margin: 26px 0 10px; }

.accordion-head {
  /* Reset del estilo nativo del <button>: sin esto, iOS Safari ignora el
     width:100%, encoge el botón a su contenido y no envuelve el texto
     (se ve chiquito y provoca desbordamiento horizontal en móvil). */
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.1s;
  /* tap fiable y sin retardo de 300ms en táctil */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.accordion-head:hover { border-color: var(--line); }
.accordion-head:active { transform: scale(0.99); }
.accordion-head .acc-ico { font-size: 20px; line-height: 1; flex-shrink: 0; }
.accordion-head .acc-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  /* que el título largo se lea completo (envuelve en móvil si hace falta) */
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
}
.accordion-head .acc-chevron {
  color: var(--text-faint);
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion-head.open .acc-chevron { transform: rotate(180deg); }
.accordion-head.open .acc-title { color: var(--text); }

.accordion-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.accordion-body[hidden] { display: none; }

/* Regla de oro (destacada en ámbar) */
.bring-golden {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(194, 118, 12, 0.08), rgba(194, 118, 12, 0.03));
  border: 1px solid rgba(194, 118, 12, 0.30);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.bring-golden .bg-badge { font-size: 18px; color: var(--amber); line-height: 1.2; }
.bring-golden .bg-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 3px;
}
.bring-golden .bg-body { font-size: 13.5px; line-height: 1.45; color: var(--text); }

/* Categorías (una tarjeta por bloque, con acento a la izquierda) */
.bring-cat {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.bring-cat--no { border-left-color: var(--red); }
.bring-cat--yes { border-left-color: var(--green); }
.bring-cat--money { border-left-color: var(--blue); }
.bring-cat--car { border-left-color: var(--amber); }

.bring-cat .bc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bring-cat .bc-ico { font-size: 16px; }
.bring-cat .bc-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.bring-cat .bc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bring-cat .bc-item {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-dim);
}
.bring-cat .bc-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}

/* Nota final (referencia + enlace a cbp.gov) */
.bring-note {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.4;
  margin: 2px 2px 0;
  letter-spacing: 0.01em;
}
.bring-note-link { color: var(--blue); text-decoration: none; }
.bring-note-link:hover { text-decoration: underline; }

/* --------------------------------------------------- footer */
.site-footer {
  text-align: center;
  padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  margin-top: 20px;
}
.footer-tag {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.footer-credits {
  font-size: 11px;
  color: var(--text-faint);
  margin: 0;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------- skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --------------------------------------------------- responsive up */
@media (min-width: 560px) {
  /* Escritorio: 4 columnas fijas, sin carrusel. */
  .sponsors-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: auto;
    overflow-x: visible;
    padding-bottom: 0;
  }
}
@media (max-width: 340px) {
  .time-num { font-size: 46px; }
  .lanes { gap: 6px; }
}

/* --------------------------------------------------- contador de visitas */
.footer-visits {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.footer-visits[hidden] { display: none; }

/* --------------------------------------------------- pista tarjeta expandible */
.sponsor--expandable { cursor: pointer; }
.sponsor .sp-more {
  font-size: 9.5px;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 8px;
  opacity: 0.9;
}

/* --------------------------------------------------- modal casa de cambio */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.25);
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-close:active { transform: scale(0.94); }

/* contenido del modal */
.fx-modal { display: flex; flex-direction: column; }
.fxm-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #05080c;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.fxm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fxm-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #0a0e13, #0a0e13 12px, #0c1119 12px, #0c1119 24px);
}
.fxm-photo-ph { font-size: 54px; opacity: 0.55; }
.fxm-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 14px 18px 2px;
}
.fxm-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 18px 4px;
}
.fxm-rate {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.fxm-rate-label {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.fxm-rate-val {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 40px;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.fxm-rate-val.buy { color: var(--green); }
.fxm-rate-val.sell { color: var(--amber); }
.fxm-info {
  padding: 12px 18px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fxm-info-row { display: flex; gap: 10px; align-items: baseline; }
.fxm-info-label {
  flex-shrink: 0;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  min-width: 74px;
}
.fxm-info-val {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}
.fxm-promo {
  margin: 14px 18px 18px;
  padding: 14px 14px;
  text-align: center;
  background: rgba(28, 126, 69, 0.07);
  border: 1px dashed var(--green);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}
.fx-code {
  display: inline-block;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--green);
  padding: 2px 10px;
  border-radius: 6px;
  margin: 0 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
