/* ==========================================================================
   meteomurcia-modern.css  ·  tema "Observatorio" (oscuro)
   Capa visual para meteomurcia.com. Se carga DESPUÉS del CSS del tema y
   trabaja junto a Tailwind CSS por CDN (preflight desactivado).

   - Solo presentación, sin lógica.
   - Reestiliza la estructura heredada de WD-World (#page, #header,
     .leftSideBar, #main-copy, #footer, .ajaxDashboard, .ajaxSidebar, avisos)
     y evita desbordes en móvil del HTML que generan los includes PHP.
   - Para cambiar la marca, edita las variables de :root.
   ========================================================================== */

:root {
  --mm-bg:       #050816;
  --mm-card:     rgba(20, 32, 60, .78);   /* fondo de tarjetas: más claro = sube estos valores */
  --mm-line:     rgba(255, 255, 255, .09);
  --mm-ink:      #e2e8f0;
  --mm-muted:    #94a3b8;
  --mm-accent:   #22d3ee;   /* cian */
  --mm-accent-2: #67e8f9;
  --mm-soft:     rgba(34, 211, 238, .10);
  --mm-radius:   16px;
  --mm-sidebar:  14rem;
  --mm-font:     "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mm-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Base (sustituye al preflight de Tailwind, desactivado) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

html body {
  margin: 0;
  padding: 0;
  color: var(--mm-ink);
  font-family: var(--mm-font);
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(60rem 28rem at 12% -8%, rgba(34, 211, 238, .11), transparent 60%),
    radial-gradient(50rem 26rem at 95% 0%, rgba(99, 102, 241, .10), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--mm-bg);
  background-attachment: fixed;
}

html body p { margin: 0 0 .75em; }
img { max-width: 100%; }
a { color: var(--mm-accent-2); }
::selection { background: rgba(34, 211, 238, .3); }

/* ---------- Contenedor ---------- */
html body #page {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* ---------- Cabecera ---------- */
html body #header {
  background: rgba(5, 8, 22, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--mm-ink);
  border-bottom: 1px solid var(--mm-line);
  cursor: pointer;
  position: relative;
}
html body #header a { color: var(--mm-accent-2); text-decoration: none; }
html body #header a:hover { text-decoration: underline; }
html body #header table { max-width: 100%; }

/* Gizmo AJAX en la cabecera */
html body #header .ajaxSidebar {
  width: auto;
  background: var(--mm-card);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--mm-line);
  padding: .25rem .5rem;
}

/* Punto "en vivo" */
@keyframes mm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.mm-live-dot { animation: mm-pulse 1.8s ease-in-out infinite; }

/* ---------- Menú lateral (menubar.php) ---------- */
html body .leftSideBar {
  float: none;
  clear: none;
  width: auto;
  margin: 0 1rem 1rem;
  background: var(--mm-card);
  border-radius: var(--mm-radius);
  box-shadow: 0 0 0 1px var(--mm-line);
  padding: .5rem 0 .25rem;
  overflow: hidden;
  display: none;           /* en móvil se abre con el botón "Menú" (body.menu-open) */
}
html body.menu-open .leftSideBar { display: block; }

html body .leftSideBar .sideBarTitle {
  background: transparent;
  color: var(--mm-accent);
  font-family: var(--mm-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .85rem 1rem .3rem;
  margin: 0;
}
html body .leftSideBar ul { margin: 0 0 .5rem; padding: 0; list-style: none; }
html body .leftSideBar li { margin: 0; padding: 0; }
html body .leftSideBar a,
html body .leftSideBar a:visited {
  display: block;
  padding: .45rem 1rem;
  color: #cbd5e1;
  background: transparent;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
html body .leftSideBar a:hover {
  background: var(--mm-soft);
  color: #fff;
  border-left-color: var(--mm-accent);
}
html body .leftSideBar .thisPage {
  color: #fff;
  font-weight: 600;
  background: var(--mm-soft);
  border-left-color: var(--mm-accent);
}
html body .leftSideBar .sideBarText {
  color: var(--mm-muted);
  font-size: .85rem;
  line-height: 1.4;
  margin: .5rem 1rem 1rem;
}
html body .leftSideBar .sideBarText a {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--mm-accent-2);
  text-decoration: underline;
}
html body .leftSideBar img { max-width: 100%; height: auto; }

/* ---------- Contenido principal ---------- */
html body #main-copy,
html body #main-copy-dark {
  background: transparent;
  color: var(--mm-ink);
  text-align: left;
  line-height: 1.55;
  margin: 0;
  padding: 1.25rem 1rem 1.5rem;
  border: 0;
}
html body .column-dark,
html body .column-light { background: transparent; color: inherit; }

html body #main-copy a { color: var(--mm-accent-2); text-decoration: none; }
html body #main-copy a:hover { text-decoration: underline; }

html body #main-copy h1,
html body #main-copy h2,
html body #main-copy h3 {
  color: #fff;
  font-family: var(--mm-font);
  font-style: normal;
  letter-spacing: -.01em;
}
html body #main-copy h1 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 .75rem; padding: 0; border: 0; }

html body #main-copy img { max-width: 100%; height: auto; }
html body #main-copy iframe { max-width: 100%; border: 0; }
html body #main-copy .ajaxDashboard,
html body #main-copy table { max-width: 100%; }
html body #main-copy img[alt="spacer"] { display: none; }   /* forzaba 620px de ancho mínimo */

/* Tablas de datos de los includes (previsión, etc.) */
html body #main-copy table { border-collapse: collapse; color: var(--mm-ink); }
html body #main-copy td,
html body #main-copy th { padding: .35rem .5rem; }

/* Dashboard AJAX */
html body .ajaxDashboard { width: 100%; }
html body .ajaxDashboard td { background: transparent; border: 0; color: var(--mm-ink); }
html body .ajaxDashboard .datahead {
  background: var(--mm-soft);
  color: var(--mm-accent-2);
  font-family: var(--mm-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .55rem;
  border-radius: 8px;
}
html body .ajaxDashboard .data1 {
  background: transparent;
  color: var(--mm-ink);
  font-family: var(--mm-font);
  font-size: .92rem;
  border-bottom: 1px solid var(--mm-line);
}

/* Gizmo / barra lateral AJAX */
html body .ajaxSidebar { background: transparent; }
html body .ajaxSidebar h2 {
  background: var(--mm-soft);
  color: var(--mm-accent-2);
  font-family: var(--mm-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 8px;
  margin-right: 0;
}
html body .ajaxSidebar td { background: transparent; }
html body .ajaxSidebar .data { color: var(--mm-accent-2); font-family: var(--mm-mono); }
html body .ajaxSidebar .meas { color: var(--mm-muted); background: transparent; }

/* Avisos meteorológicos */
html body .watchBox, html body .advisoryBox, html body .warningBox {
  border-radius: 12px;
  border: 0;
  padding: .75rem 1rem;
  margin: 0 0 1rem;
}

/* Formularios y selectores */
html body select,
html body input[type="text"] {
  max-width: 100%;
  color: var(--mm-ink);
  background-color: rgba(15, 23, 42, .8);
  border: 1px solid var(--mm-line);
  border-radius: 10px;
  padding: .5rem .65rem;
  font: inherit;
}

/* Traductor de Google sobre fondo oscuro */
#google_translate_element, #google_translate_element a, #google_translate_element span { color: var(--mm-muted) !important; }
#google_translate_element .goog-te-gadget-simple {
  background: rgba(15, 23, 42, .6) !important;
  border: 1px solid var(--mm-line) !important;
  border-radius: 10px;
  padding: .3rem .5rem !important;
}

/* ---------- Pie ---------- */
html body #footer {
  background: transparent;
  color: var(--mm-muted);
  font-size: .85rem;
  line-height: 1.6;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--mm-line);
}
html body #footer a,
html body #footer a:visited { color: var(--mm-accent-2); font-weight: 500; text-decoration: none; }
html body #footer a:hover { text-decoration: underline; }

/* ---------- Escritorio ---------- */
@media (min-width: 768px) {
  html body #page { --mm-gutter: max(1rem, calc((100% - 80rem) / 2 + 1rem)); }

  html body .leftSideBar {
    display: block;
    float: left;
    clear: left;
    width: var(--mm-sidebar);
    margin: 1.25rem 0 1rem var(--mm-gutter);
  }
  html body #main-copy,
  html body #main-copy-dark {
    margin-left: calc(var(--mm-sidebar) + var(--mm-gutter));
    margin-right: var(--mm-gutter);
    padding: 1.25rem 1.5rem 2rem;
  }
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  html body #main-copy { padding: 1rem .75rem 1.25rem; }
  html body #main-copy table { font-size: .9rem; }
}

/* Celdas del gizmo AJAX: el tema antiguo las pintaba de blanco */
html body .ajaxSidebar td.data,
html body .ajaxSidebar td.meas,
html body #header .ajaxSidebar td { background: transparent; }
html body #header .ajaxSidebar .data { font-size: .78rem; }

/* ==========================================================================
   DASHBOARD AJAX  (ajax-dashboard.php)
   La tabla original (620px, con rowspan) se convierte en una rejilla de
   tarjetas SOLO con CSS: el PHP y los id que usa ajaxWDwx.js no se tocan.
   Filas del original:  1 actualizado · 2 cabeceras · 3 temp/viento/lluvia/previsión
                        4 cabeceras · 5 humedad/almanaque/luna · 6 cabeceras · 7 UV/solar
   ========================================================================== */
html body #main-copy .ajaxDashboard {
  width: 100% !important;
  max-width: none;
  font-size: .92rem !important;
  color: var(--mm-ink) !important;
}
html body #main-copy .ajaxDashboard table { color: inherit; }
html body #main-copy .ajaxDashboard > table {
  display: block;
  width: 100% !important;
  border: 0 !important;
  background: transparent;
}
html body #main-copy .ajaxDashboard > table:first-of-type > tbody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 .75rem;
}
html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr { display: contents; }

/* celdas = tarjetas */
html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr > td {
  display: block;
  min-width: 0;
  margin: 0;
  padding: .5rem 1rem .9rem;
  text-align: left !important;
  vertical-align: top;
  color: var(--mm-ink);
  background: var(--mm-card);
  border: 1px solid var(--mm-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
}
/* fila 1: "Actualizado…" */
html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:first-child > td {
  grid-column: 1 / -1;
  padding: 0 0 .85rem;
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--mm-mono);
  font-size: .72rem;
  color: var(--mm-muted);
}
html body #main-copy .ajaxDashboard #ajaxindicator,
html body #main-copy .ajaxDashboard #ajaxdate,
html body #main-copy .ajaxDashboard #ajaxcounter { color: var(--mm-accent-2); }
/* cabeceras de tarjeta */
html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead {
  margin-top: .75rem;
  padding: .85rem 1rem .25rem;
  border: 1px solid var(--mm-line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: var(--mm-card);
  color: var(--mm-accent);
  font-family: var(--mm-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
html body #main-copy .ajaxDashboard td.datahead a img { vertical-align: middle; margin-left: .35rem; }
/* los rowspan ya no los aplica el navegador (td en bloque): se declaran aquí */
html body #main-copy .ajaxDashboard > table:first-of-type td[rowspan="5"] { grid-row: span 5; }
html body #main-copy .ajaxDashboard > table:first-of-type td[rowspan="3"] { grid-row: span 3; }

/* tablas anidadas dentro de cada tarjeta */
html body #main-copy .ajaxDashboard td table {
  width: 100% !important;
  border: 0 !important;
  border-collapse: collapse;
  font-size: inherit !important;
}
html body #main-copy .ajaxDashboard td table td,
html body #main-copy .ajaxDashboard td table th {
  border: 0 !important;
  background: transparent;
  color: inherit;
  padding: .3rem .2rem;
  font-family: var(--mm-font);
  font-size: inherit !important;
}
html body #main-copy .ajaxDashboard td table .data1 { color: var(--mm-ink); }

/* filas etiqueta : valor (lluvia, humedad/barómetro, almanaque) */
html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(3) table td.data1,
html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(1) table td.data1,
html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(2) table td.data1 {
  border-bottom: 1px solid var(--mm-line) !important;
  color: var(--mm-muted);
}
html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(3) table td:last-child:not(:first-child),
html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(1) table td:last-child:not(:first-child),
html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(2) table td:last-child:not(:first-child) {
  text-align: right !important;
  color: #fff;
  font-family: var(--mm-mono);
  font-size: .85em !important;
}
html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(3) table td[colspan] { color: var(--mm-muted); font-size: .8em !important; }

/* temperatura: protagonista */
html body #main-copy .ajaxDashboard #ajaxtemp {
  display: inline-block;
  color: #fff;
  font-family: var(--mm-font);
  font-size: 2.6rem !important;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
html body #main-copy .ajaxDashboard #ajaxheatcolorword { color: var(--mm-accent-2); font-weight: 600; }
html body #main-copy .ajaxDashboard #ajaxwind { color: #fff; font-family: var(--mm-mono); font-size: 1.8rem; font-weight: 700; }
html body #main-copy .ajaxDashboard #ajaxrain,
html body #main-copy .ajaxDashboard #ajaxhumidity,
html body #main-copy .ajaxDashboard #ajaxbaro,
html body #main-copy .ajaxDashboard #ajaxuv,
html body #main-copy .ajaxDashboard #ajaxsolar { color: #fff; }
html body #main-copy .ajaxDashboard .meas { color: var(--mm-muted); }
html body #main-copy .ajaxDashboard strong { color: var(--mm-muted); font-weight: 500; }

/* imágenes: iconos sobre fondo oscuro */
html body #main-copy .ajaxDashboard img { border: 0; }
html body #main-copy .ajaxDashboard #ajaxconditionicon2 img,
html body #main-copy .ajaxDashboard #ajaxthermometer img { border-radius: 10px; max-width: none; }
html body #main-copy .ajaxDashboard #ajaxwindiconwr img { background: #e2e8f0; border-radius: 50%; padding: 2px; max-width: none; }
html body #main-copy .ajaxDashboard td.datahead a img,
html body #main-copy .ajaxDashboard p.datahead a img { background: #e2e8f0; border-radius: 4px; padding: 1px; }

/* enlaces rápidos "En vivo / Tendencia / Gráficas…" (p.datahead dentro de la tarjeta de temperatura) */
html body #main-copy .ajaxDashboard p.datahead {
  margin: .75rem 0 0;
  padding: .75rem 0 0;
  border-top: 1px solid var(--mm-line);
  background: none;
  color: var(--mm-muted);
  font-family: var(--mm-font);
  font-size: .8rem;
  letter-spacing: 0;
  line-height: 2;
  text-align: left;
  text-transform: none;
}

/* fila con las 3 capturas (Weather34 / WD Live / Gauges) */
html body #main-copy .ajaxDashboard > table:nth-of-type(2) > tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
html body #main-copy .ajaxDashboard > table:nth-of-type(2) > tbody > tr { display: contents; }
html body #main-copy .ajaxDashboard > table:nth-of-type(2) td {
  display: block;
  padding: .4rem;
  background: var(--mm-card);
  border: 1px solid var(--mm-line);
  border-radius: 16px;
}
html body #main-copy .ajaxDashboard > table:nth-of-type(2) img {
  display: block;
  width: 100% !important;
  height: auto !important;
  border-radius: 12px;
}

/* ---- Escritorio ancho: 4 columnas como la tabla original ---- */
@media (min-width: 1100px) {
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  }
}

/* ---- Móvil / tablet: una columna, cada cabecera junto a su tarjeta ---- */
@media (max-width: 1099px) {
  html body #main-copy .ajaxDashboard > table:first-of-type td[rowspan] { grid-row: auto; }
  html body #main-copy .ajaxDashboard tr:nth-child(2) > td:nth-child(1) { order: 10; }
  html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(1) { order: 11; }
  html body #main-copy .ajaxDashboard tr:nth-child(2) > td:nth-child(2) { order: 20; }
  html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(2) { order: 21; }
  html body #main-copy .ajaxDashboard tr:nth-child(2) > td:nth-child(3) { order: 30; }
  html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(3) { order: 31; }
  html body #main-copy .ajaxDashboard tr:nth-child(2) > td:nth-child(4) { order: 40; }
  html body #main-copy .ajaxDashboard tr:nth-child(3) > td:nth-child(4) { order: 41; }
  html body #main-copy .ajaxDashboard tr:nth-child(4) > td:nth-child(1) { order: 50; }
  html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(1) { order: 51; }
  html body #main-copy .ajaxDashboard tr:nth-child(4) > td:nth-child(2) { order: 60; }
  html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(2) { order: 61; }
  html body #main-copy .ajaxDashboard tr:nth-child(4) > td:nth-child(3) { order: 70; }
  html body #main-copy .ajaxDashboard tr:nth-child(5) > td:nth-child(3) { order: 71; }
  html body #main-copy .ajaxDashboard tr:nth-child(6) > td:nth-child(1) { order: 80; }
  html body #main-copy .ajaxDashboard tr:nth-child(7) > td:nth-child(1) { order: 81; }
  html body #main-copy .ajaxDashboard tr:nth-child(6) > td:nth-child(2) { order: 90; }
  html body #main-copy .ajaxDashboard tr:nth-child(7) > td:nth-child(2) { order: 91; }
}

/* ==========================================================================
   PREVISIÓN  (WC-forecast.php  ->  table.WCforecast)
   Cada periodo (columna) se dibuja como una tarjeta: título, icono, texto,
   probabilidades y temperatura. Sin tocar el PHP.
   ========================================================================== */
html body #main-copy table.WCforecast {
  width: 100% !important;
  border: 0 !important;
  background: transparent;
}
html body #main-copy table.WCforecast tr { background: transparent !important; }
html body #main-copy table.WCforecast td { color: var(--mm-ink); border: 0 !important; }
html body #main-copy table.WCforecast b { color: #fff; }
/* cabecera / selector de ciudad */
html body #main-copy table.WCforecast > tbody > tr > td > b,
html body #main-copy table.WCforecast > tbody > tr > td > span { font-family: var(--mm-mono); font-size: .75rem; letter-spacing: .06em; }
html body #main-copy table.WCforecast select { margin: .25rem 0 .75rem; }

/* tabla de iconos: columnas-tarjeta */
html body #main-copy table.WCforecast table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: .6rem 0;
  margin: 0 -.6rem;
  width: calc(100% + 1.2rem) !important;
  table-layout: fixed;
}
html body #main-copy table.WCforecast table td {
  padding: .3rem .4rem;
  background: var(--mm-card);
  border-left: 1px solid var(--mm-line) !important;
  border-right: 1px solid var(--mm-line) !important;
  font-size: .85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
html body #main-copy table.WCforecast table tr:first-child td {
  padding-top: .9rem;
  border-top: 1px solid var(--mm-line) !important;
  border-radius: 16px 16px 0 0;
  color: var(--mm-accent-2);
  font-family: var(--mm-mono);
  font-size: .68rem !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html body #main-copy table.WCforecast table tr:last-child td {
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--mm-line) !important;
  border-radius: 0 0 16px 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
html body #main-copy table.WCforecast table img { border-radius: 12px; max-width: 100%; height: auto; }

/* móvil: las columnas-tarjeta se desplazan en horizontal en vez de aplastarse */
@media (max-width: 767px) {
  html body #main-copy table.WCforecast { display: block; overflow-x: auto; }
  html body #main-copy table.WCforecast table { width: 44rem !important; margin: 0; }
}
html body #main-copy table.WCforecast > tbody > tr > td { padding: 0; }

/* ==========================================================================
   Protección frente al <body style="…"> de WC-forecast.php
   Si WC-forecast.php no está en "modo include" ($doIncludeWC), imprime un
   documento HTML completo con <body style="font-family:Verdana; font-size:12px;
   background-color:#FFFFFF">. El navegador fusiona ese estilo en el <body> real
   (solo ocurre en index.php) y pintaba la página de blanco. Un !important en la
   hoja de estilos gana a un estilo en línea sin !important.
   ========================================================================== */
html body {
  background-color: var(--mm-bg) !important;
  color: var(--mm-ink) !important;
  font-family: var(--mm-font) !important;
  font-size: 15px !important;
}

/* ---------- Menú horizontal por categorías (menu-modern.php) ---------- */
html body #mm-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(5, 8, 22, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--mm-line);
}
html body #mm-nav .mm-bar { max-width: 80rem; margin: 0 auto; padding: .4rem 1rem; position: relative; }
html body #mm-nav ul { list-style: none; margin: 0; padding: 0; }
html body #mm-nav li { margin: 0; padding: 0; }
html body #mm-nav a,
html body #mm-nav a:visited { color: var(--mm-ink); text-decoration: none; font-weight: 500; }
html body #mm-nav .mm-nav-toggle,
html body #mm-nav .mm-trigger {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: 500 1.1rem/1 var(--mm-font, 'Outfit', system-ui, sans-serif);
  color: var(--mm-ink); background: transparent; border: 0; border-radius: .6rem; padding: .6rem .8rem;
}
html body #mm-nav .mm-trigger svg { transition: transform .15s; opacity: .7; }
html body #mm-nav .mm-cat.is-open > .mm-trigger svg { transform: rotate(180deg); }
html body #mm-nav .mm-trigger:hover,
html body #mm-nav .mm-cat.is-open > .mm-trigger,
html body #mm-nav .mm-direct > a:hover { background: rgba(34, 211, 238, .1); color: var(--mm-accent-2); }
html body #mm-nav .mm-cat.is-active > .mm-trigger,
html body #mm-nav .mm-direct.is-active > a { color: var(--mm-accent); box-shadow: inset 0 -2px 0 var(--mm-accent); border-radius: .6rem .6rem 0 0; }
html body #mm-nav .mm-direct > a { display: inline-flex; padding: .6rem .8rem; border-radius: .6rem; font-size: 1.1rem; }
html body #mm-nav .mm-nav-toggle { background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--mm-line); }

/* panel desplegable (vertical) */
html body #mm-nav .mm-panel {
  display: none; position: absolute; z-index: 1001; min-width: 14rem; max-width: 22rem;
  margin-top: 0; padding: .4rem;
  background: rgba(2, 6, 18, .97); border-radius: .9rem;
  box-shadow: 0 0 0 1px var(--mm-line), 0 18px 40px rgba(0,0,0,.55);
  max-height: 75vh; overflow-y: auto;
}
html body #mm-nav .mm-cat.is-open > .mm-panel { display: block; }
html body #mm-nav .mm-panel a { display: block; padding: .5rem .7rem; border-radius: .5rem; font-size: 1rem; }
html body #mm-nav .mm-panel a:hover { background: rgba(34, 211, 238, .12); color: var(--mm-accent-2); }
html body #mm-nav .mm-panel a[aria-current="page"] { color: var(--mm-accent); background: rgba(34, 211, 238, .08); }
html body #mm-nav .mm-grouplabel,
html body #mm-nav .mm-grouplink {
  display: block; padding: .6rem .7rem .2rem; font: 500 .68rem/1.2 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mm-accent) !important;
}
html body #mm-nav .mm-group > ul { padding-left: .4rem; border-left: 1px solid var(--mm-line); margin-left: .7rem; }

@media (min-width: 768px) {
  html body #mm-nav .mm-nav-toggle { display: none; }
  html body #mm-nav .mm-list { display: flex; flex-wrap: wrap; gap: .15rem; }
  html body #mm-nav .mm-cat { position: relative; }
  html body #mm-nav .mm-cat > .mm-panel { left: 0; top: 100%; }
}
@media (max-width: 767px) {
  html body #mm-nav .mm-list { display: none; margin-top: .4rem; max-height: 70vh; overflow-y: auto; }
  html body #mm-nav.is-open .mm-list { display: block; }
  html body #mm-nav .mm-trigger { width: 100%; justify-content: space-between; }
  html body #mm-nav .mm-direct > a { display: flex; width: 100%; }
  html body #mm-nav .mm-panel { position: static; max-width: none; max-height: none; box-shadow: none; background: rgba(255,255,255,.03); margin: 0 0 .3rem; }
  /* con el menú en cabecera, el lateral antiguo no se muestra en móvil */
  html body #page:has(#mm-nav) .leftSideBar { display: none !important; }
}
/* escritorio: lateral estrecho (solo publicidad, logos y utilidades) */
@media (min-width: 768px) {
  html body #page:has(#mm-nav) { --mm-sidebar: 10rem; }
}

/* pantallas medianas: la última categoría se alinea a su derecha para no salirse */
@media (min-width: 768px) and (max-width: 1000px) {
  html body #mm-nav .mm-cat:last-child > .mm-panel { left: auto; right: 0; }
}

/* ---------- Sin lateral izquierdo: contenido a todo el ancho ---------- */
html body .leftSideBar { display: none !important; }
@media (min-width: 768px) {
  html body #main-copy,
  html body #main-copy-dark { margin-left: var(--mm-gutter); margin-right: var(--mm-gutter); }
}

/* Tarjeta "Luna": icono de la fase lunar más grande */
html body .ajaxDashboard img[src*="moon"] {
  width: 6.5rem !important;
  height: 6.5rem !important;
  object-fit: contain;
}

/* Fondo común de tarjetas con imágenes, streaming, mapas, publicidad, etc. */
html body .mm-surface { background: var(--mm-card); }

/* Quitados del panel: accesos con imágenes a Weather34, WDLive y Gauges (tabla final de ajax-dashboard.php).
   Selectores amplios (por enlace o por imagen, con cualquier ruta) para que funcionen en cualquier versión del panel. */
html body table:not(:has(table)):has(a[href*="weather34dashboard"]),
html body table:not(:has(table)):has(a[href*="gauges-live"]),
html body table:not(:has(table)):has(img[src*="W34" i]),
html body table:not(:has(table)):has(img[src*="Gauges" i]),
html body a[href*="weather34dashboard"],
html body a[href*="gauges-live"],
html body a[href*="FreshWDL"]:has(> img[src*="WDL" i]),
html body td:has(> a[href*="weather34dashboard"]),
html body td:has(> a[href*="gauges-live"]),
html body td:has(> a[href*="FreshWDL"] > img[src*="WDL" i]),
html body img[src*="W34" i],
html body img[src*="WDL.PNG" i],
html body img[src*="Gauges" i] { display: none !important; }

/* ==========================================================================
   PÁGINA METAR (include-metar-display.php)
   Ese include reutiliza <div class="ajaxDashboard"> con una tabla distinta
   (una celda por aeropuerto, tabla interior de 320px). Aquí se deshacen las
   reglas del panel de datos para esa estructura y se pinta una tarjeta por
   aeropuerto en una rejilla. Se detecta con :has(table[width="320"]).
   ========================================================================== */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) > table:first-of-type > tbody {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 1rem !important;
}
/* filas separadoras (&nbsp;) fuera */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) > table:first-of-type > tbody > tr:not(:has(table)) { display: none !important; }
/* la celda exterior no es tarjeta: solo contiene la tarjeta */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) > table:first-of-type > tbody > tr > td,
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) > table:first-of-type > tbody > tr:first-child > td {
  grid-column: auto !important;
  grid-row: auto !important;
  order: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: var(--mm-font) !important;
  font-size: inherit !important;
  color: var(--mm-ink) !important;
}
/* la tarjeta */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] {
  width: 100% !important;
  height: 100%;
  background: var(--mm-card);
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--mm-line);
  padding: .5rem .75rem .75rem;
}
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td {
  font-family: var(--mm-font) !important;
  font-size: .92rem !important;
  color: var(--mm-ink) !important;
  border-bottom: 0 !important;
  padding: .3rem .25rem !important;
}
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td[align="right"]:not([colspan]) { text-align: right !important; color: var(--mm-muted) !important; }
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td[align="left"] { text-align: left !important; font-family: var(--mm-font) !important; }
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td[align="left"] b { color: #fff; font-weight: 600; }
/* título (ICAO - nombre) */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td.datahead {
  color: var(--mm-accent) !important;
  font-family: var(--mm-mono) !important;
  font-size: .72rem !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-top: .5rem !important;
}
/* METAR en crudo */
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td[colspan] small {
  color: var(--mm-muted);
  font-family: var(--mm-mono);
  font-size: .7rem;
  word-break: break-all;
}
html body #main-copy .ajaxDashboard:has(table[width="320"]):not(#mm-x) td > table[width="320"] td[align="center"] { text-align: center !important; font-family: var(--mm-font) !important; }

/* ==========================================================================
   Cabecera fija (cabecera + menú) y fila "actualización + datos gizmo"
   header.php mueve la línea de actualización del dashboard y el gizmo a #mm-row2
   ========================================================================== */
#mm-row2 {
  flex: 0 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem;
  margin-top: -.15rem; padding-top: .35rem; border-top: 1px solid var(--mm-line);
}
#mm-row2 #mm-upd { flex: 1 1 auto; font: .72rem/1.5 var(--mm-mono); color: var(--mm-muted); text-align: left; }
#mm-row2 #mm-upd #ajaxindicator, #mm-row2 #mm-upd #ajaxdate, #mm-row2 #mm-upd #ajaxcounter, #mm-row2 #mm-upd #ajaxtime { color: var(--mm-accent-2); }
#mm-row2 > .basis-72 { flex: 0 1 auto !important; flex-basis: auto !important; }
#mm-row2 .ajaxSidebar { padding: .15rem .5rem; }
@media (min-width: 768px) {
  html body #header { position: sticky; top: 0; z-index: 1002; }
  html body #mm-nav { top: var(--mm-hh, 7.5rem); }
}
@media (min-width: 768px) {
  html body #header { background: rgba(5, 8, 22, .97); }
  /* al hacer scroll la cabecera fija se compacta */
  html.mm-scrolled #header > div { padding-top: .25rem; padding-bottom: .25rem; row-gap: .1rem; }
        html.mm-scrolled #header h1 + div { display: none; }
    html.mm-scrolled #mm-row2 { margin-top: 0; padding-top: .15rem; }
}
@media (min-width: 768px) { html body #mm-nav { background: rgba(5, 8, 22, .97); } }

/* ---- v37: fila "actualización + gizmo" robusta: todo en UNA línea, tipografía pequeña ---- */
html body #header #mm-row2 { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; order: 99; display: flex !important; flex-wrap: wrap; align-items: center; gap: .15rem 1.25rem; }
html body #header #mm-row2 #mm-upd, html body #header #mm-row2 #mm-upd * { font: 500 .72rem/1.5 var(--mm-mono) !important; color: var(--mm-muted); }
html body #header #mm-row2 #mm-upd #ajaxindicator, html body #header #mm-row2 #mm-upd #ajaxdate,
html body #header #mm-row2 #mm-upd #ajaxcounter, html body #header #mm-row2 #mm-upd #ajaxtime { color: var(--mm-accent-2); }
html body #header #mm-row2 #mm-upd b { font-weight: 500 !important; }
/* gizmo: sus líneas (cualquier estructura) pasan a una sola línea horizontal */
html body #header #mm-row2 > .basis-72 { flex: 0 1 auto !important; min-width: 0; margin-left: auto; }
html body #header #mm-row2 > .basis-72 br { display: none !important; }
html body #header #mm-row2 > .basis-72 table, html body #header #mm-row2 > .basis-72 tbody,
html body #header #mm-row2 > .basis-72 tr { display: contents !important; }
html body #header #mm-row2 > .basis-72, html body #header #mm-row2 > .basis-72 .ajaxSidebar { display: flex !important; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; background: none !important; box-shadow: none !important; padding: 0 !important; }
html body #header #mm-row2 > .basis-72 * { font: 500 .72rem/1.5 var(--mm-mono) !important; color: var(--mm-ink); width: auto !important; max-width: none !important; float: none !important; margin: 0; padding: 0; }
html body #header #mm-row2 > .basis-72 td, html body #header #mm-row2 > .basis-72 div, html body #header #mm-row2 > .basis-72 p { display: inline-block !important; white-space: nowrap; }
html body #header #mm-row2 > .basis-72 .meas { color: var(--mm-muted); margin-right: .3rem; }
html body #header #mm-row2 > .basis-72 .data { color: var(--mm-accent-2); }

/* ---- v38: selector de idioma en la línea del menú, arriba a la derecha ---- */
html body #mm-nav .mm-bar { display: flex; flex-wrap: wrap; align-items: center; }
html body #mm-nav .mm-nav-toggle { order: 1; }
html body #mm-nav #mm-lang { order: 2; margin-left: auto; text-align: right; }
html body #mm-nav #mm-lang > div { padding: .15rem .4rem; font-size: .8rem; }
html body #mm-nav .mm-list { order: 3; }
@media (max-width: 767px) { html body #mm-nav .mm-list { flex-basis: 100%; } }
@media (min-width: 768px) {
  html body #mm-nav .mm-list { order: 1; flex: 1 1 auto; }
  html body #mm-nav #mm-lang { order: 2; flex: 0 0 auto; }
}
html body #header #mm-row2 .mm-sep { color: var(--mm-muted); margin: 0 .5rem; }
html body #header #mm-row2 > .basis-72 .mm-sep { margin: 0 .5rem !important; color: var(--mm-muted) !important; }

/* v41: sin rendija entre la cabecera fija y el menú: se solapan 2px (la cabecera tapa el borde superior del menú) y ambos son opacos */
@media (min-width: 768px) {
  html body #header { background: #050816; }
  html body #mm-nav { background: #050816; top: calc(var(--mm-hh, 7.5rem) - 2px); padding-top: 2px; }
}
html body #header #mm-row2 #mm-upd #gizmoindicator, html body #header #mm-row2 #mm-upd #gizmodate, html body #header #mm-row2 #mm-upd #gizmotime { color: var(--mm-accent-2); }

/* ---- Logo nuevo (newlogo.png) en lugar de la nube; si la imagen no carga, se conserva la nube ---- */
html body #mm-logo.mm-has-logo { background: none !important; box-shadow: none !important; width: auto !important; min-width: 0; padding: 0; }
html body #mm-logo.mm-has-logo > svg { display: none; }
html body #mm-logo.mm-has-logo > img { display: block; height: 3.5rem; width: auto; min-height: 0; max-width: 12rem; object-fit: contain; }
@media (min-width: 640px) { html body #mm-logo.mm-has-logo > img { height: 4.5rem; } }

/* logo: contenedor con esquinas redondeadas y fondo azul clarito (se aplica por CSS, sin editar la imagen) */
html body #mm-logo.mm-has-logo {
  background: #cfe8ff !important; border-radius: 1rem; overflow: hidden; padding: .25rem;
  box-shadow: 0 8px 20px rgba(14, 165, 233, .22) !important;
}
html body #mm-logo.mm-has-logo > img { height: calc(3.5rem - .5rem); border-radius: .6rem; }
@media (min-width: 640px) { html body #mm-logo.mm-has-logo > img { height: calc(4.5rem - .5rem); } }

/* logo: fondo degradado vertical, azul mar abajo -> azul cielo claro arriba */
html body #mm-logo.mm-has-logo { background: linear-gradient(to top, #0b6fb8 0%, #4aa8e0 45%, #bfe6ff 100%) !important; }

/* ==========================================================================
   v55 · Móvil (<768px): tarjetas del dashboard de 2 en 2 (Resumen/Temperatura a ancho completo)
   ========================================================================== */
@media (max-width: 767px) {
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .5rem; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(1), html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:nth-child(1) { grid-column: 1 / -1; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(2) { order: 20; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:nth-child(2) { order: 22; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(3) { order: 21; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:nth-child(3) { order: 23; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(4) { order: 30; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:nth-child(4) { order: 32; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(4) > td:nth-child(1) { order: 31; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(5) > td:nth-child(1) { order: 33; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(4) > td:nth-child(2) { order: 40; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(5) > td:nth-child(2) { order: 42; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(4) > td:nth-child(3) { order: 41; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(5) > td:nth-child(3) { order: 43; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(6) > td:nth-child(1) { order: 50; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(7) > td:nth-child(1) { order: 52; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(6) > td:nth-child(2) { order: 51; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(7) > td:nth-child(2) { order: 53; }
  /* tarjetas estrechas: menos relleno y letra algo menor para que quepan los datos */
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:not(:first-child) > td:not(:nth-child(1)) { padding-inline: .55rem; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:not(:first-child):not(:nth-child(2)):not(:nth-child(3)) > td, 
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:not(:nth-child(1)) { font-size: .82rem; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead, html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead * { font-size: .62rem !important; letter-spacing: .1em; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(1).datahead, html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(2) > td:nth-child(1).datahead * { font-size: .68rem !important; letter-spacing: .14em; }
  html body #main-copy .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(3) > td:nth-child(3) td:last-child { white-space: nowrap; font-size: .76rem !important; }
  html body #main-copy .ajaxDashboard #ajaxwind { font-size: 1.5rem; }
}

/* ==========================================================================
   v56 · Móvil (<768px): cabecera (logo, título, actualización + gizmo) fija junto al menú.
   Al hacer scroll se compacta: se ocultan la ubicación/enlaces, la insignia y la temperatura
   (el título y el logo mantienen su tamaño).
   ========================================================================== */
@media (max-width: 767px) {
  html body #header { position: sticky; top: 0; z-index: 1002; background: #050816; }
  html body #mm-nav { background: #050816; top: calc(var(--mm-hh, 7.5rem) - 2px); padding-top: 2px; }
  html.mm-scrolled #header > div { padding-top: .25rem; padding-bottom: .25rem; row-gap: .1rem; }
  html.mm-scrolled #header h1 + div { display: none; }
  html.mm-scrolled #header h1 > span + span { display: none; }
  html.mm-scrolled #header > div > .ml-auto { display: none; }
  html.mm-scrolled #mm-row2 { margin-top: 0; padding-top: .1rem; }
}

/* v69 · Previsión (WC-forecast.php): colores en línea más claros para el fondo oscuro.
   Rojo #ff0000 -> #ff8a8a (máximas), azul #0000ff -> #8ec5ff (mínimas), verde (lluvia) -> #6ee7a0, azul oscuro (nieve) -> #a5c8ff */
html body table.WCforecast span[style*="#ff0000" i],
html body table.WCforecast span[style*="rgb(255, 0, 0)"] { color: #ff8a8a !important; }
html body table.WCforecast span[style*="#0000ff" i],
html body table.WCforecast span[style*="rgb(0, 0, 255)"] { color: #8ec5ff !important; }
html body table.WCforecast span[style*="color: green"],
html body table.WCforecast td[style*="color: green"] { color: #6ee7a0 !important; }
html body table.WCforecast span[style*="darkblue"],
html body table.WCforecast td[style*="darkblue"] { color: #a5c8ff !important; }

/* v71 · Tarjeta de temperatura: máx/mín en tonos claros y termómetro (thermometer.php) con la escala en blanco.
   El termómetro es una imagen: se invierte la luminosidad (negro -> blanco) conservando los tonos rojo/azul,
   se aclara un poco y "screen" hace desaparecer el fondo oscuro/negro sobre la tarjeta. */
html body .ajaxDashboard #ajaxtempmax,
html body .ajaxDashboard #ajaxtempmax * { color: #ff5c5c !important; }
html body .ajaxDashboard #ajaxtempmin,
html body .ajaxDashboard #ajaxtempmin * { color: #38b6ff !important; }
html body .ajaxDashboard span[style*="#ff0000" i],
html body .ajaxDashboard span[style*="red" i] { color: #ff5c5c !important; }
html body .ajaxDashboard span[style*="#0000ff" i],
html body .ajaxDashboard span[style*="blue" i]:not([style*="darkblue"]) { color: #38b6ff !important; }
html body .ajaxDashboard #ajaxthermometer img.mm-thermo-filter {
  filter: invert(1) hue-rotate(180deg) brightness(1.2) saturate(1.1);
  mix-blend-mode: screen;
  background: transparent !important;
}

/* ==========================================================================
   v73 · Página de previsión completa (wxforecast.php -> WC-forecast2.php)
   Esa página imprime la tabla FUERA de #main-copy, así que se estiliza sin depender de él.
   - Cabecera + iconos: mismas tarjetas-columna que en el index.
   - Texto detallado (tabla de 2 columnas título | texto): cada periodo = una tarjeta
     con título mono cian y el texto debajo, en rejilla de 2 columnas (1 en móvil).
   ========================================================================== */
html body center:has(> table.WCforecast) { display: block; max-width: 80rem; margin: 0 auto; padding: 0 1rem 1rem; text-align: left; }
html body table.WCforecast { width: 100% !important; border: 0 !important; background: transparent; margin: 0 0 1rem; }
html body table.WCforecast tr { background: transparent !important; }
html body table.WCforecast td { color: var(--mm-ink); border: 0 !important; }
html body table.WCforecast b { color: #fff; }
html body table.WCforecast select { margin: .25rem 0 .75rem; }

/* iconos (tabla anidada): tarjetas-columna */
html body table.WCforecast table { width: calc(100% + 1.2rem) !important; margin: 0 -.6rem; border-collapse: separate; border-spacing: .6rem 0; table-layout: fixed; }
html body table.WCforecast table td {
  padding: .3rem .4rem; background: var(--mm-card);
  border-left: 1px solid var(--mm-line) !important; border-right: 1px solid var(--mm-line) !important;
  font-size: .85rem; line-height: 1.35; overflow-wrap: anywhere;
}
html body table.WCforecast table tr:first-child td {
  padding-top: .9rem; border-top: 1px solid var(--mm-line) !important; border-radius: 16px 16px 0 0;
  color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .68rem !important; letter-spacing: .08em; text-transform: uppercase;
}
html body table.WCforecast table tr:last-child td {
  padding-bottom: .9rem; border-bottom: 1px solid var(--mm-line) !important; border-radius: 0 0 16px 16px;
  color: #fff; font-size: 1rem; font-weight: 700;
}
html body table.WCforecast table img { border-radius: 12px; max-width: 100%; height: auto; }

/* texto detallado (tabla sin tablas dentro): una tarjeta por periodo */
html body table.WCforecast:not(:has(table)) { display: block; }
html body table.WCforecast:not(:has(table)) > tbody {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: .85rem; align-items: start;
}
html body table.WCforecast:not(:has(table)) > tbody > tr {
  display: block; background: var(--mm-card) !important; border: 1px solid var(--mm-line); border-radius: 18px; padding: .9rem 1.1rem 1rem;
}
html body table.WCforecast:not(:has(table)) > tbody > tr > td { display: block; width: auto !important; padding: 0 !important; text-align: left !important; }
html body table.WCforecast:not(:has(table)) > tbody > tr > td:first-child { margin-bottom: .45rem; }
html body table.WCforecast:not(:has(table)) > tbody > tr > td:first-child br { display: none; }
html body table.WCforecast:not(:has(table)) > tbody > tr > td:first-child b {
  font-family: var(--mm-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mm-accent-2);
}
html body table.WCforecast:not(:has(table)) > tbody > tr > td:last-child { font-size: .98rem; line-height: 1.6; color: var(--mm-ink); }
html body table.WCforecast:not(:has(table)) span[style*="#ff0000" i] { color: #ff5c5c !important; }
html body table.WCforecast:not(:has(table)) span[style*="#0000ff" i] { color: #38b6ff !important; }

@media (max-width: 767px) {
  html body table.WCforecast { display: block; overflow-x: auto; }
  html body table.WCforecast table { width: 44rem !important; margin: 0; }
  html body table.WCforecast:not(:has(table)) { overflow-x: visible; }
  html body table.WCforecast:not(:has(table)) > tbody { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v74 · Previsión por periodos (WC-forecast2.php): <div class="column-dark"><table border="4">
   Cabecera (ciudad) + una fila por periodo con [icono + temperatura | texto].
   Cada fila pasa a ser una tarjeta con el icono y la temperatura a la izquierda y el texto a la derecha.
   ========================================================================== */
html body div.column-dark:has(> table[border="4"]) { display: block; max-width: 80rem; margin: 0 auto; padding: 0 1rem 1rem; text-align: left; }
html body div.column-dark > table[border="4"] { display: block; width: 100% !important; border: 0 !important; background: transparent; margin: 0; }
html body div.column-dark > table[border="4"] > tbody {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: .85rem; align-items: stretch;
}
/* cabecera: ciudad */
html body div.column-dark > table[border="4"] > tbody > tr:first-child {
  display: block; grid-column: 1 / -1; background: transparent !important; padding: 0 .1rem;
}
html body div.column-dark > table[border="4"] > tbody > tr:first-child > td {
  display: block; padding: 0 !important; border: 0 !important; background: transparent !important;
  font-family: var(--mm-mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mm-accent-2) !important;
}
html body div.column-dark > table[border="4"] > tbody > tr:first-child * { color: var(--mm-accent-2) !important; font: inherit !important; }
/* una tarjeta por periodo */
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .9rem; align-items: center;
  background: var(--mm-card) !important; border: 1px solid var(--mm-line); border-radius: 18px; padding: .9rem 1rem;
}
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td {
  display: block; width: auto !important; padding: 0 !important; border: 0 !important; background: transparent !important;
}
/* izquierda: icono + temperatura */
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child {
  text-align: center !important; color: #fff; font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere;
}
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child img {
  display: block; margin: 0 auto .35rem; width: 56px; height: auto; border-radius: 14px;
}
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child b,
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child i { color: #fff; font-style: normal; }
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child span { font-size: 1.05rem; font-weight: 700; }
html body div.column-dark > table[border="4"] span[style*="#ff0000" i] { color: #ff5c5c !important; }
html body div.column-dark > table[border="4"] span[style*="#0000ff" i] { color: #38b6ff !important; }
/* derecha: texto */
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:last-child {
  text-align: left !important; color: var(--mm-ink); font-size: .98rem; line-height: 1.6;
}
@media (max-width: 480px) {
  html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) { grid-template-columns: 5rem minmax(0, 1fr); gap: .7rem; padding: .8rem .8rem; }
  html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child img { width: 46px; }
  html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:last-child { font-size: .92rem; }
}
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child br { display: none; }
html body div.column-dark > table[border="4"] > tbody > tr:first-child > td { text-align: left !important; }

/* v75 · temperatura siempre en su propia línea, debajo del texto del icono */
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child span[style*="color"] {
  display: block; margin-top: .3rem; font-size: 1.1rem; font-weight: 700; white-space: nowrap;
}
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* v76 · rejilla de tarjetas por periodo (la crea el script de footer.php a partir de la fila de iconos) */
html body table.WCforecast .mm-fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .7rem; width: 100%; margin: .25rem 0 1rem; }
html body table.WCforecast .mm-fc-card {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center;
  background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 18px; padding: .8rem .5rem .9rem; min-width: 0; overflow-wrap: anywhere;
}
html body table.WCforecast .mm-fc-card > div { color: var(--mm-ink); font-size: .85rem; line-height: 1.3; text-align: center !important; width: 100%; }
html body table.WCforecast .mm-fc-card .mm-fc-t { font-family: var(--mm-mono); font-size: .66rem !important; letter-spacing: .08em; text-transform: uppercase; color: var(--mm-accent-2); }
html body table.WCforecast .mm-fc-card .mm-fc-t * { font-size: inherit !important; color: inherit !important; }
html body table.WCforecast .mm-fc-card .mm-fc-i img { display: block; margin: 0 auto; width: 56px; height: auto; border-radius: 14px; }
html body table.WCforecast .mm-fc-card .mm-fc-T { color: #fff; font-size: 1.1rem; font-weight: 700; margin-top: .15rem; }
html body table.WCforecast .mm-fc-card .mm-fc-T span[style*="#ff0000" i] { color: #ff5c5c !important; }
html body table.WCforecast .mm-fc-card .mm-fc-T span[style*="#0000ff" i] { color: #38b6ff !important; }
html body table.WCforecast .mm-fc-card .mm-fc-r, html body table.WCforecast .mm-fc-card .mm-fc-r * { color: #6ee7a0 !important; }
html body table.WCforecast .mm-fc-card .mm-fc-n, html body table.WCforecast .mm-fc-card .mm-fc-n * { color: #a5c8ff !important; }

/* v77 · index / indexdesktop en móvil: las columnas de la previsión pasan a una rejilla de tarjetas (3 por fila) en vez de una sola fila con scroll */
html body table.WCforecast .mm-fc-g-mobile { display: none; }
@media (max-width: 767px) {
  html body table.WCforecast .mm-fc-g-mobile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
  html body table.WCforecast table.mm-fc-mhide { display: none !important; }
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-card { padding: .7rem .3rem .8rem; border-radius: 16px; }
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-card > div { font-size: .78rem; hyphens: manual; overflow-wrap: break-word; word-break: normal; }
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-t { font-size: .6rem !important; letter-spacing: .05em; }
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-i img { width: 46px; }
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-T { font-size: 1rem; }
}

/* v80 · enlaces rápidos del resumen: 2 líneas de 2 enlaces; el enlace es el nombre (sin flecha) */
html body .ajaxDashboard p.datahead .mm-ql-row { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: flex-start; }
html body .ajaxDashboard p.datahead .mm-ql {
  color: var(--mm-accent-2) !important; text-decoration: none; font-weight: 500; font-size: .85rem; line-height: 1.9; padding: .1rem 0; white-space: nowrap;
}
html body .ajaxDashboard p.datahead .mm-ql:hover, html body .ajaxDashboard p.datahead .mm-ql:focus-visible { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
html body .ajaxDashboard p.datahead:has(.mm-ql-row) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem 1rem; }
html body .ajaxDashboard p.datahead .mm-ql-row { display: contents; }
html body .ajaxDashboard p.datahead .mm-ql { white-space: normal; }

/* ==========================================================================
   v81 · Datos históricos (wxwuhistory.php + WU-History-inc.php): tablas con el diseño oscuro.
   Se apoya en las clases que ya trae la página (#wuwrap, colorTop, colorBox, selectorBox, dateTable,
   #typeTable, summaryTable, dailyTable, obsTable, pageTop, csvLink, bottomBar). No cambia el HTML.
   ========================================================================== */
html body #wuwrap { background: transparent !important; color: var(--mm-ink) !important; font-family: var(--mm-font); font-size: .9rem; max-width: 80rem; margin: 0 auto; padding: 0 1rem 1rem; }
html body #wuwrap #content { background: transparent !important; width: auto !important; padding: 0 !important; }
html body #wuwrap a { color: var(--mm-accent-2) !important; text-decoration: none; }
html body #wuwrap a:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
html body #wuwrap .heading { color: #fff !important; font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
html body #wuwrap .titleBar { background: transparent !important; color: var(--mm-muted) !important; border-top: 1px solid var(--mm-line) !important; margin: .5rem 0 1rem; padding: .5rem 0; }
html body #wuwrap .b, html body #wuwrap b, html body #wuwrap strong { color: #fff; }

/* cabecera de sección (la barra de color con esquinas) */
html body #wuwrap .colorTop { border-collapse: separate; border-spacing: 0; table-layout: auto; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: 18px 18px 0 0; overflow: hidden; }
html body #wuwrap .colorTop td, html body #wuwrap .colorTop th { background: transparent !important; color: #fff !important; border: 0 !important; height: auto !important; }
html body #wuwrap .colorTop .hLeft, html body #wuwrap .colorTop .hRight, html body #wuwrap .colorTop .sLeft, html body #wuwrap .colorTop .sRight { display: none; }
html body #wuwrap .colorTop .hCenter { padding: .75rem 1rem !important; font-family: var(--mm-mono); font-size: .8rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--mm-accent-2) !important; line-height: 1.4 !important; }
html body #wuwrap .colorTop .hMenu { padding: .75rem 1rem !important; font-size: .8rem !important; }
html body #wuwrap .colorTop .sCenter { display: none; }
/* cuerpo */
html body #wuwrap .colorBox { background: var(--mm-card); border: 1px solid var(--mm-line) !important; border-top: 0 !important; border-radius: 0 0 18px 18px; padding: 1rem !important; margin: 0 0 1.25rem; }
html body #wuwrap .colorBottom { display: none; }
html body #wuwrap .bottomBar { background: var(--mm-card) !important; color: var(--mm-muted) !important; border: 1px solid var(--mm-line) !important; border-radius: 14px; padding: .6rem 1rem !important; font-weight: 500; }

/* selector de fecha y unidades */
html body #wuwrap .selectorBox { background: rgba(255,255,255,.04) !important; border: 1px solid var(--mm-line) !important; border-radius: 14px; padding: .5rem .75rem; margin-bottom: 1rem; }
html body #wuwrap .dateTable { border-collapse: separate; border-spacing: .35rem; }
html body #wuwrap .dateTable td { padding: .15rem !important; }
html body #wuwrap .dateTable a { display: block; width: auto !important; min-width: 6rem; margin: 0 !important; padding: .35rem .8rem; border: 1px solid var(--mm-line); border-radius: 999px; background: rgba(255,255,255,.04); text-align: center; font-size: .85rem; }
html body #wuwrap .dateTable a:hover { background: rgba(56,189,248,.15); text-decoration: none; }
html body #wuwrap select, html body #wuwrap input[type="text"], html body #wuwrap input[type="submit"], html body #wuwrap input[type="button"], html body #wuwrap button {
  background: #0b1226 !important; color: var(--mm-ink) !important; border: 1px solid var(--mm-line) !important; border-radius: 10px; padding: .3rem .6rem; font-family: inherit; font-size: .85rem;
}
html body #wuwrap input[type="submit"], html body #wuwrap input[type="button"], html body #wuwrap button { cursor: pointer; }
html body #wuwrap input[type="submit"]:hover, html body #wuwrap input[type="button"]:hover, html body #wuwrap button:hover { background: rgba(56,189,248,.15) !important; }
html body #wuwrap #unitmenu, html body #wuwrap #unitmenu a { color: var(--mm-muted) !important; font-size: .8rem; }

/* pestañas Diario / Semanal / Mensual / ... */
html body #wuwrap #typeTable { background: transparent !important; border-collapse: separate; border-spacing: .35rem 0; margin: .75rem 0 1rem; width: 100%; }
html body #wuwrap #typeTable td { width: auto !important; padding: 0 !important; border: 0 !important; background: transparent !important; text-align: center; }
html body #wuwrap #typeTable td.activeTab { padding: .45rem .8rem !important; background: linear-gradient(135deg, #38bdf8, #2563eb) !important; color: #fff !important; border-radius: 999px; font-weight: 600; font-size: .85rem !important; }
html body #wuwrap #typeTable td.inactiveTab { padding: .45rem .8rem !important; border: 1px solid var(--mm-line) !important; border-radius: 999px; background: rgba(255,255,255,.04) !important; }
html body #wuwrap #typeTable td.inactiveTab a { display: block; font-size: .85rem; }

/* tablas de datos */
html body #wuwrap table.summaryTable, html body #wuwrap table.dailyTable, html body #wuwrap table.obsTable {
  width: 100% !important; border-collapse: separate; border-spacing: 0; background: transparent; margin: 0;
}
/* cada bloque de datos va dentro de .mm-scroll (lo crea footer.php): barra de scroll horizontal cuando no cabe */
html body #wuwrap .mm-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .5rem 0 1rem; border-radius: 12px; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #wuwrap .mm-scroll::-webkit-scrollbar { height: 8px; }
html body #wuwrap .mm-scroll::-webkit-scrollbar-thumb { background: rgba(56,189,248,.45); border-radius: 8px; }
@media (max-width: 767px) {
  html body #wuwrap { padding: 0 .5rem 1rem; }
  html body #wuwrap .colorBox { padding: .6rem !important; }
  html body #wuwrap .mm-scroll > table { width: max-content !important; min-width: 100% !important; }
  html body #wuwrap .mm-scroll > table td { white-space: nowrap; }
  html body #wuwrap table.mm-fix { table-layout: fixed !important; width: 100% !important; max-width: 100% !important; }
  html body #wuwrap table.mm-fix > tbody > tr > td, html body #wuwrap table.mm-fix > tr > td { min-width: 0 !important; max-width: 100%; }
  html body #wuwrap .mm-scroll { contain: inline-size; width: 100%; }
  html body #wuwrap .colorBox { min-width: 0; max-width: 100%; }
}
html body #wuwrap table.summaryTable thead tr td, html body #wuwrap table.dailyTable thead tr td, html body #wuwrap table.obsTable thead tr td,
html body #wuwrap table.summaryTable thead tr th, html body #wuwrap table.dailyTable thead tr th, html body #wuwrap table.obsTable thead tr th {
  background: rgba(56,189,248,.10) !important; background-image: none !important; color: var(--mm-accent-2) !important;
  font-family: var(--mm-mono); font-size: .68rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  border: 0 !important; border-bottom: 1px solid var(--mm-line) !important; padding: .55rem .5rem !important; text-align: center; white-space: nowrap; position: sticky; top: 0;
}
html body #wuwrap table.summaryTable tbody tr td, html body #wuwrap table.dailyTable tbody tr td, html body #wuwrap table.obsTable tbody tr td {
  background: transparent !important; color: var(--mm-ink) !important; border: 0 !important; border-bottom: 1px solid var(--mm-line) !important;
  padding: .45rem .5rem !important; font-size: .85rem; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap;
}
html body #wuwrap table.summaryTable tbody tr td:first-child, html body #wuwrap table.dailyTable tbody tr td:first-child, html body #wuwrap table.obsTable tbody tr td.date { text-align: left; color: #fff !important; font-weight: 600; }
html body #wuwrap table.obsTable tbody tr td.HdgLt, html body #wuwrap table.obsTable tbody tr td.HdgDk { background: rgba(255,255,255,.05) !important; border-bottom: 1px solid var(--mm-line) !important; color: #fff !important; font-weight: 600; }
html body #wuwrap table.obsTable tbody tr td.BodyDk { background: rgba(255,255,255,.03) !important; }
html body #wuwrap table.obsTable tbody tr td.Left { border-left: 1px solid var(--mm-line) !important; }
html body #wuwrap table.obsTable tbody tr td.Right { border-right: 1px solid var(--mm-line) !important; }
html body #wuwrap table.summaryTable tbody tr:hover td, html body #wuwrap table.dailyTable tbody tr:hover td, html body #wuwrap table.obsTable tbody tr:hover td { background: rgba(56,189,248,.10) !important; }
html body #wuwrap table.dailyTable tbody tr:nth-child(even) td { background: rgba(255,255,255,.025) !important; }
/* colores en línea (font color / span) legibles sobre fondo oscuro */
html body #wuwrap font[color="#FF0000" i], html body #wuwrap font[color="red" i], html body #wuwrap span[style*="#ff0000" i], html body #wuwrap span[style*="color:red" i], html body #wuwrap span[style*="color: red" i] { color: #ff5c5c !important; }
html body #wuwrap font[color="#0000FF" i], html body #wuwrap font[color="blue" i], html body #wuwrap span[style*="#0000ff" i], html body #wuwrap span[style*="color:blue" i], html body #wuwrap span[style*="color: blue" i] { color: #38b6ff !important; }

/* enlaces superiores y CSV */
html body #wuwrap .pageTop { font-size: .8rem; font-family: var(--mm-font); }
html body #wuwrap .pageTop a { color: var(--mm-accent-2) !important; }
html body #wuwrap #csvLink a { display: inline-block; background: rgba(255,255,255,.04) !important; border: 1px solid var(--mm-line) !important; border-radius: 999px; padding: .35rem 1rem !important; text-decoration: none; }
html body #wuwrap #csvLink a:hover { background: rgba(56,189,248,.15) !important; }
html body #wuwrap .logo { filter: brightness(1.8); }

/* v87 · histórico: selector de fecha centrado y sin desbordar (fila que se adapta, sin celdas vacías) */
html body #wuwrap .dateTable td.nobr:not(:has(a)) { display: none !important; }
html body #wuwrap .dateTable, html body #wuwrap .dateTable > tbody > tr > td.full { width: 100% !important; max-width: 100%; }
html body #wuwrap .dateTable form { margin: 0; }
html body #wuwrap .dateTable form > table { margin: 0 auto !important; width: 100%; max-width: 100%; }
html body #wuwrap .dateTable form > table > tbody > tr, html body #wuwrap .dateTable form > table > tr { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; }
html body #wuwrap .dateTable form > table td { display: block; padding: 0 !important; }
html body #wuwrap .dateTable form select, html body #wuwrap .dateTable form input[type="submit"] { max-width: 100%; margin: 0 !important; }
@media (max-width: 767px) {
  html body #wuwrap .selectorBox { padding: .6rem .5rem; }
  html body #wuwrap #typeTable > tbody > tr, html body #wuwrap #typeTable > tr { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
  html body #wuwrap #typeTable { border-spacing: 0; }
}

/* v88 · selector de fecha: siempre en una sola línea (los desplegables se encogen si hace falta) */
html body #wuwrap .dateTable form > table > tbody > tr, html body #wuwrap .dateTable form > table > tr { flex-wrap: nowrap; gap: .35rem; }
html body #wuwrap .dateTable form > table td { flex: 0 1 auto; min-width: 0; }
html body #wuwrap .dateTable form > table td:has(select) { flex: 1 1 auto; }
html body #wuwrap .dateTable form select { width: 100% !important; min-width: 0; padding-left: .6rem !important; padding-right: 1.4rem !important; text-overflow: ellipsis; }
html body #wuwrap .dateTable form input[type="submit"] { flex: none; padding-left: .8rem !important; padding-right: .8rem !important; }
@media (max-width: 767px) {
  html body #wuwrap .dateTable form select { font-size: .8rem !important; padding: .4rem 1.15rem .4rem .45rem !important; background-position: right .3rem center !important; background-size: .7rem !important; }
  html body #wuwrap .dateTable form input[type="submit"] { font-size: .8rem !important; padding: .4rem .6rem !important; }
  html body #wuwrap .dateTable form > table td:has(select) { flex: 1 1 0; }
  html body #wuwrap .dateTable form > table td:first-child { flex-grow: 2; }
}
@media (max-width: 767px) {
  html body #wuwrap .dateTable form > table td:has(select), html body #wuwrap .dateTable form > table td:first-child { flex: 0 1 auto; }
  html body #wuwrap .dateTable form select { width: auto !important; }
}
@media (max-width: 767px) {
  html body #wuwrap #typeTable td.activeTab, html body #wuwrap #typeTable td.inactiveTab { padding: .4rem .65rem !important; }
  html body #wuwrap #typeTable td.inactiveTab a { font-size: .8rem; }
}

/* v89 · histórico: título del bloque ("Tabla de datos para octubre 12, 2026") en una sola línea en móvil */
@media (max-width: 767px) {
  html body #wuwrap .colorTop .hCenter { white-space: nowrap !important; font-size: clamp(.58rem, 2.9vw, .8rem) !important; letter-spacing: .04em !important; padding: .75rem .6rem !important; }
  html body #wuwrap .colorTop .hLeft, html body #wuwrap .colorTop .hRight, html body #wuwrap .colorTop .hMenu { width: 0 !important; padding: 0 !important; }
}

/* v90 · histórico móvil: título arriba y selector de unidades debajo, dentro del bloque */
@media (max-width: 767px) {
  html body #wuwrap table.colorTop { width: 100% !important; max-width: 100%; table-layout: fixed; }
  html body #wuwrap table.colorTop > tbody > tr:first-child, html body #wuwrap table.colorTop > tr:first-child { display: flex; flex-wrap: wrap; align-items: center; width: 100%; }
  html body #wuwrap table.colorTop .hLeft, html body #wuwrap table.colorTop .hRight { display: none !important; }
  html body #wuwrap table.colorTop .hCenter { flex: 1 1 100%; padding: .75rem 1rem .25rem !important; }
  html body #wuwrap table.colorTop .hMenu { flex: 1 1 100%; width: auto !important; padding: .1rem 1rem .7rem !important; white-space: normal !important; text-align: left !important; font-size: .78rem !important; }
  html body #wuwrap table.colorTop > tbody > tr:nth-child(2), html body #wuwrap table.colorTop > tr:nth-child(2) { display: none; }
}


/* v97 · wxhistory.php (informe mensual de la estación): formulario y tarjetas por día. La clase .mm-wxh la pone footer.php */
html body #main-copy.mm-wxh h3 { font-size: 1.3rem; margin: .5rem 0 1rem; color: #fff; }
html body #main-copy.mm-wxh fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; min-width: 0; margin: 0 0 1.25rem; padding: .8rem 1rem 1rem; background: rgba(255,255,255,.04); border: 1px solid var(--mm-line); border-radius: 14px; }
html body #main-copy.mm-wxh legend { padding: 0 .5rem; font-family: var(--mm-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mm-accent-2); }
html body #main-copy.mm-wxh fieldset select { flex: 1 1 10rem; max-width: 18rem; min-width: 0; padding: .55rem .8rem; color: var(--mm-ink); background-color: #0b1226; border: 1px solid var(--mm-line); border-radius: 12px; font: inherit; }
html body #main-copy.mm-wxh fieldset input[type="submit"] { flex: none; padding: .55rem 1.2rem; border: 0; border-radius: 999px; color: #fff; font-weight: 600; font-family: inherit; cursor: pointer; background: linear-gradient(135deg, #38bdf8, #2563eb); }
html body #main-copy.mm-wxh fieldset input[type="submit"]:hover { filter: brightness(1.1); }
html body #main-copy.mm-wxh > h1 { font-size: 1.3rem; margin: 1.25rem 0 1rem; }
html body #main-copy.mm-wxh .mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start; }
html body #main-copy.mm-wxh .mm-card { min-width: 0; overflow: hidden; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy.mm-wxh .mm-card.mm-wide { grid-column: 1 / -1; }
html body #main-copy.mm-wxh .mm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy.mm-wxh .mm-scroll::-webkit-scrollbar { height: 8px; }
html body #main-copy.mm-wxh .mm-scroll::-webkit-scrollbar-thumb { background: rgba(56,189,248,.45); border-radius: 8px; }
html body #main-copy.mm-wxh .mm-card table { width: 100% !important; margin: 0; border-collapse: separate; border-spacing: 0; background: transparent; }
html body #main-copy.mm-wxh .mm-card tr.table-top td { padding: .75rem .9rem; background: rgba(56,189,248,.10) !important; color: var(--mm-accent-2) !important; font-family: var(--mm-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; border-bottom: 1px solid var(--mm-line); }
html body #main-copy.mm-wxh .mm-card tr.column-light td, html body #main-copy.mm-wxh .mm-card tr.column-dark td { padding: .5rem .9rem; font-size: .88rem; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--mm-line); background: transparent !important; }
html body #main-copy.mm-wxh .mm-card tr.column-dark td { background: rgba(255,255,255,.03) !important; }
html body #main-copy.mm-wxh .mm-card:not(.mm-wide) tr td:first-child:not([colspan]) { color: var(--mm-muted); }
html body #main-copy.mm-wxh .mm-card:not(.mm-wide) tr td + td { color: #fff; font-weight: 500; }
html body #main-copy.mm-wxh .mm-card.mm-wide tr.column-light td, html body #main-copy.mm-wxh .mm-card.mm-wide tr.column-dark td { text-align: center; white-space: nowrap; }
html body #main-copy.mm-wxh .mm-card tr:last-child td { border-bottom: 0; }
html body #main-copy.mm-wxh .mm-card > p { margin: 0; padding: .65rem .9rem; border-top: 1px solid var(--mm-line); font-size: .8rem; color: var(--mm-accent-2); cursor: pointer; }
html body #main-copy.mm-wxh .mm-card > p:hover { background: rgba(56,189,248,.08); }
html body #main-copy.mm-wxh .mm-card > img { display: block; max-width: 100%; height: auto; padding: .5rem; box-sizing: border-box; }
html body #main-copy.mm-wxh .mm-note { display: block; padding: .6rem .9rem; border-top: 1px solid var(--mm-line); font-size: .78rem; color: var(--mm-muted); }
@media (max-width: 767px) {
  html body #main-copy.mm-wxh fieldset select { flex: 1 1 100%; max-width: none; }
  html body #main-copy.mm-wxh fieldset input[type="submit"] { flex: 1 1 100%; }
  html body #main-copy.mm-wxh .mm-card tr.column-light td, html body #main-copy.mm-wxh .mm-card tr.column-dark td { padding: .5rem .75rem; font-size: .85rem; }
}
html body #main-copy.mm-wxh .mm-card tr.table-top, html body #main-copy.mm-wxh .mm-card tr.table-top th { background: transparent !important; background-image: none !important; color: var(--mm-accent-2) !important; }
html body #main-copy.mm-wxh .mm-card tr.column-light, html body #main-copy.mm-wxh .mm-card tr.column-dark { background: transparent !important; }

/* v98 · wxhilowavg.php: los títulos llevan colores en línea azul oscuro (#0066CC, #0F4679) que no se leen sobre fondo oscuro */
html body #main-copy .column-dark > span[style*="#0066CC" i] { color: var(--mm-accent-2) !important; }
html body #main-copy .column-dark > span[style*="#0F4679" i] { color: var(--mm-muted) !important; }


/* v99 · wxhilowavg.php: tablas matriz (medición x columnas). Se devuelve su comportamiento de tabla normal (la rejilla de tarjetas
   del dashboard no sirve aquí) y se estilan como tarjeta con scroll horizontal. La clase .mm-hla la pone footer.php */
html body #main-copy.mm-hla .mm-hla-card { max-width: 100%; margin: .75rem 0 1.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy.mm-hla .mm-hla-card::-webkit-scrollbar { height: 8px; }
html body #main-copy.mm-hla .mm-hla-card::-webkit-scrollbar-thumb { background: rgba(56,189,248,.45); border-radius: 8px; }
html body #main-copy.mm-hla .ajaxDashboard { width: 100% !important; min-width: 40rem; margin: 0; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type { display: table !important; width: 100% !important; border-collapse: separate !important; border-spacing: 0; background: transparent; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody { display: table-row-group !important; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr { display: table-row !important; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td,
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > th { display: table-cell !important; margin: 0 !important; padding: .45rem .6rem !important; border: 0 !important; border-bottom: 1px solid var(--mm-line) !important; border-radius: 0 !important; background: transparent !important; color: var(--mm-ink) !important; text-align: center !important; vertical-align: middle; font-size: .85rem !important; }
/* cabeceras de columna */
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead,
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > th.datahead { background: rgba(56,189,248,.10) !important; color: var(--mm-accent-2) !important; font-family: var(--mm-mono); font-size: .68rem !important; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
/* fila superior (unidades + "actualizado") */
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr:first-child > td,
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr:first-child > th { font-family: var(--mm-mono); font-size: .72rem !important; color: var(--mm-muted) !important; text-align: left !important; }
html body #main-copy.mm-hla #uomM, html body #main-copy.mm-hla #uomE { color: var(--mm-muted) !important; }
html body #main-copy.mm-hla #uomM[style*="blue" i], html body #main-copy.mm-hla #uomE[style*="blue" i] { color: #38bdf8 !important; }
html body #main-copy.mm-hla .ajax, html body #main-copy.mm-hla #ajaxcounter { color: var(--mm-accent-2) !important; }
/* tablas anidadas (hilowavg2): etiqueta y valores */
html body #main-copy.mm-hla .ajaxDashboard td table { width: 100% !important; border-collapse: collapse; }
html body #main-copy.mm-hla .ajaxDashboard td table td { padding: .25rem .3rem !important; border: 0 !important; background: transparent !important; font-size: .85rem !important; }
html body #main-copy.mm-hla .ajaxDashboard td table td.column-dark { color: #fff !important; font-weight: 600; text-align: center; }
html body #main-copy.mm-hla .ajaxDashboard td:first-child table td.column-dark { text-align: left; color: var(--mm-accent-2) !important; }
html body #main-copy.mm-hla .ajaxDashboard td table td.data3 { color: #fff !important; text-align: center; font-variant-numeric: tabular-nums; }
html body #main-copy.mm-hla .ajaxDashboard td table td.data4 { color: var(--mm-muted) !important; text-align: left; }
html body #main-copy.mm-hla .ajaxDashboard td table td.data3 *, html body #main-copy.mm-hla .ajaxDashboard td table td.column-dark * { color: inherit !important; }
html body #main-copy.mm-hla .ajaxDashboard td table td.data4 * { color: inherit !important; }
html body #main-copy.mm-hla .ajaxDashboard td table img { max-width: 2.6rem; height: auto; }
/* Monthly.php: etiqueta (th) + 12 valores */
html body #main-copy.mm-hla #Monthly .ajaxDashboard > table:first-of-type > tbody > tr > th.data1 { color: var(--mm-accent-2) !important; text-align: left !important; font-size: .78rem !important; white-space: nowrap; }
html body #main-copy.mm-hla #Monthly .ajaxDashboard > table:first-of-type > tbody > tr > td.data1 { color: #fff !important; font-size: .78rem !important; font-variant-numeric: tabular-nums; white-space: nowrap; padding: .45rem .35rem !important; }
html body #main-copy.mm-hla #Monthly .ajaxDashboard > table:first-of-type > tbody > tr > td.data1 * { color: inherit !important; font-size: inherit !important; }
html body #main-copy.mm-hla #Monthly .ajaxDashboard { min-width: 46rem; }
@media (max-width: 767px) {
  html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead, html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td.datahead * { font-size: .66rem !important; }
}
/* wxhilowavg: anula los estilos de "tarjeta" del dashboard (fila 3/columna 3) que reducían el texto de la columna "Ayer" */
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td:nth-child(n) table td,
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td:nth-child(n) table td:last-child,
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr:nth-child(n) > td:nth-child(n) td:last-child { font-size: .85rem !important; white-space: normal; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td table td.data4 { color: var(--mm-muted) !important; }
html body #main-copy.mm-hla .ajaxDashboard > table:first-of-type > tbody > tr > td table td.data3 { color: #fff !important; }


/* v100 · banner de AdSense en páginas interiores: contenedor con scroll horizontal (la clase la pone footer.php) */
html body #main-copy .mm-adscroll { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 auto .75rem; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy .mm-adscroll > iframe, html body #main-copy .mm-adscroll > ins { max-width: none !important; display: block; margin-left: auto; margin-right: auto; }

/* v102 · valor de la temperatura en las vistas de WC-forecast: +15 % (solo tamaño de letra) */
html body #main-copy table.WCforecast table tr:last-child td,
html body table.WCforecast table tr:last-child td { font-size: 1.15rem; }                                   /* tabla de previsión (escritorio / index) */
html body div.column-dark > table[border="4"] > tbody > tr:not(:first-child) > td:first-child span[style*="color"] { font-size: 1.265rem; } /* wxforecast.php */
html body table.WCforecast .mm-fc-card .mm-fc-T { font-size: 1.265rem; }                                    /* tarjetas (móvil index y wxforecast) */
html body table.WCforecast:not(:has(table)):not(:has(.mm-fc-card)) span[style*="#ff0000" i],
html body table.WCforecast:not(:has(table)):not(:has(.mm-fc-card)) span[style*="#0000ff" i] { font-size: 1.15em; }                 /* temperaturas dentro del texto largo */
@media (max-width: 767px) {
  html body table.WCforecast .mm-fc-g-mobile .mm-fc-card > div.mm-fc-T { font-size: .9rem; }   /* antes .78rem (+15 %) */
}


/* ==========================================================================
   v105 · wxtrends.php · wxgraphs.php · wxquake.php
   Las clases .mm-pg (+ .mm-trn / .mm-gph / .mm-quake) las pone footer.php según la página.
   ========================================================================== */
html body #main-copy.mm-pg { --mm-pad: 1rem; }
html body #main-copy.mm-pg > h3 { font-size: 1.3rem; margin: .5rem 0 1rem; color: #fff; }
html body #main-copy.mm-pg .mm-card { display: block; min-width: 0; margin: 0 0 1rem; padding: 0; overflow: hidden; text-align: left; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); box-shadow: none; }
html body #main-copy.mm-pg .mm-card > h1, html body #main-copy.mm-pg .mm-card > h2, html body #main-copy.mm-pg .mm-card > h3 {
  margin: 0; padding: .75rem var(--mm-pad); border: 0; border-bottom: 1px solid var(--mm-line); border-radius: 0; background: rgba(56,189,248,.10);
  color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; text-align: left;
}
html body #main-copy.mm-pg .mm-body { padding: .8rem var(--mm-pad); overflow: hidden; line-height: 1.55; color: var(--mm-ink); }
html body #main-copy.mm-pg .mm-body.mm-flush { padding: 0; }
html body #main-copy.mm-pg .mm-scroll { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy.mm-pg .mm-scroll::-webkit-scrollbar { height: 8px; }
html body #main-copy.mm-pg .mm-scroll::-webkit-scrollbar-thumb { background: rgba(56,189,248,.45); border-radius: 8px; }
html body #main-copy.mm-pg .mm-card.mm-flush-card { overflow-x: auto; }

/* tablas (tendencias y terremotos) */
html body #main-copy.mm-pg .mm-scroll table { width: 100% !important; margin: 0; border: 0 !important; border-collapse: separate; border-spacing: 0; background: transparent !important; }
html body #main-copy.mm-pg .mm-scroll th,
html body #main-copy.mm-pg .mm-scroll thead td,
html body #main-copy.mm-pg .mm-scroll tr.table-top td,
html body #main-copy.mm-pg .mm-scroll tr.mm-hrow td { padding: .65rem .8rem; background: rgba(56,189,248,.10) !important; color: var(--mm-accent-2) !important; font-family: var(--mm-mono); font-size: .68rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; text-align: center; white-space: nowrap; border: 0 !important; border-bottom: 1px solid var(--mm-line) !important; }
html body #main-copy.mm-pg .mm-scroll th a, html body #main-copy.mm-pg .mm-scroll thead td a { color: inherit !important; text-decoration: none; }
html body #main-copy.mm-pg .mm-scroll td { padding: .5rem .8rem; border: 0 !important; border-bottom: 1px solid var(--mm-line) !important; background: transparent !important; font-size: .88rem; font-variant-numeric: tabular-nums; text-align: center; vertical-align: middle; }
html body #main-copy.mm-pg .mm-scroll tbody tr:nth-child(even) > td { background: rgba(255,255,255,.03) !important; }
html body #main-copy.mm-pg .mm-scroll tr:last-child > td { border-bottom: 0 !important; }
html body #main-copy.mm-pg .mm-scroll td img { max-height: 1.6rem; width: auto; vertical-align: middle; }
html body #main-copy.mm-pg .mm-scroll td a { color: var(--mm-accent-2); }
html body #main-copy.mm-pg .mm-scroll td font[color] { font-size: inherit; }
/* título de la tabla dentro de ella (celda con colspan) */
html body #main-copy.mm-pg .mm-scroll td[colspan] { text-align: center; }

/* ---------- tendencias ---------- */
html body #main-copy.mm-trn .mm-scroll table { min-width: 36rem; }
html body #main-copy.mm-trn .mm-scroll tr > th:first-child,
html body #main-copy.mm-trn .mm-scroll tr > td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; white-space: nowrap; color: #fff; font-weight: 600; background-color: #121c38 !important; box-shadow: 1px 0 0 var(--mm-line); }
html body #main-copy.mm-trn .mm-scroll thead td:first-child, html body #main-copy.mm-trn .mm-scroll tr.table-top td:first-child { background-color: #14284a !important; }
html body #main-copy.mm-trn .mm-body ul { margin: 0; padding-left: 1.1rem; }
html body #main-copy.mm-trn .mm-body li { margin: .25rem 0; }

/* ---------- gráficas ---------- */
html body #main-copy.mm-gph .mm-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
html body #main-copy.mm-gph .mm-grid .mm-card { margin: 0; }
html body #main-copy.mm-gph .mm-body { text-align: center; }
html body #main-copy.mm-gph .mm-zoom { display: block; }
html body #main-copy.mm-gph .mm-body img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; }

/* ---------- terremotos ---------- */
html body #main-copy.mm-quake p:empty { display: none; }
html body #main-copy.mm-quake .quake, html body #main-copy.mm-quake #map-container { width: auto !important; max-width: 100%; box-sizing: border-box; }
html body #main-copy.mm-quake #map-container { padding: .4rem; margin: 0 0 1rem; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); box-shadow: none; overflow: hidden; }
html body #main-copy.mm-quake #map { width: 100% !important; height: min(30rem, 70vh) !important; border-radius: 12px; }
html body #main-copy.mm-quake .mm-promo { display: flex; align-items: center; gap: 1rem; padding: .9rem var(--mm-pad); text-align: left; }
html body #main-copy.mm-quake .mm-promo > a:first-child { flex: none; }
html body #main-copy.mm-quake .mm-promo img { display: block; width: 8rem; max-width: 100%; height: auto; border-radius: 10px; }
html body #main-copy.mm-quake .mm-promo p { margin: 0; }
html body #main-copy.mm-quake .mm-promo strong a, html body #main-copy.mm-quake .mm-promo a { font-size: 1rem; font-weight: 600; color: var(--mm-accent-2); }
html body #main-copy.mm-quake .mm-scroll table { min-width: 34rem; }
html body #main-copy.mm-quake .mm-scroll td:first-child { text-align: left; }
html body #main-copy.mm-quake .mm-scroll td .n, html body #main-copy.mm-quake .mm-scroll td.n { font-size: inherit; }
html body #main-copy.mm-quake .mm-scroll td a { font-size: inherit !important; }
html body #main-copy.mm-quake .mm-qmap { width: auto !important; max-width: 100%; box-sizing: border-box; padding: .8rem var(--mm-pad); text-align: center; background-color: var(--mm-card) !important; }
html body #main-copy.mm-quake .mm-qmap img { display: block; max-width: 100%; height: auto !important; margin: 0 auto .5rem; border-radius: 8px; background: #fff; }
html body #main-copy.mm-quake > div > p { color: var(--mm-muted); }

@media (max-width: 767px) {
  html body #main-copy.mm-pg { --mm-pad: .85rem; }
  html body #main-copy.mm-pg .mm-scroll td { padding: .45rem .65rem; font-size: .84rem; }
  html body #main-copy.mm-gph .mm-body::after { content: "Toca la imagen para verla a tamaño completo"; display: block; margin-top: .55rem; font-size: .7rem; color: var(--mm-muted); }
  html body #main-copy.mm-quake .mm-promo { flex-direction: column; text-align: center; gap: .6rem; }
  html body #main-copy.mm-quake .mm-promo img { width: 9rem; margin: 0 auto; }
  /* listado de terremotos apilado: una ficha por seísmo */
  html body #main-copy.mm-quake .mm-scroll table.mm-stack { min-width: 0; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack,
  html body #main-copy.mm-quake .mm-scroll table.mm-stack > tbody,
  html body #main-copy.mm-quake .mm-scroll table.mm-stack > thead,
  html body #main-copy.mm-quake .mm-scroll table.mm-stack tr { display: block; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack tr.mm-hrow { display: none; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack tr { padding: .6rem .85rem; border-bottom: 1px solid var(--mm-line); }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack tbody tr:nth-child(even) > td { background: transparent !important; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .18rem 0 !important; border: 0 !important; background: transparent !important; text-align: right; font-size: .84rem; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td::before { content: attr(data-label); flex: none; font-family: var(--mm-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-muted); }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td:first-child { display: block; padding-bottom: .3rem !important; text-align: left; font-size: .95rem; font-weight: 600; color: #fff; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td:first-child::before { display: block; margin-bottom: .1rem; }
}

/* v106 · wxquake (móvil): el valor largo (fecha y hora) puede partirse en vez de quedar cortado */
@media (max-width: 767px) {
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td { white-space: normal !important; overflow-wrap: anywhere; min-width: 0; }
  html body #main-copy.mm-quake .mm-scroll table.mm-stack td > * { min-width: 0; max-width: 100%; white-space: normal !important; }
}


/* v107 · gauges-live.php (Steelseries): tarjeta con cabecera; los instrumentos (canvas de tamaño fijo) se centran y, si no caben, llevan scroll horizontal */
html body #main-copy .mm-gcard { max-width: 100%; margin: .5rem 0 1rem; overflow: hidden; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy .mm-gcard::before { content: "El tiempo en vivo · Steelseries"; display: block; padding: .75rem 1rem; background: rgba(56,189,248,.10); border-bottom: 1px solid var(--mm-line); color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
html body #main-copy .mm-gauges { max-width: 100%; padding: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; text-align: center; color: var(--mm-ink); scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy .mm-gauges::-webkit-scrollbar { height: 8px; }
html body #main-copy .mm-gauges::-webkit-scrollbar-thumb { background: rgba(56,189,248,.45); border-radius: 8px; }
html body #main-copy .mm-gauges canvas { max-width: none; }
html body #main-copy .mm-gauges a { color: var(--mm-accent-2); }
html body #main-copy .mm-gauges > * { margin-left: auto; margin-right: auto; }
@media (max-width: 767px) {
  html body #main-copy .mm-gauges { padding: .6rem; }
}

/* v110 · el menú SÍ debe mostrar los enlaces a Weather34 y Gauges: la regla anterior ("Quitados del panel") ocultaba cualquier enlace a esas páginas, también los del menú */
html body #mm-nav .mm-panel a[href*="weather34dashboard"],
html body #mm-nav .mm-panel a[href*="gauges-live"],
html body #mm-nav .mm-panel a[href*="FreshWDL"] { display: block !important; }
html body #mm-nav .mm-panel li:has(> a[href*="weather34dashboard"]),
html body #mm-nav .mm-panel li:has(> a[href*="gauges-live"]) { display: list-item !important; }

/* v113 · gauges-live.php (móvil): 4 tarjetas con 2 relojes cada una. Las clases las pone footer.php */
html body #main-copy .mm-gauges.mm-g4on { overflow: visible; padding: .6rem; text-align: center; }
html body #main-copy .mm-gauges .mm-gleft { display: none !important; }
html body #main-copy .mm-g4 { display: grid; grid-template-columns: 1fr; gap: .7rem; }
html body #main-copy .mm-gc { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; align-items: center; justify-items: center; padding: .6rem .4rem; background: rgba(255,255,255,.04); border: 1px solid var(--mm-line); border-radius: 14px; }
html body #main-copy .mm-gcell { min-width: 0; width: 100%; text-align: center; font-size: .8rem; color: var(--mm-muted); }
html body #main-copy .mm-gcell > td, html body #main-copy .mm-gcell > th, html body #main-copy .mm-gcell > tr { display: block; padding: 0; border: 0; }
html body #main-copy .mm-gcell table { width: 100% !important; }
html body #main-copy .mm-gcell canvas { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; margin: 0 auto; }
/* v114 · lo que no es un reloj (LED, contador "N segundos"...) se queda arriba, a su tamaño y con scroll si no cabe */
html body #main-copy .mm-gauges.mm-g4on > :not(.mm-g4) { max-width: 100%; overflow-x: auto; margin: 0 auto .7rem; }

/* v115 · gauges-live móvil: los relojes se alinean por arriba (da igual el texto de debajo de cada uno) y los créditos van al final */
html body #main-copy .mm-gc { align-items: start; }
html body #main-copy .mm-gcell { align-self: start; }
html body #main-copy .mm-gcredits { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--mm-line); text-align: center; font-size: .78rem; line-height: 1.5; color: var(--mm-muted); }
html body #main-copy .mm-gcredits hr { display: none; }
html body #main-copy .mm-gcredits a { color: var(--mm-accent-2); }


/* v116 · FreshWDL.php: tarjeta con el panel WDL (iframe 1200x700). Escritorio: se escala al ancho disponible. Móvil: tamaño real con scroll horizontal */
html body #main-copy .mm-wdl { max-width: 100%; margin: .5rem 0 1rem; overflow: hidden; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy .mm-wdl::before { content: "Datos de la estación en tiempo real · FreshWDL"; display: block; padding: .75rem 1rem; background: rgba(56,189,248,.10); border-bottom: 1px solid var(--mm-line); color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
html body #main-copy .mm-wdl-view { position: relative; width: 100%; overflow: hidden; }
html body #main-copy .mm-wdl-view iframe { display: block; width: 1200px; max-width: none; height: 700px; border: 0; background: #fff; transform: scale(var(--mm-s, 1)); transform-origin: 0 0; }
html body #main-copy .mm-wdl-view.mm-wdl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy .mm-wdl-full { margin: 0; padding: .8rem 1rem; text-align: center; border-top: 1px solid var(--mm-line); }
html body #main-copy .mm-wdl-full a { display: inline-block; padding: .55rem 1.2rem; border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none; background: linear-gradient(135deg, #0ea5e9, #6366f1); }
html body #main-copy .mm-wdl-full a:hover { filter: brightness(1.1); }
@media (max-width: 767px) {
  html body #main-copy .mm-wdl-full::before { content: "Desliza ↔ para ver el panel completo, o ábrelo en pantalla completa:"; display: block; margin-bottom: .6rem; font-size: .75rem; color: var(--mm-muted); }
}


/* v118 · DatosWD.php (MeteoMurcia.htm): tabla de pares etiqueta/valor en tarjeta. Las clases .mm-pg/.mm-wd las pone footer.php */
html body #main-copy.mm-wd .mm-wdwrap { text-align: left; color: var(--mm-ink); }
html body #main-copy.mm-wd .mm-wdwrap img { max-width: 100%; height: auto; border-radius: 8px; }
html body #main-copy.mm-wd .mm-wdwrap h1, html body #main-copy.mm-wd .mm-wdwrap h2, html body #main-copy.mm-wd .mm-wdwrap h3 { color: #fff; font-size: 1.2rem; margin: 1rem 0 .6rem; text-align: left; }
html body #main-copy.mm-wd .mm-wdwrap .mm-pre { max-width: 100%; overflow-x: auto; padding: .8rem 1rem; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); font-family: var(--mm-mono); font-size: .8rem; color: var(--mm-ink); }
html body #main-copy.mm-wd .mm-wdwrap a { color: var(--mm-accent-2); }
html body #main-copy.mm-wd .mm-scroll table { min-width: 0; }
html body #main-copy.mm-wd .mm-scroll td { text-align: left; font-size: .9rem; }
html body #main-copy.mm-wd .mm-scroll td:nth-child(odd) { color: var(--mm-muted); }
html body #main-copy.mm-wd .mm-scroll td:nth-child(even) { color: #fff; font-weight: 500; }
html body #main-copy.mm-wd .mm-scroll td[colspan] { color: var(--mm-accent-2); font-weight: 600; text-align: center; background: rgba(56,189,248,.08) !important; }
html body #main-copy.mm-wd .mm-scroll td font, html body #main-copy.mm-wd .mm-scroll td b, html body #main-copy.mm-wd .mm-scroll td strong { font-size: inherit; }
@media (max-width: 767px) {
  /* cada fila de 4 celdas (etiqueta/valor, etiqueta/valor) pasa a dos líneas: etiqueta a la izquierda, valor a la derecha */
  html body #main-copy.mm-wd .mm-scroll table, html body #main-copy.mm-wd .mm-scroll tbody { display: block; width: 100% !important; }
  html body #main-copy.mm-wd .mm-scroll tr { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); column-gap: .8rem; padding: .35rem .85rem; border-bottom: 1px solid var(--mm-line); }
  html body #main-copy.mm-wd .mm-scroll tr > td { display: block; min-width: 0; padding: .15rem 0 !important; border: 0 !important; background: transparent !important; font-size: .84rem; overflow-wrap: anywhere; }
  html body #main-copy.mm-wd .mm-scroll tr > td:nth-child(even) { text-align: right; }
  html body #main-copy.mm-wd .mm-scroll tr > td[colspan], html body #main-copy.mm-wd .mm-scroll tr > th { grid-column: 1 / -1; text-align: center; padding: .45rem 0 !important; }
  html body #main-copy.mm-wd .mm-scroll tbody tr:nth-child(even) > td { background: transparent !important; }
}
html body #main-copy.mm-wd .mm-scroll tr, html body #main-copy.mm-wd .mm-scroll tbody, html body #main-copy.mm-wd .mm-scroll thead { background: transparent !important; background-image: none !important; }
html body #main-copy.mm-wd .mm-scroll tbody tr:nth-child(even) { background: rgba(255,255,255,.03) !important; }


/* v119 · DatosWD.php: pestañas con los grupos de imágenes (las crea footer.php) */
html body #main-copy.mm-wd .mm-hide { display: none !important; }
html body #main-copy.mm-wd .mm-wdwrap p:empty { display: none; }
html body #main-copy.mm-wd .mm-wdwrap hr { height: 0; border: 0; border-top: 1px solid var(--mm-line); background: none; }
html body #main-copy.mm-wd .mm-tabs { margin: 1rem 0; text-align: left; }
html body #main-copy.mm-wd .mm-tabbar { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem .1rem .6rem; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; -webkit-overflow-scrolling: touch; }
html body #main-copy.mm-wd .mm-tab { flex: none; padding: .5rem 1rem; border: 1px solid var(--mm-line); border-radius: 999px; background: rgba(255,255,255,.05); color: var(--mm-ink); font-family: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
html body #main-copy.mm-wd .mm-tab:hover { background: rgba(56,189,248,.12); }
html body #main-copy.mm-wd .mm-tab[aria-selected="true"] { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0ea5e9, #6366f1); }
html body #main-copy.mm-wd .mm-tab:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: 2px; }
html body #main-copy.mm-wd .mm-tabpanel[hidden] { display: none; }
html body #main-copy.mm-wd .mm-imgcard, html body #main-copy.mm-wd .mm-tabbox { margin: 0 0 1rem; padding: .7rem; text-align: center; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); overflow-x: auto; }
html body #main-copy.mm-wd .mm-imgcard p, html body #main-copy.mm-wd .mm-imgcard center { margin: 0; }
html body #main-copy.mm-wd .mm-zoom { display: block; }
html body #main-copy.mm-wd .mm-imgcard img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
html body #main-copy.mm-wd .mm-tabbox pre { margin: 0; text-align: left; border: 0; padding: 0; background: none; white-space: pre-wrap; overflow-wrap: anywhere; }
html body #main-copy.mm-wd .mm-tabbox select, html body #main-copy.mm-wd .mm-tabbox input[type="button"] { padding: .5rem .8rem; color: var(--mm-ink); background-color: #0b1226; border: 1px solid var(--mm-line); border-radius: 12px; font-family: inherit; max-width: 100%; }
html body #main-copy.mm-wd .mm-tabbox input[type="button"] { cursor: pointer; background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; border: 0; border-radius: 999px; padding: .5rem 1.2rem; font-weight: 600; }
@media (max-width: 767px) {
  html body #main-copy.mm-wd .mm-tabpanels::before { content: "Toca una imagen para verla a tamaño completo"; display: block; margin: 0 0 .6rem; font-size: .72rem; color: var(--mm-muted); text-align: center; }
  html body #main-copy.mm-wd .mm-imgcard { padding: .45rem; }
}
/* los rótulos deslizantes (marquee) de Weather Display llevan width=800: se ajustan al ancho disponible */
html body #main-copy.mm-wd .mm-wdwrap marquee { display: block; width: 100% !important; max-width: 100%; margin: .3rem 0; font-size: .85rem !important; }
html body #main-copy.mm-wd .mm-scroll th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: .85rem; overflow-wrap: anywhere; }


/* v120 · escritorio: el gizmo en la línea del enlace de X, a la derecha (mismas reglas que en #mm-row2) */
html body #header .mm-gz-line > .basis-72 { flex: 0 1 auto !important; min-width: 0; margin-left: auto; }
html body #header .mm-gz-line > .basis-72 br { display: none !important; }
html body #header .mm-gz-line > .basis-72 table, html body #header .mm-gz-line > .basis-72 tbody,
html body #header .mm-gz-line > .basis-72 tr { display: contents !important; }
html body #header .mm-gz-line > .basis-72, html body #header .mm-gz-line > .basis-72 .ajaxSidebar { display: flex !important; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; background: none !important; box-shadow: none !important; padding: 0 !important; }
html body #header .mm-gz-line > .basis-72 * { font: 500 .72rem/1.5 var(--mm-mono) !important; color: var(--mm-ink); width: auto !important; max-width: none !important; float: none !important; margin: 0; padding: 0; }
html body #header .mm-gz-line > .basis-72 td, html body #header .mm-gz-line > .basis-72 div, html body #header .mm-gz-line > .basis-72 p { display: inline-block !important; white-space: nowrap; }
html body #header .mm-gz-line > .basis-72 .meas { color: var(--mm-muted); margin-right: .3rem; }
html body #header .mm-gz-line > .basis-72 .data { color: var(--mm-accent-2); }

html body #header .mm-gz-line > .basis-72 .mm-sep { margin: 0 .5rem !important; color: var(--mm-muted) !important; }
@media (min-width: 768px) {
  html body #header div.basis-48 { flex: 1 1 0% !important; }
  html body #header .mm-gz-line { width: 100%; }
  html body #header .mm-gz-line > .basis-72 { margin-left: auto; text-align: right; justify-content: flex-end; }
}

/* v121 · movil: el gizmo siempre en su propia linea, bajo la hora de actualizacion (ya no salta segun el ancho) */
@media (max-width: 767.98px) {
  html body #header #mm-row2 #mm-upd { flex: 0 0 100% !important; width: 100%; }
  html body #header #mm-row2 > .basis-72 { flex: 0 0 100% !important; width: 100% !important; margin-left: 0 !important; justify-content: flex-start; text-align: left; }
}

/* v122 · movil: el gizmo ENCIMA de la hora de actualizacion y alineado a la derecha */
@media (max-width: 767.98px) {
  html body #header #mm-row2 > .basis-72 { order: 1 !important; justify-content: flex-end !important; text-align: right !important; margin-left: auto !important; }
  html body #header #mm-row2 > .basis-72 .ajaxSidebar { justify-content: flex-end !important; }
  html body #header #mm-row2 #mm-upd { order: 2 !important; }
}

/* v123 · movil: el gizmo en la misma linea que el enlace "Seguir" de X, a la derecha (si no cabe, baja alineado a la derecha) */
html body #header .mm-gz-line { width: 100%; }
html body #header .mm-gz-line > .basis-72 { margin-left: auto !important; justify-content: flex-end !important; text-align: right !important; }
html body #header .mm-gz-line > .basis-72 .ajaxSidebar { justify-content: flex-end !important; }

/* v125 · movil: se deja la cabecera como estaba (título + temperatura). La línea "El tiempo en Murcia / Seguir / gizmo" se prolonga
   bajo el bloque de temperatura hasta el tope derecho (header.php fija --mm-tw = ancho de ese bloque + hueco), de modo que el gizmo queda pegado a la derecha.
   "El tiempo en Murcia" en su propia línea; debajo, "Seguir" y el gizmo a la derecha. */
@media (max-width: 767.98px) {
  html body #header .mm-gz-line { width: auto; gap: .25rem .75rem; margin-right: calc(-1 * var(--mm-tw, 0px)); flex-wrap: wrap !important; }
  html body #header .mm-gz-line > span { flex: 0 0 100%; }
  html body #header .mm-gz-line > a { flex: 0 0 auto; }
  html body #header .mm-gz-line > .basis-72 { flex: 1 1 6rem !important; min-width: 0; margin-left: auto !important; justify-content: flex-end !important; text-align: right !important; }
  html body #header .mm-gz-line > .basis-72 .ajaxSidebar { justify-content: flex-end !important; }
}

/* v126 · selector de idioma dentro del menú (categoría Más, tras "Versión móvil") */
html body #mm-nav .mm-panel li.mm-lang-item { padding: .35rem .75rem; list-style: none; }
html body #mm-nav .mm-panel #mm-lang { margin: 0; text-align: left; order: 0; flex: none; }
html body #mm-nav .mm-panel #mm-lang > div { display: inline-block; padding: .15rem .4rem; font-size: .8rem; }

/* v129 · embalses.php: tarjeta con el widget de embalses.net */
html body #main-copy .mm-emb { max-width: 100%; margin: .5rem 0 1rem; overflow: hidden; text-align: left; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy .mm-emb::before { content: "Estado de los embalses"; display: block; padding: .75rem 1rem; background: rgba(56,189,248,.10); border-bottom: 1px solid var(--mm-line); color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
html body #main-copy .mm-emb-view { padding: 1rem; display: flex; justify-content: center; }
html body #main-copy .mm-emb-view iframe { display: block; width: 100%; max-width: 500px; height: 550px; border: 0; border-radius: .6rem; background: #0F172A; }
html body #main-copy .mm-emb-src { margin: 0; padding: .6rem 1rem; text-align: center; border-top: 1px solid var(--mm-line); color: var(--mm-muted); font-size: .8rem; }
html body #main-copy .mm-emb-src a { color: var(--mm-accent-2); }
@media (max-width: 767px) { html body #main-copy .mm-emb-view { padding: .5rem; } }

/* v130 · manualmeteorologia.php: tarjeta con el manual (iframe) a ancho adaptable */
html body #main-copy .mm-man { max-width: 100%; margin: .5rem 0 1rem; overflow: hidden; text-align: left; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy .mm-man::before { content: "Manual de meteorología · Vademécum REMER"; display: block; padding: .75rem 1rem; background: rgba(56,189,248,.10); border-bottom: 1px solid var(--mm-line); color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
html body #main-copy .mm-man-view { padding: .75rem; }
html body #main-copy .mm-man-view iframe { display: block; width: 100%; max-width: 100%; height: 78vh; min-height: 520px; border: 0; border-radius: .6rem; background: #0b1222; }
html body #main-copy .mm-man-full { margin: 0; padding: .8rem 1rem; text-align: center; border-top: 1px solid var(--mm-line); }
html body #main-copy .mm-man-full a { display: inline-block; padding: .55rem 1.2rem; border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none; background: linear-gradient(135deg, #0ea5e9, #6366f1); }
html body #main-copy .mm-man-full a:hover { filter: brightness(1.1); }
@media (max-width: 767px) { html body #main-copy .mm-man-view { padding: .35rem; } html body #main-copy .mm-man-view iframe { height: 75vh; } }

/* v131 · glosariometeorologia.php: misma tarjeta que el manual, con su propia cabecera */
html body #main-copy .mm-man.mm-man-glo::before { content: "Glosario de términos meteorológicos · Vademécum REMER"; }

/* v132 · webcam.php: 3 cámaras en tarjetas del mismo tamaño (5:3), con título */
html body #main-copy .mm-cams { text-align: left; margin: .5rem 0 1rem; }
html body #main-copy .mm-cams-h { margin: 0 0 .8rem; font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
html body #main-copy .mm-cams-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
html body #main-copy .mm-cam { min-width: 0; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); overflow: hidden; }
html body #main-copy .mm-cam-view { position: relative; width: 100%; aspect-ratio: 960 / 576; overflow: hidden; background: #000; }
html body #main-copy .mm-cam-view iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
html body #main-copy .mm-cam-view.mm-cam-scale iframe { width: 960px; height: 576px; max-width: none; transform: scale(var(--mm-cs, 1)); transform-origin: 0 0; }
html body #main-copy .mm-cam-t { margin: 0; padding: .65rem .9rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; font-size: .9rem; color: var(--mm-ink); }
html body #main-copy .mm-cam-n { font-family: var(--mm-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--mm-accent-2); }
html body #main-copy .mm-cam-n::after { content: "·"; margin-left: .6rem; color: var(--mm-muted); }

/* v133/v136 · panel "Datos en Tiempo Real": el título de Viento / Lluvia / Pronóstico / Almanaque es un enlace; se nota porque lleva subrayado punteado y una flecha "›" que se desliza al pasar el ratón */
html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link { display: inline-flex; align-items: center; gap: .4em; color: var(--mm-accent-2); text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .4em; cursor: pointer; }
html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link::after { content: "\203A"; display: inline-block; font-size: 1.25em; line-height: 1; padding: 0 .35em .08em; border: 1px solid currentColor; border-radius: 999px; opacity: .85; transition: transform .15s ease, background-color .15s ease, opacity .15s ease; }
html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link:hover, html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link:focus-visible { color: #fff; text-decoration-style: solid; }
html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link:hover::after, html body #main-copy .ajaxDashboard td.datahead a.mm-dh-link:focus-visible::after { transform: translateX(3px); background: rgba(56,189,248,.25); opacity: 1; }

/* v134 · wxastronomy.php: tarjetas (Sol/Luna, fases, equinoccios/solsticios) */
html body #main-copy-dark.mm-astro { text-align: center; color: var(--mm-ink); }
html body #main-copy-dark.mm-astro > h3 { margin: .5rem 0 1rem; text-align: left; color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
html body #main-copy-dark.mm-astro > br { display: none; }
html body #main-copy-dark.mm-astro .mm-acard { width: 100%; margin: 0 0 1rem; padding: .9rem; text-align: center; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy-dark.mm-astro .mm-acard > br { display: none; }
html body #main-copy-dark.mm-astro .mm-agrid { display: grid; gap: .75rem; grid-template-columns: repeat(var(--mm-n, 2), minmax(0, 1fr)); }
html body #main-copy-dark.mm-astro .mm-agrid[data-cols="2"] { --mm-n: 2; }
html body #main-copy-dark.mm-astro .mm-agrid[data-cols="3"] { --mm-n: 3; }
html body #main-copy-dark.mm-astro .mm-agrid[data-cols="4"] { --mm-n: 4; }
html body #main-copy-dark.mm-astro .mm-aitem { min-width: 0; padding: .8rem .5rem; border: 1px solid var(--mm-line); border-radius: 12px; background: rgba(255,255,255,.03); font-size: .9rem; line-height: 1.5; }
html body #main-copy-dark.mm-astro .mm-ar { margin: 0 0 .5rem; overflow-wrap: anywhere; }
html body #main-copy-dark.mm-astro .mm-ar:last-child { margin-bottom: 0; }
html body #main-copy-dark.mm-astro .mm-ar0 { color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
html body #main-copy-dark.mm-astro .mm-ar0 h3 { margin: 0; font: inherit; color: inherit; letter-spacing: .1em; }
html body #main-copy-dark.mm-astro .mm-ar0 small { display: block; margin-top: .15rem; color: var(--mm-muted); text-transform: none; letter-spacing: 0; font-family: inherit; }
html body #main-copy-dark.mm-astro .mm-ar1 img { max-width: 100%; height: auto; border-radius: 10px; }
html body #main-copy-dark.mm-astro .mm-ar2 { color: var(--mm-ink); }
html body #main-copy-dark.mm-astro small { color: var(--mm-muted); }
html body #main-copy-dark.mm-astro > div:last-of-type p, html body #main-copy-dark.mm-astro .mm-acard:last-of-type p { margin: 1rem 0 0; }
html body #main-copy-dark.mm-astro .mm-acard p img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--mm-line) !important; }
@media (max-width: 767px) {
  html body #main-copy-dark.mm-astro .mm-agrid[data-cols="3"], html body #main-copy-dark.mm-astro .mm-agrid[data-cols="4"] { --mm-n: 2; }
  html body #main-copy-dark.mm-astro .mm-acard { padding: .6rem; }
}

/* v135 · viento.php y lluvia.php: contenido de Weather Display en tarjetas. Las clases .mm-pg/.mm-wdg las pone footer.php */
html body #main-copy.mm-wdg .mm-wdwrap { text-align: left; color: var(--mm-ink); }
html body #main-copy.mm-wdg .mm-wdwrap img { max-width: 100%; height: auto; border-radius: 8px; }
html body #main-copy.mm-wdg .mm-wdwrap h1, html body #main-copy.mm-wdg .mm-wdwrap h2, html body #main-copy.mm-wdg .mm-wdwrap h3 { color: #fff; font-size: 1.2rem; margin: 1rem 0 .6rem; text-align: left; }
html body #main-copy.mm-wdg .mm-wdwrap a { color: var(--mm-accent-2); }
html body #main-copy.mm-wdg .mm-wdwrap p:empty { display: none; }
html body #main-copy.mm-wdg .mm-wdwrap hr { height: 0; border: 0; border-top: 1px solid var(--mm-line); background: none; }
html body #main-copy.mm-wdg .mm-scroll table { min-width: 0; }
html body #main-copy.mm-wdg .mm-scroll td, html body #main-copy.mm-wdg .mm-scroll th { font-size: .9rem; }

/* v134 · el anuncio también en #main-copy-dark (wxastronomy.php) */
html body #main-copy-dark .mm-adscroll { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 auto .75rem; scrollbar-width: thin; scrollbar-color: rgba(56,189,248,.5) transparent; }
html body #main-copy-dark .mm-adscroll > iframe, html body #main-copy-dark .mm-adscroll > ins { max-width: none !important; display: block; margin-left: auto; margin-right: auto; }

/* v137 · enlaces inferiores de Resumen/temperatura (WD LIVE, Tendencia, Gráficas, Histórico): mismo aspecto de enlace que los títulos del panel (v136); la flecha va tras la última palabra aunque el texto ocupe 2 líneas */
html body #main-copy .ajaxDashboard p.datahead .mm-ql { display: block; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .4em; cursor: pointer; }
html body #main-copy .ajaxDashboard p.datahead .mm-ql::after { content: "\2060\203A"; display: inline; margin-left: .35em; font-size: 1em; line-height: 1; padding: .02em .32em .08em; border: 1px solid currentColor; border-radius: 999px; opacity: .85; text-decoration: none; transition: transform .15s ease, background-color .15s ease, opacity .15s ease; }
html body #main-copy .ajaxDashboard p.datahead .mm-ql:hover, html body #main-copy .ajaxDashboard p.datahead .mm-ql:focus-visible { text-decoration-style: solid; }
html body #main-copy .ajaxDashboard p.datahead .mm-ql:hover::after, html body #main-copy .ajaxDashboard p.datahead .mm-ql:focus-visible::after { position: relative; left: 3px; background: rgba(56,189,248,.25); opacity: 1; }

/* v140 · banner dentro de una tarjeta (como en la portada): se activa añadiendo la clase mm-adcard a .mm-adscroll (de momento, wxforecast.php) */
html body #main-copy .mm-adscroll.mm-adcard { width: 100%; padding: .5rem; margin: 0 0 1rem; text-align: center; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }

/* v141 · pie de página: logotipos de los proyectos con la misma altura (el de Weather Underground salía enorme) */
html body .mm-proj img { height: 3.5rem !important; width: auto !important; max-width: none !important; min-width: 0; object-fit: contain; }
@media (max-width: 767px) { html body .mm-proj { gap: .75rem 1rem; } html body .mm-proj img { height: 3rem !important; } }

/* v142 · viento.php y lluvia.php: los gráficos (imágenes sueltas de viento.htm / lluvia.htm) en tarjetas dentro de una rejilla adaptable */
html body #main-copy.mm-wdg .mm-imggrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin: .5rem 0 1rem; }
html body #main-copy.mm-wdg .mm-imgcard { display: flex; align-items: center; justify-content: center; min-width: 0; padding: .75rem; overflow: hidden; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); }
html body #main-copy.mm-wdg .mm-imgcard:first-child { grid-column: 1 / -1; }
html body #main-copy.mm-wdg .mm-imgcard img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
html body #main-copy.mm-wdg .mm-wdwrap center, html body #main-copy.mm-wdg .mm-wdwrap p { margin: 0; }
html body #main-copy.mm-wdg .mm-wdwrap br { display: none; }
@media (max-width: 767px) { html body #main-copy.mm-wdg .mm-imgcard { padding: .4rem; } }

/* v146 · graficasyrecords.php: cada gráfico en su tarjeta con título (data-caption, lo pone footer.php) */
html body #main-copy.mm-wdg .mm-imgcard.mm-imgcard-cap { flex-direction: column; justify-content: flex-start; align-items: center; gap: .6rem; }
html body #main-copy.mm-wdg .mm-imgcard.mm-imgcard-cap img { order: 2; }
html body #main-copy.mm-wdg .mm-imgcard.mm-imgcard-cap .mm-imgcap { order: 1; }
html body #main-copy.mm-wdg .mm-imgcap { margin: 0; align-self: stretch; padding-bottom: .1rem; text-align: left; color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }

/* v147 · wxwugraphs.php (Wunderground graphs, pestañas jQuery UI): solo estilo sobre el HTML que genera el script
   - #WUG-tabbed es una tabla de maquetación: se muestra como bloque y el script de "auto height" (que fija su altura en línea) se neutraliza
   - las pestañas (.ui-tabs-nav) pasan a botones tipo "píldora"; el contenido de cada pestaña va sobre fondo transparente */
html body #main-copy #WUG-tabbed, html body #main-copy #WUG-tabbed > tbody, html body #main-copy #WUG-tabbed > tbody > tr, html body #main-copy #WUG-tabbed > tbody > tr > td { display: block; width: 100% !important; height: auto !important; min-height: 0 !important; padding: 0; border: 0; background: none; text-align: left; }
html body #main-copy #WUG-tabbed { margin: 0; }
html body #main-copy #WUG-tabbed > tbody > tr:first-child > td { padding: 1rem; margin: 0 0 1rem; background: var(--mm-card); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); color: var(--mm-ink); }
html body #main-copy #WUG-tabbed h1 { margin: 0 0 1rem; padding: 0 0 .75rem; border-bottom: 1px solid var(--mm-line); color: var(--mm-accent-2); font-family: var(--mm-mono); font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
html body #main-copy #WUG-tabbed > tbody > tr > td > br { display: none; }
html body #main-copy { background: transparent !important; color: var(--mm-ink) !important; font-size: inherit !important; }

html body #main-copy #WU-MDswitch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; padding: 0 !important; background: transparent !important; border: 0 !important; color: inherit; }
html body #main-copy #WU-MDswitch > .ui-tabs-nav { order: 1; flex: 1 1 auto; }
html body #main-copy #WU-MDswitch > #lang-switch { order: 2; position: static !important; margin: 0; text-align: right; }
html body #main-copy #WU-MDswitch > .ui-tabs-panel { order: 3; flex: 0 0 100%; min-width: 0; }
html body #main-copy #lang-switch form { margin: 0; font-size: .85rem !important; color: var(--mm-muted); }

/* el tema claro de jQuery UI (fondos blancos/grises) se anula: los contenedores quedan transparentes */
html body #main-copy .ui-tabs, html body #main-copy .ui-widget, html body #main-copy .ui-widget-content { padding: 0; background: transparent !important; border: 0 !important; color: inherit; }
html body #main-copy .ui-tabs-panel [bgcolor="#ffffff" i], html body #main-copy .ui-tabs-panel [bgcolor="white" i] { background: transparent !important; }
html body #main-copy .ui-tabs .ui-tabs-nav { display: flex; flex-wrap: wrap; gap: .3rem; width: fit-content; max-width: 100%; margin: 0 0 .9rem !important; padding: .25rem !important; list-style: none; background: rgba(255,255,255,.04) !important; border: 1px solid var(--mm-line) !important; border-radius: 999px; }
html body #main-copy .ui-tabs .ui-tabs-nav li { float: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 999px; }
html body #main-copy .ui-tabs .ui-tabs-nav li a { float: none !important; display: block; padding: .4rem 1rem !important; border-radius: 999px; color: var(--mm-muted) !important; font-size: .86rem; font-weight: 600; text-decoration: none !important; cursor: pointer; }
html body #main-copy .ui-tabs .ui-tabs-nav li a:hover { color: #fff !important; background: rgba(255,255,255,.07); }
html body #main-copy .ui-tabs .ui-tabs-nav li.ui-tabs-selected, html body #main-copy .ui-tabs .ui-tabs-nav li.ui-tabs-active, html body #main-copy .ui-tabs .ui-tabs-nav li.ui-state-active { background: linear-gradient(135deg, #0ea5e9, #6366f1) !important; }
html body #main-copy .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, html body #main-copy .ui-tabs .ui-tabs-nav li.ui-tabs-active a, html body #main-copy .ui-tabs .ui-tabs-nav li.ui-state-active a { color: #fff !important; background: none; }
html body #main-copy .ui-tabs .ui-tabs-nav li.ui-state-disabled a { opacity: .45; }

html body #main-copy .ui-tabs .ui-tabs-panel { padding: .25rem 0 0 !important; background: transparent !important; border: 0 !important; color: var(--mm-ink); }
html body #main-copy .ui-tabs .ui-tabs-hide, html body #main-copy .ui-tabs .ui-tabs-panel.ui-tabs-hide { display: none !important; }
/* pestañas internas (subpestañas diaria/mensual...): algo más compactas */
html body #main-copy .ui-tabs .ui-tabs .ui-tabs-nav { margin-bottom: .7rem !important; }
html body #main-copy .ui-tabs .ui-tabs .ui-tabs-nav li a { padding: .3rem .8rem !important; font-size: .8rem; }

html body #main-copy .ui-tabs-panel img { max-width: 100%; height: auto; border-radius: 10px; }
html body #main-copy .ui-tabs-panel table { max-width: 100%; border-color: var(--mm-line) !important; }
html body #main-copy .ui-tabs-panel a { color: var(--mm-accent-2); }
html body #main-copy .ui-tabs-panel em, html body #main-copy .ui-tabs-panel .ui-tabs-loading { color: var(--mm-muted); }
html body #main-copy .ui-tabs-panel select, html body #main-copy .ui-tabs-panel input[type="text"], html body #main-copy .ui-tabs-panel input[type="submit"], html body #main-copy .ui-tabs-panel input[type="button"], html body #main-copy .ui-tabs-panel button, html body #main-copy #lang-switch select {
  color-scheme: dark; padding: .35rem .6rem; color: var(--mm-ink); background: rgba(255,255,255,.06); border: 1px solid var(--mm-line); border-radius: .5rem; font: inherit; font-size: .85rem; }
html body #main-copy .ui-tabs-panel input[type="submit"], html body #main-copy .ui-tabs-panel input[type="button"], html body #main-copy .ui-tabs-panel button { cursor: pointer; background: rgba(56,189,248,.14); border-color: rgba(56,189,248,.35); }

/* pie del script (versión / créditos) */
html body #main-copy #WUG-tabbed > tbody > tr:last-child > td { padding: .2rem .4rem; }
html body #main-copy #WUG-foot, html body #main-copy #WUGcInfo { font: .72rem var(--mm-font) !important; color: var(--mm-muted); text-align: center; }
html body #main-copy .c-lside a { color: var(--mm-muted) !important; text-decoration: underline dotted !important; text-underline-offset: 3px; }
html body #main-copy .c-rside a { color: var(--mm-accent-2) !important; }

@media (max-width: 767px) {
  html body #main-copy #WUG-tabbed > tbody > tr:first-child > td { padding: .75rem; }
  html body #main-copy .ui-tabs .ui-tabs-nav { border-radius: 1rem; width: 100%; }
  html body #main-copy .ui-tabs .ui-tabs-nav li { flex: 1 1 auto; text-align: center; }
  html body #main-copy .ui-tabs .ui-tabs-nav li a { padding: .45rem .6rem !important; }
  html body #main-copy #WU-MDswitch > #lang-switch { flex: 0 0 100%; }
}

/* v151 · imagensatelite.php: animaciones Meteosat (Meteociel.fr) en tarjetas, reutilizando .mm-cams / .mm-cam */
html body #main-copy .mm-sat { margin-bottom: 1.4rem; }
html body #main-copy .mm-sat-view { aspect-ratio: 4 / 3; background: #0b1222; }
html body #main-copy .mm-sat-view img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
html body #main-copy .mm-cams-src { margin: 0 0 1rem; text-align: center; color: var(--mm-muted); font-size: .8rem; }
html body #main-copy .mm-cams-src a { color: var(--mm-accent-2); }

/* v152 · imagensatelite.php: ampliar imagen (lightbox) */
html body #main-copy .mm-sat-view { cursor: zoom-in; }
html body #main-copy .mm-sat-view:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: -2px; }
html body #main-copy .mm-sat-view::after { content: "⤢"; position: absolute; right: .5rem; top: .5rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: .5rem; background: rgba(5,8,22,.65); color: #fff; font-size: 1.1rem; opacity: 0; transition: opacity .15s; pointer-events: none; }
html body #main-copy .mm-sat-view:hover::after, html body #main-copy .mm-sat-view:focus-visible::after { opacity: 1; }
html.mm-lb-open { overflow: hidden; }
.mm-lb { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 2.5rem .5rem 1rem; background: rgba(3,6,18,.92); }
.mm-lb[hidden] { display: none; }
.mm-lb-f { margin: 0; max-width: 100%; text-align: center; }
.mm-lb-f img { display: block; margin: 0 auto; width: min(calc(100vw - 7rem), calc((100vh - 8rem) * 4 / 3)); height: auto; border-radius: .6rem; background: #0b1222; }
.mm-lb-f figcaption { margin-top: .7rem; color: #e2e8f0; font-size: .9rem; }
.mm-lb-x { position: absolute; top: .6rem; right: .8rem; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.mm-lb-n { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.mm-lb-x:hover, .mm-lb-n:hover { background: rgba(34,211,238,.35); }
@media (max-width: 767px) {
  .mm-lb { flex-wrap: wrap; align-content: center; gap: .6rem; }
  .mm-lb-f { flex: 0 0 100%; order: 1; }
  .mm-lb-f img { width: min(100vw - 1rem, (100vh - 10rem) * 4 / 3); }
  .mm-lb-n { order: 2; }
}
