/* Glassy Hour
   Concepto: tabla de mareas y pizarrón de campeonato sobre la isla volcánica.
   Lo memorable son las alturas de ola en Barlow Condensed grande; todo lo demás, sobrio. */

:root {
  --st-green: #4daa78;     /* verde mar de la paleta de estados (PALETTE en data.js) */
  --atlantico: #0e2a47;
  --atlantico-2: #17406a;
  --espuma: #f3f7f9;
  --basalto: #2b3138;
  --gris: #66727f;
  --linea: #dfe6ec;
  --agua: #1c8c9e;
  --agua-claro: #e3f3f5;
  --teide: #e9b949;
  --blanco: #ffffff;
  --surface: #ffffff;       /* tarjetas y paneles */
  --ink: #0e2a47;           /* titulares y cifras */
  --on-dark: #ffffff;       /* texto sobre fondos oscuros */
  --ink-mix: #0b1620;       /* para oscurecer colores de estado */
  --skeleton-a: #e8eef3;
  --skeleton-b: #f4f7f9;
  color-scheme: light;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;

  --top: 64px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --float: 0 24px 60px -20px rgba(14, 42, 71, .45), 0 2px 6px rgba(14, 42, 71, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }  /* nada puede ensanchar la página: en el móvil no se puede alejar el zoom por debajo del ancho de pantalla */
body {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--basalto);
  background: var(--espuma);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--gris); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Cabecera ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--top);
  display: flex; align-items: center; gap: 32px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--linea);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--gris); transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--agua-claro); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--espuma); border: 1px solid var(--linea); }
.lang button { padding: 4px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--gris); }
.lang button.active { background: var(--atlantico); color: var(--on-dark); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--ink); }
.icon-btn .ico { width: 22px; height: 22px; }
.menu-btn { display: none; }

/* ── Botones y píldoras ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  background: var(--atlantico); color: var(--on-dark);
  transition: background .15s;
}
.btn:hover { background: var(--atlantico-2); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn-ghost:hover { background: var(--surface); }
.btn-quiet { padding: 7px 14px; font-size: .88rem; background: var(--espuma); color: var(--ink); box-shadow: inset 0 0 0 1px var(--linea); }
.btn-quiet:hover { background: var(--agua-claro); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; line-height: 1.4;
  color: color-mix(in srgb, var(--c) 45%, var(--ink-mix));
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill-lg { font-size: .95rem; padding: 5px 14px; }

.skeleton { background: linear-gradient(90deg, var(--skeleton-a) 0%, var(--skeleton-b) 50%, var(--skeleton-a) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Portada ──────────────────────────────────────────────────────────────── */
.view-map { position: relative; height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); }
.map-wrap { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #07182b; }
.leaflet-container { font-family: var(--text); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .7) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--float) !important; border-radius: var(--r-sm) !important; overflow: hidden; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: var(--ink) !important; }

.panel {
  position: absolute; z-index: 500; top: 20px; left: 20px; bottom: 20px;
  width: 420px; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--float);
  overflow-y: auto; overscroll-behavior: contain;
  animation: panel-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes panel-in { from { opacity: 0; transform: translateX(-16px); } }
.hero { padding: 30px 30px 20px; }
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 12px;
}
.hero p { color: var(--gris); font-size: 1rem; max-width: 34ch; }

.best {
  display: flex; flex-direction: column; gap: 10px;
  margin: 0 20px; padding: 18px 20px; min-height: 132px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--atlantico); color: var(--on-dark);
  position: relative; overflow: hidden;
}
.best::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 160px; pointer-events: none;
  background: repeating-radial-gradient(circle at 100% 100%, transparent 0 14px, rgba(255, 255, 255, .06) 14px 16px);
}
.best-label { font-weight: 600; font-size: .9rem; color: var(--teide); }
.best-row { display: flex; align-items: center; gap: 16px; }
.best-num { font-family: var(--display); font-weight: 700; font-size: 4rem; line-height: .85; letter-spacing: -.02em; }
.best-num small { font-size: 1.4rem; font-weight: 600; margin-left: 2px; color: #a9c1d6; }
.best-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.best-name { font-family: var(--display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.best-meta { font-size: .88rem; color: #a9c1d6; }
.best .pill { align-self: flex-start; }
.level-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 30px 0; }
.lf-title { font-size: .84rem; font-weight: 600; color: var(--basalto); margin-right: 4px; }
.lf-btn { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--espuma); color: var(--basalto); font: 500 .86rem var(--text); cursor: pointer; }
.lf-btn[aria-pressed="true"] { background: var(--atlantico); color: var(--on-dark); }
.lf-btn:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
@media (max-width: 860px) { .level-filter { margin: 14px 14px 0; } }
.trust-strip { margin: 10px 30px 0; font-size: .8rem; color: var(--gris); line-height: 1.5; }
.trust-strip a { font-weight: 600; color: color-mix(in srgb, var(--agua) 72%, var(--ink-mix)); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .trust-strip { margin: 10px 14px 0; } }

/* Por qué fiarte (Acerca de) */
.trust { background: var(--atlantico); color: var(--on-dark); border-radius: var(--r-lg); padding: 36px 36px 30px; }
.trust h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.trust-lead { margin-top: 12px; max-width: 62ch; font-size: 1.08rem; color: #c9d9e8; }
.trust-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.trust-num { padding: 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 6px; }
.trust-num b { font-family: var(--display); font-weight: 700; font-size: 2.3rem; line-height: 1; color: var(--teide); }
.trust-num span { font-size: .9rem; color: #c9d9e8; }
.trust-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin-top: 28px; }
.trust-list li { display: flex; gap: 14px; }
.trust-ico { flex-shrink: 0; width: 26px; height: 26px; color: var(--teide); margin-top: 2px; }
.trust-list h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.trust-list p { margin-top: 4px; font-size: .95rem; color: #c9d9e8; }
@media (max-width: 860px) {
  .trust { padding: 26px 18px 22px; border-radius: var(--r-md); }
  .trust-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .trust-num { padding: 14px; }
  .trust-num b { font-size: 1.8rem; }
  .trust-list { grid-template-columns: 1fr; gap: 16px; }
}

.plan-link {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 30px 0; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--agua-claro); color: color-mix(in srgb, var(--agua) 70%, var(--ink-mix)); font-weight: 600; font-size: .95rem;
}
.plan-link:hover { background: color-mix(in srgb, var(--agua) 20%, var(--surface)); }
.plan-link:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
@media (max-width: 860px) { .plan-link { margin: 10px 14px 0; } }
.best-cta { font-weight: 600; font-size: .92rem; color: var(--on-dark); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; }
.best:hover .best-cta { text-decoration-color: var(--teide); }

.list-title { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); padding: 26px 30px 6px; }
.coast-title { font-size: .82rem; font-weight: 600; color: var(--gris); padding: 12px 18px 4px; }
.spot-list { display: flex; flex-direction: column; padding: 0 12px; }
.spot-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: var(--r-md);
  transition: background .15s;
}
.spot-row:hover { background: var(--espuma); }
.sr-badge {
  width: 58px; height: 52px; flex-shrink: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 14px;
  border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, var(--surface));
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1;
  color: color-mix(in srgb, var(--c) 70%, #0b1620);
}
.sr-badge small { font-size: .9rem; margin-left: 1px; }
.sr-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sr-main b { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.sr-main small { font-size: .86rem; color: var(--gris); }
.sr-chev { color: #b8c4ce; width: 18px; height: 18px; }
.panel-foot { margin-top: auto; padding: 18px 30px 22px; font-size: .82rem; color: var(--gris); }

.map-legend {
  position: absolute; z-index: 500; right: 20px; top: 20px;
  display: flex; gap: 12px; padding: 8px 14px; border-radius: 999px;
  background: rgba(14, 42, 71, .82); backdrop-filter: blur(8px); color: #dbe7f0; font-size: .8rem;
}
.map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* Marcadores */
.spot-marker { background: none; border: 0; }
.sm {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  cursor: pointer; transition: transform .15s;
}
.sm-val {
  min-width: 40px; height: 32px; padding: 0 8px; display: grid; grid-auto-flow: column; align-items: baseline; justify-content: center; align-content: center;
  border-radius: 999px; background: var(--c); color: var(--t, var(--on-dark));
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;  /* texto grande (≥ 18,7 px en negrita): contraste mínimo 3 */ line-height: 1;
}
.sm-val small { font-size: .75rem; margin-left: 1px; }
.sm-name { font-weight: 600; font-size: .9rem; color: var(--ink); }
/* Mejor spot del momento: insignia pequeña con estrella en la esquina del marcador */
.sm { position: relative; }
.sm-star {
  position: absolute; top: -7px; left: -6px; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: var(--teide); color: #0e2a47; box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(0, 0, 0, .35);
}
.sm-star .ico { width: 12px; height: 12px; fill: currentColor; stroke-width: 1.5; }
.spot-marker:hover .sm, .spot-marker.hover .sm { transform: scale(1.08); }
.compact .sm { padding: 3px; }
.compact .sm-name { display: none; }
.compact .spot-marker:hover .sm, .compact .spot-marker.hover .sm { padding-right: 12px; }
.compact .spot-marker:hover .sm-name, .compact .spot-marker.hover .sm-name { display: inline; }
.compact .spot-marker:hover, .compact .spot-marker.hover { z-index: 1000 !important; }

/* ── Spot ─────────────────────────────────────────────────────────────────── */
.spot-hero { position: relative; z-index: 0; isolation: isolate; overflow: hidden; background: var(--atlantico); }
.spot-hero-map { position: absolute; inset: 0; }
.spot-hero-shade { position: absolute; inset: 0; z-index: 400; background: linear-gradient(90deg, rgba(14, 42, 71, .92) 0%, rgba(14, 42, 71, .55) 45%, rgba(14, 42, 71, .1) 100%); }
.spot-hero-content {
  /* La cabecera crece con el contenido (nombres en dos líneas): nada queda bajo la franja de datos */
  position: relative; z-index: 401; min-height: 300px;
  max-width: 1240px; margin: 0 auto; padding: 22px 28px 46px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; color: var(--on-dark);
}
.spot-actions { grid-column: 1 / -1; align-self: start; display: flex; gap: 8px; flex-wrap: wrap; }
.chip-back {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px 7px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); font-weight: 600; font-size: .9rem;
}
.chip-back:hover { background: rgba(255, 255, 255, .24); }
.chip-back .ico { width: 18px; height: 18px; }
.spot-coast { color: #b9cee0; font-size: 1rem; }
.spot-hero-title h1 { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 7vw, 5.2rem); line-height: .9; letter-spacing: -.01em; }
.spot-hero-now { display: flex; align-items: flex-end; gap: 14px; }
.hero-num { font-family: var(--display); font-weight: 700; font-size: clamp(4.5rem, 11vw, 8rem); line-height: .78; letter-spacing: -.03em; }
.hero-num small { font-size: .32em; font-weight: 600; color: #b9cee0; margin-left: 4px; }
.hero-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 6px; font-size: .9rem; color: #b9cee0; }

.spot-body { max-width: 1240px; margin: 0 auto; padding: 0 28px 48px; }
.stats-bar {
  position: relative; z-index: 2; margin-top: -26px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--float);
}
.sk-bar { grid-column: 1 / -1; height: 92px; }
.stat { display: flex; gap: 12px; padding: 18px 20px; }
.stat + .stat { border-left: 1px solid var(--linea); }
.stat-ico { width: 22px; height: 22px; color: var(--agua); margin-top: 2px; }
.stat div { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: .85rem; color: var(--gris); }
.stat-value { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.05; color: var(--ink); }
.stat-sub { font-size: .85rem; color: var(--gris); display: flex; align-items: center; gap: 4px; }
.stat-note { font-size: .74rem; color: var(--gris); }
.lv-dots { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.lv-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--linea); }
.lv-dots i.on { background: var(--ink); }
@media (max-width: 860px) {
  .stats-bar { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--linea); }
  .lv-dots { margin-left: 6px; }
}

.day-tabs {
  display: flex; gap: 8px; margin: 28px 0 18px; padding-bottom: 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.day-tabs .day-tab { flex: 1 1 0; min-width: 64px; padding: 10px 10px 0; scroll-snap-align: start; }
/* Si no caben todas, un degradado a la derecha indica que hay más (se quita al llegar al final) */
.day-tabs.more { mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
/* Días 8–16: previsión orientativa */
.day-tab-far { box-shadow: inset 0 0 0 1px var(--linea); border: 1px dashed var(--linea); }
.day-tab-far.active { border-color: transparent; }
.day-far {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px;
  border-radius: var(--r-sm); background: color-mix(in srgb, var(--teide) 14%, var(--surface));
  font-size: .9rem; color: var(--basalto);
}
.day-far-ico { width: 18px; height: 18px; color: color-mix(in srgb, var(--teide) 60%, var(--ink-mix)); }
.day-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px 0; border-radius: var(--r-md); text-align: left; overflow: hidden;
  background: transparent; box-shadow: inset 0 0 0 1px var(--linea); transition: background .15s, box-shadow .15s;
}
.day-tab:hover { background: var(--surface); }
.day-tab.active { background: var(--atlantico); color: var(--on-dark); box-shadow: none; }
.dt-day { font-weight: 600; font-size: .95rem; }
.dt-day small { font-weight: 400; color: var(--gris); }
.day-tab.active .dt-day small { color: #a9c1d6; }
.dt-max { font-family: var(--display); font-weight: 700; font-size: 1.8rem; line-height: 1.1; }
.dt-max small { font-size: .9rem; margin-left: 1px; }
.dt-bar { align-self: stretch; height: 5px; margin: 8px -14px 0; background: var(--c); }

.day-panel { min-height: 300px; }
.sk-panel { height: 300px; }

.wdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.load-error { display: flex; gap: 12px; align-items: flex-start; }
.load-error h2 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink); }
.load-error p { margin: 4px 0 12px; color: var(--basalto); }
.load-err { color: var(--basalto); }
.btn-retry {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px;
  background: var(--atlantico); color: var(--on-dark); font: 600 .95rem var(--text); cursor: pointer;
}
.btn-retry:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
.updated { margin-top: 18px; font-size: .85rem; color: var(--gris); }

/* ── Páginas ──────────────────────────────────────────────────────────────── */
.view-page { padding: 56px 28px 72px; }
.page { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.page-head { max-width: 760px; }
.kicker { display: none; }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4rem); line-height: .95; color: var(--ink); margin-bottom: 16px; }
.lead { font-size: 1.15rem; color: var(--basalto); max-width: 62ch; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 28px; min-width: 0; }
.card h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.1; color: var(--ink); margin-bottom: 8px; }
.card > p { color: var(--gris); max-width: 70ch; margin-bottom: 18px; }
.contact-list { list-style: none; display: grid; gap: 22px; margin-top: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); margin-bottom: 4px; }
.contact-list p { margin-bottom: 10px; }
.contact-ico { width: 26px; height: 26px; flex: none; color: var(--agua); margin-top: 2px; }
.contact-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; overflow-wrap: anywhere; }
.contact-btn svg { width: 18px; height: 18px; flex: none; }
.legal { display: flex; flex-direction: column; gap: 26px; padding: 28px; }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink); margin-bottom: 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 10px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 4px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-updated { color: var(--gris); font-size: .9rem; }
@media (max-width: 860px) { .legal { padding: 20px 16px; gap: 22px; } }
.card-note { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linea); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.mt { margin-top: 24px; }

.kpis { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.kpi { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.kpi + .kpi { border-left: 1px solid var(--linea); }
.kpi b { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--ink); }
.kpi span { font-size: .9rem; color: var(--gris); }
.kpi-main { background: var(--atlantico); }
.kpi-main b { font-size: 4rem; color: var(--teide); }
.kpi-main span { color: #b9cee0; }

.chart { position: relative; height: 300px; }
.chart-wide { height: 330px; }
.chart-tall { height: 420px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; margin-top: 10px; }
.steps li { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 3px solid var(--agua); }
.step-n { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--agua); }
.steps h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.steps p { font-size: .92rem; color: var(--gris); }

.table-wrap { overflow-x: auto; }
.ablation { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.ablation th { text-align: right; font-weight: 600; font-size: .85rem; color: var(--gris); padding: 10px 8px; border-bottom: 2px solid var(--linea); }
.ablation th:first-child, .ablation td:first-child { text-align: left; }
.ablation td { padding: 10px 8px; border-bottom: 1px solid var(--linea); text-align: right; }
.ablation .pos { color: #15803d; }
.ablation .neg { color: #be123c; }
.ablation tr.final td { font-weight: 700; background: color-mix(in srgb, var(--teide) 18%, var(--surface)); }

.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.flow { display: flex; align-items: stretch; gap: 12px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.flow-node { flex: 1; min-width: 140px; padding: 16px; border-radius: var(--r-md); background: var(--espuma); display: flex; flex-direction: column; gap: 4px; }
.flow-node b { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.flow-node span { font-size: .85rem; color: var(--gris); }
.flow-edge { background: var(--atlantico); }
.flow-edge b { color: var(--on-dark); }
.flow-edge span { color: #b9cee0; }
.flow-arrow { align-self: center; color: var(--gris); font-size: 1.2rem; }
.flow-note { margin-top: 12px; font-size: .9rem; color: var(--gris); }
.flow-live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--st-green); margin-right: 8px; }

.tech-group h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--ink); margin-bottom: 12px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tech-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border-radius: var(--r-md); min-width: 0; overflow-wrap: anywhere; }
a.tech-card:hover { background: var(--espuma); }
.tech-icon { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 700; font-size: .8rem; }
.tech-card b { font-weight: 600; color: var(--ink); }
.tech-card p { font-size: .9rem; color: var(--gris); }

.author { display: flex; gap: 16px; align-items: center; }
.author img { border-radius: 50%; flex-shrink: 0; }
.read-list { list-style: none; display: flex; flex-direction: column; gap: 12px; color: var(--basalto); }
.rating-scale { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ── Pie ──────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--linea); background: var(--surface); }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; font-size: .9rem; color: var(--gris); }
.footer-in a { color: var(--ink); font-weight: 600; }
.footer-in a:hover { color: var(--agua); }
.footer-in .grow { flex: 1; }
body[data-view="map"] .footer { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-main { grid-column: 1 / -1; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--linea); }
}

@media (max-width: 860px) {
  :root { --top: 58px; }
  .topbar { padding: 0 16px; gap: 12px; justify-content: space-between; }
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: var(--top) 0 auto 0; flex-direction: column; gap: 2px;
    padding: 12px; background: var(--surface); border-bottom: 1px solid var(--linea); box-shadow: var(--float);
    transform: translateY(-110%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; z-index: -1;
  }
  .menu-open .nav { transform: none; visibility: visible; transition: transform .22s ease; }
  .nav a { padding: 14px 16px; font-size: 1.05rem; }

  .view-map { height: auto; }
  .map-wrap { position: relative; height: 56vh; }
  .map-legend { top: auto; bottom: 34px; right: 10px; left: 10px; justify-content: center; flex-wrap: wrap; border-radius: var(--r-sm); }
  .panel {
    position: relative; inset: auto; width: auto; margin-top: -22px; border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -10px 30px rgba(14, 42, 71, .18); overflow: visible; animation: none;
  }
  .hero { padding: 18px 20px 16px; }
  .hero h1 { font-size: 2.2rem; }
  .best { margin: 0 14px; }
  .list-title { padding: 22px 20px 4px; }
  .coast-title { padding: 10px 14px 2px; }
  .spot-list { padding: 0 6px; }
  .panel-foot { padding: 18px 20px 26px; }

  .spot-hero-content { min-height: 270px; padding: 14px 18px 40px; grid-template-columns: 1fr; gap: 8px; }
  .spot-hero-now { justify-self: start; }
  .spot-hero-title h1 { font-size: 2.8rem; }
  .hero-num { font-size: 4.4rem; }
  .spot-body { padding: 0 14px 40px; }
  .stat { padding: 12px 10px; gap: 0; }
  .stat-ico { display: none; }
  .stat-value { font-size: 1.45rem; }
  .stat-sub { font-size: .76rem; flex-wrap: wrap; }
  .day-tabs { display: flex; overflow-x: auto; margin: 20px -14px 14px; padding: 0 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .day-tabs .day-tab { flex: 0 0 70px; min-width: 0; }
  .day-panel { padding: 0; }

  .view-page { padding: 32px 16px 56px; }
  .card { padding: 20px 18px; border-radius: var(--r-md); }
  .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .chart { height: 260px; }
  .chart-tall { height: 420px; }
}

@media (max-width: 860px) {
  .leaflet-control-zoom { display: none; }
  .map-legend { gap: 4px 10px; font-size: .74rem; padding: 6px 10px; }
}

/* Grupos de spots cercanos */
.sm-group { padding-right: 4px; }
.sm-count {
  min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px;
  background: var(--atlantico); color: var(--on-dark); font-weight: 700; font-size: .8rem;
}
.compact .sm-group { padding-right: 4px; }

/* ── Mapa tipo app ────────────────────────────────────────────────────────── */
.map-tools {
  position: absolute; z-index: 500; right: 20px; bottom: 104px;
  display: flex; flex-direction: column; gap: 8px;
}
.tool-btn, .panel-toggle {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: var(--float);
}
.tool-btn:hover, .panel-toggle:hover { background: var(--espuma); }
.tool-btn.busy .ico { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.leaflet-control-zoom { display: none; }
.user-dot { border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 0 0 10px rgba(37, 99, 235, .25); }

.panel-toggle { position: absolute; z-index: 600; top: 34px; left: 452px; transition: left .25s ease; }
.panel-toggle .ico { transition: transform .25s; }
.panel { transition: transform .25s ease, opacity .25s; }
.panel-collapsed .panel { transform: translateX(calc(-100% - 30px)); opacity: 0; pointer-events: none; }
.panel-collapsed .panel-toggle { left: 20px; }
.panel-collapsed .panel-toggle .ico { transform: rotate(180deg); }

.timebar {
  position: absolute; z-index: 500; left: 460px; right: 80px; bottom: 22px;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px 18px 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--float);
  transition: left .25s ease; max-width: 860px;
}
.panel-collapsed .timebar { left: 20px; }
.time-now {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem;
  background: var(--espuma); color: var(--ink); box-shadow: inset 0 0 0 1px var(--linea);
}
.time-now.active { background: var(--atlantico); color: var(--on-dark); box-shadow: none; }
.time-track { position: relative; flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.time-label { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); line-height: 1.1; }
.time-track input[type="range"] { width: 100%; accent-color: var(--agua); height: 22px; cursor: pointer; }
.time-days { position: relative; height: 12px; }
.time-days { margin: 0 9px; }  /* alineado con el recorrido del pulgar del deslizador */
.time-days span { position: absolute; transform: translateX(-50%); font-size: .72rem; color: var(--gris); white-space: nowrap; }
.time-days span b { font-weight: 600; color: var(--basalto); }
.td-tick { position: absolute; top: -9px; width: 1px; height: 6px; background: var(--linea); }

@media (max-width: 860px) {
  body[data-view="map"] { overflow: hidden; }
  .view-map { height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); overflow: hidden; }
  .map-wrap { position: absolute; inset: 0; height: auto; }
  .panel-toggle { display: none; }
  .map-legend { display: none; }
  .timebar { left: 10px; right: 10px; top: 10px; bottom: auto; gap: 10px; padding: 6px 12px 12px 6px; border-radius: 14px; max-width: none; }
  .time-now { padding: 6px 12px; font-size: .82rem; }
  .time-label { font-size: .95rem; }
  .time-track input[type="range"] { height: 18px; }
  .time-days span { font-size: .66rem; }
  .map-tools { right: 10px; top: 92px; bottom: auto; }
  .tool-btn { width: 40px; height: 40px; }

  /* Lista de spots: barra compacta arriba que se despliega hacia abajo */
  .panel {
    position: absolute; z-index: 700; left: 10px; right: 10px; top: 10px; bottom: auto;
    width: auto; margin: 0; border-radius: 16px;
    box-shadow: var(--float);
    max-height: 62px; overflow: hidden; animation: none;
    transition: max-height .32s cubic-bezier(.2, .8, .2, 1);
  }
  .panel[data-sheet="open"] { max-height: calc(100% - 118px); overflow-y: auto; overscroll-behavior: contain; }
  .panel .panel-grab {
    position: sticky; top: 0; z-index: 2; order: 0; flex-shrink: 0;
    display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 14px 8px 12px;
    background: var(--surface); text-align: left; cursor: pointer; touch-action: none;
  }
  .panel[data-sheet="open"] .panel-grab { border-bottom: 1px solid var(--linea); }
  .pg-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--agua-claro); color: var(--agua); flex-shrink: 0; }
  .pg-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
  .pg-text b { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
  .pg-text small { font-size: .82rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pg-chev { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--espuma); color: var(--ink); flex-shrink: 0; transition: transform .25s; }
  .panel[data-sheet="open"] .pg-chev { transform: rotate(180deg); }
  .panel .best { order: 1; margin-top: 14px; }
  .panel .buoy-card { order: 2; }
  .panel .list-title { order: 3; }
  .panel .spot-list { order: 4; }
  .panel .hero { order: 5; padding-top: 28px; }
  .panel .hero h1 { font-size: 1.7rem; }
  .panel-foot { order: 6; }

  /* Barra de tiempo abajo y botones del mapa bajo la lista */
  .timebar { top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .map-tools { top: auto; bottom: calc(112px + env(safe-area-inset-bottom)); }  /* abajo a la derecha, sobre la atribución y la barra de tiempo */
  .view-map .leaflet-bottom { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .panel-collapsed .panel { transform: none; opacity: 1; pointer-events: auto; }
}

/* ── Datos reales ─────────────────────────────────────────────────────────── */
.bm {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 10px 4px 6px;
  border-radius: 8px; background: var(--atlantico); color: var(--on-dark); box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  cursor: pointer; border: 2px solid #22d3ee;
}
.bm-dot, .bc-dot { width: 9px; height: 9px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); animation: live 2s infinite; flex-shrink: 0; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.bm-val { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1; }
.bm-val small { font-size: .75rem; margin-left: 1px; }
.bm-tag { font-size: .7rem; font-weight: 600; color: #a5f3fc; }
.buoy-card {
  display: flex; align-items: center; gap: 12px; margin: 10px 20px 0; padding: 12px 14px; flex-shrink: 0;
  border-radius: var(--r-md); background: var(--agua-claro); color: var(--ink);
}
.buoy-card:empty { display: none; }
.buoy-card:hover { background: #d3edf0; }
.bc-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bc-main b { font-weight: 600; }
.bc-main small { font-size: .82rem; color: var(--gris); }
.pill-live::before { animation: live 2s infinite; }
.stat-buoy {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  border-top: 1px solid var(--linea); font-size: .9rem; color: var(--ink); font-weight: 500;
}
.stat-buoy:hover { background: var(--espuma); }
.src { font-size: .75rem; color: var(--gris); font-weight: 400; }
.sources { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sources th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--gris); padding: 10px 8px; border-bottom: 2px solid var(--linea); }
.sources td { padding: 10px 8px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.sources td:first-child { font-weight: 600; color: var(--ink); }
.kind { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--espuma); color: var(--gris); white-space: nowrap; }
.kind.k-meas { background: #cffafe; color: #0e7490; }
.kind.k-ia { background: color-mix(in srgb, var(--teide) 25%, var(--surface)); color: #8a5a00; }
.kind.k-fc { background: #eef2f6; color: #475569; }
.kpis-3 { grid-template-columns: repeat(3, 1fr); margin: 6px 0 22px; box-shadow: inset 0 0 0 1px var(--linea); }
.kpis-3 .kpi-main b { font-size: 2.6rem; }
h3.sub { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--ink); margin-bottom: 10px; }
.note { font-size: .88rem; color: var(--gris); margin-top: 4px; }
.limits { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 18px 18px; color: var(--basalto); }
@media (max-width: 860px) {
  .kpis-3 { grid-template-columns: 1fr; }
  .kpis-3 .kpi + .kpi { border-left: 0; border-top: 1px solid var(--linea); }
  .buoy-card { margin: 10px 14px 0; order: 1; }
}

@media (max-width: 860px) {
  .sources thead { display: none; }
  .sources tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
  .sources td { padding: 0; border: 0; }
  .sources td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--gris); font-size: .86rem; }
  .sources td:nth-child(3) { grid-row: 1; grid-column: 2; }
  .sources td:nth-child(4) { grid-column: 1 / -1; font-size: .8rem; color: var(--gris); }
}

/* ── Accesibilidad ────────────────────────────────────────────────────────── */
.skip { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: 10px; background: var(--atlantico); color: #fff; font-weight: 600; }
.skip:focus { top: 10px; }
main:focus { outline: none; }
.panel-grab { display: block; width: 100%; border: 0; background: transparent; }
.leaflet-marker-icon:focus-visible .sm, .leaflet-marker-icon:focus-visible .bm { outline: 3px solid #fff; outline-offset: 2px; }
.sr-badge { color: color-mix(in srgb, var(--c) 45%, var(--ink-mix)); }
@media (min-width: 861px) { .panel-grab { display: none; } }
.tp-tag { font-style: normal; font-size: .6rem; color: var(--gris); margin-left: 2px; }

/* Favoritos */
.chip-fav.on { background: var(--teide); color: #0e2a47; }
.chip-fav.on .ico { fill: currentColor; }
.coast-fav { display: flex; align-items: center; gap: 6px; color: #8a5a00; }
.coast-fav .ico { width: 14px; height: 14px; fill: var(--teide); stroke: #8a5a00; }
.fav-dot { font-style: normal; color: #8a5a00; font-size: .85em; }

/* ── Modo oscuro ──────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --espuma: #0a1622;
  --surface: #12202f;
  --linea: #23364a;
  --basalto: #d8e2ec;
  --gris: #9fb0c1;
  --ink: #eef4fa;
  --ink-mix: #ffffff;
  --atlantico: #1b3a5c;
  --atlantico-2: #24496f;
  --agua: #38b2c4;
  --agua-claro: #133446;
  --skeleton-a: #172a3d;
  --skeleton-b: #1e3449;
  --float: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --espuma: #0a1622; --surface: #12202f; --linea: #23364a; --basalto: #d8e2ec; --gris: #9fb0c1;
    --ink: #eef4fa; --ink-mix: #ffffff; --atlantico: #1b3a5c; --atlantico-2: #24496f; --agua: #38b2c4;
    --agua-claro: #133446; --skeleton-a: #172a3d; --skeleton-b: #1e3449;
    --float: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(10, 22, 34, .7) !important; color: #9fb0c1; }
:root[data-theme="dark"] .kind.k-fc, :root[data-theme="dark"] .kind { background: #1b2c3e; color: #b7c6d4; }
:root[data-theme="dark"] .kind.k-meas { background: #0f3a44; color: #8ee6f2; }
:root[data-theme="dark"] .kind.k-ia { background: #3a2f12; color: #f2cf73; }
:root[data-theme="dark"] .buoy-card:hover { background: #18405a; }
:root[data-theme="dark"] .ablation .pos { color: #4ade80; }
:root[data-theme="dark"] .ablation .neg { color: #fb7185; }
:root[data-theme="dark"] .coast-fav { color: #f2cf73; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kind.k-fc, :root:not([data-theme="light"]) .kind { background: #1b2c3e; color: #b7c6d4; }
  :root:not([data-theme="light"]) .kind.k-meas { background: #0f3a44; color: #8ee6f2; }
  :root:not([data-theme="light"]) .kind.k-ia { background: #3a2f12; color: #f2cf73; }
  :root:not([data-theme="light"]) .ablation .pos { color: #4ade80; }
  :root:not([data-theme="light"]) .ablation .neg { color: #fb7185; }
  :root:not([data-theme="light"]) .coast-fav { color: #f2cf73; }
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(10, 22, 34, .7) !important; color: #9fb0c1; }
}
.theme-btn .ico { width: 20px; height: 20px; }

.share-menu {
  position: absolute; z-index: 5; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--float);
}
.spot-actions { position: relative; }
.share-menu { top: 100%; left: 0; }
.share-menu .btn-ghost { color: var(--ink); }
.share-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--gris); cursor: pointer; }
.share-close .ico { width: 20px; height: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spot-more-menu { display: contents; }
.chip-more { display: none; padding: 7px 10px; }
@media (max-width: 860px) {
  .chip-more { display: inline-flex; }
  .spot-more-menu {
    display: none; position: absolute; z-index: 6; top: 100%; right: 0; margin-top: 8px; flex-direction: column; align-items: stretch; gap: 4px;
    min-width: 220px; padding: 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--float);
  }
  .spot-more-menu.open { display: flex; }
  .spot-more-menu .chip-back { background: transparent; color: var(--ink); backdrop-filter: none; border-radius: 10px; padding: 10px 12px; }
  .spot-more-menu .chip-back:hover { background: var(--espuma); }
  .spot-more-menu .chip-alert.on { background: var(--agua); color: #fff; }
}
.chip-cam { background: #fff; color: #0e2a47; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); padding-left: 12px; }
.chip-cam:hover { background: #fff; transform: translateY(-1px); }
.chip-cam .ico { color: #0e2a47; }
.cam-dot { width: 9px; height: 9px; border-radius: 50%; background: #e0352b; margin-right: 2px; box-shadow: 0 0 0 0 rgba(224, 53, 43, .6); animation: cam-live 1.6s infinite; }
.chip-cam.near .cam-dot { background: #e3864b; animation: none; }
@keyframes cam-live { 0% { box-shadow: 0 0 0 0 rgba(224, 53, 43, .55); } 70% { box-shadow: 0 0 0 7px rgba(224, 53, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 53, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .cam-dot { animation: none; } }
.chip-alert.on { background: var(--agua); color: #fff; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 3000; max-width: min(92vw, 460px);
  transform: translate(-50%, 140%); padding: 12px 18px; border-radius: 14px;
  background: var(--atlantico); color: var(--on-dark); box-shadow: var(--float); font-size: .92rem;
  transition: transform .25s ease;
}
.toast.show { transform: translate(-50%, 0); }

/* ── Barra de datos: a qué momento se refiere ─────────────────────────────── */
.stats-when { grid-column: 1 / -1; padding: 12px 20px 0; font-size: .85rem; font-weight: 500; color: var(--agua); }

/* ── Cajas de marea y viento del día ──────────────────────────────────────── */
.cbox { background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px 18px; min-width: 0; }
.cbox-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cbox-head h2 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.2; color: var(--ink); }
.cbox-head .btn { margin-left: auto; }

/* Resumen del día: la mejor hora */
.day-summary { border-left: 5px solid var(--c); display: flex; flex-direction: column; }
.sum-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.sum-time { font-family: var(--display); font-weight: 700; font-size: 3.4rem; line-height: 1; color: var(--ink); }
.sum-line { margin-top: 10px; font-size: 1rem; color: var(--basalto); }
.sum-sun { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; font-size: .88rem; color: var(--gris); }
.sum-ico { width: 16px; height: 16px; color: var(--teide); }
.cbox-head .src { margin-left: auto; font-size: .78rem; color: var(--gris); }
.cbox-ico { width: 22px; height: 22px; color: var(--agua); }
.cbox-sum { margin: 4px 0 10px; font-size: .92rem; color: var(--basalto); display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 6px; }
.cbox-good {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .84rem; font-weight: 600;
  color: color-mix(in srgb, var(--st-green) 50%, var(--ink-mix)); background: color-mix(in srgb, var(--st-green) 15%, var(--surface));
}
.cbox-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .78rem; color: var(--gris); }
.cbox-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cbox-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-night { background: color-mix(in srgb, var(--gris) 10%, transparent); }
.lg-best { width: 2px !important; height: 14px !important; border-radius: 0 !important; background: var(--teide); }
.lg-now { border-radius: 50% !important; background: var(--surface); box-shadow: inset 0 0 0 3px var(--ink); }

.tl-legend { margin-top: 6px; }
.tl-legend b { font-weight: 600; color: var(--basalto); }
.lg-sw { border-radius: 3px; }

/* Día: mejor hora y swell a la derecha, la gráfica hora a hora a la izquierda */
.day-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px;
  grid-template-areas: "tl sum" "tl swell" "gear gear"; grid-template-rows: auto 1fr auto;
}
.day-summary { grid-area: sum; }
.day-gear { grid-area: gear; }
.gear-suit { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.gear-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gear-pic { width: 64px; height: 80px; flex-shrink: 0; }
.gear-boot { width: 30px; height: 38px; flex-shrink: 0; margin-top: -4px; }
.gp-body { fill: var(--agua-claro); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gp-end { fill: var(--ink); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.gear-scale { margin-top: 10px; width: 100%; max-width: 280px; }
.gs-bar { position: relative; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--espuma); }
.gs-seg { position: absolute; top: 0; bottom: 0; opacity: .3; }
.gs-seg:first-child { border-radius: 4px 0 0 4px; }
.gs-seg:last-of-type { border-radius: 0 4px 4px 0; }
.gs-seg.on { opacity: 1; top: -2px; bottom: -2px; border-radius: 3px; }
.gs-mark { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); }
.gs-mark b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 2px; font-family: var(--display); font-weight: 700; font-size: .9rem; color: var(--ink); white-space: nowrap; }
.gs-ends { display: flex; justify-content: space-between; margin-top: 4px; font-size: .74rem; color: var(--gris); }
.gear-prod { margin-top: 4px; font-size: .86rem; font-weight: 600; color: color-mix(in srgb, var(--agua) 72%, var(--ink-mix)); text-decoration: underline; text-underline-offset: 3px; }
.gear-ad { font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--espuma); color: var(--gris); }
.gear-name { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; color: var(--ink); }
.gear-felt { font-weight: 600; font-size: .92rem; color: var(--basalto); }
.gear-why { font-size: .84rem; color: var(--gris); }
.gear-list { list-style: none; display: grid; gap: 6px; margin-top: 12px; }
/* En el ordenador, franja a todo el ancho: el traje a la izquierda, escarpines y sol a la derecha */
@media (min-width: 1101px) {
  #gear-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; align-items: start; }
  .gear-list { margin-top: 8px; }
}
.gear-list:empty { display: none; }
.gear-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--basalto); }
.gear-ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--agua); margin-top: 1px; }
.day-timeline { grid-area: tl; align-self: start; }
.day-swell { grid-area: swell; display: flex; flex-direction: column; }
.day-swell .swell-map { flex: 1; display: flex; align-items: center; }
.sum-wind { margin-top: 10px; }

/* Pestañas de la gráfica: Resumen · Olas · Viento · Marea */
.tl-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 8px 0 12px; border-radius: 14px; background: var(--espuma); }
.tl-tab {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: transparent; color: var(--gris); font: 600 .95rem var(--text); cursor: pointer; transition: background .15s, color .15s;
}
.tl-tab:hover { color: var(--ink); }
.tl-tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(14, 42, 71, .14); }
.tl-tab:focus-visible { outline: 2px solid var(--agua); outline-offset: 1px; }
.tl-tab-ico { width: 18px; height: 18px; color: var(--agua); flex-shrink: 0; }

/* Lectura de la hora elegida: cada dato abre su detalle */
.tl-read { margin-bottom: 14px; padding: 14px 14px 12px; border-radius: var(--r-md); background: var(--espuma); touch-action: pan-y; }
.tl-when { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 4px; }
.tl-time { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--ink); }
.why-btn { border: 0; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: color-mix(in srgb, var(--agua) 72%, var(--ink-mix)); font: 600 .84rem var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.why-btn[aria-expanded="true"] { background: var(--atlantico); color: var(--on-dark); text-decoration: none; }
.why-btn:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
.tl-why { margin: 10px 4px 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); font-size: .92rem; line-height: 1.45; color: var(--basalto); }
.tl-tag { font-size: .84rem; font-weight: 600; color: color-mix(in srgb, var(--agua) 72%, var(--ink-mix)); }
.tl-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.tl-cell {
  display: flex; gap: 8px; min-width: 0; padding: 8px; border: 0; border-radius: 10px; background: transparent;
  text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.tl-cell:hover { background: var(--surface); }
.tl-cell.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--agua); }
.tl-cell:focus-visible { outline: 2px solid var(--agua); outline-offset: 1px; }
.tl-cell-body { display: flex; flex-direction: column; min-width: 0; }
.tl-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--agua); }
.tl-k { font-size: .8rem; color: var(--gris); }
.tl-v { font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.1; color: var(--ink); }
.tl-s { font-size: .84rem; color: var(--basalto); }
.tl-kj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-kj i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tl-note { margin: 8px 4px 0; font-size: .84rem; color: var(--basalto); }
.tl-hint { margin-top: 8px; font-size: .78rem; color: var(--gris); }
.tl-legend small { color: var(--gris); font-size: .74rem; }

/* Gráfica hora a hora (SVG) */
.tl-chart { width: 100%; touch-action: pan-y; cursor: crosshair; border-radius: var(--r-sm); user-select: none; -webkit-user-select: none; }
.tl-chart:focus-visible { outline: 2px solid var(--agua); outline-offset: 4px; }
.tl-chart svg { display: block; overflow: visible; }
.tl-night { fill: color-mix(in srgb, var(--gris) 10%, transparent); }
.tl-sel { fill: color-mix(in srgb, var(--agua) 16%, transparent); }
.tl-pill { fill: var(--ink); }
.tl-pill-t { font-size: 12px; font-weight: 700; fill: var(--surface); }
.tl-lab { font-size: 12px; font-weight: 600; fill: var(--basalto); }
.tl-unit { font-weight: 400; fill: var(--gris); }
.tl-base { stroke: var(--linea); stroke-width: 1; }
.tl-wave-area { fill: color-mix(in srgb, var(--agua) 22%, transparent); }
.tl-wave-line { fill: none; stroke: var(--agua); stroke-width: 2.5; }
.tl-range { fill: color-mix(in srgb, var(--teide) 30%, transparent); }
.tl-raw { fill: none; stroke: var(--gris); stroke-width: 1.5; stroke-dasharray: 4 4; }
.tl-meas { fill: #22d3ee; stroke: #0891b2; stroke-width: 1.5; }
.tl-val { font-family: var(--display); font-weight: 700; font-size: 13px; fill: var(--ink); }
.tl-val-sm { font-size: 11.5px; }
.tl-val-u { font-family: var(--text); font-weight: 500; font-size: 10px; fill: var(--gris); }
.tl-cell-t { font-family: var(--display); font-weight: 600; font-size: 13px; fill: var(--ink); }
.tl-seg-t { font-size: 11.5px; font-weight: 600; fill: var(--ink); }
.tl-tide-h { font-size: 10.5px; fill: var(--gris); }
.tl-tide-area { fill: color-mix(in srgb, var(--agua) 14%, transparent); }
.tl-tide-line { fill: none; stroke: var(--atlantico-2); stroke-width: 2; stroke-linejoin: round; }
.tl-tide-pt { stroke: var(--surface); stroke-width: 1.5; }
.tc-high { fill: var(--atlantico-2); }
.tc-low { fill: var(--agua); }
.tl-tide-t { font-family: var(--display); font-size: 14px; font-weight: 700; fill: var(--ink); }
.tl-now { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .55; }
.tl-tick { font-size: 11.5px; fill: var(--gris); }
.tl-tick.now { fill: var(--agua); font-weight: 700; }
.tl-best { fill: var(--ink); font-weight: 700; }
:root[data-theme="dark"] .tl-tide-line { stroke: #8fd3ff; }
:root[data-theme="dark"] .tc-high { fill: #8fd3ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tl-tide-line { stroke: #8fd3ff; }
  :root:not([data-theme="light"]) .tc-high { fill: #8fd3ff; }
}

@media (max-width: 1100px) {
  .day-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "sum gear" "tl tl" "swell swell"; grid-template-rows: auto; }
}
@media (max-width: 420px) { .tl-tab-ico { display: none; } }
@media (max-width: 360px) {
  .brand-name { font-size: 1.3rem; } .topbar { gap: 8px; padding: 0 12px; }
  .topbar-actions { gap: 4px; } .theme-btn { display: none; }  /* el tema sigue en Ajustes (menú) */
}
@media (max-width: 860px) {
  .cbox { padding: 16px 14px 14px; border-radius: var(--r-md); }
  .sum-time { font-size: 2.8rem; }
  .day-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sum" "tl" "gear" "swell"; gap: 14px; }
  .tl-read { padding: 12px 8px 8px; }
  .tl-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .tl-tab { font-size: .88rem; padding: 6px 4px; }
  .tl-time { font-size: 1.9rem; }
  .tl-v { font-size: 1.35rem; }
}

/* ── Caja de swell ─────────────────────────────────────────────────────────── */
.swell-map { width: 100%; min-height: 220px; }
.swell-map svg { display: block; margin: 0 auto; overflow: visible; }
.sw-island { fill: color-mix(in srgb, var(--basalto) 16%, var(--surface)); stroke: color-mix(in srgb, var(--basalto) 35%, transparent); stroke-width: 1; }
.sw-ideal { fill: color-mix(in srgb, var(--st-green) 16%, transparent); stroke: color-mix(in srgb, var(--st-green) 55%, transparent); stroke-width: 1; stroke-dasharray: 3 3; }
.sw-line { stroke-width: 4; stroke-linecap: round; }
.sw-spot { fill: var(--teide); stroke: var(--surface); stroke-width: 2.5; }
.sw-north path { fill: var(--gris); }
.sw-north text { font-size: 10px; font-weight: 600; fill: var(--gris); }
.sw-verdict { font-weight: 600; color: color-mix(in srgb, var(--c) 48%, var(--ink-mix)); }
.lg-ideal { background: color-mix(in srgb, var(--st-green) 16%, transparent); border: 1px dashed var(--st-green); }

.set-form { display: grid; gap: 14px; }
.set-h { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--ink); margin-top: 6px; }
.set-example { padding: 10px 14px; border-radius: var(--r-sm); background: var(--espuma); color: var(--basalto); font-size: .92rem; }
.set-note { font-size: .84rem; color: var(--gris); }
.nav-settings { display: none !important; }
@media (max-width: 860px) {
  .nav-settings { display: block !important; }
  .settings-btn { display: none !important; }
}

/* ── ¿Dónde voy? ──────────────────────────────────────────────────────────── */
.plan-form { display: grid; gap: 16px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.rp-chips.plan-days { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.plan-days .rp-opt { flex-shrink: 0; }
.plan-days label small { margin-left: 2px; }
.plan-list { display: grid; gap: 10px; }
.plan-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 20px;
  border-radius: var(--r-md); background: var(--surface); border-left: 5px solid var(--c); transition: transform .12s, box-shadow .12s;
}
.plan-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -10px rgba(14, 42, 71, .4); }
.plan-card:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
.plan-rank { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--gris); min-width: 1.4em; text-align: center; }
.plan-main { display: flex; flex-direction: column; min-width: 0; }
.plan-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--ink); }
.plan-coast { font-size: .82rem; color: var(--gris); }
.plan-line { margin-top: 4px; font-size: .92rem; color: var(--basalto); }
.plan-hours { font-weight: 600; color: color-mix(in srgb, var(--agua) 72%, var(--ink-mix)); }
.plan-top { padding: 22px 24px; background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.plan-top .plan-name { font-size: 2rem; }
.plan-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: color-mix(in srgb, var(--teide) 45%, var(--ink-mix)); }
.plan-star { width: 16px; height: 16px; }
.plan-flat { color: var(--basalto); margin-bottom: 10px; }
.plan-rest { margin-top: 14px; }
.plan-rest summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--basalto); }
.plan-rest .plan-list { margin-top: 6px; }
#plan-results { display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .plan-row { flex-direction: column; }
  .plan-card { gap: 12px; padding: 14px; }
  .plan-card .pill { grid-column: 2; justify-self: start; }
  .plan-top .plan-name { font-size: 1.7rem; }
}

/* Vistas de «¿Dónde voy?» y calendario de días × spots */
.plan-views { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); align-self: flex-start; }
.plan-views .tl-tab { transition: none; }
.plan-views .tl-tab.on { background: var(--atlantico); color: var(--on-dark); }
.plan-views .tl-tab.on .tl-tab-ico { color: var(--on-dark); }
.cal-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-md); padding: 14px 14px 10px; }
.cal-wrap:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
.cal { border-collapse: separate; border-spacing: 3px; min-width: max-content; }
.cal th, .cal td { padding: 0; }
.cal thead th { font-size: .74rem; font-weight: 500; color: var(--gris); text-align: center; line-height: 1.15; padding-bottom: 4px; }
.cal thead th span, .cal thead th b { display: block; }
.cal thead th b { font-family: var(--display); font-size: 1rem; color: var(--ink); }
.cal-corner, .cal-spot { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.cal-spot { text-align: left; font-weight: 600; font-size: .86rem; color: var(--ink); padding-right: 10px !important; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.cal-coast th { position: sticky; left: 0; text-align: left; font-size: .74rem; font-weight: 600; color: var(--gris); padding: 10px 0 2px !important; }
.cal-cell { display: block; width: 34px; height: 30px; border-radius: 7px; background: var(--c); transition: transform .12s; }
.cal-cell:hover { transform: scale(1.12); }
.cal-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
td.cal-far .cal-cell { opacity: .55; }
th.cal-far b { color: var(--gris); }
.cal-none { width: 34px; height: 30px; }
.cal-legend { margin-top: 12px; }
.cal-legend i { border-radius: 4px !important; }
.cal-hint { color: var(--gris); }
@media (max-width: 860px) {
  .plan-row { flex-direction: column; }
  .cal-cell { width: 28px; height: 26px; }
  .cal-spot { max-width: 112px; font-size: .8rem; }
}

/* ── ¿Cómo estuvo? (valoración de los surfistas) ──────────────────────────── */
.cbox.report { margin-top: 20px; }
.rp-cta { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.rp-cta p { flex: 1; min-width: 220px; color: var(--basalto); }
.page-narrow { max-width: 760px; }
.report-card { padding: 26px 28px; }
.rp-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.rp-select {
  width: 100%; min-height: 48px; padding: 10px 40px 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--linea);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2366727f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; color: var(--ink); font: 500 1rem var(--text); cursor: pointer;
}
.rp-select:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }
.rp-anon { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .84rem; color: var(--gris); }
.rp-anon-ico { width: 16px; height: 16px; flex-shrink: 0; }
.rp-thanks h2 { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--ink); margin: 6px 0 4px; }
.rp-thanks h2:focus { outline: none; }
@media (max-width: 860px) { .report-card { padding: 18px 16px; } }
.rp-form { display: grid; gap: 14px; margin-top: 4px; }
.rp-q { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.rp-q legend { padding: 0; margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.rp-q legend small { font-weight: 400; color: var(--gris); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-opt { position: relative; }
.rp-opt input { position: absolute; left: 0; top: 0; opacity: 0; width: 1px; height: 1px; }
.rp-opt label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  background: var(--espuma); color: var(--basalto); font-weight: 500; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.rp-opt label small { color: var(--gris); font-size: .78rem; }
.rp-opt label:hover { box-shadow: inset 0 0 0 1.5px var(--linea); }
.rp-opt input:checked + label { background: var(--atlantico); color: var(--on-dark); }
.rp-opt input:checked + label small { color: #b9cee0; }
.rp-opt input:focus-visible + label { outline: 2px solid var(--agua); outline-offset: 2px; }
.rp-opt input:disabled + label { opacity: .4; cursor: not-allowed; box-shadow: none; }
.rp-dot { width: 10px; height: 10px; border-radius: 50%; }
.rp-shown { font-size: .9rem; color: var(--basalto); min-height: 1.2em; margin: -4px 0 0; }
.rp-shown:empty { display: none; }
.rp-send { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.btn-retry:disabled { opacity: .45; cursor: not-allowed; }
.rp-msg { font-size: .88rem; color: var(--basalto); }
@media (max-width: 860px) { .cbox.report { margin-top: 14px; } .rp-opt label { padding: 8px 12px; } }

/* Guía del spot (texto, también para Google) */
.cbox.spot-guide { margin-top: 20px; }
.guide-title { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink); margin-bottom: 8px; }
.spot-guide p { color: var(--basalto); line-height: 1.6; max-width: 75ch; }
.spot-guide p + p { margin-top: 8px; }
@media (max-width: 860px) { .cbox.spot-guide { margin-top: 14px; } }

/* ── Cuándo funciona (estadística por meses) ──────────────────────────────── */
.cbox.climate { margin-top: 20px; }
.cl-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 170px; margin-top: 10px; }
.cl-col { display: flex; flex-direction: column; align-items: center; min-width: 0; border-radius: 8px; padding: 4px 0; }
.cl-col.now { background: var(--agua-claro); }
.cl-val { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--ink); line-height: 1.2; }
.cl-val small { font-size: .65rem; font-weight: 600; color: var(--gris); }
.cl-plot { position: relative; flex: 1; width: 60%; max-width: 30px; }
.cl-plot i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 1px 1px; }
.cl-ok { background: color-mix(in srgb, var(--agua) 22%, transparent); }
.cl-good { background: var(--agua); }
.cl-m { margin-top: 4px; font-size: .74rem; color: var(--gris); }
.cl-col.now .cl-m { color: var(--ink); font-weight: 700; }
.cl-note { margin-top: 8px; font-size: .8rem; color: var(--gris); }
.lg-cl-good { background: var(--agua); }
.lg-cl-ok { background: color-mix(in srgb, var(--agua) 22%, transparent); }
@media (max-width: 860px) {
  .cbox.climate { margin-top: 14px; }
  .cl-chart { gap: 2px; height: 150px; }
  .cl-val { font-size: .78rem; }
  .cl-val small { display: none; }
  .cl-plot { width: 70%; }
}

/* Las cajas de una misma fila tienen la misma altura: la gráfica de viento crece para llenar la suya */

/* Hora a hora: al deslizar, las columnas encajan junto a las etiquetas fijas */
