/* Mapa macro (mapa_macro.js). Mobile-first; acento de marca; colores de dato = los de la función única (--dato-verde / --dato-rojo). Zonas táctiles ≥ 44 px, texto ≥ 13 px. */
#mapa-macro-pagina { padding-bottom: 24px; }
.mm-barra { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 10px; }
.mm-modos { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; max-width: 100%; }
.mm-modos-color { overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; }
.mm-modos-color::-webkit-scrollbar { display: none; }
.mm-modos { height: 44px; align-items: stretch; }
.mm-modos button { background: transparent; border: 0; color: var(--text-secondary); padding: 0 14px; font-size: 14px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.mm-modos button.on { background: var(--t-naranja, #ff7a2e); color: var(--t-sobre-marca, #1a0f05); font-weight: 600; }
.mm-modos button:focus-visible, .mm-chip:focus-visible, .mm-zoom button:focus-visible, .mm-cerrar:focus-visible, .mm-rank button:focus-visible { outline: 2px solid var(--t-naranja, #ff7a2e); outline-offset: 2px; }
.mm-lienzo { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { .mm-lienzo { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; } .mm-cerrar, .mm-asa { display: none; } .mm-modos-color { flex: 0 1 auto; } }
.mm-mapa-caja { border: 1px solid var(--border); border-radius: 12px; background: #15171b; padding: 4px; position: relative; min-width: 0; }
.mm-herr { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: nowrap; min-width: 0; }
.mm-zoom { flex: none; }
.mm-zoom button { padding: 0; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.mm-zoom button + button, .mm-vistas button + button { border-left: 1px solid var(--border); }
.mm-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.mm-vistas { min-width: 0; }
.mm-vistas::-webkit-scrollbar { display: none; }
.mm-svg { width: 100%; height: auto; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: #101216; border-radius: 8px; }
.mm-fondo { fill: #23262c; stroke: #31353c; stroke-width: .35; vector-effect: non-scaling-stroke; }
.mm-p { fill: #2d3139; stroke: #0e1013; stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; outline: none; transition: filter .15s, fill .25s; }
.mm-p.sin-dato { fill: #2a2d33; stroke: #3a3e46; }
.mm-p:hover, .mm-p:focus-visible { filter: brightness(1.28) saturate(1.1); stroke: #fff; stroke-width: 1.2; }
.mm-p.sel { fill: var(--t-naranja, #ff7a2e) !important; stroke: #ffd2b0; stroke-width: 1.6; }
.mm-svg.zoom { cursor: grab; }
.mm-etqs { pointer-events: none; }
.mm-guia { stroke: rgba(255, 255, 255, .55); stroke-width: calc(1 * var(--u, 1px)); stroke-dasharray: calc(3 * var(--u, 1px)) calc(2 * var(--u, 1px)); }
.mm-et { font-size: calc(12 * var(--u, 1px)); fill: #fff; paint-order: stroke; stroke: rgba(10, 12, 15, .85); stroke-width: calc(3 * var(--u, 1px)); stroke-linejoin: round; }
.mm-et-d { font-weight: 700; font-size: calc(12 * var(--u, 1px)); letter-spacing: .03em; }
.mm-et-v { font-weight: 600; }
.mm-leyenda { margin-top: 8px; }
.mm-ley-barra { height: 10px; border-radius: 6px; }
.mm-ley-txt { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin: 4px 0; color: var(--text-secondary); }
.mm-ley-txt .peor { color: #e8837c; } .mm-ley-txt .mejor { color: #5fd29a; }
.mm-leyenda .que { font-size: 13px; margin: 2px 0 0; }
.mm-ley-gris { color: #3a3e46; }
.mm-panel { border: 1px solid var(--border); border-radius: 12px; background: var(--t-panel, var(--panel)); padding: 14px; min-width: 0; }
.mm-vacio, .mm-sin { color: var(--text-secondary); font-size: 14px; margin: 6px 0; }
.mm-h3 { margin: 0 0 8px; font-size: 16px; }
.mm-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mm-rank button { width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; background: transparent; border: 0; color: var(--text-primary); min-height: 44px; padding: 4px 6px; border-radius: 8px; font-size: 14px; cursor: pointer; text-align: left; }
.mm-rank button:hover { background: rgba(255, 255, 255, .05); }
.mm-rk-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-rk-b { height: 8px; background: #23262c; border-radius: 4px; overflow: hidden; }
.mm-rk-b i { display: block; height: 100%; border-radius: 4px; transition: width .35s ease-out; }
.mm-rk-pie { margin: 8px 0 0; font-size: 13px; }
.mm-asa { display: none; }
.mm-cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.mm-cab-t { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mm-bandera { font-size: 34px; line-height: 1; }
.mm-cab h3 { margin: 0 0 2px; font-size: 20px; outline: none; }
.mm-cerrar { background: transparent; border: 1px solid var(--border); color: var(--text-primary); border-radius: 10px; min-width: 44px; min-height: 44px; font-size: 16px; cursor: pointer; flex: none; }
.mm-fz-frase { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.mm-datos { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .mm-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mm-dato { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-width: 0; background: rgba(255, 255, 255, .02); }
.mm-dato.nuevo { border-color: var(--t-naranja, #ff7a2e); }
.mm-dato.destello { animation: mm-destello 1.8s ease-out; }
@keyframes mm-destello { 0% { background: rgba(255, 122, 46, .35); } 100% { background: rgba(255, 255, 255, .02); } }
.mm-dato h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-chip-nuevo { font-size: 13px; font-weight: 600; color: var(--t-sobre-marca, #1a0f05); background: var(--t-naranja, #ff7a2e); border-radius: 999px; padding: 1px 8px; }
.mm-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mm-valor { font-size: 28px; line-height: 1.1; }
.mm-valor small { font-size: 13px; color: var(--text-secondary); }
.mm-spark { width: 96px; height: 28px; color: var(--t-naranja, #ff7a2e); flex: none; }
.mm-var { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; margin: 4px 0 2px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.mm-var.verde { color: var(--dato-verde, #35c47c); background: rgba(53, 196, 124, .14); }
.mm-var.rojo { color: var(--dato-rojo, #ef5350); background: rgba(239, 83, 80, .14); }
.mm-var.neutro { color: var(--text-secondary); }
.mm-fecha { margin: 4px 0; font-size: 13px; }
.mm-aviso { margin: 4px 0; font-size: 13px; color: var(--t-ambar, #f3c04f); }
.mm-reciente { margin: 4px 0; font-size: 13.5px; }
.mm-lectura { margin: 4px 0; font-size: 14px; line-height: 1.4; }
.mm-que { margin-top: 6px; font-size: 13.5px; line-height: 1.5; }
.mm-que summary { cursor: pointer; color: var(--t-naranja-2, #ff9a5c); min-height: 36px; display: flex; align-items: center; }
.mm-que p { margin: 4px 0; color: var(--text-secondary); }
.mm-fuente { display: block; margin-top: 6px; font-size: 13px; }
.mm-chips { display: flex; gap: 8px; margin: 12px 0 4px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
@media (min-width: 901px) { .mm-chips { flex-wrap: wrap; overflow: visible; } }
.mm-chip { flex: none; scroll-snap-align: center; background: transparent; border: 1px solid var(--border); color: var(--text-primary); border-radius: 999px; padding: 0 14px; font-size: 14px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.mm-chip.on { border-color: var(--t-naranja, #ff7a2e); background: rgba(255, 122, 46, .16); font-weight: 600; }
.mm-pie { margin: 8px 0 0; font-size: 13px; }
/* comparar */
.mm-tabla-caja { overflow-x: auto; }
.mm-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.mm-tabla th, .mm-tabla td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.mm-tabla th[scope=row] .que { display: block; font-size: 13px; font-weight: 400; }
.mm-tabla td b { display: block; font-size: 17px; }
.mm-tabla td .que { display: block; font-size: 13px; }
.mm-c.verde, .mm-c.verde b { color: var(--dato-verde, #35c47c); }
.mm-c.rojo, .mm-c.rojo b { color: var(--dato-rojo, #ef5350); }
.mm-c.neutro, .mm-c.neutro b { color: var(--text-primary); }
.mm-c.sin { color: var(--text-secondary); }
.mm-tarjetas { display: none; }
.mm-ic { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.mm-ic h4 { margin: 0 0 6px; font-size: 15px; display: flex; flex-direction: column; }
.mm-ic h4 .que { font-size: 13px; font-weight: 400; }
.mm-ic-f { display: grid; grid-template-columns: minmax(70px, .9fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; min-height: 44px; }
.mm-ic-b { height: 10px; background: #23262c; border-radius: 5px; overflow: hidden; }
.mm-ic-b i { display: block; height: 100%; border-radius: 5px; background: var(--text-secondary); transition: width .35s ease-out; }
.mm-ic-b i.verde { background: var(--dato-verde, #35c47c); } .mm-ic-b i.rojo { background: var(--dato-rojo, #ef5350); }
/* el panel es un contenedor: por debajo de ~560 px de ANCHO DEL PANEL (no de la pantalla) se usan tarjetas; por encima, la tabla con la etiqueta legible y scroll horizontal si hay muchos países */
.mm-panel { container-type: inline-size; container-name: mmp; }
.mm-tabla { min-width: calc(11ch + var(--n, 3) * 11ch); }
.mm-tabla th[scope=row] { min-width: 11ch; width: 22%; overflow-wrap: normal; word-break: normal; hyphens: none; }
.mm-tabla th[scope=col] { min-width: 9ch; overflow-wrap: normal; word-break: normal; }
.mm-tabla td { min-width: 9ch; }
@container mmp (max-width: 559px) {
  .mm-tabla-caja { display: none; }
  .mm-tarjetas { display: grid; gap: 10px; }
}
/* comparar en escritorio: el panel pasa debajo del mapa a todo el ancho (nunca una columna estrecha) */
@media (min-width: 901px) { .mm-lienzo.comparando { grid-template-columns: minmax(0, 1fr); } .mm-lienzo.comparando .mm-panel { min-width: 520px; } }
.mm-fzs, .mm-fz { overflow-wrap: normal; }
#mapa-macro-pagina { overflow-anchor: none; }
.mm-panel { min-height: 160px; }
.mm-leyenda-c { margin: 10px 0; font-size: 13px; line-height: 1.5; }
.mm-h { margin: 12px 0 6px; font-size: 15px; }
.mm-fzs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.mm-fz { padding: 6px 10px; border-left: 3px solid var(--border); }
.mm-fz.mas_fuerte { border-left-color: var(--dato-verde, #35c47c); }
.mm-fz.mas_debil { border-left-color: var(--dato-rojo, #ef5350); }
/* carga */
.mm-esq { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { .mm-esq { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.mm-esq-mapa { height: 300px; border-radius: 12px; background: linear-gradient(100deg, #1a1d22 30%, #23272e 50%, #1a1d22 70%); background-size: 300% 100%; animation: mm-brillo 1.4s linear infinite; }
.mm-esq-panel { display: grid; gap: 10px; align-content: start; }
.mm-esq-panel i { height: 70px; border-radius: 10px; background: linear-gradient(100deg, #1a1d22 30%, #23272e 50%, #1a1d22 70%); background-size: 300% 100%; animation: mm-brillo 1.4s linear infinite; }
@keyframes mm-brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* móvil: el panel del país sube como hoja inferior con altura propia (asa: deslizar arriba = pantalla completa, abajo = cerrar) */
@media (max-width: 900px) {
  .mm-panel.hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 52vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .55); animation: mm-sube .22s ease-out; padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); transition: height .22s ease-out; }
  .mm-panel.hoja-completa { height: 92vh; }
  .mm-panel.hoja .mm-asa { display: flex; justify-content: center; padding: 10px 0 12px; touch-action: none; cursor: grab; }
  .mm-asa i { display: block; width: 44px; height: 5px; border-radius: 3px; background: #4a4f58; }
  body.mm-hoja-abierta #mapa-macro-pagina { padding-bottom: 54vh; }
  .mm-datos { grid-template-columns: minmax(0, 1fr); }
  @keyframes mm-sube { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .mm-panel.hoja, .mm-dato.destello, .mm-esq-mapa, .mm-esq-panel i { animation: none; } .mm-p, .mm-rk-b i, .mm-ic-b i, .mm-panel.hoja { transition: none; } }
html[data-efectos="off"] .mm-panel.hoja, html[data-efectos="off"] .mm-dato.destello { animation: none; }

@media (max-width: 420px) { .mm-modos button { padding: 0 10px; font-size: 13.5px; } }

.mm-etqs.mm-oculta { opacity: 0; }
.mm-etqs { transition: opacity .12s; }
/* selector de zonas: segmentado, táctil (≥ 44 px) y con la zona activa resaltada; el zoom queda a su lado y baja a otra línea solo si no cabe */
.mm-herr { flex-wrap: wrap; row-gap: 8px; }
.mm-vistas { flex: 1 1 260px; display: flex; overflow-x: auto; scrollbar-width: none; }
.mm-vistas button { flex: 0 0 auto; min-width: 64px; white-space: nowrap; padding: 0 14px; text-align: center; }
.mm-zoom { margin-left: auto; }
/* 6/11/2026 · móvil: el mapa del mundo ocupa 1,9 veces el ancho de la pantalla (más alto, sin latitudes vacías) y se desliza en horizontal; etiquetas siempre a 12 px */
.mm-svg-wrap { max-width: 100%; }
@media (max-width: 600px) {
  .mm-svg-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; border-radius: 8px; }
  .mm-svg-wrap .mm-svg { width: max(100%, 740px); max-width: none; touch-action: pan-x pan-y; }
}
@media (min-width: 901px) { .mm-et { stroke-width: calc(2.5 * var(--u, 1px)); } .mm-et-d { letter-spacing: 0; } }
