/* ==========================================================================
   Escampa — estilos
   Dirección: web meteorológica para escaladores. Azul noche del Cantábrico
   en cabecera y portada, tarjetas claras con iconos grandes (roca, sol,
   lluvia) y un código de color único para "¿se puede escalar?".
   Tipografía: Archivo (variable, con anchura condensada para titulares).
   ========================================================================== */

:root {
  --bg: #f1f4f7;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --ink: #0d1b2a;
  --muted: #5b6b7c;
  --line: #dfe5ec;
  --navy: #0b1f33;
  --navy-2: #12304d;
  --accent: #1673d1;
  --accent-soft: #e5f0fc;
  --sky: #5fc3ff;

  --v-ideal: #12915a;
  --v-good: #6fae2c;
  --v-doubt: #e6a817;
  --v-bad: #d63a2f;
  --v-closed: #8a96a3;

  --rock: #8f8a84;
  --rock-hi: #c4beb6;
  --shade: #6c7d90;
  --cloud: #b4c2cf;
  --ring-bg: #e6ebf1;
  --temp: #e0662f;
  --rain: #1f6fd1;
  --rain-soft: rgba(31, 111, 209, .14);
  --wind: #6a55c2;
  --night: rgba(13, 27, 42, .045);
  --moon-dark: #2a3a4d;
  --moon-lit: #f3ead2;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 8px 24px rgba(13, 27, 42, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --night: rgba(0, 0, 0, .25); --moon-dark: #1a2738;
    --bg: #08131f; --surface: #0f1d2c; --surface-2: #142538; --ink: #e6eef6; --muted: #92a4b7; --line: #1f3347;
    --navy: #050d17; --navy-2: #0c1d30; --accent: #5aa8f5; --accent-soft: #13304f;
    --v-ideal: #2fb877; --v-good: #94c94a; --v-doubt: #f0b941; --v-bad: #ec5a4e; --v-closed: #6f7d8b;
    --rock: #9b968f; --rock-hi: #6e6963; --shade: #7a8ca0; --cloud: #6f8193; --ring-bg: #1d3044;
    --temp: #f08a5a; --rain: #5ea6f0; --rain-soft: rgba(94, 166, 240, .2); --wind: #a493ee;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --night: rgba(0, 0, 0, .25); --moon-dark: #1a2738;
  --bg: #08131f; --surface: #0f1d2c; --surface-2: #142538; --ink: #e6eef6; --muted: #92a4b7; --line: #1f3347;
  --navy: #050d17; --navy-2: #0c1d30; --accent: #5aa8f5; --accent-soft: #13304f;
  --v-ideal: #2fb877; --v-good: #94c94a; --v-doubt: #f0b941; --v-bad: #ec5a4e; --v-closed: #6f7d8b;
  --rock: #9b968f; --rock-hi: #6e6963; --shade: #7a8ca0; --cloud: #6f8193; --ring-bg: #1d3044;
  --temp: #f08a5a; --rain: #5ea6f0; --rain-soft: rgba(94, 166, 240, .2); --wind: #a493ee;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; font-stretch: 88%; font-weight: 750; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap, .top__in {
  max-width: 1240px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- cabecera ---------- */
.top { position: sticky; top: 0; z-index: 1500; background: var(--navy); color: #fff; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid rgba(255,255,255,.07); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand__logo { width: 36px; height: 36px; }
.brand__name { font-size: 1.6rem; font-weight: 800; font-stretch: 90%; letter-spacing: -.02em; }
.nav { margin-left: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; font-size: .95rem; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 760px) {
  .top__in { flex-wrap: wrap; gap: 0 12px; padding-block: 6px 0; }
  .nav { margin: 0 -8px; width: calc(100% + 16px); padding-bottom: 4px; }
  .nav a { padding: 7px 10px; font-size: .9rem; }
}

.crumbs { background: var(--navy-2); color: rgba(255,255,255,.7); font-size: .82rem; }
.crumbs .wrap { padding-block: 7px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: #fff; }

/* ---------- portada ---------- */
.hero, .crag-hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(95,195,255,.22), transparent 60%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
}
.hero::before, .crag-hero::before {   /* curvas de nivel */
  content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Cg fill='none' stroke='white' stroke-width='1'%3E%3Cpath d='M-20 220 C80 160 160 250 260 190 S440 120 620 180'/%3E%3Cpath d='M-20 245 C90 185 170 270 270 215 S450 150 620 205'/%3E%3Cpath d='M-20 270 C100 210 180 290 280 240 S460 180 620 230'/%3E%3Cpath d='M-20 195 C70 135 150 230 250 165 S430 90 620 155'/%3E%3Cpath d='M-20 170 C60 110 140 205 240 140 S420 60 620 130'/%3E%3Cpath d='M300 60 C340 30 400 40 420 70 S380 120 340 110 S280 90 300 60Z'/%3E%3Cpath d='M320 70 C345 52 385 58 398 77 S372 102 348 97 S308 86 320 70Z'/%3E%3C/g%3E%3C/svg%3E") center / 900px auto;
}
.hero__in { position: relative; padding-block: 36px 64px; }
.crag-hero .wrap { position: relative; padding-block: 26px 52px; }
.hero__eyebrow { margin: 0 0 8px; color: var(--sky); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); font-stretch: 78%; font-weight: 800; max-width: 18ch; }
.crag-hero h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); font-stretch: 80%; font-weight: 800; }
.hero__lead { margin: 12px 0 0; font-size: 1.1rem; color: rgba(255,255,255,.82); max-width: 56ch; }

.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.summary:empty { display: none; }
.sum { display: grid; align-content: center; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); min-width: 104px; }
.sum b { font-size: 2rem; line-height: 1; font-weight: 800; font-stretch: 80%; }
.sum span { font-size: .85rem; color: rgba(255,255,255,.8); }
.sum--yes b { color: #4ee39a; } .sum--doubt b { color: #ffd166; } .sum--no b { color: #ff8a80; }
.sum--best { text-decoration: none; color: #fff; grid-template-columns: 1fr auto; column-gap: 14px; background: rgba(95,195,255,.14); border-color: rgba(95,195,255,.35); }
.sum--best span { grid-column: 1; }
.sum--best b { grid-column: 1; font-size: 1.3rem; }
.sum--best em { grid-column: 2; grid-row: 1 / 3; font-style: normal; font-weight: 800; font-size: 2.2rem; font-stretch: 80%; color: #4ee39a; align-self: center; }
.sum--best:hover { background: rgba(95,195,255,.22); }

/* ---------- barra de herramientas ---------- */
.app { position: relative; margin-top: -34px; }
.toolbar, .cl-toolbar {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 12px; display: grid; gap: 10px; margin-bottom: 16px;
}
.toolbar__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.toolbar__right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 280px; justify-content: flex-end; min-width: 0; }
.toolbar, .toolbar__row, .toolbar > *, .cl-toolbar > * { min-width: 0; }
#model { min-width: 0; max-width: 100%; }
.modelpick { min-width: 0; max-width: 100%; }
.modelpick select { min-width: 0; width: 100%; }
@media (max-width: 560px) { .toolbar__right { justify-content: stretch; } .toolbar input[type=search] { max-width: none; flex-basis: 100%; } #model { flex: 1 1 100%; } .modelpick { flex: 1; } }
.toolbar input[type=search] { flex: 1 1 160px; max-width: 260px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.cl-toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
@media (max-width: 760px) { .cl-toolbar { grid-template-columns: minmax(0, 1fr); } }
.days, .chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.days::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.day, .chip {
  flex: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 12px;
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem;
}
.day__n { text-transform: capitalize; }
.day__c { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.day[aria-checked="true"], .chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.day[aria-checked="true"] .day__c { color: inherit; opacity: .85; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--v-ideal); flex: none; }
.dot.st-ideal { background: var(--v-ideal); } .dot.st-good { background: var(--v-good); } .dot.st-doubt { background: var(--v-doubt); }
.dot.st-bad { background: var(--v-bad); } .dot.st-closed, .dot.st-none { background: var(--v-closed); }

.modelpick { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.modelpick__k { padding: 0 10px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.modelpick select { border: 0; background: var(--surface); padding: 8px 10px; font-weight: 600; max-width: 230px; }
#model { display: flex; align-items: center; gap: 6px; }
.modelpick__info { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .85rem; }

/* ---------- mapa + lista ---------- */
.explore { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) {
  .explore { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .explore__map { position: sticky; top: 74px; }
  .explore__map .map { height: calc(100vh - 92px); max-height: 820px; }
}
.map { height: 320px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.status:empty { display: none; }
.status { color: var(--muted); margin: 0 0 12px; }
.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.pin {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .78rem;
  border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); background: var(--v-closed);
}
.pin--dot { width: 14px; height: 14px; border-width: 2px; }
.pin.st-ideal { background: var(--v-ideal); } .pin.st-good { background: var(--v-good); } .pin.st-doubt { background: var(--v-doubt); color: #1b1300; }
.pin.st-bad { background: var(--v-bad); } .pin.st-closed { background: var(--v-closed); }
.pop { display: grid; gap: 3px; min-width: 170px; }
.pop b { font-size: 1rem; }
.pop__st { font-weight: 700; }
.pop__st.st-ideal { color: var(--v-ideal); } .pop__st.st-good { color: var(--v-good); } .pop__st.st-doubt { color: #b07d00; } .pop__st.st-bad { color: var(--v-bad); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }

/* títulos de la lista */
.explore__list { display: grid; gap: 14px; align-content: start; min-width: 0; }
.list-h { font-size: 1.35rem; margin: 6px 0 0; }
.list-h:first-of-type { margin-top: 0; }
.list-h span { color: var(--muted); font-weight: 600; }

/* zonas plegables (portada) */
.zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.zone details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.zone details[open] { box-shadow: var(--shadow); }
.zone summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.zone summary::-webkit-details-marker { display: none; }
.zone summary:hover { background: var(--surface-2); }
.zone__mark { width: 6px; align-self: stretch; border-radius: 3px; background: var(--zc); flex: none; }
.zone__head { flex: 1; min-width: 0; display: grid; gap: 2px; }
.zone__name { font-size: 1.2rem; font-weight: 750; font-stretch: 85%; }
.zone__meta { font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone__meta b { color: var(--v-ideal); }
.zone__dist { display: flex; gap: 2px; width: 110px; height: 8px; flex: none; }
.zone__dist i { border-radius: 2px; background: var(--c); }
.zone__chev { width: 10px; height: 10px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin: 0 4px 4px; }
.zone details[open] .zone__chev { transform: rotate(-135deg); margin-bottom: -4px; }
@media (max-width: 520px) { .zone__dist { display: none; } }
.zone details > .cards { padding: 4px 14px 16px; }

/* listas de tarjetas */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.cards--top { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); margin-bottom: 28px; }
.app > .list-h { margin: 8px 0 14px; }
.btn--wide { width: 100%; }
.cards--flat { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.explore__list .cc { padding: 12px 14px; gap: 10px; }
.explore__list .cc__badge { width: 60px; height: 52px; border-radius: 12px; }
.explore__list .cc__badge span { font-size: .6rem; }
.explore__list .cc__badge b { font-size: 1.3rem; }
.explore__list .cc__facts { grid-template-columns: minmax(0, 1fr); gap: 5px; }

/* tarjeta de escuela */
.cc {
  --st: var(--v-closed);
  display: grid; gap: 12px; height: 100%; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cc::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--st); }
.cc:hover { border-color: var(--st); box-shadow: var(--shadow); transform: translateY(-2px); }
.st-ideal { --st: var(--v-ideal); } .st-good { --st: var(--v-good); } .st-doubt { --st: var(--v-doubt); } .st-bad { --st: var(--v-bad); } .st-closed { --st: var(--v-closed); }
.cc__head { display: flex; gap: 12px; align-items: center; }
.cc__badge { flex: none; width: 58px; height: 58px; border-radius: 14px; background: var(--st); color: #fff; display: grid; place-content: center; text-align: center; line-height: 1; }
.cc.st-doubt .cc__badge { color: #241900; }
.cc__badge b { font-size: 1.5rem; font-weight: 800; font-stretch: 80%; }
.cc__badge span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.cc__title { display: grid; gap: 2px; min-width: 0; }
.cc__name { font-weight: 750; font-size: 1.1rem; line-height: 1.15; font-stretch: 92%; }
.cc__meta { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.zdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cc__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.fact { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 500; min-width: 0; }
.fact > span:last-child { line-height: 1.25; }
.fact .ico { width: 24px; height: 24px; }
.fact--rock-dry { color: var(--v-ideal); } .fact--rock-damp { color: #b07d00; } .fact--rock-wet { color: var(--rain); }
.tchip { display: inline-block; padding: 1px 7px; border-radius: 6px; font-weight: 700; font-size: .84rem; flex: none; }
.cc__foot { display: grid; gap: 5px; }
.cc__bar { display: flex; gap: 2px; height: 6px; }
.cc__bar i { flex: 1; border-radius: 2px; background: var(--c); opacity: .3; }
.cc__bar i.in { opacity: 1; }
.cc__win { font-size: .8rem; color: var(--muted); font-weight: 500; }
.cc__win:empty { display: none; }
.cc--big .cc__badge { width: 64px; height: 64px; }
.v-ideal { --c: var(--v-ideal); } .v-good { --c: var(--v-good); } .v-doubt { --c: var(--v-doubt); } .v-bad { --c: var(--v-bad); } .v-closed { --c: var(--v-closed); }

/* chips de zonas (portada y zonas) */
.zone-chips { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.zone-chips a { display: grid; padding: 12px 14px 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; overflow: hidden; }
.zone-chips a::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--zc); }
.zone-chips a:hover { border-color: var(--zc); }
.zone-chips b { font-weight: 700; }
.zone-chips span { font-size: .82rem; color: var(--muted); }
.mt { margin-top: 28px; }

/* índice de zonas */
.zones-map .map { height: 380px; margin-bottom: 20px; }
.zgrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.zcard { display: grid; grid-template-rows: auto 1fr auto; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.zcard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(13,27,42,.14); }
.zcard__top { position: relative; height: 120px; display: block; color: #fff; }
.zbanner { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zcard__name { position: absolute; left: 18px; bottom: 14px; font-size: 1.6rem; font-weight: 800; font-stretch: 80%; text-shadow: 0 1px 8px rgba(0,0,0,.25); line-height: 1; }
.zcard__n { position: absolute; right: 14px; top: 12px; background: rgba(0,0,0,.25); padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.zcard__body { padding: 14px 18px; display: grid; gap: 12px; align-content: start; }
.zcard__intro { font-size: .92rem; color: var(--muted); }
.zcard__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.zcard__tags i { font-style: normal; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); text-transform: capitalize; }
.zcard__live { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.zcard__live .zone__dist { width: 100%; height: 8px; }
.zlive__k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.zlive__n b { color: var(--v-ideal); font-size: 1.15rem; }
.zlive__best em { font-style: normal; font-weight: 800; color: var(--st); margin-left: 4px; }
.zcard__cta { padding: 12px 18px; border-top: 1px solid var(--line); font-weight: 700; color: var(--zc); }
.zpin { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--zc); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.zlabel { display: inline-block; transform: translate(-50%, -150%); white-space: nowrap; background: var(--zc); color: #fff; font-weight: 700; font-size: .78rem; padding: 3px 9px; border-radius: 999px; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

/* cabecera de una zona */
.zone-hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.zbanner--big { opacity: .9; }
.zone-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,15,28,.7), rgba(5,15,28,.15)); }
.zone-hero__in { position: relative; z-index: 1; padding-block: 30px 56px; }
.zone-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-stretch: 78%; font-weight: 800; }
.zone-hero .hero__eyebrow { color: #fff; opacity: .85; }
.zstats { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.zstats div { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 8px 14px; }
.zstats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; opacity: .8; }
.zstats dd { margin: 0; font-weight: 700; text-transform: capitalize; }

.ico { width: 28px; height: 28px; flex: none; }

/* ---------- ficha de escuela ---------- */
.crag-live .status { padding: 20px; background: var(--surface); border-radius: var(--r); }
.cl-main { display: grid; gap: 16px; }
.cl-main.is-loading { opacity: .5; pointer-events: none; }
.day--st .dot { width: 8px; height: 8px; }

.verdict {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; box-shadow: var(--shadow);
  border-left: 6px solid var(--st);
}
.ring__n { font: 800 34px var(--font); font-stretch: 80%; fill: var(--ink); }
.verdict__k { margin: 0; color: var(--muted); font-size: .85rem; }
.verdict__k::first-letter { text-transform: uppercase; }
.verdict__say { margin: 4px 0 10px; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; font-stretch: 90%; line-height: 1.2; }
.verdict__say b { color: var(--st); }
@media (max-width: 560px) { .verdict { grid-template-columns: minmax(0, 1fr); justify-items: start; } .verdict__ring svg { width: 96px; height: 96px; } }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: .86rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pill.sev-3 { background: color-mix(in srgb, var(--v-bad) 13%, var(--surface)); border-color: color-mix(in srgb, var(--v-bad) 40%, var(--surface)); }
.pill.sev-2 { background: color-mix(in srgb, var(--v-doubt) 16%, var(--surface)); border-color: color-mix(in srgb, var(--v-doubt) 45%, var(--surface)); }
.pill.ok { background: color-mix(in srgb, var(--v-ideal) 13%, var(--surface)); border-color: color-mix(in srgb, var(--v-ideal) 40%, var(--surface)); }

.tiles4 { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .tile { padding: 12px; } .tile__main { flex-direction: column; align-items: flex-start; gap: 6px; } .tile__main .ico { width: 40px; height: 40px; } .tile__main b { font-size: 1.25rem; } .sunarc { max-width: 150px; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; min-width: 0; }
.tile__k { margin: 0; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tile__main { display: flex; align-items: center; gap: 12px; }
.tile__main .ico { width: 54px; height: 54px; }
.tile__main b, .tile__mid b { display: block; font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.tile__main span { font-size: .88rem; color: var(--muted); }
.tile__s { margin: 0; font-size: .82rem; color: var(--muted); }
.tile__s.warn { color: var(--v-bad); font-weight: 600; }
.tile--rock-dry .tile__main b { color: var(--v-ideal); } .tile--rock-damp .tile__main b { color: #b07d00; } .tile--rock-wet .tile__main b { color: var(--rain); }
.tbig { font-size: 2rem !important; }
.bigarrow .arrow { width: 46px; height: 46px; color: var(--accent); }
.wetbars { display: flex; gap: 2px; height: 26px; align-items: end; }
.wetbars i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; }
.wb-dry { background: color-mix(in srgb, var(--v-ideal) 55%, var(--surface)); }
.wb-damp { background: var(--v-doubt); }
.wb-wet { background: var(--rain); }
.sunarc { width: 100%; max-width: 220px; height: auto; justify-self: center; }
.sunarc__t { font: 600 8px var(--font); fill: var(--muted); }
.tile__mid b { font-size: 1.2rem; }

.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.block h2 { font-size: 1.3rem; }
.link { font-size: .88rem; font-weight: 500; }

/* rejilla hora a hora */
.hgrid-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.hgrid { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: 100%; }
.hgrid th, .hgrid td { text-align: center; padding: 6px 3px; white-space: nowrap; min-width: 46px; }
.hgrid thead th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.hgrid tbody th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; position: sticky; left: -18px; background: var(--surface); z-index: 1; padding-left: 0; min-width: 84px; }
.hgrid tbody tr + tr > * { border-top: 1px solid var(--surface-2); }
.hgrid .in { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.hgrid thead th.in { color: var(--accent); }
.hgrid .night { opacity: .55; }
.sq { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 6px; background: var(--c); color: #fff; font-weight: 800; font-size: .8rem; }
.sq.v-doubt { color: #241900; }
.hgrid .ico { width: 26px; height: 26px; display: block; margin: 0 auto; }
.rk { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }
.rk--dry { background: var(--v-ideal); } .rk--damp { background: var(--v-doubt); } .rk--wet { background: var(--rain); box-shadow: 0 0 0 3px var(--rain-soft); }
.mm { color: var(--rain); }
.pr { color: var(--rain); font-size: .78rem; opacity: .8; }
.wd { display: inline-flex; align-items: center; gap: 1px; font-weight: 600; }
.hgrid small { display: block; font-size: .72rem; color: var(--muted); }
.hgrid small.warn, .warn { color: var(--v-bad); font-weight: 700; }
.arrow { width: 15px; height: 15px; color: var(--accent); }

/* próximos días */
.week { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.wk {
  cursor: pointer; text-align: center; background: var(--surface-2); border: 2px solid transparent; border-radius: 12px;
  padding: 10px 6px; display: grid; gap: 3px; justify-items: center; position: relative; overflow: hidden;
}
.wk::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--st); }
.wk.is-on { border-color: var(--ink); background: var(--surface); }
.wk__d { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.wk__s { font-size: 1.8rem; font-weight: 800; font-stretch: 80%; line-height: 1; color: var(--st); }
.wk__l { font-size: .78rem; font-weight: 600; }
.wk__i { display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; color: var(--rain); }
.wk__i em { font-style: normal; font-weight: 600; }
.wk__i .ico { width: 24px; height: 24px; }
.wk__w { font-size: .72rem; color: var(--muted); min-height: 1em; }

/* comparar modelos */
.agree { margin: 0 0 12px; font-size: .92rem; }
.conf { display: inline-block; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; margin-right: 8px; color: #fff; }
.conf--alta { background: var(--v-ideal); } .conf--media { background: var(--v-doubt); color: #241900; } .conf--baja { background: var(--v-bad); }
.mtable { display: grid; gap: 6px; }
.mrow {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) 48px minmax(120px, 2fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
}
.mrow.is-on { border-color: var(--accent); background: var(--accent-soft); }
.mrow.is-empty { grid-template-columns: minmax(150px, 1.2fr) 1fr; opacity: .7; }
.mrow__name { display: grid; line-height: 1.2; }
.mrow__name span { font-size: .78rem; color: var(--muted); }
.mrow__score { display: grid; place-items: center; height: 34px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 800; font-size: 1.05rem; }
.mrow__score.v-doubt { color: #241900; }
.mrow__strip { display: flex; gap: 2px; height: 14px; }
.mrow__strip i { flex: 1; border-radius: 2px; background: var(--c); opacity: .4; }
.mrow__strip i.in { opacity: 1; }
.mrow__facts { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.mrow__facts span { display: inline-flex; align-items: center; gap: 2px; }
.mrow__facts .ico { width: 16px; height: 16px; }
.mrow__na { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) {
  .mrow { grid-template-columns: minmax(0, 1fr) 48px auto; grid-template-areas: "name score btn" "strip strip strip" "facts facts facts"; row-gap: 8px; }
  .mrow__name { grid-area: name; } .mrow__score { grid-area: score; } .mrow .btn { grid-area: btn; }
  .mrow__strip { grid-area: strip; } .mrow__facts { grid-area: facts; }
  .mrow.is-empty { grid-template-areas: none; grid-template-columns: minmax(0, 1fr); }
}
.cl-actions { margin: 0; }

/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--sm { padding: 6px 12px; font-size: .84rem; }
.btn:disabled { cursor: default; filter: none; }

/* ---------- contenido estático (SEO) ---------- */
.seo { padding-block: 36px 8px; }
.seo h2 { font-size: 1.6rem; margin-bottom: 14px; }
.seo h3 { font-size: 1.1rem; margin-bottom: 6px; }
.seo h3 a { color: inherit; text-decoration: none; }
.seo h3 a:hover { color: var(--accent); }
.seo__zones { display: grid; gap: 20px 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.seo__zones ul, .seo__list, .near { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .92rem; }
.seo__zones a, .seo__list a, .near a { font-weight: 500; }
.faq { display: grid; gap: 8px; max-width: 820px; margin-bottom: 16px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.crag-info { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .crag-info { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.crag-info p { max-width: 64ch; }
.crag-info h2 + table { margin-bottom: 24px; }
.facts { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { font-weight: 600; color: var(--muted); width: 32%; }
.closed-note { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--v-bad) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--v-bad) 40%, var(--surface)); font-weight: 600; }
.prose { max-width: 900px; }
.prose p { max-width: 70ch; }
.prose h2 { margin-top: 28px; }
.legend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.legend-grid .lg { background: var(--c); color: #fff; border-radius: 10px; padding: 10px; display: grid; }
.legend-grid .lg.v-doubt { color: #241900; }
.legend-grid b { font-size: 1.2rem; font-weight: 800; }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 8px 0 4px; }
.lgi { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.lgi .ico { width: 40px; height: 40px; }
.lgi span { display: grid; }
.tscale { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); border-radius: 8px; overflow: hidden; max-width: 620px; }
.tscale span { text-align: center; font-weight: 700; padding: 6px 0; font-size: .85rem; }
.models-table { overflow-x: auto; }

/* ---------- radar ---------- */
body[data-page="radar"] .foot, body[data-page="radar"] .crumbs { display: none; }
.radar-page { position: relative; height: calc(100dvh - 58px - env(safe-area-inset-top, 0px)); }
@media (max-width: 640px) { .radar-page { height: calc(100dvh - 96px - env(safe-area-inset-top, 0px)); } }
.map--radar { position: absolute; inset: 0; height: auto; border-radius: 0; border: 0; }
.rp-top { position: absolute; z-index: 800; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; max-width: 460px; }
.rp-top select { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; box-shadow: var(--shadow); }
.rp-top .btn { box-shadow: var(--shadow); }
.rp-status {
  position: absolute; z-index: 800; top: 64px; left: 12px; width: min(360px, calc(100% - 24px));
  background: var(--surface); border-radius: var(--r); box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 14px 16px; border-left: 6px solid var(--v-closed);
}
.rp-status p { margin: 0; }
.rs-dry { border-left-color: var(--v-ideal); } .rs-soon { border-left-color: var(--v-doubt); } .rs-rain { border-left-color: var(--rain); }
.rs-k { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rs-h { font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.15; margin: 2px 0 6px !important; }
.rs-dry .rs-h { color: var(--v-ideal); } .rs-soon .rs-h { color: #b07d00; } .rs-rain .rs-h { color: var(--rain); }
.rs-s { font-size: .88rem; color: var(--muted); }
.rs-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; align-items: end; height: 34px; margin-top: 10px; }
.rs-bars i { display: block; height: var(--h); min-height: 3px; background: var(--rain); border-radius: 3px 3px 0 0; }
.rs-bars i[style*="--h:0%"] { background: var(--line); height: 3px; }
.rs-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 3px; }
.rs-link { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .9rem; }
.rp-bar {
  position: absolute; z-index: 800; left: 12px; right: 12px; bottom: 16px; max-width: 760px; margin-inline: auto;
  background: var(--surface); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
}
.playbtn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.playbtn svg { width: 22px; height: 22px; fill: currentColor; }
.playbtn .i-pause, .playbtn[aria-pressed="true"] .i-play { display: none; }
.playbtn[aria-pressed="true"] .i-pause { display: block; }
.rp-time { display: grid; min-width: 112px; }
.rp-time output { font-size: 1.4rem; font-weight: 800; font-stretch: 85%; line-height: 1; }
#radar-time.is-proj { color: var(--wind); }
#radar-kind { font-size: .78rem; color: var(--muted); font-weight: 600; }
#radar-kind.is-proj { color: var(--wind); }
.rp-track { position: relative; flex: 1; min-width: 0; padding-top: 18px; }
.rp-ticks { position: absolute; left: 8px; right: 8px; top: 0; height: 30px; pointer-events: none;
  background: linear-gradient(90deg, transparent var(--now, 80%), color-mix(in srgb, var(--wind) 10%, transparent) var(--now, 80%)); border-radius: 6px; }
.tk { position: absolute; bottom: 4px; width: 2px; height: 8px; background: var(--line); transform: translateX(-1px); }
.tk em { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.tk--proj { background: var(--wind); }
.tk--proj em { color: var(--wind); font-weight: 600; }
.tk--now { height: 14px; background: var(--ink); }
.tk--now em { color: var(--ink); font-weight: 700; }
#radar-slider { width: 100%; accent-color: var(--accent); margin: 8px 0 0; position: relative; }
.rp-legend {
  position: absolute; z-index: 800; right: 12px; bottom: 100px; display: flex; align-items: center; gap: 6px;
  background: var(--surface); padding: 6px 10px; border-radius: 10px; font-size: .74rem; font-weight: 600; box-shadow: var(--shadow);
}
.rp-legend i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #a6dcff, #3e8ce8, #1d4fbf, #f2d200, #ff8a00, #e02b2b); }
.rp-err:empty { display: none; }
.rp-err { position: absolute; z-index: 800; left: 12px; right: 12px; bottom: 100px; background: var(--surface); padding: 8px 12px; border-radius: 10px; margin: 0; max-width: 460px; }
@media (max-width: 640px) {
  .rp-status { top: auto; bottom: 108px; }
  .rp-legend { bottom: auto; top: 64px; right: 12px; }
  .rp-bar { gap: 10px; padding: 10px 12px; }
  .rp-time { min-width: 84px; }
}
.target { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255,255,255,.6); box-shadow: 0 0 0 0 rgba(22,115,209,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,115,209,.55); } 100% { box-shadow: 0 0 0 18px rgba(22,115,209,0); } }
.track-line { stroke: var(--wind); stroke-width: 3; stroke-dasharray: 7 6; fill: none; }
.track-dot { stroke: var(--wind); fill: var(--surface); stroke-width: 2.5; }
.track-label span { display: inline-block; transform: translate(8px, -50%); white-space: nowrap; font: 700 11px var(--font); background: var(--surface); color: var(--wind); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--wind); }

/* ---------- pie ---------- */
.foot { margin-top: 48px; background: var(--navy); color: rgba(255,255,255,.75); font-size: .88rem; }
.foot__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block: 32px 40px; }
.foot a { color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot__brand { font-size: 1.5rem; font-weight: 800; font-stretch: 90%; letter-spacing: -.02em; color: #fff; margin: 0 0 6px; }
.foot__h { color: #fff; font-weight: 700; margin: 0 0 8px; }
.foot .muted { color: rgba(255,255,255,.6); }

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

/* ==========================================================================
   EL TIEMPO (cualquier lugar)
   ========================================================================== */
.wx-hero { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; padding-block: 22px 52px; position: relative; }
.wx-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-stretch: 80%; font-weight: 800; margin-bottom: 14px; }
.wxsearch { position: relative; display: flex; gap: 8px; align-items: center; max-width: 720px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.wxsearch__ico { width: 20px; height: 20px; fill: none; stroke: #5b6b7c; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.wxsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #0d1b2a; font-size: 1.05rem; padding: 8px 4px; }
.wxsearch .btn { flex: none; }
.wxsearch__res { position: absolute; z-index: 1600; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); max-height: 60vh; overflow: auto; }
.wxsearch__res button { width: 100%; text-align: left; display: grid; gap: 1px; background: none; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.wxsearch__res button:hover, .wxsearch__res button:focus-visible { background: var(--surface-2); }
.wxsearch__res span { font-size: .85rem; color: var(--muted); }
.wx-none { padding: 10px 12px; color: var(--muted); }
.wx-saved { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.wx-saved__k { font-size: .82rem; color: rgba(255,255,255,.7); margin-right: 4px; }
.wx-place { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: .88rem; cursor: pointer; }
.wx-place.is-on, .wx-place:hover { background: #fff; color: var(--navy); }
.app--wx { margin-top: -30px; }
.wx { display: grid; gap: 16px; }
.wx.is-loading { opacity: .6; }

/* ahora */
.wnow { --sky1: #1e64b0; --sky2: #4e9be0; position: relative; overflow: hidden; color: #fff; border-radius: 18px; padding: 18px 20px; background: linear-gradient(125deg, var(--sky1), var(--sky2)); box-shadow: var(--shadow); display: grid; gap: 10px; }
.wnow::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60%; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120 L0 80 L40 55 L70 70 L110 30 L140 52 L170 40 L210 75 L250 22 L290 60 L320 48 L360 78 L400 58 L400 120Z' fill='white' fill-opacity='.07'/%3E%3Cpath d='M0 120 L0 98 L50 80 L90 92 L130 70 L180 95 L230 72 L280 96 L330 80 L400 100 L400 120Z' fill='white' fill-opacity='.08'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.wnow > * { position: relative; z-index: 1; }
.sky-clear { --sky1: #1e64b0; --sky2: #4e9be0; } .sky-partly { --sky1: #2a5a8c; --sky2: #6f9cc6; } .sky-cloudy { --sky1: #3e5367; --sky2: #74889b; }
.sky-rain { --sky1: #263b52; --sky2: #4f6a84; } .sky-storm { --sky1: #1f2236; --sky2: #4a4766; } .sky-snow { --sky1: #4b6680; --sky2: #8aa3b9; }
.sky-fog { --sky1: #56625f; --sky2: #8b9693; } .sky-night { --sky1: #0b1628; --sky2: #213656; }
.sky-night.sky-rain, .sky-night.sky-cloudy { --sky1: #101824; --sky2: #2e3d50; }
.wnow__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wnow__place { margin: 0; font-size: 1.5rem; font-weight: 800; font-stretch: 85%; }
.wnow__sub { margin: 0; font-size: .85rem; opacity: .8; }
.star { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); display: grid; place-items: center; cursor: pointer; color: #fff; flex: none; }
.star svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star.is-on svg { fill: #ffd166; stroke: #ffd166; }
.wnow__main { display: flex; align-items: center; gap: 12px; }
.wnow__icon .wx { width: 104px; height: 104px; color: #fff; }
.wnow__temp { font-size: 5.2rem; font-weight: 300; line-height: .95; letter-spacing: -.03em; font-stretch: 90%; }
.wnow__sky { margin: 4px 0 0; font-size: 1.2rem; font-weight: 600; }
.wnow__range { margin: 2px 0 0; font-size: .92rem; opacity: .9; }
.wnow__rain { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.wnow__rain p { margin: 0; flex: 1 1 220px; font-size: .95rem; }
.nowbars { position: relative; flex: 1 1 260px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; align-items: end; height: 34px; padding-bottom: 14px; }
.nowbars i { display: block; height: var(--h); min-height: 2px; background: #8cc8ff; border-radius: 2px 2px 0 0; }
.nowbars i[style*="--h:0%"] { background: rgba(255,255,255,.3); height: 2px; }
.nowbars__axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: .66rem; opacity: .8; }
@media (max-width: 520px) { .wnow__temp { font-size: 4rem; } .wnow__icon .wx { width: 78px; height: 78px; } }

/* avisos */
.wx-alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.walert { padding: 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); }
.walert--bad { background: color-mix(in srgb, var(--v-bad) 14%, var(--surface)); border-color: color-mix(in srgb, var(--v-bad) 45%, var(--surface)); }
.walert--warn { background: color-mix(in srgb, var(--v-doubt) 18%, var(--surface)); border-color: color-mix(in srgb, var(--v-doubt) 50%, var(--surface)); }
.walert--info { background: color-mix(in srgb, var(--rain) 12%, var(--surface)); border-color: color-mix(in srgb, var(--rain) 40%, var(--surface)); }
.walert--ok { background: color-mix(in srgb, var(--v-ideal) 12%, var(--surface)); border-color: color-mix(in srgb, var(--v-ideal) 40%, var(--surface)); }
.walert--link { margin-left: auto; color: var(--accent); text-decoration: none; }

/* rejilla */
.wx-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .wx-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wx-span { grid-column: 1 / -1; } }
.meteo-scroll { overflow-x: auto; margin: 0 -6px 12px; }
.meteo-scroll canvas { display: block; }
.htable-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.htable { border-collapse: collapse; font-size: .84rem; }
.htable th, .htable td { padding: 5px 5px; text-align: center; white-space: nowrap; min-width: 44px; }
.htable thead th { font-weight: 600; color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.htable thead th small { display: block; font-size: .66rem; text-transform: capitalize; color: var(--accent); font-weight: 700; }
.htable thead th.is-now { color: var(--ink); font-weight: 800; }
.htable .newday { border-left: 1px solid var(--line); }
.htable tbody th { position: sticky; left: -18px; background: var(--surface); text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; padding-left: 0; min-width: 72px; z-index: 1; }
.htable tbody tr + tr > * { border-top: 1px solid var(--surface-2); }
.htable .wx { width: 30px; height: 30px; color: var(--cloud); display: block; margin: 0 auto; }
.htable td.rain { color: var(--rain); font-weight: 700; }
.pbar { display: inline-block; min-width: 34px; font-size: .78rem; background: linear-gradient(0deg, var(--rain-soft) var(--p), transparent var(--p)); border-radius: 3px; padding: 1px 2px; color: var(--rain); font-weight: 600; }
.cbar { display: inline-block; width: 30px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--cloud) var(--p), var(--surface-2) var(--p)); }
.gust-mid { color: #b07d00; font-weight: 700; } .gust-hi { color: var(--v-bad); font-weight: 800; }

/* 14 días */
.wx-days { align-self: start; }
.d14 { list-style: none; margin: 0; padding: 0; display: grid; }
.d14__row { display: grid; grid-template-columns: 3.6rem 34px 3.8rem 2.2rem minmax(40px, 1fr) 2.2rem 4rem; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.d14__row:first-child { border-top: 0; }
.d14__day { display: grid; line-height: 1.15; }
.d14__day b { text-transform: capitalize; }
.d14__day small, .d14__rain small, .d14__wind small { font-size: .72rem; color: var(--muted); }
.d14 .wx { width: 32px; height: 32px; color: var(--cloud); }
.d14__rain { display: grid; line-height: 1.15; font-size: .82rem; color: var(--rain); }
.d14__min { color: var(--muted); text-align: right; }
.d14__max { font-weight: 700; }
.d14__wind { display: flex; align-items: center; gap: 4px; font-size: .84rem; justify-content: flex-end; }
.d14__wind > span { display: grid; line-height: 1.05; text-align: right; }
.range { position: relative; height: 7px; border-radius: 4px; background: var(--surface-2); }
.range i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
@media (max-width: 460px) { .d14__row { grid-template-columns: 3.2rem 30px 3.2rem 2rem minmax(30px, 1fr) 2rem; } .d14__wind { display: none; } }

/* recuadros de detalle */
.wx-tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
@media (min-width: 640px) and (max-width: 1099px) { .wx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wx-tiles { grid-column: auto; } }
.wtile { gap: 6px; }
.wtile > span, .wtile__row span, #wx-aqi > span { display: block; font-size: .84rem; color: var(--muted); }
.wbig { display: block; font-size: 1.9rem; font-weight: 800; font-stretch: 85%; line-height: 1.05; color: var(--ink); }
.wbig small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.wbig--bad { color: var(--v-bad); } .wbig--warn { color: #b07d00; } .wbig--ok { color: var(--v-ideal); }
.wtile__row { display: flex; align-items: center; gap: 12px; }
.wtile__row b { font-size: 1.05rem; }
.compass { width: 92px; height: 92px; flex: none; }
.compass__t { font: 700 9px var(--font); fill: var(--muted); }
.compass__v { font: 800 14px var(--font); fill: var(--ink); }
.meter { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter--pollen i { background: linear-gradient(90deg, #7bc96f, #e6c229, #e8572a, #b3203b); background-size: 300px 100%; }
.trend { font-weight: 700; color: var(--ink) !important; }
.uvbar, .aqibar { position: relative; height: 8px; border-radius: 4px; margin: 6px 0 2px; }
.uvbar { background: linear-gradient(90deg, #3fb36b 0 27%, #f2c94c 27% 55%, #f2994a 55% 73%, #eb5757 73% 100%); }
.aqibar { background: linear-gradient(90deg, #2bb5a7 0 20%, #4caf50 20% 40%, #e6c229 40% 60%, #e8572a 60% 80%, #b3203b 80% 100%); }
.uvbar i, .aqibar i { position: absolute; top: -4px; width: 4px; height: 16px; background: var(--ink); border-radius: 2px; transform: translateX(-2px); }
.sunpath { width: 100%; max-width: 200px; height: auto; }
.wtile__2 { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; }
.moon { width: 72px; height: 72px; flex: none; }
.layers { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; font-size: .82rem; }
.layers em { font-style: normal; font-weight: 600; font-size: .78rem; }
.wtile__mini { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.wtile__mini b { color: var(--ink); }

/* comparación de modelos */
.mgrid-wrap { overflow-x: auto; }
.mgrid { border-collapse: collapse; width: 100%; font-size: .84rem; }
.mgrid th, .mgrid td { padding: 6px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.mgrid thead th { font-weight: 700; text-transform: capitalize; }
.mgrid thead th small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.mgrid tbody th { text-align: left; white-space: nowrap; }
.mgrid tbody th small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.mcell { display: grid; justify-items: center; gap: 2px; }
.mcell .wx { width: 28px; height: 28px; color: var(--cloud); }
.mcell small { color: var(--muted); }
.mcell em { font-style: normal; font-size: .74rem; color: var(--rain); font-weight: 600; }
.wx-map { height: 340px; }

.map-err { margin: 0; height: 100%; min-height: 120px; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: .92rem; }
.map--mini { height: 260px; margin-bottom: 24px; }
.pin.st-none { background: var(--v-closed); }

/* fondos de mapa: gris para el radar, oscuro en modo noche */
.basemap--grey { filter: grayscale(1) contrast(.92) brightness(1.04); }
.basemap--dark { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9); }
.basemap--grey.basemap--dark { filter: grayscale(1) invert(1) brightness(.9) contrast(.9); }
.leaflet-control-layers { border-radius: 10px !important; font: inherit; }

.rainhist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; text-align: center; font-size: .78rem; color: var(--muted); }
.rainhist span { background: var(--surface-2); border-radius: 8px; padding: 5px 2px; line-height: 1.15; }
.rainhist b { color: var(--rain); font-size: 1rem; }

.why { list-style: none; margin: 2px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.why li { padding-left: 14px; position: relative; line-height: 1.3; }
.why li::before { content: ""; position: absolute; left: 0; top: .45em; width: 6px; height: 6px; border-radius: 50%; background: var(--rain); }
