/* Meteo — design system
   dark-first, clean, high-legibility */
:root {
  --bg: #0A1412;
  --bg2: #0F1E1A;
  --card: rgba(15, 32, 28, .74);
  --card-border: rgba(122, 224, 198, .16);
  --text: #E7EDEA;
  --text-dim: #9FB8AD;
  --text-faint: #68877A;
  --accent: #17BFA2;
  --accent2: #0E7A68;
  --sun: #E3B64B;
  --hot: #D98E4A;
  --rain-c: #4aa8ff;
  --good: #41d9a3;
  --shadow: 0 8px 32px rgba(0,0,0,.35);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="light"] {
  --bg: #f2f0e6;
  --bg2: #e9e6d8;
  --card: rgba(255,255,255,.8);
  --card-border: rgba(20,90,70,.18);
  --text: #10233d;
  --text-dim: #4a5f7c;
  --text-faint: #8295ad;
  --accent: #0ba5bd;
  --accent2: #1667c2;
  --shadow: 0 8px 28px rgba(30,60,110,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* el hidden siempre gana sobre display:flex */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(27,127,212,.25), transparent 60%),
    radial-gradient(900px 420px at -10% 10%, rgba(53,208,229,.14), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
  transition: background .4s, color .3s;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--card-border);
}
.topbar-inner {
  max-width: 1060px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(34,211,238,.35)); }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-tagline {
  font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sun); opacity: .85; margin-left: 2px;
}
@media (max-width: 640px) { .brand-tagline { display: none; } }

.search-wrap { position: relative; flex: 1; max-width: 460px; margin: 0 auto; }
.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: var(--text-faint); pointer-events: none;
}
#search {
  width: 100%; padding: 10px 14px 10px 40px;
  border-radius: 999px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--text);
  font: inherit; font-size: .95rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,208,229,.18); }
#search::placeholder { color: var(--text-faint); }

.results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; z-index: 60;
}
.results button {
  display: flex; width: 100%; gap: 10px; padding: 11px 14px;
  background: none; border: none; color: var(--text); font: inherit; text-align: left;
  cursor: pointer; align-items: baseline;
}
.results button:hover, .results button:focus { background: rgba(53,208,229,.12); outline: none; }
.results .r-name { font-weight: 600; }
.results .r-admin { margin-left: auto; color: var(--text-faint); font-size: .85rem; white-space: nowrap; }

  .menu-btn { display: none; }
  .app-menu, .menu-backdrop { display: none !important; }
.ad-slot { display: none; }
.ad-slot.ad-on {
  display: block;
  min-height: 50px;
  margin: 8px 0 0;
  overflow: hidden;
  border-radius: 10px;
}
.controls { display: flex; gap: 8px; }
.chip {
  min-width: 42px; height: 36px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--text-dim);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.icon-sun { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- main ---------- */
main { max-width: 1060px; margin: 0 auto; padding: 26px 18px 40px; }
.noscript { text-align: center; color: var(--text-dim); padding: 40px; }

.hero {
  position: relative; overflow: hidden;
  display: grid; gap: 18px; align-items: center;
  grid-template-columns: 1fr auto;
  padding: 26px 26px 22px; margin-bottom: 18px;
  background:
    radial-gradient(560px 260px at 84% -18%, rgba(34,211,238,.14), transparent 62%),
    radial-gradient(460px 240px at 2% 118%, rgba(251,191,36,.10), transparent 60%),
    var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise .45s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none;} }
.hero-city h1 { font-size: clamp(1.55rem, 4vw, 2.3rem); letter-spacing: -.025em; font-weight: 750; }
.hero-city p { color: var(--text-dim); font-size: .95rem; }
.hero-city .updated { color: var(--text-faint); font-size: .76rem; margin-top: 2px; }

.hero-now { display: flex; align-items: center; gap: 14px; }
.now-icon svg { width: 74px; height: 74px; filter: drop-shadow(0 4px 14px rgba(255,209,102,.3)); }
.now-temp-val { font-size: clamp(3.2rem, 9vw, 4.8rem); font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.now-temp-val .deg { font-size: .45em; font-weight: 600; color: var(--text-dim); vertical-align: super; }
.now-cond { display: block; color: var(--text-dim); font-size: 1rem; margin-top: 6px; }

.now-stats {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px;
}
.stat {
  padding: 12px 14px; border-radius: 14px; min-height: 56px;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  border: 1px solid var(--card-border);
  transition: border-color .18s, background .18s;
}
.stat:hover { border-color: rgba(120,170,255,.3); background: color-mix(in srgb, var(--bg) 76%, transparent); }
.stat .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.stat .v { font-size: 1.08rem; font-weight: 650; margin-top: 3px; }
.stat .v small { color: var(--text-faint); font-weight: 500; font-size: .78em; }

/* ---------- secciones desplegables (acordeón) ---------- */
.card.fold { padding: 0; overflow: visible; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 17px 22px;
  background: none; border: none; cursor: pointer;
  color: var(--text); font: inherit; text-align: left;
  transition: background .18s;
}
.sec-head:hover { background: rgba(120,170,255,.06); }
.sec-head .sec-title { margin: 0; font-size: 1.05rem; }
.chev {
  width: 18px; height: 18px; flex: 0 0 auto;
  color: var(--text-faint); transition: transform .32s ease;
}
.fold.open > .sec-head .chev { transform: rotate(180deg); }
.sec-body {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height .38s cubic-bezier(.2,.6,.2,1), padding .28s ease;
}
.fold.open .sec-body {
  max-height: 3200px;
  overflow: visible;
  padding-bottom: 8px;
}
.sec-pad { padding: 0 16px 16px; min-height: 0; }

/* ---------- cards ---------- */
.tend-box{margin:10px 0 14px;padding:12px 14px}
.tend-kicker{margin:0 0 8px;font-size:.72rem;opacity:.75}
.tend-row{display:flex;gap:8px;overflow:auto}
.tend-w{min-width:72px;text-align:center;padding:8px 6px;border-radius:10px;background:rgba(255,255,255,.05)}
.tend-w b{display:block;font-size:.68rem}
.tend-w span{display:block;font-size:1.05rem;font-weight:700}
.tend-w small{opacity:.7}
.tend-note{margin:8px 0 0;font-size:.65rem;opacity:.6}
.card {
  margin-bottom: 18px; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise .5s ease both;
}
.sec-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 16px; color: var(--text); }

/* hourly strip */
.hourly-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.hour-daysep {
  flex: 0 0 auto; display: flex; align-items: center; padding: 0 10px 0 14px;
  border-left: 1px dashed var(--card-border);
  color: var(--text-faint); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; scroll-snap-align: start;
}
.hour-daysep span { writing-mode: horizontal-tb; }
.hour-cell {
  flex: 0 0 auto; min-width: 74px; text-align: center;
  padding: 12px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  border: 1px solid var(--card-border);
}
.hour-cell .h { font-size: .8rem; color: var(--text-faint); font-weight: 600; }
.hour-cell svg { width: 30px; height: 30px; margin: 8px auto 6px; display: block; }
.hour-cell .t { font-weight: 700; font-size: 1.02rem; }
.hour-cell .w { font-size: .72rem; color: var(--text-faint); margin-top: 4px; }
.hour-cell .pp { font-size: .72rem; color: var(--rain-c); margin-top: 2px; }

/* charts */
.chart { position: relative; width: 100%; min-height: 140px; overflow-x: auto; }
.chart svg { display: block; min-width: 640px; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 18px; margin-top: 8px; color: var(--text-dim); font-size: .82rem; flex-wrap: wrap; }
.chart-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot-max { background: var(--hot); }
.dot-min { background: var(--accent); }
.dot-rain { background: var(--rain-c); }

/* daily grid */
.daily-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.day-cell {
  padding: 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  border: 1px solid var(--card-border);
  transition: transform .15s, border-color .15s;
}
.day-cell:hover { transform: translateY(-2px); border-color: var(--accent); }
.day-cell.today { border-color: var(--accent); background: rgba(53,208,229,.08); }
.day-cell .d { font-weight: 700; font-size: .92rem; }
.day-cell .d-date { font-size: .72rem; color: var(--text-faint); }
.day-cell svg { width: 38px; height: 38px; margin: 8px 0; }
.day-cell .tmax { font-weight: 750; font-size: 1.18rem; }
.day-cell .tmin { color: var(--text-faint); margin-left: 6px; font-size: .95rem; }
.day-cell .extra { margin-top: 8px; font-size: .74rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 3px; }
.day-cell .extra b { color: var(--text); font-weight: 600; }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--text-faint); font-size: .8rem; padding: 8px 0 30px; line-height: 1.7; }
.footer strong { color: var(--text-dim); }
.footer .disclaimer { font-size: .72rem; max-width: 640px; margin: 6px auto 0; }
.install-hint { margin-top: 8px; }

/* toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 10px 20px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow); z-index: 100; animation: rise .3s ease;
}
[data-theme="light"] .toast { background: #10233d; color: #fff; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero-now { justify-content: flex-start; }
  .topbar-inner { flex-wrap: wrap; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  main { padding: 18px 12px 30px; }
  .card { padding: 18px 14px; }
}

/* ---------- viento / skeleton / error / ads ---------- */
.wind-arrow {
  display: inline-block; font-weight: 700; color: var(--accent);
  transition: transform .5s ease;
}
.stat.skel {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}
.stat.skel .k, .stat.skel .v { color: transparent; }   /* el skeleton replica la estructura real → misma altura */
.stat.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(120,170,255,.14), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%);} to { transform: translateX(100%);} }
.hero.loading .now-temp-val { opacity: .5; }

.err-box { grid-column: 1 / -1; text-align: center; color: var(--text-dim); padding: 18px 0; line-height: 2.1; }
.err-box .chip { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .stat.skel::after { animation: none; }
  .hero, .card { animation: none; }
}

/* ---------- mapa global (full-bleed estilo Windy) ---------- */
.map-card {
  width: 100vw; margin-inline: calc(50% - 50vw);
  padding: 0; background: transparent; border: none; box-shadow: none; border-radius: 0;
}
.map-wrap {
  position: relative; height: clamp(430px, 72vh, 780px); overflow: hidden;
  background: #081120; touch-action: none; cursor: grab; user-select: none;
}
.map-wrap canvas { position: absolute; inset: 0; display: block; }
.map-title {
  position: absolute; top: 14px; left: 14px; z-index: 5; margin: 0;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border: 1px solid var(--card-border); backdrop-filter: blur(10px);
}
.map-zoom-ctrl {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; z-index: 5;
}
.map-zoom-ctrl button {
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.05rem; font-weight: 600;
  border: 1px solid var(--card-border); color: var(--text);
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: blur(10px); cursor: pointer; transition: all .15s;
}
.map-zoom-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.map-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(7,16,31,.45); z-index: 6; backdrop-filter: blur(2px);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(53,208,229,.25); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* capas: chips flotantes abajo a la izquierda */
.map-layers {
  position: absolute; left: 12px; bottom: 118px; z-index: 6;
  display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 240px);
}
.layer-chip {
  padding: 6px 12px; border-radius: 999px; font: inherit; font-size: .74rem; font-weight: 600;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(10px);
  color: var(--text-dim); cursor: pointer; transition: all .18s;
}
.layer-chip:hover { color: var(--text); border-color: var(--accent); }
.layer-chip.active {
  background: linear-gradient(120deg, #2bc3dd, #1284b8);
  border-color: transparent; color: #04222b; font-weight: 700;
  box-shadow: 0 2px 14px rgba(34,211,238,.45);
}
/* días: fila compacta sobre la timeline */
.map-days {
  position: absolute; left: 12px; right: 12px; bottom: 74px; z-index: 6;
  display: flex; gap: 5px; overflow-x: auto; padding: 2px; scrollbar-width: none;
}
.map-days::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(10px);
  color: var(--text-dim); font: inherit; font-size: .72rem; font-weight: 600;
  cursor: pointer; transition: all .16s; text-transform: capitalize;
}
.day-chip:hover { color: var(--text); border-color: var(--accent); }
.day-chip.on {
  border-color: var(--accent); color: var(--text);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: 0 0 8px rgba(34,211,238,.35);
}
.day-chip.today { color: var(--text); }
/* leyenda: compacta abajo a la derecha */
.map-legend {
  position: absolute; right: 12px; bottom: 118px; z-index: 6;
  width: min(188px, 44%); padding: 7px 10px 5px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border: 1px solid var(--card-border); backdrop-filter: blur(10px);
}
.legend-item { margin-bottom: 5px; }
.legend-item:last-child { margin-bottom: 0; }
.legend-name { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 2px; }
.legend-bar { height: 8px; border-radius: 4px; margin-bottom: 2px; }
.legend-vals { display: flex; justify-content: space-between; font-size: .66rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.map-credits { position: absolute; left: 12px; bottom: 12px; z-index: 4; font-size: .62rem; color: var(--text-faint); }

/* móvil: apilado vertical sin choques — timeline → días → capas (fila scrolleable) → leyenda */
@media (max-width: 640px) {
  .map-layers {
    left: 12px; right: 12px; bottom: 160px; max-width: none;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  .map-layers::-webkit-scrollbar { display: none; }
  .layer-chip { flex: 0 0 auto; }
  .map-legend {
    right: 12px; bottom: 208px; width: auto; max-width: 62%;
  }
  .map-days { bottom: 130px; }        /* sobre la timeline, sin encimarse */
  .map-layers { bottom: 170px; }
  .map-timeline { padding: 6px 10px; gap: 8px; }
  .map-time { min-width: 96px; font-size: .68rem; }
  .map-credits { display: none; }
  .map-title { top: 10px; left: 10px; font-size: .62rem; padding: 5px 10px; }
  .map-zoom-ctrl { right: 8px; }
  .map-zoom-ctrl button { width: 32px; height: 32px; font-size: .95rem; }
}
.map-tip {
  position: absolute; z-index: 7; pointer-events: none;
  padding: 5px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid var(--card-border); backdrop-filter: blur(8px);
  color: var(--text); font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 16px rgba(0,0,0,.35); white-space: nowrap;
}
.legend-src { font-size: .6rem; color: var(--text-faint); margin-top: 4px; letter-spacing: .04em; }
#mapDemoBadge {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  padding: 5px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  letter-spacing: .04em; color: var(--sun);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid rgba(255,209,102,.4); backdrop-filter: blur(8px);
  animation: fadeIn .6s ease;
}
/* timeline: barra de vidrio sutil al pie */
.map-timeline {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 56%, transparent);
  border: 1px solid rgba(120,170,255,.15); backdrop-filter: blur(14px);
}
.map-timeline button {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%;
  font-size: .82rem; border: none; cursor: pointer; color: #04222b;
  background: linear-gradient(135deg, #35d0e5, #1b7fd4); font-weight: 800;
  box-shadow: 0 2px 12px rgba(53,208,229,.4); transition: transform .15s;
}
.map-timeline button:hover { transform: scale(1.08); }
.map-timeline input[type="range"] {
  flex: 1; cursor: pointer; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 999px; outline: none;
  background: linear-gradient(90deg, rgba(34,211,238,.5), rgba(120,170,255,.2));
}
.map-timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: #eaf6ff; border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(34,211,238,.75); cursor: pointer;
}
.map-timeline input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #eaf6ff; border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(34,211,238,.75); cursor: pointer;
}
.map-time { flex: 0 0 auto; font-size: .74rem; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 106px; text-align: right; }


@media (max-width: 640px) {
  .map-layers { margin-left: 0; width: 100%; }
  .map-head { flex-direction: column; align-items: flex-start; }
  .map-time { min-width: 96px; font-size: .72rem; }
}

/* ---------- favoritos ---------- */
.fav-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px;
  scrollbar-width: none;
}
.fav-strip::-webkit-scrollbar { display: none; }
.fav-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--card-border); background: var(--card); color: var(--text-dim);
  cursor: pointer; transition: all .18s;
}
.fav-chip:hover { color: var(--text); border-color: var(--accent); }
.fav-chip.here { border-color: var(--accent); color: var(--text); box-shadow: 0 0 10px rgba(34,211,238,.22); }
.fav-chip .fx {
  font-size: .95rem; line-height: 1; color: var(--text-faint);
  padding: 0 1px; border-radius: 50%;
}
.fav-chip .fx:hover { color: #FF6060; }
.fav-btn {
  background: none; border: none; cursor: pointer; padding: 0 6px;
  font-size: 1.25rem; line-height: 1; color: var(--text-faint);
  transition: transform .15s, color .15s; vertical-align: middle;
}
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.on { color: var(--sun); text-shadow: 0 0 10px rgba(251,191,36,.5); }

/* ---------- banner de ciclones ---------- */
#stormBanner {
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 16px; padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(255,96,96,.14), rgba(255,193,64,.1), transparent 70%);
  border: 1px solid rgba(255,140,80,.4);
  box-shadow: 0 4px 22px rgba(255,90,60,.12);
  animation: rise .45s ease both;
}
.sb-icon { font-size: 1.7rem; animation: spinSlow 5s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.sb-body { flex: 1; min-width: 0; }
.sb-title { font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sb-cat {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; color: #1a1206;
}
.sb-sub { font-size: .78rem; color: var(--text-dim); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .sb-icon { animation: none; } }

/* ---------- splash de carga ---------- */
#splash {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 500px at 70% 20%, rgba(27,127,212,.28), transparent 60%), var(--bg);
  transition: opacity .55s ease, visibility .55s;
}
#splash.off { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-logo { width: 92px; height: 92px; filter: drop-shadow(0 6px 22px rgba(53,208,229,.4)); }
.splash-name {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--sun), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.splash-status { color: var(--text-dim); font-size: .88rem; min-height: 1.3em; text-align: center; }
.splash-bar { width: 200px; height: 4px; border-radius: 999px; background: var(--card-border); overflow: hidden; }
.splash-bar-fill {
  width: 40%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--sun));
  animation: slideBar 1.1s ease-in-out infinite;
}
@keyframes slideBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}
.splash-rays { animation: raySpin 12s linear infinite; transform-origin: 24px 19px; }
@keyframes raySpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .splash-bar-fill, .splash-rays { animation: none; }
  #splash svg animate { display: none; }
}

/* ---------- animaciones de gráficas ---------- */
.chart svg .line-in {
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: dashIn 1.15s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes dashIn { to { stroke-dashoffset: 0; } }
.chart svg .line-fade { opacity: 0; animation: fadeIn .8s ease forwards; }
.chart svg .area-fade { opacity: 0; animation: fadeIn 1.1s ease .35s forwards; }
.chart svg .dot-in { opacity: 0; animation: fadeIn .35s ease forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.chart svg .bar-grow {
  transform-box: fill-box; transform-origin: bottom;
  animation: growBar .85s cubic-bezier(.3,1.25,.45,1) backwards;
}
@keyframes growBar { from { transform: scaleY(0); } }

/* tooltip de gráficas */
.chart svg .night-band { fill: rgba(96, 118, 200, .22); }
[data-theme="light"] .chart svg .night-band { fill: rgba(20, 30, 60, .12); }
.chart svg .past-fade { fill: rgba(5, 8, 16, .28); }
[data-theme="light"] .chart svg .past-fade { fill: rgba(255, 255, 255, .45); }
.chart-tip {
  position: fixed; z-index: 220; pointer-events: none;
  background: color-mix(in srgb, var(--bg2) 94%, transparent);
  border: 1px solid var(--card-border);
  border-radius: 10px; padding: 9px 12px; min-width: 128px;
  font-size: .8rem; color: var(--text); box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.chart-tip[hidden] { display: none; }
.chart-tip .tt-title { font-weight: 700; margin-bottom: 5px; font-size: .83rem; }
.chart-tip .tr { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.chart-tip .tr i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.chart-tip .tr span { color: var(--text-dim); flex: 1; }
.chart-tip .tr b { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .chart svg .line-in, .chart svg .bar-grow { animation: none; stroke-dashoffset: 0; }
  .chart svg .line-fade, .chart svg .area-fade, .chart svg .dot-in { animation: none; opacity: 1; }
}

/* ================================================================
   LAYOUT UNA PANTALLA (Sep 18): mapa full-viewport + panel lateral
   de desplegables. Sin scroll de página: solo el panel se desplaza.
   ================================================================ */
html, body { height: 100%; overflow: hidden; }

.app { position: fixed; inset: 0; }

.topbar { position: absolute; top: 0; left: 0; right: 0; }
.topbar-inner { max-width: none; padding: 9px 14px; }
.app .noscript {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  z-index: 60; background: var(--card); border: 1px solid var(--card-border);
  border-radius: 12px; box-shadow: var(--shadow);
}

#stormBanner, .fav-strip {
  position: absolute; top: 64px; left: 12px; z-index: 35;
  right: calc(min(430px, 100%) + 24px);
}
.fav-strip { display: flex; flex-wrap: wrap; gap: 8px; }

.map-pane { position: absolute; inset: 0; }
.map-pane .map-card { position: absolute; inset: 0; width: auto; margin: 0; }
.map-pane .map-wrap { position: absolute; inset: 0; height: auto; }

/* el panel ocupa la derecha: los overlays del mapa se apartan de él */
.map-zoom-ctrl { right: auto; left: 12px; }
.map-legend { right: calc(min(430px, 100%) + 14px); }
.map-timeline { right: calc(min(430px, 100%) + 14px); }
.map-days { right: calc(min(430px, 100%) + 14px); }
.map-credits { display: none; }   /* atribución en el pie del panel */

/* ===== panel lateral ===== */
.side-panel {
  position: absolute; top: 62px; right: 0; bottom: 0;
  width: min(400px, 38vw);
  z-index: 30;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(22px);
  border-left: 1px solid var(--card-border);
  box-shadow: -16px 0 48px rgba(0, 0, 0, .42);
}
.panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 14px 28px;
  scrollbar-width: thin;
}

.panel-handle { display: none; }

.side-panel .hero {
  grid-template-columns: 1fr; gap: 12px;
  padding: 16px 16px 14px; margin: 0;
  border-radius: 16px; animation: none;
}
.side-panel .hero-city h1 { font-size: 1.42rem; }
.side-panel .hero-now { gap: 12px; }
.side-panel .now-icon svg { width: 56px; height: 56px; }
.side-panel .now-temp-val { font-size: 2.7rem; }
.side-panel .now-stats { grid-template-columns: repeat(2, 1fr); }
.side-panel .card { width: 100%; margin: 0; border-radius: 16px; }
.side-panel .sec-head .sec-title { font-size: .98rem; }
.side-panel .daily-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.side-panel .footer { padding: 16px 18px 24px; font-size: .72rem; line-height: 1.55; color: var(--text-dim); }
.side-panel .footer p { margin-bottom: 8px; }
.side-panel .footer .disclaimer { font-size: .7rem; max-width: none; color: var(--text-dim); }

/* ===== móvil: el panel es una hoja inferior con peek (ciudad + temp) ===== */
@media (max-width: 900px) {
  #stormBanner, .fav-strip { right: 12px; }

  .side-panel {
    top: auto; left: 0; bottom: 0; width: 100%;
    height: 76dvh;
    border-left: none; border-top: 1px solid var(--card-border);
    border-radius: 20px 20px 0 0;
    transform: translateY(calc(100% - 62px));
    transition: transform .32s cubic-bezier(.2, .6, .2, 1);
    padding: 32px 12px 16px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .4);
  }
  .side-panel.open { transform: translateY(0); }

  .panel-handle {
    display: flex; position: absolute; top: 0; left: 0; right: 0; height: 32px;
    align-items: center; justify-content: center; gap: 8px;
    background: transparent; border: none; color: var(--text-faint); cursor: pointer;
  }
  .panel-handle::before {
    content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 4px; border-radius: 2px; background: rgba(148, 163, 184, .4);
  }
  .panel-handle .chev { width: 18px; height: 18px; transition: transform .3s; }
  .side-panel.open .panel-handle .chev { transform: rotate(180deg); }

  .side-panel .hero { padding: 10px 14px 12px; }
  .side-panel .hero-city h1 { font-size: 1.12rem; }
  .side-panel .now-temp-val { font-size: 2.1rem; }
  .side-panel .now-icon svg { width: 44px; height: 44px; }

  .map-zoom-ctrl { left: auto; right: 8px; }
  .map-legend { right: 12px; bottom: 208px; width: auto; max-width: 62%; }
  .map-timeline { right: 12px; left: 12px; bottom: 66px; }
  .map-days { right: 12px; left: 12px; bottom: 130px; }
  .map-layers { bottom: 170px; }
}

/* ================================================================
   PASADA MÓVIL (Sep 18): topbar de UNA fila, sheet con peek limpio
   ================================================================ */
@media (max-width: 900px) {
  .topbar-inner { padding: 8px 10px; gap: 8px; flex-wrap: nowrap; }
  .brand { gap: 7px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 1rem; }
  .brand-tagline { display: none; }
  .search-wrap { flex: 1; max-width: none; margin: 0; min-width: 0; }
  #search { padding: 8px 12px 8px 36px; font-size: .88rem; height: 36px; }
  .search-icon { left: 12px; width: 15px; height: 15px; }
  .controls { gap: 5px; flex-shrink: 0; }
  .chip { min-width: 34px; height: 32px; padding: 0 8px; font-size: .78rem; }
  #stormBanner, .fav-strip { top: 58px; }

  /* sheet: peek más útil (ciudad + temp legibles) y panel compacto */
  .side-panel { transform: translateY(calc(100% - 68px)); padding: 34px 10px 14px; }
  .panel-handle { height: 34px; }
  .panel-handle::before { top: 9px; }
  .side-panel .hero { padding: 10px 12px 12px; gap: 8px; }
  .side-panel .hero-city h1 { font-size: 1.1rem; line-height: 1.25; }
  .side-panel .hero-city p { font-size: .8rem; }
  .side-panel .hero-city .updated { font-size: .68rem; }
  .side-panel .now-temp-val { font-size: 2rem; }
  .side-panel .now-icon svg { width: 40px; height: 40px; }
  .side-panel .now-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .side-panel .stat { padding: 7px 8px; }
  .side-panel .stat .v { font-size: .95rem; }
  .side-panel .card { border-radius: 14px; }
  .side-panel .sec-head { padding: 10px 12px; }
  .side-panel .sec-head .sec-title { font-size: .92rem; }
  .side-panel .footer { font-size: .64rem; }
}

/* pulido fino móvil: buscador con prioridad y timeline sin roces con el peek */
@media (max-width: 520px) {
  .brand-name { display: none; }   /* queda la marca (sol) como enlace */
  .brand { flex-shrink: 0; }
}
@media (max-width: 900px) {
  .map-timeline { bottom: 74px; }
}

/* spinner con etiqueta (no parece un mapa roto mientras cargan datos) */
.map-loading-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.map-loading-txt { font-size: .78rem; color: var(--text-dim); letter-spacing: .04em; }

/* toggle de isobaras: chip independiente en la barra de capas */
.isobar-chip { border-style: dashed; }
.isobar-chip.active { border-color: var(--accent); color: var(--text); border-style: solid; }

/* icono de clima en los chips de día (timeline) */
.day-ico { margin-right: 5px; font-size: .95em; line-height: 1; }

/* pulso radial bajo el cursor + flecha de dirección del viento en el tooltip */
@keyframes vzPulse {
  0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; }
  70% { transform: translate(-50%,-50%) scale(2.4); opacity: .55; }
  100% { transform: translate(-50%,-50%) scale(3); opacity: 0; }
}
#mapPulse { z-index: 3; }
.tip-arrow { display: inline-block; font-size: .85em; color: var(--accent); margin-right: 3px; transition: transform .3s; }

/* splash: pulso de luz mientras cargan los datos */
.map-loading-box .spinner { animation: spin 1s linear infinite, vzGlow 2.2s ease-in-out infinite; }
@keyframes vzGlow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(34,211,238,.5)); }
  50% { filter: drop-shadow(0 0 14px rgba(34,211,238,1)); }
}
.map-loading-txt { animation: vzBreathe 2.2s ease-in-out infinite; }
@keyframes vzBreathe {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ===== identidad Clima Tláloc: azteca + futurista ===== */
.brand-name {
  background: linear-gradient(100deg, var(--sun) 10%, #f2d98b 45%, var(--accent) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand-tagline { letter-spacing: .14em; text-transform: uppercase; font-size: .58rem; color: var(--text-faint); }

/* anillo pulsante del splash + pupilas de Tláloc que laten */
.splash-ring {
  width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center;
  animation: vzGlow 2.2s ease-in-out infinite;
}
.splash-ring .splash-logo { width: 100%; height: 100%; }
.splash-pupil { animation: tlalocPulse 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes tlalocPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* tarjeta Tláloc Pro */
.pro-card {
  display: flex; gap: 14px; align-items: center; padding: 14px;
  background: linear-gradient(140deg, rgba(23,191,162,.14), rgba(227,182,75,.08) 60%, rgba(15,32,28,.4));
  border: 1px solid rgba(227,182,75,.28);
}
.pro-mark { width: 52px; height: 52px; flex: 0 0 auto; }
.pro-info { flex: 1; min-width: 0; }
.pro-line { font-size: .78rem; color: var(--text-dim); margin: 2px 0 4px; }
.pro-price { font-size: 1.5rem; font-weight: 800; color: var(--sun); margin: 0 0 8px; }
.pro-price small { font-size: .7rem; font-weight: 600; color: var(--text-dim); }
.pro-btn {
  display: inline-block; padding: 7px 16px; border-radius: 999px; text-decoration: none;
  font-size: .8rem; font-weight: 700; color: #0A1412;
  background: linear-gradient(120deg, var(--sun), #f2d98b);
  box-shadow: 0 2px 14px rgba(227,182,75,.4);
}
.pro-btn:hover { filter: brightness(1.08); }

/* tooltip pineado: tarjeta vertical con rosa de vientos */
.map-tip.pinned {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px; white-space: normal; max-width: 220px;
}
.map-tip.pinned canvas { border-radius: 8px; background: rgba(10,20,18,.55); }

.layer-chip.world-disabled { opacity: .45; cursor: not-allowed; }

.layer-chip.loading { animation: vzBreathe 1.1s ease-in-out infinite; }

/* ---------- motion Tláloc (v75) ---------- */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-soft: cubic-bezier(.4, 0, .2, 1); }

.app { animation: appIn .55s var(--ease-out) both; }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }

.splash-ring {
  animation: ringPulse 2.4s var(--ease-soft) infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(23,191,162,.25)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 22px rgba(227,182,75,.4)); }
}

.results { animation: rise .22s var(--ease-out); }
.results button { transition: background .18s var(--ease-soft), transform .18s var(--ease-soft); }
.results button:hover { transform: translateX(3px); }

.layer-chip, .day-chip, .chip, .fav-chip, .map-zoom-ctrl button {
  transition: transform .2s var(--ease-out), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.layer-chip:active, .day-chip:active, .chip:active { transform: scale(.96); }
.layer-chip.active { transform: scale(1.04); }

.side-panel { transition: transform .38s var(--ease-out), box-shadow .3s; }
.side-panel .hero, .side-panel .card { animation: rise .4s var(--ease-out) both; }
.side-panel .now-temp-val { transition: opacity .35s var(--ease-soft); }

.model-badge {
  margin-top: 6px; font-size: .68rem; letter-spacing: .04em;
  color: var(--accent); font-weight: 650;
  animation: rise .45s var(--ease-out) both;
}

.map-loading { transition: opacity .35s var(--ease-soft); }
.map-tip { transition: opacity .15s var(--ease-soft), transform .15s var(--ease-soft); }

@media (prefers-reduced-motion: reduce) {
  .app, .splash-ring, .results, .side-panel .hero, .side-panel .card, .model-badge { animation: none; }
  .layer-chip, .day-chip, .chip, .side-panel { transition: none; }
}

/* ================================================================
   v77 — HUD limpio, una capa, extras, panel scrolleable
   ================================================================ */
.layer-dock {
  position: static; width: auto;
  padding: 0; border: none; background: none;
  box-shadow: none; backdrop-filter: none;
  display: flex; flex-direction: column; gap: 6px;
}
.dock-label {
  margin: 4px 2px 2px;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint);
}
.dock-base, .dock-extra { display: flex; flex-direction: column; gap: 5px; }
.layer-dock .layer-chip,
.overlay-chip {
  width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .78rem;
  transform: none !important;
}
.chip-why {
  font-size: .68rem; font-weight: 500; line-height: 1.3;
  color: var(--text-faint); letter-spacing: 0; text-transform: none;
  white-space: normal;
}
.dock-note {
  margin: 0 0 8px; font-size: .72rem; line-height: 1.35; color: var(--text-dim);
}
.overlay-chip {
  border: 1px dashed var(--card-border);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  color: var(--text-dim);
  font: inherit; font-weight: 650; cursor: pointer; text-align: left;
}
.overlay-chip.on {
  border-style: solid;
  border-color: rgba(23,191,162,.55);
  color: var(--text);
  background: rgba(23,191,162,.14);
}
.layer-chip.active { transform: none !important; box-shadow: none; }

.map-zoom-ctrl { left: 12px; top: auto; bottom: 168px; transform: none; }
.map-layers { display: none; } /* dock nuevo reemplaza la barra vieja */
.map-legend { left: 172px; right: auto; bottom: 118px; width: min(220px, 34%); }
.map-days { left: 172px; }
.map-timeline { left: 172px; }

.side-panel .daily-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.day-cell {
  display: grid;
  grid-template-columns: 68px 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.day-cell svg { width: 34px; height: 34px; margin: 0; }
.day-cell .d-col, .day-cell .d-meta { min-width: 0; }
.day-cell .extra { margin-top: 4px; font-size: .7rem; }
.hourly-strip {
  overflow-x: auto !important;
  touch-action: pan-x;
  padding-bottom: 10px;
}
.chart { overflow-x: auto !important; touch-action: pan-x; }

.handle-bar {
  display: none;
  width: 44px; height: 4px; border-radius: 99px;
  background: rgba(180, 200, 190, .45);
}

@media (max-width: 900px) {
  .layer-dock { flex-direction: column; width: 100%; }
  .dock-base, .dock-extra { flex-direction: row; flex-wrap: wrap; }
  .layer-dock .layer-chip, .overlay-chip {
    width: auto; flex: 0 0 auto; padding: 7px 11px; border-radius: 999px;
  }
  .map-zoom-ctrl { left: auto; right: 8px; bottom: auto; top: 72px; }
  .map-legend { left: 10px; right: auto; bottom: 214px; max-width: 52%; }
  .map-days { left: 10px; right: 10px; bottom: 108px; }
  .map-timeline { left: 10px; right: 10px; bottom: 78px; }

  .side-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    height: min(88dvh, 820px);
    max-height: 88dvh;
    padding: 0;
    overflow: hidden;
    border-left: none;
    border-top: 1px solid var(--card-border);
    border-radius: 22px 22px 0 0;
    transform: translateY(calc(100% - 92px));
    transition: transform .36s var(--ease-out);
    box-shadow: 0 -18px 50px rgba(0,0,0,.45);
  }
  .side-panel.open { transform: translateY(0); }
  .panel-handle {
    display: flex; position: relative; flex: 0 0 40px;
    align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-faint); cursor: pointer;
  }
  .panel-handle::before { display: none; }
  .handle-bar { display: block; }
  .panel-scroll { padding: 0 12px 28px; }
  .side-panel .now-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 901px) {
  .panel-handle { display: none; }
  .map-credits { display: none; }
}

.panel-scroll .hero,
.panel-scroll .card { flex: 0 0 auto; }

/* v78 HUD: fabs + hojas, alerta cerrable, tracker */
.hud-fabs {
  position: absolute; left: 12px; top: 78px; z-index: 12;
  display: flex; flex-direction: column; gap: 8px;
}
.hud-fab {
  min-width: 108px; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--text); font: inherit; font-size: .8rem; font-weight: 700;
  backdrop-filter: blur(14px); cursor: pointer; text-align: left;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}
.hud-fab[aria-expanded="true"] {
  border-color: var(--accent); color: var(--accent);
}
.hud-sheet {
  position: absolute; left: 12px; top: 210px; z-index: 13;
  width: min(300px, calc(100% - 24px));
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sheet-x {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.06); color: var(--text); font-size: 1.2rem; cursor: pointer;
}
.storm-chip {
  position: absolute; top: 66px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid rgba(255, 160, 80, .45);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  max-width: min(420px, calc(100% - 24px));
}
.storm-chip button {
  border: none; background: none; color: var(--text); font: inherit; cursor: pointer;
}
.storm-chip .chip-go { font-weight: 700; font-size: .82rem; text-align: left; }
.storm-chip .chip-x {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.08); font-size: 1rem;
}
.storm-list { display: flex; flex-direction: column; gap: 8px; }
.storm-card {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--card-border); background: color-mix(in srgb, var(--bg) 45%, transparent);
  color: var(--text); font: inherit; cursor: pointer;
}
.storm-card.on { border-color: var(--accent); }
.storm-card .sc-name { font-weight: 750; }
.storm-card .sc-meta { font-size: .75rem; color: var(--text-dim); margin-top: 3px; }
.storm-empty { color: var(--text-faint); font-size: .82rem; padding: 8px 2px; }
.storm-note {
  margin: 0 0 8px; padding: 0 2px;
  font-size: .72rem; line-height: 1.35; color: var(--text-faint);
}
.cat-legend {
  margin: 0 0 10px; padding: 8px 10px;
  font-size: .7rem; line-height: 1.4; color: var(--text-dim);
  border-radius: 10px; background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--card-border);
}
.sc-code {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  border-radius: 999px; font-size: .68rem; font-weight: 700;
  color: var(--accent); border: 1px solid var(--card-border);
}
.storm-follow {
  margin-top: 8px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--card-border); background: none; color: var(--accent);
  font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer;
}

.map-zoom-ctrl { left: 12px; top: auto; bottom: 118px; transform: none; }
.map-legend { left: 12px; right: auto; bottom: 118px; }
.map-days { left: 12px; }
.map-timeline { left: 12px; }
.map-title { display: none; }

@media (max-width: 900px) {
  .hud-fabs { top: auto; bottom: 148px; left: 10px; flex-direction: row; flex-wrap: wrap; max-width: 72%; }
  .hud-fab { min-width: 0; padding: 8px 11px; font-size: .74rem; }
  .hud-sheet {
    left: 10px; right: 10px; top: auto; bottom: 196px; width: auto;
    max-height: 46vh;
  }
  .storm-chip { top: 58px; left: 10px; right: 10px; transform: none; max-width: none; }
  #hudForecastBtn { display: inline-flex; }
  .map-days {
    display: flex;
    left: 10px; right: 10px; bottom: 118px;
  }
  .day-chip { padding: 4px 9px; font-size: .66rem; }
  .map-legend { bottom: 214px; }
}
@media (min-width: 901px) {
  #hudForecastBtn { display: none; }
}

#stormBanner { display: none !important; }

/* ================================================================
   v81 — panel de pronóstico: pestañas, días desplegables, hero corto
   ================================================================ */
.side-panel {
  width: min(420px, 40vw);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.side-panel .hero {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px 12px; margin: 0;
}
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.hero-city {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: start;
}
.hero-city h1 { grid-column: 1; }
.hero-city .fav-btn { grid-column: 2; grid-row: 1; }
.hero-city p { grid-column: 1 / -1; }
.side-panel .hero-city h1 { font-size: 1.28rem; line-height: 1.2; }
.side-panel .hero-city p { font-size: .78rem; }
.side-panel .hero-now { gap: 8px; }
.side-panel .now-icon svg { width: 42px; height: 42px; }
.side-panel .now-temp-val { font-size: 2.15rem; }
.side-panel .now-cond { font-size: .78rem; margin-top: 2px; }
.side-panel .updated { font-size: .68rem; color: var(--text-faint); }
.side-panel .now-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.side-panel .stat { padding: 7px 8px; min-height: 0; border-radius: 10px; }
.side-panel .stat .k { font-size: .58rem; }
.side-panel .stat .v { font-size: .84rem; margin-top: 1px; }

.panel-tabs {
  display: flex; gap: 6px;
  position: sticky; top: 0; z-index: 4;
  padding: 2px 0 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.ptab {
  flex: 1; min-height: 36px; padding: 7px 8px;
  border-radius: 10px; border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
  color: var(--text-dim); font: inherit; font-size: .78rem; font-weight: 700;
  cursor: pointer;
}
.ptab.on {
  background: rgba(23, 191, 162, .18);
  border-color: rgba(23, 191, 162, .5);
  color: var(--text);
}
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.tab-hint {
  font-size: .7rem; color: var(--text-faint); margin: 0 2px 8px;
}

.daily-list { display: flex; flex-direction: column; gap: 6px; }
.day-row {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  border-radius: 14px; color: inherit; font: inherit;
  padding: 0;
}
.day-row:hover { border-color: rgba(23, 191, 162, .45); }
.day-row.today { border-color: rgba(23, 191, 162, .55); background: rgba(23, 191, 162, .08); }
.day-row.open { border-color: var(--accent); }
.day-main {
  display: grid;
  grid-template-columns: 64px 36px minmax(0, 1fr) 18px;
  align-items: center; gap: 8px;
  padding: 9px 11px;
}
.day-row .d { font-weight: 750; font-size: .88rem; }
.day-row .d-date { font-size: .68rem; color: var(--text-faint); }
.day-row svg { width: 32px; height: 32px; display: block; }
.day-temps { display: flex; align-items: baseline; gap: 6px; }
.day-row .tmax { font-weight: 750; font-size: 1.05rem; }
.day-row .tmin { color: var(--text-faint); font-size: .88rem; }
.day-pop { font-size: .7rem; color: var(--rain-c); margin-top: 2px; }
.day-chev {
  width: 14px; height: 14px; color: var(--text-faint);
  transition: transform .22s ease;
}
.day-row.open .day-chev { transform: rotate(180deg); }
.day-detail {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.day-row.open .day-detail { grid-template-rows: 1fr; }
.day-detail-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  padding: 0 11px;
}
.day-row.open .day-detail-inner { padding-bottom: 10px; }
.day-detail-inner span {
  font-size: .72rem; color: var(--text-dim);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border-radius: 8px; padding: 6px 8px;
}
.day-detail-inner b { color: var(--text); }

.hourly-strip {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 12px; touch-action: pan-x;
  scroll-snap-type: x mandatory;
}
.hour-cell {
  min-width: 72px; scroll-snap-align: start;
}
.chart { overflow: hidden !important; }
.chart svg { min-width: 0 !important; width: 100%; height: auto; max-height: 200px; }
.chart-block { margin-bottom: 14px; }
.chart-title { font-size: .82rem; font-weight: 750; margin: 0 0 8px; }

.pro-card { display: flex; gap: 12px; align-items: center; padding: 12px; }
.pro-card .pro-mark { width: 44px; height: 44px; flex: 0 0 auto; }
.pro-card .sec-title { margin-bottom: 2px; font-size: .92rem; }
.pro-line { font-size: .72rem; color: var(--text-dim); }
.pro-price { font-size: .95rem; margin: 4px 0; }

.peek-now {
  display: none;
  font-size: .82rem; font-weight: 700; color: var(--text);
}

.help-btn {
  width: 100%; margin: 0 0 8px; padding: 7px 10px;
  border-radius: 10px; border: 1px dashed var(--card-border);
  background: transparent; color: var(--accent);
  font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; text-align: left;
}
.help-btn[aria-expanded="true"] { border-style: solid; background: rgba(23,191,162,.1); }
.peek-bar { display: contents; }
.peek-help { display: none; }
.help-card {
  margin: 0 0 10px; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  font-size: .74rem; line-height: 1.45; color: var(--text-dim);
}
.help-card p { margin: 0 0 8px; }
.help-card p:last-child { margin-bottom: 0; }
.help-card strong { color: var(--text); }
.wx-ico { display: inline-flex; cursor: help; }
.stat, .day-pop, .pp { cursor: help; }
.ui-tip {
  position: fixed; z-index: 240; max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg2) 94%, transparent);
  border: 1px solid var(--card-border);
  color: var(--text); font-size: .75rem; line-height: 1.35;
  box-shadow: var(--shadow); pointer-events: none;
  display: flex; align-items: flex-start; gap: 8px;
}
.ui-tip[hidden] { display: none !important; }
.ui-tip-txt { margin: 0; flex: 1; }
.ui-tip-x {
  display: none; flex: 0 0 auto;
  width: 28px; height: 28px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.08); color: var(--text);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}

/* ================================================================
   v94 — móvil: hamburguesa | búsqueda | logo. Sin fabs sobre el mapa.
   ================================================================ */
@media (max-width: 900px) {
  :root {
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --topbar-h: 52px;
    --peek-h: 56px;
    --ad-h: 0px;
    --tl-h: 44px;
    --days-h: 38px;
    --chrome-gap: 6px;
    --tl-bottom: calc(var(--peek-h) + var(--ad-h) + var(--safe-b) + var(--chrome-gap));
    --days-bottom: calc(var(--tl-bottom) + var(--tl-h) + 4px);
    --dock-top: calc(var(--days-bottom) + var(--days-h) + 8px);
  }
  .app.ads-on { --ad-h: 62px; }

  .topbar {
    padding-top: var(--safe-t);
    z-index: 50;
  }
  .topbar-inner {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 46px 44px;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
  }
  .menu-btn {
    display: grid !important;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    color: var(--text);
    cursor: pointer;
  }
  .menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 2px auto;
    border-radius: 2px;
    background: currentColor;
  }
  .brand {
    grid-column: 4;
    justify-self: end;
    gap: 0;
  }
  .brand-name, .brand-tagline { display: none !important; }
  .brand-mark { width: 40px; height: 40px; }
  .controls {
    display: flex !important;
    grid-column: 3;
    grid-row: 1;
    gap: 0;
    margin: 0;
    justify-self: end;
  }
  .controls #lang,
  .controls #theme { display: none !important; }
  .controls #unit {
    display: grid !important;
    place-items: center;
    min-width: 44px;
    height: 40px;
    padding: 0 6px;
    font-size: .8rem;
    font-weight: 800;
  }
  .search-wrap {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    margin: 0;
  }
  #search { height: 40px; font-size: 16px; padding: 8px 12px 8px 36px; }

  .menu-backdrop {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0, 0, 0, .45);
  }
  .app.menu-open .menu-backdrop { display: block !important; }
  .app-menu {
    display: none !important;
    flex-direction: column;
    gap: 8px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    z-index: 80;
    padding: calc(var(--safe-t) + 12px) 14px calc(18px + var(--safe-b));
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(22px);
    overflow-y: auto;
  }
  .app.menu-open .app-menu { display: flex !important; }
  .menu-storm {
    border-color: rgba(255, 209, 102, .45);
    color: var(--sun);
  }
  .app-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
  }
  .menu-prefs { display: flex; gap: 8px; margin-bottom: 6px; }
  .menu-item {
    width: 100%;
    text-align: left;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: color-mix(in srgb, var(--bg) 50%, transparent);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
  }
  .menu-pro { color: var(--sun); }

  .fav-strip { display: none !important; }
  .hud-fabs, #hudForecastBtn, .storm-chip { display: none !important; }
  .map-credits, .map-legend { display: none !important; }
  #gridStaleBadge {
    top: calc(var(--safe-t) + var(--topbar-h) + 8px + 7.5rem) !important;
    bottom: auto !important;
    left: 10px !important;
    right: 10px !important;
    max-width: none !important;
    z-index: 11 !important;
    font-size: .62rem !important;
    transform: none !important;   /* R6b: sin translateX(-50%) — el pastillón se salía de pantalla */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .map-zoom-ctrl {
    top: auto !important;
    right: 8px !important;
    left: auto !important;
    bottom: var(--dock-top) !important;
    transform: none !important;
    z-index: 9;
  }
  .map-zoom-ctrl button { width: 36px; height: 36px; }

  .storm-chip {
    top: calc(var(--safe-t) + var(--topbar-h) + 6px) !important;
    left: 10px !important;
    right: 10px !important;
    transform: none !important;
    max-width: none !important;
    padding: 5px 6px 5px 10px;
    z-index: 12;
  }
  .storm-chip .chip-go {
    font-size: .74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hud-sheet {
    top: auto !important;
    bottom: var(--dock-top) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: min(46dvh, calc(100dvh - var(--safe-t) - var(--topbar-h) - var(--dock-top) - 16px)) !important;
    z-index: 16;
  }

  .dock-note { display: none; }
  .dock-base {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .dock-extra {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
  }
  .layer-dock .layer-chip,
  .overlay-chip {
    width: auto !important;
    min-height: 52px;
    padding: 8px 10px !important;
    border-radius: 12px !important;
  }
  .chip-why {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .62rem;
    line-height: 1.25;
  }

  .map-days {
    left: 10px !important;
    right: 54px !important;
    bottom: var(--days-bottom) !important;
    height: var(--days-h);
    align-items: center;
    z-index: 8;
  }
  .day-chip {
    padding: 7px 12px;
    font-size: .72rem;
    min-height: 34px;
  }
  .map-timeline {
    left: 10px !important;
    right: 10px !important;
    bottom: var(--tl-bottom) !important;
    height: var(--tl-h);
    padding: 6px 10px;
    gap: 8px;
    z-index: 8;
  }
  .map-timeline button { width: 32px; height: 32px; }
  .map-time { min-width: 72px; font-size: .66rem; }

  .side-panel {
    width: 100% !important;
    height: min(88dvh, 780px) !important;
    max-height: 88dvh !important;
    padding: 0 !important;
    padding-bottom: var(--safe-b) !important;
    transform: translateY(calc(100% - var(--peek-h) - var(--ad-h) - var(--safe-b))) !important;
    border-radius: 20px 20px 0 0;
    z-index: 30;
  }
  .side-panel.open { transform: translateY(0) !important; }
  .panel-handle {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    min-height: 0 !important;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 4px;
    flex: 1;
  }
  .peek-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: var(--peek-h);
    padding: 4px 10px 8px;
  }
  .peek-now {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    font-size: .88rem;
    font-weight: 650;
  }
  .peek-now b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
  }
  .peek-now span {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 800;
  }
  .side-panel.open .peek-now { display: none; }
  .peek-help {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: rgba(23, 191, 162, .18);
    color: var(--text);
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    flex: 0 0 auto;
  }
  .side-panel.open .peek-help { display: none; }
  #adBanner.ad-on { margin: 0 10px 8px; }
  .side-panel .now-stats { grid-template-columns: repeat(2, 1fr); }
  .help-btn {
    min-height: 44px;
    padding: 11px 12px;
    font-size: .86rem;
    border-style: solid;
    background: rgba(23, 191, 162, .16);
  }
  .help-card { font-size: .82rem; line-height: 1.5; padding: 12px 14px; }
  .ui-tip {
    max-width: calc(100vw - 20px);
    font-size: .86rem;
    padding: 12px 10px 12px 14px;
    pointer-events: auto;
  }
  .ui-tip-x { display: grid; place-items: center; }

  .app.forecast-open .hud-sheet,
  .app.forecast-open .map-days,
  .app.forecast-open .map-timeline,
  .app.forecast-open .map-zoom-ctrl,
  .app.forecast-open .storm-chip {
    display: none !important;
  }

  .stat .k::after, .day-pop::after {
    content: ' ?';
    color: var(--accent); font-weight: 800; font-size: .72em;
  }
  .wx-ico { position: relative; }
  .wx-ico::after {
    content: '?';
    position: absolute; right: -5px; top: -6px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(23, 191, 162, .9); color: #04221c;
    font-size: 9px; font-weight: 800; line-height: 14px; text-align: center;
  }
}
.sat-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 22, 20, .72);
  border: 1px solid rgba(127, 224, 198, .28);
  color: #D7F4EC;
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
  max-width: 52vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sat-badge[hidden] { display: none !important; }
.auth-who { margin: 4px 12px 8px; font-size: .72rem; color: var(--text-faint); word-break: break-all; }
.auth-modal { position: fixed; inset: 0; z-index: 240; display: grid; place-items: center; background: rgba(4, 12, 10, .62); }
.auth-modal[hidden] { display: none !important; }
.auth-card { width: min(360px, 92vw); padding: 16px 16px 14px; border-radius: 14px; background: #10241f; border: 1px solid rgba(127, 224, 198, .22); }
.auth-card strong { display: block; margin: 0 28px 8px 0; }
.auth-note { font-size: .72rem; line-height: 1.35; color: var(--text-faint); margin: 0 0 12px; }
.auth-card label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; margin-bottom: 8px; }
.auth-card input { padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: #0b1a16; color: inherit; }
.auth-msg { min-height: 1.2em; font-size: .72rem; color: #f0c27a; }
.auth-go { width: 100%; margin-top: 4px; padding: 9px; border-radius: 9px; border: 0; background: #17bfa2; color: #04221c; font-weight: 700; }
.auth-switch { display: flex; gap: 8px; margin-top: 10px; }
.auth-switch button { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,.14); color: inherit; border-radius: 8px; padding: 6px; font-size: .75rem; }
@media (max-width: 640px) {
  .sat-badge { max-width: 42vw; font-size: .58rem; padding: 2px 7px; }
}

/* P4-LAYOUT — no insertar a mitad de otros bloques */
.overlay-chip[data-overlay="sat"] { display: none !important; }
.sat-badge { display: none !important; }
#mapSat.on {
  border-color: rgba(23, 191, 162, .7);
  color: #17bfa2;
  box-shadow: 0 0 0 2px rgba(23, 191, 162, .22);
}
.sat-chip {
  position: absolute;
  left: 46px;
  top: 4px;
  z-index: 9;
  font: 600 10px/1 var(--font, system-ui);
  letter-spacing: .04em;
  padding: 3px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid rgba(127, 224, 198, .35);
  color: var(--text);
  pointer-events: none;
}
.sat-chip[data-kind='foto'] { border-color: rgba(250, 204, 21, .55); }
.sat-chip[hidden] { display: none !important; }
.sat-card {
  position: absolute;
  z-index: 8;
  width: min(260px, 70vw);
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid rgba(127, 224, 198, .28);
  backdrop-filter: blur(10px);
  color: var(--text);
  pointer-events: none;
}
.sat-card[hidden] { display: none !important; }
.sat-card strong { display: block; font-size: .78rem; margin-bottom: 4px; }
.sat-card p { margin: 0; font-size: .68rem; line-height: 1.35; color: var(--text-faint, #b7cfc6); }
.sat-card p + p { margin-top: 4px; }
.map-zoom-ctrl {
  left: auto !important;
  right: 12px;
  top: auto !important;
  bottom: 168px;
  transform: none !important;
  z-index: 8;
}
.map-legend {
  left: 12px;
  right: auto !important;
  bottom: 118px;
  z-index: 6;
}
.storm-chip { max-width: min(440px, 56vw); }
@media (min-width: 901px) {
  .map-zoom-ctrl {
    right: calc(min(400px, 38vw) + 16px);
    bottom: 168px;
  }
  .sat-card {
    right: calc(min(400px, 38vw) + 62px);
    bottom: 168px;
    left: auto;
  }
  .map-legend {
    left: 12px;
    right: auto !important;
    bottom: 118px;
    width: min(220px, 30%);
  }
  .storm-chip {
    left: calc((100% - min(400px, 38vw)) / 2);
    top: 72px;
  }
}
@media (max-width: 900px) {
  .map-zoom-ctrl {
    right: 8px;
    left: auto !important;
    top: 72px !important;
    bottom: auto !important;
  }
  .sat-card {
    left: 10px;
    right: 54px;
    top: 72px;
    bottom: auto;
    width: auto;
  }
  .map-legend { left: 12px; right: auto !important; }
}

/* P7 — outlook NHC */
.outlook-sec { margin-top: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.outlook-item { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.out-chip {
  flex: 0 0 auto; min-width: 44px; text-align: center;
  font-size: .78rem; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); color: #E7EDEA;
}
.out-chip.out-lo { border-color: rgba(227,182,75,.5); color: #E3B64B; }
.out-chip.out-med { border-color: rgba(217,142,74,.55); color: #D98E4A; }
.out-chip.out-hi { border-color: rgba(230,90,70,.55); color: #E65A46; }
.out-body { min-width: 0; }
.out-zone { display: block; font-size: .82rem; color: var(--text); }
.out-rows { display: flex; gap: 12px; margin-top: 2px; font-size: .7rem; color: var(--text-dim); }
.out-rows b { color: var(--text); }
.out-lang { margin: 6px 0 0; font-size: .62rem; letter-spacing: .02em; color: var(--text-faint); text-transform: uppercase; }
.out-sum { margin: 4px 0 0; font-size: .68rem; line-height: 1.4; color: var(--text-faint); }

/* P40 — centrado mapa + contenido, sobre todo móvil */
@media (max-width: 900px) {
  :root { --peek-h: 68px; }

  .topbar-inner {
    display: grid !important;
    grid-template-columns: 90px minmax(0, 1fr) 90px !important;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
  }
  .menu-btn { grid-column: 1 !important; justify-self: start !important; }
  .search-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-self: stretch !important;
  }
  .controls {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    margin: 0 !important;
  }
  .brand {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  .map-days {
    left: 10px !important;
    right: 10px !important;
  }
  .map-timeline {
    left: 10px !important;
    right: 10px !important;
  }
  #stormBanner, .fav-strip {
    left: 10px !important;
    right: 10px !important;
  }
  .map-legend {
    left: 10px !important;
    right: auto !important;
  }
  .map-zoom-ctrl {
    right: 8px !important;
    left: auto !important;
    top: 72px !important;
    bottom: auto !important;
  }

  .side-panel {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
  .peek-bar { justify-content: center; }
  .peek-now { justify-content: center !important; }
  .panel-handle { align-items: center !important; }

  .side-panel .panel-scroll {
    padding-left: 12px;
    padding-right: 12px;
  }
  .side-panel .hero,
  .side-panel .card,
  .side-panel .daily-list,
  .side-panel .hero-city,
  .side-panel .hero-top {
    width: 100%;
    max-width: 100%;
  }
  .side-panel .hero-city { text-align: center; }
  .side-panel .now-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-items: stretch;
  }
}

@media (min-width: 901px) {
  .map-days,
  .map-timeline {
    left: 12px !important;
    right: calc(min(400px, 38vw) + 14px) !important;
  }
}

/* P24 — crédito del basemap satelital */
.sat-credit {
  position: absolute; right: 8px; bottom: 8px; z-index: 26;
  font-size: .62rem; color: rgba(231,237,234,.75);
  background: rgba(10,20,18,.62); padding: 3px 8px; border-radius: 8px;
  pointer-events: none; backdrop-filter: blur(2px);
}
.sat-credit[hidden] { display: none; }

/* P25 — modo embed (widget King Yacht): mapa limpio, sin panel ni menús */
body.embed .side-panel,
body.embed .menu-btn,
body.embed .hud-fabs,
body.embed #favBtn,
body.embed #shareBtn,
body.embed #authModal { display: none !important; }
.embed-chip {
  position: absolute; left: 10px; bottom: 10px; z-index: 28;
  background: rgba(10,20,18,.74); border: 1px solid rgba(255,255,255,.10);
  color: #E7EDEA; font-size: .78rem; font-weight: 700; padding: 6px 12px;
  border-radius: 999px; pointer-events: none; backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* P25b — widget embed aún más limpio: sin búsqueda */
body.embed .search-wrap { display: none !important; }

/* P0 — aviso de grilla vieja */
.stale-badge {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 27;
  background: rgba(30, 26, 8, .82); border: 1px solid rgba(227, 182, 75, .4);
  color: #F3D9A0; font-size: .72rem; padding: 4px 12px; border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
.cycle-badge {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 27;
  background: rgba(8, 22, 20, .82); border: 1px solid rgba(127, 224, 198, .35);
  color: #D7F4EC; font-size: .72rem; padding: 4px 12px; border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
@media (max-width: 900px) {
  .cycle-badge, .stale-badge {
    bottom: auto;
    top: 13.75rem;
  }
}
