:root {
  --bg: #eef2f7;
  --bg-grad-a: #4a90d9;
  --bg-grad-b: #7fb2e5;
  --ink: #1a2330;
  --muted: #667085;
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #fff;
  --line: rgba(20, 30, 50, 0.08);
  --accent: #2f6fb0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 40, 80, 0.12);
  --maxw: 1200px;
  --tile-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(20, 40, 80, 0.12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-grad-b);
  background-image: linear-gradient(160deg, var(--bg-grad-a), var(--bg-grad-b) 60%, var(--bg-grad-b));
  background-repeat: no-repeat;
  min-height: 100vh;
  line-height: 1.5;
}

/* ---- weather-adaptive themes (page background) ---- */
.theme-clear  { --bg-grad-a: #3aa0e0; --bg-grad-b: #8fd0f5; }
.theme-partly { --bg-grad-a: #5b9bd5; --bg-grad-b: #a9c7e4; }
.theme-cloudy { --bg-grad-a: #7c8ba1; --bg-grad-b: #aab6c6; }
.theme-rain   { --bg-grad-a: #4b6178; --bg-grad-b: #74879b; }
.theme-snow   { --bg-grad-a: #8fa6bd; --bg-grad-b: #d5e2ef; }
.theme-storm  { --bg-grad-a: #3a4257; --bg-grad-b: #5d6580; }
.theme-night  { --bg-grad-a: #101a30; --bg-grad-b: #223354; }

/* Night: darken the cards too, so light (moon) icons and text stay readable */
body.theme-night {
  --ink: #eaf0f8;
  --muted: #9db0cc;
  --card: rgba(26, 40, 68, 0.82);
  --card-solid: #17263f;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #8fbdec;
  --tile-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---- header ---- */
.site-header {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; letter-spacing: .3px; }
.brand-mark { filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.header-nav { display: flex; gap: 8px; }
.header-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem;
  padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.16);
}
.header-nav a:hover { background: rgba(255,255,255,.28); }
.lang-switch { border: 1px solid rgba(255,255,255,.4); }

main.wrap { padding-top: 22px; padding-bottom: 40px; }

/* ---- hero ---- */
.hero { text-align: center; color: #fff; padding: 26px 10px 30px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 5vw, 2.6rem); text-shadow: 0 2px 10px rgba(0,0,0,.18); }
.hero-sub { margin: 0; font-size: 1.05rem; opacity: .95; }

/* ---- cards ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.section-title { margin: 0 0 14px; font-size: 1.15rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- breadcrumb ---- */
.breadcrumb { color: rgba(255,255,255,.9); font-size: .9rem; margin: 4px 0 16px; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: #fff; text-decoration: none; opacity: .95; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- top row: current weather + air quality side by side ---- */
.top-row.has-air { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.top-row.has-air > .card { margin-bottom: 0; }
@media (max-width: 720px) { .top-row.has-air { grid-template-columns: 1fr; } }

.air-card { display: flex; flex-direction: column; }
.air-main { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.air-aqi { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.air-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.air-pollutants { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; }
.air-pollutants li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .92rem;
  border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.air-pollutants li > span { color: var(--muted); }
.air-pollutants li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.air-pollutants li b small { color: var(--muted); font-weight: 400; font-size: .72rem; }
.air-details-btn { align-self: stretch; margin-top: auto; text-align: center; padding: 9px 16px; font-size: .9rem; }
.air-pollen { grid-column: 1 / -1; justify-content: flex-start !important; gap: 10px; }
.badge.sm { font-size: .72rem; padding: 1px 8px; }

/* ---- UV index card (forecast page) ---- */
.uv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.uv-card-head .section-title { margin: 0; }
.uv-card-val { display: flex; align-items: center; gap: 12px; }
.uv-card-num { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.uv-scale { position: relative; height: 12px; border-radius: 999px;
  background: linear-gradient(90deg, #4caf50, #8bc34a 27%, #ffc107 54%, #ff9800 73%, #f44336 100%); }
.uv-marker { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.uv-scale-nums { display: flex; justify-content: space-between; margin-top: 6px; font-size: .72rem; color: var(--muted); }
.uv-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.uv-card-foot .btn { margin-top: 0; }
.uv-card-foot .uv-burn { font-size: .9rem; }

/* ---- current conditions ---- */
.current { display: grid; gap: 18px; }
.current-main { display: flex; align-items: center; gap: 18px; }
.current-icon svg { width: 92px; height: 92px; display: block; }
.current-temp h1 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 600; color: var(--muted); }
.big-temp { font-size: clamp(3rem, 12vw, 4.6rem); font-weight: 800; line-height: 1; }
.cond { font-size: 1.15rem; margin-top: 2px; }
.cond-feels { font-size: .95rem; color: var(--muted); margin-top: 4px; }
.metrics { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.metrics li { display: flex; flex-direction: column; gap: 2px; }
.m-label { font-size: .8rem; color: var(--muted); }
.m-val { font-size: 1.15rem; font-weight: 700; }
.m-sub { font-size: .74rem; color: var(--muted); }
.wind-val { display: flex; align-items: center; gap: 5px; }
.wind-arrow { color: var(--accent); flex: 0 0 auto; }
.h-wind { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--muted); margin-top: 2px; }
.h-wind .wind-arrow { width: 15px; height: 15px; }

/* ---- details grid (UV, air quality, pressure, gusts, precip) ---- */
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.detail-tile { background: var(--tile-bg); border: 1px solid var(--glass-border); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 3px; backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); }
.dt-label { font-size: .82rem; color: var(--muted); }
.dt-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.dt-sub { font-size: .78rem; color: var(--muted); }
.dt-link { font-size: .78rem; color: var(--accent); text-decoration: none; margin-top: 2px; font-weight: 600; }
.dt-link:hover { text-decoration: underline; }
.badge { display: inline-block; align-self: flex-start; margin-top: 2px; padding: 2px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; color: #fff; }
.badge.lvl-1 { background: #4caf50; }
.badge.lvl-2 { background: #8bc34a; color: #1a2330; }
.badge.lvl-3 { background: #ffc107; color: #1a2330; }
.badge.lvl-4 { background: #ff9800; }
.badge.lvl-5 { background: #f44336; }
.badge.lvl-6 { background: #7b1fa2; }

/* ---- hourly strip ---- */
.hourly-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; cursor: grab; }
.hourly-strip.dragging { cursor: grabbing; user-select: none; }
.hour { flex: 0 0 auto; width: 64px; text-align: center; padding: 11px 4px; border-radius: 14px;
  background: var(--tile-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); }
.h-time { font-size: .78rem; color: var(--muted); }
.h-icon svg { width: 34px; height: 34px; }
.h-temp { font-weight: 700; font-size: .95rem; }
.h-pop { font-size: .68rem; color: var(--accent); min-height: 14px; white-space: nowrap; }
.h-pop.on { font-weight: 600; }

/* ---- daily list ---- */
.daily { list-style: none; margin: 0; padding: 0; }
.day-row {
  display: grid; grid-template-columns: 68px 34px 1fr auto auto auto; align-items: center; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
}
.day-row:last-child { border-bottom: 0; }
.d-name { font-weight: 700; }
.d-icon svg { width: 30px; height: 30px; display: block; }
.d-cond { color: var(--muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-uv { font-size: .8rem; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.d-precip { font-size: .82rem; color: var(--accent); white-space: nowrap; }
.d-temps { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot.lvl-1 { background: #4caf50; } .dot.lvl-2 { background: #8bc34a; }
.dot.lvl-3 { background: #ffc107; } .dot.lvl-4 { background: #ff9800; }
.dot.lvl-5 { background: #f44336; } .dot.lvl-6 { background: #7b1fa2; }

/* severity text colors — color-coded labels/statements, legible on light + night */
.sev-1 { color: #2e7d32; } .sev-2 { color: #558b2f; } .sev-3 { color: #b07d00; }
.sev-4 { color: #e65100; } .sev-5 { color: #d32f2f; } .sev-6 { color: #7b1fa2; }
body.theme-night .sev-1 { color: #81c784; } body.theme-night .sev-2 { color: #aed581; }
body.theme-night .sev-3 { color: #ffd54f; } body.theme-night .sev-4 { color: #ffb74d; }
body.theme-night .sev-5 { color: #ef9a9a; } body.theme-night .sev-6 { color: #ce93d8; }

.updated { text-align: right; font-size: .82rem; margin: -6px 4px 20px; color: rgba(255,255,255,.85); }

/* ---- featured city grid ---- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.city-card {
  display: grid; grid-template-rows: auto 44px auto auto; align-items: center; justify-items: center;
  text-decoration: none; color: #fff; padding: 16px 10px; border-radius: 14px; gap: 2px;
  background-image: linear-gradient(160deg, var(--bg-grad-a), var(--bg-grad-b));
  box-shadow: 0 6px 16px rgba(20,40,80,.16); transition: transform .12s ease;
}
.city-card:hover { transform: translateY(-3px); }
.cc-name { font-weight: 700; font-size: 1rem; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.cc-icon svg { width: 40px; height: 40px; }
.cc-temp { font-size: 1.7rem; font-weight: 800; }
.cc-cond { font-size: .82rem; opacity: .95; text-align: center; }

/* ---- search ---- */
.search { position: relative; margin-bottom: 16px; }
#city-search {
  width: 100%; padding: 13px 16px; font-size: 1rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card-solid); color: var(--ink); outline: none;
}
#city-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,111,176,.15); }
.search-results {
  list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; z-index: 20; left: 0; right: 0;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.search-results li a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results li a:hover, .search-results li a.active { background: rgba(47,111,176,.1); }

.city-links { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
.city-links a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--accent); font-weight: 500; }
.city-links a:hover { background: rgba(47,111,176,.08); }

/* ---- notice / 404 ---- */
.notice p { margin: 8px 0; }
.notice h1 { font-size: 3rem; margin: 0; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; margin-top: 8px; }

/* ---- UV / time-to-burn calculator ---- */
.uv-h1 { font-size: clamp(1.4rem, 4.5vw, 2rem); margin: 0 0 10px; }
.uv-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.uv-tile { flex: 1 1 92px; min-width: 92px; background: var(--tile-bg); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; color: inherit; font: inherit; transition: transform .1s ease, border-color .1s ease; }
.uv-tile:hover { transform: translateY(-2px); }
.uv-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.uv-num { font-size: 1.6rem; font-weight: 800; }

.skin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.skin-tile { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--tile-bg);
  border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px; cursor: pointer; color: inherit;
  font: inherit; transition: transform .1s ease, border-color .1s ease; }
.skin-tile:hover { transform: translateY(-2px); }
.skin-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.skin-swatch { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.55); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.skin-body { display: flex; flex-direction: column; gap: 2px; }
.skin-name { font-weight: 700; }
.skin-desc { font-size: .82rem; color: var(--muted); }
.common-badge { display: inline-block; font-size: .66rem; font-weight: 700; background: var(--accent); color: #fff;
  padding: 1px 8px; border-radius: 999px; vertical-align: middle; }

.uv-num + .spf-cap { display: block; }
.spf-cap { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.uv-result-card { text-align: center; }
.uv-big { font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 800; margin: 6px 0; }
.uv-big.is-norisk { font-size: clamp(1.3rem, 5vw, 1.7rem); color: #4caf50; }
.uv-advice { margin: 6px auto 0; max-width: 520px; }
.uv-burn { cursor: help; }

/* ---- weather map ---- */
.map-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#map { height: 540px; border-radius: 14px; overflow: hidden; z-index: 0; }
@media (max-width: 520px) { #map { height: 420px; } }
.radar-btn { flex: 0 0 auto; opacity: .6; margin-top: 0; cursor: pointer; border: 0; }
.radar-btn.on { opacity: 1; }
#aq-map { height: 480px; border-radius: 12px; overflow: hidden; z-index: 0; }
.aq-pop { color: #1a2330; min-width: 132px; }
.aq-pop-title { display: block; margin-bottom: 4px; font-size: .95rem; }
.aq-pop-aqi { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 2px; }
.aq-pop-aqi i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.aq-pop-src { color: #667085; margin-top: 3px; font-size: .82rem; }
.aq-legend { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.aq-legend .lg { width: 15px; height: 12px; border-radius: 3px; display: inline-block; }
.aq-legend .lg.lvl-1 { background: #4caf50; } .aq-legend .lg.lvl-2 { background: #8bc34a; }
.aq-legend .lg.lvl-3 { background: #ffc107; } .aq-legend .lg.lvl-4 { background: #ff9800; }
.aq-legend .lg.lvl-5 { background: #f44336; } .aq-legend .lg.lvl-6 { background: #7b1fa2; }
.map-popup-link { font-weight: 600; color: var(--accent); }
.leaflet-popup-content { margin: 10px 14px; }

/* ---- dev demo / style guide ---- */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.demo-item { text-align: center; padding: 12px 8px; background: var(--tile-bg); border: 1px solid var(--glass-border); border-radius: 12px; }
.demo-icon svg { width: 48px; height: 48px; }
.demo-icon.wind-demo { color: var(--accent); }
.demo-code { font-size: .72rem; color: var(--muted); }
.demo-mk { font-weight: 600; font-size: .88rem; margin-top: 4px; }
.demo-sq { font-size: .82rem; }
.demo-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.demo-sub { font-weight: 700; margin: 14px 0 6px; font-size: .9rem; }
.theme-swatch { height: 56px; border-radius: 10px; }
.demo-strings { overflow-x: auto; }
.demo-strings table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.demo-strings th, .demo-strings td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.demo-strings code { font-size: .8rem; }

/* ---- footer ---- */
.site-footer { color: rgba(255,255,255,.92); text-align: center; padding: 22px 0 30px; font-size: .88rem;
  margin-top: 26px; background: rgba(15, 30, 55, 0.22); }
.site-footer .muted { color: rgba(255,255,255,.75); }
.site-footer p { margin: 3px 0; }
.footer-nav a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer .muted a { color: rgba(255,255,255,.85); }
.updated { text-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* ---- air-quality page ---- */
.aq-hero-main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.aq-aqi-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.aq-aqi-num { font-size: 2.6rem; font-weight: 800; line-height: 1; padding: 10px 18px; border-radius: 16px; }
.aq-aqi-scale { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.aq-hero-meta { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.aq-hero-meta h1 { margin: 0; font-size: 1.4rem; }
.aq-main-pol { margin: 2px 0 0; font-size: .95rem; }
.aq-source { margin: 0; font-size: .84rem; }
.aq-who { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--tile-bg);
  border: 1px solid var(--glass-border); font-weight: 600; }
.aq-who.ok { color: #2e7d32; }

.aq-health-general { margin: 0 0 12px; }
.aq-health-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aq-health-list li { display: flex; align-items: center; gap: 12px; }
.aq-health-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; color: #fff; flex: 0 0 auto; }
.aq-health-ico.lvl-2, .aq-health-ico.lvl-3 { color: #1a2330; }
.aq-ico { display: block; }

.aq-pollutants { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.aq-pol { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.aq-pol:last-child { border-bottom: 0; }
.aq-pol-name { display: flex; align-items: center; gap: 8px; }
.aq-pol-val { font-variant-numeric: tabular-nums; }
.aq-pol-val .muted { font-size: .82rem; }
.aq-pol-who { font-size: .82rem; min-width: 62px; text-align: right; }
.aq-pol-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }

/* air-quality leaderboard (home) + world comparison (air page) */
.aq-board-sub { margin: -8px 0 12px; font-size: .9rem; }
.aq-board, .aq-world { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.aq-board li { display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.aq-board li:last-child, .aq-world li:last-child { border-bottom: 0; }
.aqb-rank { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; text-align: center; }
.aqb-city { font-weight: 600; color: var(--ink); text-decoration: none; }
.aqb-city:hover { text-decoration: underline; }
.aqb-level { font-size: .85rem; }
.aqb-aqi, .aw-aqi { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.aq-world li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.aq-world li.self { background: var(--tile-bg); border-radius: 10px; padding: 9px 12px; margin: 2px 0;
  border-bottom: 0; font-weight: 700; }
.aw-name { font-weight: 600; }

.aq-stations { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.aq-stations li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.aq-stations li:last-child { border-bottom: 0; }
.aq-st-name { font-weight: 600; }
.aq-st-src { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--accent); border: 1px solid var(--glass-border); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.aq-st-dist { font-size: .85rem; }
.aq-st-aqi { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.aq-forecast { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.aq-forecast li { display: grid; grid-template-columns: 70px 54px 1fr; align-items: center; gap: 12px; padding: 6px 0; }
.aqf-day { font-weight: 600; }
.aqf-aqi { text-align: center; font-variant-numeric: tabular-nums; }
.aqf-label { font-size: .9rem; }

.aq-weather-metrics { list-style: none; margin: 0 0 10px; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.aq-weather-metrics .m-label { display: block; color: var(--muted); font-size: .82rem; }
.aq-weather-metrics .m-val { font-size: 1.2rem; font-weight: 700; }

.aq-scale { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.aq-scale li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.aq-scale .badge { min-width: 66px; text-align: center; }

@media (max-width: 520px) {
  .day-row { grid-template-columns: 58px 28px 1fr auto auto; }
  .d-cond, .d-uv { display: none; }
  .d-precip { justify-self: end; }
  .current-main { flex-direction: row; }
}
