* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overscroll-behavior-x: auto;
  overscroll-behavior-y: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

/* Navbar */
.navbar {
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  padding-top: max(0.75rem, env(safe-area-inset-top));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav-brand {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #fff;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
}

.lang-flag {
  font-size: 1.3rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.lang-flag:hover,
.lang-flag.active {
  opacity: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* City search */
.nav-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
}

.nav-search-icon {
  position: absolute;
  left: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.7;
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  padding: 0.45rem 0.7rem 0.45rem 2rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.nav-search input::placeholder {
  color: rgba(255,255,255,0.6);
}

.nav-search input:focus {
  background: #fff;
  color: #1a1a2e;
  border-color: #2563eb;
}

.nav-search input:focus::placeholder {
  color: #888;
}

.nav-search input:focus ~ .nav-search-icon,
.nav-search:focus-within .nav-search-icon {
  opacity: 1;
}

.nav-search-list {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: #fff;
  color: #1a1a2e;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  z-index: 200;
  max-height: 60vh;
  overflow-y: auto;
}

.nav-search-list li {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.2;
}

.nav-search-list li.active,
.nav-search-list li:hover {
  background: #eef2ff;
  color: #1d4ed8;
}

.nav-search-empty {
  color: #888 !important;
  font-style: italic;
  cursor: default !important;
  background: transparent !important;
}

.nav-user {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn:hover {
  background: #e8e8e8;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

/* Auth */
.auth-card {
  max-width: 400px;
  margin: 4rem auto;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1a1a2e;
}

.auth-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.auth-card label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.auth-card input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
}

.auth-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-card hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Dashboard */
h1 {
  margin-bottom: 1rem;
}

/* Hero Overview — "Tenerife right now" (matches city-hero style) */
.hero-overview {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.hero-overview-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-overview-sub {
  font-size: 0.9rem;
  color: #666;
}

.zone-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.zone-card-line1 {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}

.zone-icon { font-size: 1.1rem; line-height: 1; }

.zone-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}

.zone-weather-icon {
  font-size: 1.3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

.zone-temp-avg {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.zone-temp-range {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
}

.zone-wind {
  font-size: 0.8rem;
  color: #666;
  margin-left: auto;
}
.zone-wind strong { color: #1a1a2e; font-weight: 700; }

/* Advanced toggle */
.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid #d5d9e0;
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
  margin: 0.5rem 0 0.75rem;
  transition: all 0.15s ease;
}
.advanced-toggle:hover {
  background: #f3f4f8;
  color: #1a1a2e;
}
.advanced-toggle .chev { transition: transform 0.2s ease; display: inline-block; }
.advanced-toggle.open .chev { transform: rotate(180deg); }

.metric-btn.advanced { display: none; }
.metric-btns.advanced-open .metric-btn.advanced { display: inline-flex; }

.hero-metric.advanced { display: none; }
.hero-metrics.advanced-open .hero-metric.advanced { display: flex; }

@media (max-width: 640px) {
  .hero-overview { padding: 1.1rem; }
  .hero-overview-title { font-size: 1.35rem; }
  .zone-temp-avg { font-size: 1.2rem; }
  .zone-card { padding: 0.75rem; }
}

/* Insights */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.insight-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border-left: 4px solid #e0e0e0;
}

.insight-card.hot { border-left-color: #e74c3c; }
.insight-card.cool { border-left-color: #3498db; }
.insight-card.sunny { border-left-color: #f1c40f; }
.insight-card.rain { border-left-color: #2980b9; }
.insight-card.warm { border-left-color: #e67e22; }
.insight-card.wind { border-left-color: #1abc9c; }
.insight-card.avg { border-left-color: #9b59b6; }
.insight-card.calima { border-left-color: #d4a017; }
.insight-card.aqi { border-left-color: #8e44ad; }

.insight-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.insight-body {
  min-width: 0;
}

.insight-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #888;
  font-weight: 600;
}

.insight-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.insight-city {
  font-size: 0.85rem;
  color: #555;
}

.insight-city a {
  color: #2563eb;
  text-decoration: none;
}

.insight-city a:hover {
  text-decoration: underline;
}

.insight-card.fuel-avg {
  border-left-color: #e67e22;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.insight-card.fuel-avg .insight-body { width: 100%; }
.insight-card.fuel-avg:hover {
  box-shadow: 0 3px 14px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.fuel-avg-grid {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: baseline;
  column-gap: 0.4rem;
  row-gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.fuel-avg-row { display: contents; }
.fuel-avg-trend,
.fuel-avg-trend-empty {
  min-width: 5rem;
}
.fuel-avg-trend { justify-content: center; }
.fuel-avg-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.fuel-avg-name {
  font-size: 0.8rem;
  color: #555;
}
.fuel-avg-price {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  text-align: right;
}
.fuel-avg-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.fuel-trend-up   { color: #c0392b; background: rgba(231,76,60,0.1); }
.fuel-trend-down { color: #1e8449; background: rgba(39,174,96,0.1); }
.fuel-trend-flat { color: #6b7280; background: rgba(107,114,128,0.1); }
.fuel-trend-arrow { line-height: 1; }

.text-muted-inline {
  color: #999;
  font-size: 0.8em;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
}

#map {
  width: 100%;
  height: 500px;
  border-radius: 8px;
}

.weather-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.weather-table th,
.weather-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.weather-table th {
  background: #1a1a2e;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.weather-table td a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.weather-table td a:hover {
  text-decoration: underline;
}

.weather-table tr:hover {
  background: #f8f9fa;
}

.no-data {
  color: #999;
  font-style: italic;
}

/* City detail */
.section-title .section-hint {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #94a3b8;
  margin-left: 0.35rem;
}
.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
  margin: 0.75rem 0 0.5rem;
}

/* Hero */
/* ── City header (compact, dashboard-inspired) ── */
.city-header {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.city-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.city-header-icon {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.22));
}
.city-header-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.15;
}
.city-header-temp {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a2e;
}
.city-header-desc {
  font-size: 1rem;
  font-weight: 500;
  color: #555;
  margin-left: 0.35rem;
}
.city-header-feels {
  font-size: 0.85rem;
  color: #888;
}
.city-header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1 1 auto;
}
.city-header-pills .dash-pill {
  font-size: 0.9rem;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
}
.city-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.8rem;
  color: #888;
}
.city-header-compare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  background: #f0f5ff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
}
.city-header-compare label { font-size: 0.82rem; color: #374151; font-weight: 600; margin: 0; white-space: nowrap; }
.city-hero-updated {
  color: #888 !important;
  font-size: 0.8rem !important;
}

/* ── City cards row 1 (Sea + AQI, 2 columns) ── */
.city-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.city-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border-left: 4px solid #e0e0e0;
}
.city-card-sea { border-left-color: #3b82f6; }
.city-card-aqi { border-left-color: #8b5cf6; }
.city-card-webcams { border-left-color: #f59e0b; }
.city-card-head {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.city-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.city-card-metric {
  display: flex;
  flex-direction: column;
}
.city-card-metric-label {
  font-size: 0.7rem;
  color: #888;
  font-weight: 500;
}
.city-card-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

/* ── City webcam strip (row 2, full width) ── */
.city-webcam-strip .city-card-webcams {
  border-left-color: #f59e0b;
}
.city-card-webcam-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.city-card-webcam {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 9;
}
.city-card-webcam img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.city-card-webcam .webcam-card-live {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 768px) {
  .city-header { padding: 0.85rem 1rem; gap: 0.5rem; }
  .city-header-icon { font-size: 2.8rem; }
  .city-header-name { font-size: 1.3rem; }
  .city-header-temp { font-size: 1.6rem; }
  .city-header-pills { gap: 0.3rem; }
  .city-header-pills .dash-pill { font-size: 0.82rem; padding: 0.35rem 0.7rem; }
  .city-card-webcam-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .city-header-left { width: 100%; }
  .city-cards-row { grid-template-columns: 1fr; }
  .city-card-webcam-row { grid-template-columns: repeat(2, 1fr); }
}

/* Metrics inside the hero */
.hero-metric {
  background: #f7f8fa;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  line-height: 1.2;
  height: 100%;
}

.hero-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #888;
}

.hero-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 0.15rem;
}

.hero-metric-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
}

.hero-metric-sub {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.1rem;
}

/* Air quality inside the hero — 3rd column */
.hero-aqi {
  padding: 0.9rem 1rem;
  background: #f7f8fa;
  border: 1px solid #eef0f3;
  border-radius: 10px;
}
.hero-aqi .aqi-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #888;
}
.hero-aqi .aqi-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}
.hero-aqi .aqi-pollutants {
  border-top: 1px solid #e9ebef;
  gap: 0.5rem 1rem !important;
  font-size: 0.78rem;
  color: #666;
}
.hero-aqi .pollutant-key {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: #888;
  font-weight: 600;
  margin-right: 0.3rem;
}
.hero-aqi .pollutant-val { font-weight: 700; color: #1a1a2e; }

/* Metric strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metric-tile {
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.metric-icon { font-size: 1.5rem; line-height: 1; }
.metric-body { min-width: 0; }
.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #888;
}
.metric-value { font-size: 1.15rem; font-weight: 700; color: #1a1a2e; line-height: 1.2; }
.metric-unit { font-size: 0.8rem; font-weight: 500; color: #888; }
.metric-sub { font-size: 0.75rem; color: #666; margin-top: 0.1rem; }

/* Air Quality card */
.aqi-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.aqi-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.aqi-dot.lg { width: 18px; height: 18px; }
.aqi-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: #888; }
.aqi-value { font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.aqi-pollutants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.85rem;
}
.aqi-pollutants > div { display: flex; gap: 0.4rem; align-items: baseline; }
.pollutant-key { color: #888; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pollutant-val { font-weight: 700; color: #1a1a2e; }

/* Forecast list */
.forecast-section { margin-top: 0.75rem; }

.forecast-list {
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem 0.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.forecast-day-block { border-bottom: 1px solid #f3f4f6; }
.forecast-day-block:last-child { border-bottom: none; }
.forecast-row {
  display: grid;
  grid-template-columns: 5.5rem 2.2rem 4.5rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
}
.forecast-row:hover { background: #f8fafc; }
.forecast-row:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
.forecast-row.today { background: #f8faff; }
.forecast-chev {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
.forecast-day-block.expanded .forecast-chev { transform: rotate(180deg); }
.forecast-hourly-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.forecast-day-block.expanded .forecast-hourly-wrap { max-height: 240px; }
.forecast-hourly-wrap .hourly-list {
  box-shadow: none;
  background: transparent;
  padding: 0.25rem 0.4rem 0.7rem;
}
.forecast-hourly-empty {
  padding: 0.5rem 0.85rem 0.8rem;
  color: #cbd5e1;
  font-size: 0.8rem;
}

.forecast-day { line-height: 1.2; }
.forecast-weekday { font-weight: 600; font-size: 0.9rem; color: #1a1a2e; text-transform: capitalize; }
.forecast-date { font-size: 0.75rem; color: #888; }

.forecast-icon { font-size: 1.6rem; line-height: 1; text-align: center; }

.forecast-precip { font-size: 0.8rem; color: #2563eb; font-weight: 500; }
.forecast-precip.muted { color: #ccc; font-weight: 400; }

.forecast-range {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.2rem;
  align-items: center;
  gap: 0.5rem;
}
.forecast-low, .forecast-high {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
}
.forecast-low { color: #6b7280; text-align: right; }
.forecast-high { text-align: left; }

.forecast-bar {
  position: relative;
  height: 6px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
}
.forecast-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.forecast-skeleton {
  height: 56px;
  margin: 0.4rem;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
}

/* Today · hour-by-hour strip */
.hourly-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.75rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.hourly-card {
  flex: 0 0 auto;
  min-width: 4.8rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
  border-radius: 10px;
  background: #f8fafc;
  scroll-snap-align: start;
}
.hourly-card.now {
  background: #eef4ff;
  box-shadow: 0 0 0 1px #c5d7ff inset;
}
.hourly-hour {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}
.hourly-card.now .hourly-hour { color: #1d4ed8; }
.hourly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.2rem;
  align-items: center;
  justify-items: center;
}
.hourly-cell { line-height: 1.1; }
.hourly-icon { font-size: 1.1rem; }
.hourly-temp {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
}
.hourly-rain {
  font-size: 0.62rem;
  color: #2563eb;
  font-weight: 500;
  white-space: nowrap;
}
.hourly-rain.muted { color: #cbd5e1; font-weight: 400; }
.hourly-wind {
  font-size: 0.62rem;
  color: #64748b;
  white-space: nowrap;
}
.hourly-skeleton {
  flex: 0 0 auto;
  width: 4.8rem;
  height: 100px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
}
@keyframes skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* History section */
.history-section { margin-top: 0.75rem; }

.history-controls {
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.control-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.4rem;
}

.metric-scroll .metric-btn { white-space: nowrap; }

.compare-chart { min-height: 420px; height: 50vh; max-height: 540px; }
.compare-chart canvas { width: 100% !important; height: 100% !important; }

.text-muted {
  color: #888;
  font-size: 0.85rem !important;
}

.custom-range-wrap {
  display: inline-block;
  position: relative;
}

.custom-range-popup {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 1rem;
  z-index: 100;
  min-width: 200px;
  max-width: calc(100vw - 2rem);
}

.custom-range-popup.open {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-range-popup label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin: 0;
}

.date-input {
  padding: 0.4rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  width: 100%;
}

.range-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.chart-container {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* Map markers */
.weather-icon-marker {
  background: none !important;
  border: none !important;
}

.marker-emoji {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  padding: 2px 4px;
  line-height: 1;
}

/* Map tooltip */
.temp-tooltip {
  font-size: 0.8rem;
  font-weight: 600;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 6px !important;
  padding: 4px 8px !important;
}

/* Compare page */
.compare-controls label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
  margin-bottom: 0.5rem;
}

.chip {
  padding: 0.3rem 0.7rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.chip.selected {
  color: #fff;
}

.display-btn.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.metric-btn.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.compare-chart {
  min-height: 450px;
}

/* Responsive */
@media (min-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  /* Navbar: brand stays, links and flags share the second row */
  .navbar {
    padding: 0.6rem 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    row-gap: 0.4rem;
  }
  .nav-brand { font-size: 1.05rem; }
  .nav-search { order: 3; flex: 1 1 100%; max-width: none; }
  .nav-search input { font-size: 16px; padding: 0.55rem 0.8rem 0.55rem 2rem; }
  .nav-links { gap: 1rem; order: 4; flex: 1 1 100%; justify-content: center; }
  .nav-links a { font-size: 0.95rem; padding: 0.25rem 0.3rem; }
  .lang-switch { gap: 0.35rem; }
  .lang-flag { font-size: 1.15rem; padding: 0.15rem; }

  /* Insights: horizontal swipe cards (more scannable than 2-col stack) */
  .insights-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 1rem;
    gap: 0.75rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.25rem 1rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .insights-grid::-webkit-scrollbar { display: none; }
  .insight-card {
    scroll-snap-align: start;
    padding: 0.9rem;
  }
  .insight-value { font-size: 1.1rem; }

  #map { height: 320px; }

  /* Dashboard table — ensure horizontal scroll rather than viewport overflow */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0 1rem;
  }
  .weather-table,
  #stations-table {
    font-size: 0.85rem;
  }
  .weather-table th,
  .weather-table td,
  #stations-table th,
  #stations-table td {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
  }


  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .metric-tile { padding: 0.75rem 0.85rem; gap: 0.55rem; }
  .metric-icon { font-size: 1.3rem; }
  .metric-value { font-size: 1.05rem; }

  .hero-metric { padding: 0.45rem 0.55rem; }
  .hero-metric-label { font-size: 0.6rem; }
  .hero-metric-value { font-size: 0.9rem; }
  .hero-metric-unit { font-size: 0.7rem; }
  .hero-metric-sub { font-size: 0.65rem; }

  .forecast-row {
    grid-template-columns: 4.5rem 1.8rem 3.5rem 1fr;
    gap: 0.5rem;
    padding: 0.6rem 0.6rem;
  }
  .forecast-icon { font-size: 1.4rem; }
  .forecast-precip { font-size: 0.75rem; }
  .forecast-range { grid-template-columns: 2rem 1fr 2rem; gap: 0.4rem; }
  .forecast-low, .forecast-high { font-size: 0.8rem; }

  .history-controls { padding: 0.75rem 0.85rem; }
  .history-sub-controls { gap: 0.85rem; }
  .compare-chart { min-height: 320px; height: 60vw; max-height: 440px; }

  .aqi-pollutants { gap: 0.4rem 1rem; font-size: 0.8rem; }
  .section-title { font-size: 0.95rem; margin: 1.25rem 0 0.6rem; }

  /* Controls — less gap on mobile */
  .metric-btns,
  .range-selector { gap: 0.35rem !important; }

  /* Touch targets — bump button sizes to ~40px min tap area */
  .btn-sm,
  .chip {
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
  }
  .btn {
    min-height: 40px;
  }

  /* City chip list scrolls if crowded — but stays wrapped for reachability */
  .city-chips { gap: 0.35rem !important; }

  .chart-container {
    padding: 0.9rem;
    border-radius: 10px;
  }
  .compare-chart { min-height: 340px; }

  /* Popup: anchor to the right edge of its trigger on small screens */
  .custom-range-popup {
    left: auto;
    right: 0;
  }
}

@media (max-width: 420px) {
  .insights-grid { grid-auto-columns: 86%; }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.9rem; }
  .current-temp { font-size: 2.2rem; }
  .insight-icon { font-size: 1.5rem; }
  .insight-value { font-size: 1rem; }
  .insight-label { font-size: 0.7rem; }

  .hero-metrics { grid-template-columns: 1fr; gap: 0.3rem; }
  .hero-metric { padding: 0.35rem 0.5rem; }
  .forecast-row { grid-template-columns: 3.8rem 1.6rem 3rem 1fr auto; }
}

@media (hover: none) {
  .chip:hover { border-color: #ddd; color: inherit; }
  .btn:hover { background: #fff; }
  .weather-table tr:hover { background: transparent; }
}

/* Calima & Air Quality */
.calima-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
  text-decoration: none;
}
a.calima-badge:hover { opacity: 0.85; }
.calima-badge.moderate { background: #fef3c7; color: #92400e; }
.calima-badge.severe { background: #fee2e2; color: #991b1b; }

.aqi-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.marker-emoji.calima-moderate {
  background: rgba(255, 200, 50, 0.9) !important;
  box-shadow: 0 0 8px rgba(212, 160, 23, 0.6);
}
.marker-emoji.calima-severe {
  background: rgba(255, 100, 100, 0.9) !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.7);
  animation: pulse-calima 2s infinite;
}
@keyframes pulse-calima {
  0%, 100% { box-shadow: 0 0 8px rgba(220, 38, 38, 0.5); }
  50% { box-shadow: 0 0 16px rgba(220, 38, 38, 0.9); }
}

/* Home page */
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #1a5490 0%, #4a90e2 55%, #6fb1d4 100%);
  background-image: linear-gradient(135deg, rgba(26,84,144,0.45), rgba(26,26,46,0.55)), url('/images/hero-tenerife.webp');
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.home-hero-inner {
  padding: 1.75rem 1.5rem;
  max-width: 900px;
  width: 100%;
}
.home-hero-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.home-hero-tagline {
  font-size: 1.05rem;
  font-weight: 400;
  opacity: 0.92;
  margin-bottom: 1rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.home-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}
.home-hero-chip-sep { opacity: 0.5; }

@media (min-width: 640px) {
  .home-hero { min-height: 240px; }
  .home-hero-title { font-size: 2.3rem; }
  .home-hero-tagline { font-size: 1.1rem; }
  .home-hero-inner { padding: 1.75rem 2rem; }
}
@media (min-width: 992px) {
  .home-hero { min-height: 280px; }
  .home-hero-title { font-size: 2.6rem; }
}

.home-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 0.7rem;
}
.home-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #0284c7, #38bdf8);
}
@media (min-width: 640px) {
  .home-section-title { font-size: 1.25rem; }
}

.home-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: 10px;
  font-size: 0.95rem;
}
.home-alert a { color: #c2410c; font-weight: 600; }

.zone-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.zone-card-link:hover .zone-card { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.zone-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }

.home-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  height: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.home-cta-weather { background: linear-gradient(135deg, #0ea5e9, #1a5490); }
.home-cta-fuel    { background: linear-gradient(135deg, #10b981, #047857); }
.home-cta-icon { font-size: 2.4rem; flex-shrink: 0; }
.home-cta-body { flex: 1; }
.home-cta-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.2rem; }
.home-cta-desc { font-size: 0.9rem; opacity: 0.92; margin-bottom: 0.5rem; }
.home-cta-action { font-size: 0.9rem; font-weight: 600; }

.home-footer-credits {
  max-width: 1200px;
  margin: 2rem auto 1rem;
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.6;
}
.home-footer-credits a { color: #4b5563; }
.footer-nav {
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.85rem;
}
.footer-nav a { color: #1a1a2e; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }
.footer-links {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  font-size: 0.85rem;
}
.footer-links a { color: #374151; text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }
.footer-links span { color: #9ca3af; }

.content-page {
  max-width: 720px;
  margin: 2rem auto 3rem;
  padding: 0 1.25rem;
  line-height: 1.7;
  color: #1f2937;
}
.content-page h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 1rem;
  color: #1a1a2e;
}
.content-page p { margin-bottom: 1rem; }
.content-page a { color: #0ea5e9; }
.content-lead { font-size: 1.1rem; color: #4b5563; }

.today-page { max-width: 1100px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
.today-hero { text-align: center; margin-bottom: 2rem; }
.today-hero h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); color: #1a1a2e; margin-bottom: 0.75rem; }
.today-lead { color: #4b5563; font-size: 1.05rem; max-width: 640px; margin: 0 auto; }
.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.today-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.today-q { font-size: 0.85rem; font-weight: 500; color: #6b7280; margin: 0; text-transform: none; letter-spacing: 0; }
.today-verdict { font-size: 1.35rem; font-weight: 600; color: #1a1a2e; margin: 0; line-height: 1.25; }
.today-detail { font-size: 0.85rem; color: #6b7280; margin: 0; }
.today-card--yes, .today-card--severe, .today-card--poor, .today-card--extreme, .today-card--very-high, .today-card--warn { border-left: 4px solid #ef4444; }
.today-card--moderate, .today-card--high, .today-card--cool { border-left: 4px solid #f59e0b; }
.today-card--no, .today-card--none, .today-card--good, .today-card--warm, .today-card--pleasant, .today-card--low, .today-card--calm, .today-card--beach { border-left: 4px solid #10b981; }
.today-card--fair { border-left: 4px solid #16a34a; }
.today-card--cold { border-left: 4px solid #3b82f6; }
.today-card--upcoming { border-left: 4px solid #f97316; }

/* Calima dedicated page */
.calima-page { max-width: 960px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
.calima-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  margin-bottom: 1.75rem;
}
a.calima-hero { text-decoration: none; color: inherit; }
a.calima-hero:hover { background: #f9fafb; }
.d-flex > .calima-hero { margin-bottom: 0; height: 100%; }
.calima-hero-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; display: inline-block; }
.calima-hero--severe .calima-hero-icon,
.calima-hero--moderate .calima-hero-icon,
.calima-hero--upcoming .calima-hero-icon {
  animation: calima-blink 1.5s ease-in-out infinite;
}
.calima-hero-body { flex: 1; min-width: 0; }
.calima-hero-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.calima-hero-heading {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  margin: 0 0 0.35rem;
  color: #1a1a2e;
  font-weight: 700;
}
.calima-hero-detail { margin: 0; color: #4b5563; font-size: 1rem; line-height: 1.5; }
.calima-hero--severe { border-left: 6px solid #ef4444; }
.calima-hero--moderate { border-left: 6px solid #eab308; }
.calima-hero--upcoming { border-left: 6px solid #f97316; }
.calima-hero--none { border-left: 6px solid #10b981; }

.calima-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.calima-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.3rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-width: 0;
}
.calima-week-day.today { background: #f8faff; box-shadow: 0 0 0 1px #c5d7ff inset; }
.calima-week-weekday {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.calima-week-daynum {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
}
.calima-week-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #10b981;
  margin: 0.1rem 0;
}
.calima-week-day--moderate .calima-week-dot { background: #eab308; }
.calima-week-day--severe .calima-week-dot { background: #ef4444; }
.calima-week-day--unknown .calima-week-dot { background: #cbd5e1; }
.calima-week-dust {
  font-size: 0.7rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 540px) {
  .calima-week-strip { gap: 0.25rem; }
  .calima-week-day { padding: 0.45rem 0.2rem; }
  .calima-week-weekday { font-size: 0.62rem; }
  .calima-week-daynum { font-size: 0.85rem; }
  .calima-week-dust { font-size: 0.62rem; }
}

.calima-section { margin-top: 1.75rem; }
.calima-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.calima-section-body { color: #4b5563; line-height: 1.6; margin: 0 0 0.5rem; }
.calima-section-body.muted { color: #94a3b8; }

.calima-city-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}
.calima-city-row {
  display: grid;
  grid-template-columns: 0.6rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, transform 0.15s;
}
.calima-city-row:hover { background: #f8fafc; transform: translateY(-1px); color: inherit; }
.calima-city-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #10b981;
}
.calima-city-row--moderate .calima-city-dot { background: #eab308; }
.calima-city-row--severe .calima-city-dot { background: #ef4444; }
.calima-city-name {
  font-weight: 600;
  color: #1a1a2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calima-city-dust {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #1a1a2e;
}
.calima-city-unit { font-size: 0.72rem; color: #94a3b8; font-weight: 500; margin-left: 0.15rem; }

.calima-recent-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.calima-recent-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.calima-recent-row--moderate { border-left: 4px solid #eab308; }
.calima-recent-row--severe { border-left: 4px solid #ef4444; }
.calima-recent-day { font-weight: 600; color: #1a1a2e; }
.calima-recent-severity {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #64748b;
  padding: 0.15rem 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
}
.calima-recent-row--severe .calima-recent-severity { background: #fee2e2; color: #b91c1c; }
.calima-recent-row--moderate .calima-recent-severity { background: #fef3c7; color: #92400e; }
.calima-recent-peak { font-size: 0.85rem; color: #64748b; font-variant-numeric: tabular-nums; }

.calima-tips {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.calima-tips li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
  color: #334155;
  line-height: 1.5;
  position: relative;
  padding-left: 2rem;
}
.calima-tips li::before {
  content: '✓';
  position: absolute;
  left: 0.85rem;
  top: 0.7rem;
  color: #10b981;
  font-weight: 700;
}

@media (max-width: 540px) {
  .calima-hero { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .calima-recent-row { grid-template-columns: 1fr auto; row-gap: 0.25rem; }
  .calima-recent-peak { grid-column: 1 / -1; }
}

.home-calima-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #1a1a2e;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.home-calima-card:hover { background: #f9fafb; }
.home-calima-dot { font-size: 0.95rem; display: inline-block; }
.home-calima-severe .home-calima-dot,
.home-calima-moderate .home-calima-dot,
.home-calima-upcoming .home-calima-dot {
  animation: calima-blink 1.5s ease-in-out infinite;
}
@keyframes calima-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.home-calima-label { font-weight: 600; }
.home-calima-msg { flex: 1; color: #4b5563; }
.home-calima-value { font-size: 0.8rem; color: #6b7280; font-variant-numeric: tabular-nums; }
.home-calima-arrow { color: #9ca3af; font-weight: 600; }
.home-calima-severe { border-left: 4px solid #ef4444; }
.home-calima-moderate { border-left: 4px solid #eab308; }
.home-calima-none { border-left: 4px solid #10b981; }
.home-calima-unknown { border-left: 4px solid #9ca3af; }
.home-calima-upcoming { border-left: 4px solid #f97316; }
@media (max-width: 540px) {
  .home-calima-msg { flex-basis: 100%; order: 3; }
  .home-calima-card { flex-wrap: wrap; }
}

.home-today-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  text-decoration: none;
  color: #1a1a2e;
  transition: transform 0.15s, box-shadow 0.15s;
}
.home-today-banner:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15); color: #1a1a2e; }
.home-today-banner-icon { font-size: 2rem; flex-shrink: 0; }
.home-today-banner-body { flex: 1; }
.home-today-banner-title { font-weight: 600; font-size: 1.15rem; margin-bottom: 0.2rem; }
.home-today-banner-desc { font-size: 0.95rem; color: #4b5563; }
.home-today-banner-action { font-weight: 600; color: #6d28d9; white-space: nowrap; font-size: 0.95rem; }
@media (max-width: 540px) {
  .home-today-banner { flex-wrap: wrap; }
  .home-today-banner-action { flex-basis: 100%; }
}
.content-contact { text-align: center; padding: 1.5rem 0 0.5rem; }
.content-contact-email {
  display: inline-block;
  font-size: 1.75rem;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  border-bottom: 2px solid #0ea5e9;
  padding-bottom: 0.1rem;
}
.content-contact-email:hover { color: #0ea5e9; }

/* Fuel stations table — tuned to match site style */
#stationsTable,
#stations-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100% !important;
  font-size: 0.9rem;
}
#stationsTable,
#stations-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0.75rem 0.9rem;
  white-space: nowrap;
}
#stationsTable,
#stations-table tbody td {
  border: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 0.7rem 0.9rem;
  color: #1a1a2e;
  vertical-align: middle;
}
#stationsTable,
#stations-table tbody tr:last-child td { border-bottom: none !important; }
#stationsTable,
#stations-table tbody tr { background: #fff !important; transition: background 0.12s ease; }
#stationsTable,
#stations-table tbody tr:hover { background: #f8fafc !important; }
#stationsTable,
#stations-table td.text-end, #stationsTable,
#stations-table th.text-end {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
#stationsTable,
#stations-table td a {
  color: #1a1a2e;
  font-weight: 600;
  text-decoration: none;
}
#stationsTable,
#stations-table td a:hover { color: #0284c7; }
#stationsTable,
#stations-table td .text-muted.small { font-size: 0.75rem; margin-top: 0.1rem; }

/* DataTables controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  margin-left: 0.4rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: #0284c7; }
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}
.dataTables_wrapper .dataTables_info {
  color: #64748b;
  font-size: 0.8rem;
  padding-top: 0.75rem !important;
}
.dataTables_wrapper .dataTables_paginate {
  padding-top: 0.5rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  color: #64748b !important;
  padding: 0.25rem 0.65rem !important;
  font-size: 0.85rem;
  margin: 0 0.1rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #1a1a2e !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #cbd5e1 !important;
  background: transparent !important;
  border-color: transparent !important;
}
#stationsTable,
#stations-table thead th.sorting::after,
#stationsTable,
#stations-table thead th.sorting_asc::after,
#stationsTable,
#stations-table thead th.sorting_desc::after {
  opacity: 0.5;
}

@media (max-width: 600px) {
  #stationsTable,
#stations-table { font-size: 0.82rem; }
  #stationsTable,
#stations-table thead th, #stationsTable,
#stations-table tbody td { padding: 0.55rem 0.55rem; }
}

/* Error page */
.error-page {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem 1.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.error-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.error-title { font-size: 1.4rem; font-weight: 700; color: #1a1a2e; margin: 0 0 0.5rem; }
.error-body { color: #666; margin: 0 0 1rem; }

/* Beach today */
.beach-hero { padding: 0.5rem 0 0.25rem; }
.beach-hero-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem 1rem; }
.beach-hero-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.25rem; color: #1a1a2e; flex-grow: 1; }
.beach-hero-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.8rem; color: #64748b; }
.beach-hero-today { font-weight: 500; }
.beach-hero-subtitle { color: #666; margin: 0.25rem 0 0; font-size: 0.95rem; }

.beach-list {
  display: grid;
  grid-template-columns: auto minmax(10rem, auto) repeat(5, auto) auto 1fr;
  row-gap: 0.6rem;
  column-gap: 1rem;
}
.beach-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.beach-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.beach-rank {
  font-weight: 700;
  color: #94a3b8;
  font-size: 1.1rem;
  min-width: 2.2rem;
}
.beach-score {
  --score-color: #2ecc71;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--score-color) 15%, #fff);
  border: 2px solid var(--score-color);
  color: var(--score-color);
}
.beach-score-val { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.beach-score-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 0.1rem;
}
.beach-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.beach-weather-icon { font-size: 1.8rem; }

.beach-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 4rem;
}
.beach-metric-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}
.beach-metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
}
.beach-metric-unit {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.beach-section-headers {
  display: none;
  justify-content: space-between;
  padding: 0 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}
.beach-section-headers .beach-section-headers-label.muted { padding-right: 1rem; }
@media (min-width: 901px) { .beach-section-headers { display: flex; } }

.beach-forecast {
  padding-left: 1rem;
  margin-left: 0.25rem;
  border-left: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9rem;
}
.beach-forecast-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
}
.beach-forecast-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
}
.beach-forecast-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  background: #f8fafc;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #1a1a2e;
  font-weight: 600;
  white-space: nowrap;
}
.beach-forecast-item .fc-unit { font-size: 0.65rem; color: #64748b; font-weight: 500; }
.beach-forecast-item.warn { background: #fef3c7; color: #92400e; }
.beach-forecast-item.steady { background: #ecfdf5; color: #047857; }
.beach-forecast-item strong { font-weight: 700; margin-left: 0.15rem; }

@media (max-width: 900px) {
  .beach-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
  .beach-row {
    grid-column: auto;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank name"
      "metrics metrics"
      "forecast forecast";
    gap: 0.7rem 1rem;
  }
  .beach-row > .beach-rank { grid-area: rank; }
  .beach-row > .beach-name { grid-area: name; white-space: normal; }
  .beach-row > .beach-weather-icon { display: none; }
  .beach-row > .beach-metric { grid-row: 2; }
  .beach-row > .beach-forecast {
    grid-area: forecast;
    padding-left: 0;
    border-left: none;
    border-top: 1px dashed #cbd5e1;
    padding-top: 0.6rem;
  }
}
@media (max-width: 480px) {
  .beach-row { padding: 0.85rem 1rem; }
  .beach-metric { min-width: 3.5rem; }
  .beach-metric-value { font-size: 0.9rem; }
}

/* Home split row: beaches (left) & stack (right) share equal height */
.home-split-row .beach-list.flex-grow-1 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.home-split-row .beach-list.flex-grow-1 > .beach-row {
  display: grid;
  grid-column: auto;
  grid-template-columns: auto minmax(10rem, 1fr) repeat(5, auto) auto auto;
  gap: 1rem;
  flex: 1 1 0;
  align-items: center;
}
.home-split-right { flex: 1; }
.home-split-right > * { flex: 1 1 0; }
.home-split-right > .zone-duo-card { flex: 0.55 1 0; }
.home-split-right > .home-cta-compact { flex: 1 1 0; min-height: 100px; }

/* Zone duo (North + South side-by-side in one card) */
.zone-duo-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.zone-duo-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  color: inherit;
}
.zone-duo-item {
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}
.zone-duo-item + .zone-duo-item { border-left: 1px solid #f1f5f9; }
.zone-duo-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
}
.zone-duo-icon { font-size: 1rem; }
.zone-duo-name { flex-grow: 1; }
.zone-duo-weather { font-size: 1.1rem; }
.zone-duo-temp { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; line-height: 1.1; }
.zone-duo-range { font-size: 0.75rem; font-weight: 500; color: #64748b; margin-left: 0.3rem; }
.zone-duo-meta { font-size: 0.72rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Compact CTA inside the home split */
.home-cta-compact {
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.home-cta-compact .home-cta-icon { font-size: 2.3rem; flex-shrink: 0; }
.home-cta-compact .home-cta-title { font-size: 1.05rem; }
.home-cta-compact .home-cta-desc { font-size: 0.82rem; }
.home-cta-compact .home-cta-body { min-width: 0; }
.home-cta-compact .home-cta-title { font-size: 0.95rem; margin-bottom: 0.1rem; }
.home-cta-compact .home-cta-desc {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-cta-compact .home-cta-action { font-size: 0.78rem; }

@media (max-width: 991px) {
  .home-split-right > * { flex: none !important; min-height: auto !important; }
  .home-split-right { gap: 0.5rem !important; }
  .home-cta.home-cta-compact {
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.7rem;
  }
  .home-cta-compact .home-cta-icon { font-size: 1.5rem !important; }
  .home-cta-compact .home-cta-title { font-size: 0.88rem !important; margin-bottom: 0.1rem; }
  .home-cta-compact .home-cta-desc { font-size: 0.75rem !important; -webkit-line-clamp: 1; margin-bottom: 0.1rem !important; }
  .home-cta-compact .home-cta-action { font-size: 0.75rem !important; }
}

/* Home: beaches card */
.beach-home-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  color: #1a1a2e;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.beach-home-head { display: flex; align-items: baseline; margin-bottom: 0.85rem; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.beach-home-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: #1a1a2e; }
.beach-home-seeall { color: #0284c7; font-size: 0.85rem; text-decoration: none; font-weight: 500; }
.beach-home-seeall:hover { color: #0369a1; text-decoration: underline; }
.beach-home-list { display: flex; flex-direction: column; gap: 0.4rem; }
.beach-home-item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.8rem;
  background: #f8fafc;
  border-radius: 10px;
  color: #1a1a2e;
  text-decoration: none;
  transition: background 0.15s ease;
}
.beach-home-item:hover { background: #eff6ff; color: #1a1a2e; }
.beach-home-rank { font-weight: 700; color: #94a3b8; }
.beach-home-name { font-weight: 600; font-size: 0.95rem; color: #1a1a2e; }
.beach-home-sub { font-size: 0.75rem; color: #64748b; margin-top: 0.1rem; }
.beach-home-score { font-weight: 700; font-size: 1.1rem; color: #0284c7; }

/* ── Webcams ── */
.webcam-page { max-width: 1100px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
.webcam-hero { text-align: center; margin-bottom: 1.5rem; }
.webcam-hero h1 { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.3rem; }
.webcam-lead { color: #6b7280; font-size: 0.95rem; margin: 0; }

.webcam-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.webcam-filter-btn {
  background: #fff; border: 1px solid #d5d9e0; border-radius: 20px;
  padding: 0.3rem 0.9rem; font-size: 0.82rem; font-weight: 500;
  color: #555; cursor: pointer; transition: all 0.15s;
}
.webcam-filter-btn:hover { border-color: #1a1a2e; color: #1a1a2e; }
.webcam-filter-btn.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }

.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.webcam-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.webcam-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.10); }
.webcam-card-link { display: block; text-decoration: none; color: inherit; }
.webcam-card-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #f0f0f0; }
.webcam-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.webcam-card-live {
  position: absolute; top: 8px; right: 8px;
  background: #ef4444; color: #fff;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 4px;
  line-height: 1.4;
}
.webcam-card-body { padding: 0.6rem 0.8rem; }
.webcam-card-name { font-weight: 600; font-size: 0.9rem; color: #1a1a2e; }
.webcam-card-zone { font-size: 0.75rem; color: #6b7280; margin-top: 0.15rem; }

.webcam-attribution { text-align: center; color: #94a3b8; font-size: 0.8rem; margin-top: 2rem; }
.webcam-attribution a { color: #6b7280; text-decoration: underline; }

/* Webcam thumbnails on city page */
.webcam-thumbnails {
  display: flex; gap: 0.75rem; overflow-x: auto;
  -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem;
}
.webcam-thumb {
  flex-shrink: 0; width: 200px; text-decoration: none; color: inherit;
  border-radius: 10px; overflow: hidden;
  transition: transform 0.15s;
}
.webcam-thumb:hover { transform: translateY(-2px); }
.webcam-thumb-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
  border-radius: 10px;
}
.webcam-thumb-label {
  display: block; font-size: 0.75rem; color: #555;
  margin-top: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Webcam column on home page */
.home-webcam-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.home-webcam-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; flex: 1;
}
.home-webcam-pair .home-webcam-card {
  display: flex; flex-direction: column;
}
.home-webcam-pair .webcam-card-img-wrap { flex: 1; }
.home-webcam-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.home-webcam-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.10); }
.home-webcam-label {
  padding: 0.5rem 0.7rem; font-weight: 600; font-size: 0.85rem; color: #1a1a2e;
}

@media (max-width: 640px) {
  .webcam-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
  .webcam-card-body { padding: 0.4rem 0.6rem; }
  .webcam-card-name { font-size: 0.82rem; }
  .webcam-thumb { width: 160px; }
}

/* ── Dashboard redesign ── */
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 16px; padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); flex-wrap: wrap; gap: 0.75rem;
}
.dash-header-title h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.dash-header-title p { font-size: 0.85rem; color: #6b7280; margin: 0.15rem 0 0; }
.dash-header-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dash-pill {
  background: #f7f8fa; border: 1px solid #e5e7eb; border-radius: 20px;
  padding: 0.3rem 0.75rem; font-size: 0.8rem; font-weight: 500; color: #374151;
  white-space: nowrap;
}

/* Zone forecast strip */
.zone-fc-strip {
  display: flex; gap: 0.15rem; border-top: 1px solid #e9ebef;
  padding-top: 0.45rem; margin-top: 0.25rem;
}
.zone-fc-day {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 0;
}
.zone-fc-label { font-size: 0.85rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.03em; }
.zone-fc-day.today .zone-fc-label { font-weight: 700; color: #1a1a2e; }
.zone-fc-icon { font-size: 1.9rem; line-height: 1.3; }
.zone-fc-hi { font-size: 1.1rem; font-weight: 600; color: #6b7280; }
.zone-fc-day.today .zone-fc-hi { font-weight: 700; color: #1a1a2e; }

/* Sea summary card */
.sea-summary-card {
  background: #fff; border-radius: 16px; padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); height: 100%;
  display: flex; flex-direction: column;
}
.sea-summary-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.sea-summary-icon { font-size: 1.5rem; }
.sea-summary-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: #1a1a2e; }
.sea-summary-metrics { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.sea-summary-metric {}
.sea-summary-label { font-size: 0.72rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.03em; }
.sea-summary-value { font-size: 1.3rem; font-weight: 600; color: #1a1a2e; }
.sea-summary-verdict {
  margin-top: auto; padding: 0.4rem 0.75rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 500;
}
.sea-calm { background: #ecfdf5; color: #065f46; }
.sea-moderate { background: #fffbeb; color: #92400e; }
.sea-rough { background: #fef2f2; color: #991b1b; }

/* Dashboard section heads */
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.dash-section-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.dash-section-link { font-size: 0.85rem; color: #2563eb; text-decoration: none; font-weight: 500; }
.dash-section-link:hover { text-decoration: underline; }

/* Dashboard webcam row */
.dash-webcam-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
}
.webcam-card-temp {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 2px 8px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
}

/* Calima one-line banner */
.dash-calima-banner {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: #fff; border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  text-decoration: none; color: #374151;
  font-size: 0.88rem; transition: background 0.15s;
}
.dash-calima-banner:hover { background: #f9fafb; color: #374151; }
.dash-calima-banner--moderate { border-left: 4px solid #eab308; }
.dash-calima-banner--severe { border-left: 4px solid #ef4444; }
.dash-calima-banner--upcoming { border-left: 4px solid #f97316; }
.dash-calima-dot { font-size: 0.9rem; display: inline-block; }
.dash-calima-banner--moderate .dash-calima-dot,
.dash-calima-banner--severe .dash-calima-dot,
.dash-calima-banner--upcoming .dash-calima-dot {
  animation: calima-blink 1.5s ease-in-out infinite;
}
.dash-calima-text { flex: 1; font-weight: 700; }
.dash-calima-arrow { color: #9ca3af; font-weight: 600; }

/* Insights grid: 4 cols, marine spans 2 rows on col 4 */
.dash-insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 0.5rem;
}
.dash-insights-grid .dash-sea-tall {
  grid-column: 4;
  grid-row: 1 / 3;
}

@media (max-width: 991px) {
  .dash-insights-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .dash-insights-grid .dash-sea-tall {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
@media (max-width: 480px) {
  .dash-insights-grid { grid-template-columns: 1fr; }
}

/* Collapsible stations */
.dash-stations-toggle { margin-top: 1.5rem; }
.dash-stations-summary {
  display: flex; align-items: center; gap: 0.75rem;
  cursor: pointer; padding: 0.75rem 1rem;
  background: #fff; border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  list-style: none;
}
.dash-stations-summary::-webkit-details-marker { display: none; }
.dash-stations-title { font-size: 1.1rem; font-weight: 700; }
.dash-stations-count { color: #6b7280; font-size: 0.85rem; margin-left: auto; }
.dash-stations-chev { color: #9ca3af; font-weight: 600; transition: transform 0.2s; }
details[open] > .dash-stations-summary .dash-stations-chev { transform: rotate(180deg); }

@media (max-width: 768px) {
  .dash-webcam-row { grid-template-columns: 1fr 1fr; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .dash-webcam-row { grid-template-columns: 1fr; }
  .zone-fc-icon { font-size: 0.75rem; }
}

/* Breadcrumbs */
.breadcrumb-nav { margin-top: 0.25rem; }
.breadcrumb-nav .breadcrumb {
  font-size: 0.85rem;
  background: transparent;
  padding: 0;
  margin-bottom: 0.5rem;
  list-style: none;
  display: flex;
  gap: 0.4rem;
}
.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: #9ca3af;
  margin-right: 0.4rem;
}
.breadcrumb-nav .breadcrumb-item a {
  color: #6b7280;
  text-decoration: none;
}
.breadcrumb-nav .breadcrumb-item a:hover {
  color: #1a1a2e;
  text-decoration: underline;
}
.breadcrumb-nav .breadcrumb-item.active {
  color: #1a1a2e;
  font-weight: 500;
}

/* History details toggle (city page) */
.history-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  list-style: none;
  margin-bottom: 1rem;
}
.history-summary::-webkit-details-marker { display: none; }
.history-summary-title { font-size: 1.1rem; font-weight: 700; }
.history-summary-chev { color: #9ca3af; font-weight: 600; transition: transform 0.2s; margin-left: auto; }
details[open] > .history-summary .history-summary-chev { transform: rotate(180deg); }

/* ── Fuel page hero ── */
.fuel-hero {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.fuel-hero-head h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.fuel-hero-station-name { font-size: 1.3rem; }
.fuel-hero-sub { font-size: 0.85rem; color: #6b7280; margin: 0.15rem 0 0; }
.fuel-hero-meta { font-size: 0.85rem; color: #6b7280; text-align: right; }

.fuel-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.fuel-summary-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid #eef0f3;
}
.fuel-summary-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.fuel-summary-icon { font-size: 1.2rem; }
.fuel-summary-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #374151;
}
.fuel-summary-count {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-left: auto;
}
.fuel-summary-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.1;
}
.fuel-summary-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
}
.fuel-summary-delta {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.fuel-summary-delta.down { color: #059669; }
.fuel-summary-delta.up { color: #dc2626; }
.fuel-summary-delta.stable { color: #9ca3af; }
.fuel-summary-spread {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 0.2rem;
}
.fuel-summary-cheapest {
  font-size: 0.78rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid #e5e7eb;
}
.fuel-summary-cheapest-label {
  color: #9ca3af;
  font-weight: 500;
}
.fuel-summary-cheapest a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.fuel-summary-cheapest a:hover { text-decoration: underline; }

@media (max-width: 991px) {
  .fuel-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .fuel-summary-grid { grid-template-columns: 1fr; }
  .fuel-summary-price { font-size: 1.5rem; }
  .fuel-hero { padding: 1rem; }
}

