:root {
  --bg: #0b1220;
  --bg-grad-a: #122036;
  --bg-grad-b: #0b1220;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.10);
  --text: #f3f6fc;
  --muted: #9fb0c9;
  --accent: #2f7bf6;
  --light: #6fb0ff;
  --moderate: #2f7bf6;
  --heavy: #7b3ff6;
  --safe: #34d399;
  --radius: 22px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef3fb;
    --bg-grad-a: #dceafe;
    --bg-grad-b: #eef3fb;
    --card: rgba(255, 255, 255, 0.75);
    --card-border: rgba(15, 30, 60, 0.08);
    --text: #0c1830;
    --muted: #5a6b85;
    --shadow: 0 10px 30px rgba(40, 70, 130, 0.12);
  }
}

/* Manual theme overrides (set on <html data-theme>) */
html[data-theme="dark"] {
  --bg: #0b1220; --bg-grad-a: #122036; --bg-grad-b: #0b1220;
  --card: rgba(255,255,255,0.06); --card-border: rgba(255,255,255,0.10);
  --text: #f3f6fc; --muted: #9fb0c9; --shadow: 0 10px 40px rgba(0,0,0,0.35);
}
html[data-theme="light"] {
  --bg: #eef3fb; --bg-grad-a: #dceafe; --bg-grad-b: #eef3fb;
  --card: rgba(255,255,255,0.75); --card-border: rgba(15,30,60,0.08);
  --text: #0c1830; --muted: #5a6b85; --shadow: 0 10px 30px rgba(40,70,130,0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--bg-grad-a) 0%, var(--bg-grad-b) 60%) fixed,
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  padding:
    calc(env(safe-area-inset-top, 0px) + 12px)
    16px
    calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- pull to refresh ---- */
.ptr {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center;
  opacity: 0;
  z-index: 40;
  pointer-events: none;
}
.ptr-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
}
.ptr.spin .ptr-spinner { animation: spin 0.8s linear infinite; }

/* ---- topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.loc-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
}
.loc-btn #locName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loc-btn .chev { margin-left: auto; opacity: .6; }
.gps-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.icon, .chev { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.gps-btn.spin .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- favorites quick-switch ---- */
.fav-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 2px; margin-top: -4px;
}
.fav-bar::-webkit-scrollbar { height: 0; }
.fav-pill {
  flex: 0 0 auto;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--card-border); background: var(--card);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(10px);
}
.fav-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.fav-list { margin: 8px 0; }
.fav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 8px; border-radius: 12px;
}
.fav-item:hover { background: var(--card); }
.fav-item .f-star { font-size: 16px; }
.fav-item .f-name { flex: 1; font-weight: 600; cursor: pointer; }
.fav-item .f-admin { font-size: 12px; color: var(--muted); font-weight: 400; }
.fav-item .f-del {
  border: none; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}

/* ---- cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.content { display: flex; flex-direction: column; gap: 16px; flex: 1; }

/* ---- hero ---- */
.hero {
  padding: 26px 24px 28px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 80% 0%, rgba(47,123,246,.25), transparent 70%);
  pointer-events: none;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; }
.hero-ico { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero-temp {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}
.hero-temp .deg { color: var(--muted); font-weight: 500; }
.hero-feels { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---- official warnings ---- */
.warnings { display: flex; flex-direction: column; gap: 8px; }
.warnings:empty { display: none; }
.warning {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid transparent; align-items: flex-start;
}
.warning .w-ico { font-size: 22px; line-height: 1.2; }
.warning .w-body { flex: 1; min-width: 0; }
.warning .w-title { font-size: 15px; font-weight: 800; }
.warning .w-desc { font-size: 13px; opacity: .9; margin-top: 3px; }
.warning .w-time { font-size: 11px; opacity: .7; margin-top: 5px; }
.warning.lvl2 { background: rgba(247,209,84,.16); border-color: rgba(247,209,84,.45); color: #f7d154; }
.warning.lvl3 { background: rgba(245,158,75,.18); border-color: rgba(245,158,75,.5); color: #ffb454; }
.warning.lvl4 { background: rgba(239,94,94,.20); border-color: rgba(239,94,94,.55); color: #ff8a8a; }

/* ---- alerts ---- */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts:empty { display: none; }
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
}
.alert .a-ico { font-size: 18px; }
.alert.warn { background: rgba(255,160,40,.16); border-color: rgba(255,160,40,.35); color: #ffb454; }
.alert.danger { background: rgba(255,70,70,.16); border-color: rgba(255,70,70,.35); color: #ff7a7a; }
.alert.info { background: rgba(111,176,255,.14); border-color: rgba(111,176,255,.3); color: var(--light); }
.alert.cold { background: rgba(120,180,255,.16); border-color: rgba(120,180,255,.35); color: #9cc6ff; }
.hero-head {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.hero-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}
.hero-sun {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.hero-sun .hs-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
}
.hero-sun .hs-item.next { color: var(--text); }
.hero-sun .hs-moon { margin-left: auto; font-size: 18px; }

.hero.is-dry .hero-head { color: var(--safe); }
.hero.is-rain .hero-head { color: var(--light); }

/* ---- graph ---- */
.graph-card { padding: 18px 16px 14px; }
.graph-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 4px;
}
.graph-title .src { font-size: 11px; opacity: .6; font-weight: 500; }
.graph-wrap { position: relative; }
.graph {
  width: 100%;
  height: 150px;
  display: block;
  overflow: visible;
}
.axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding: 0 2px;
}
.legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.light { background: var(--light); }
.dot.moderate { background: var(--moderate); }
.dot.heavy { background: var(--heavy); }

/* ---- hourly strip ---- */
.hourly-card, .daily-card { padding: 18px 8px 16px; }
.hourly-card .graph-title, .daily-card .graph-title { padding: 0 12px; margin-bottom: 12px; }
.hourly {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 8px 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.hourly::-webkit-scrollbar { height: 0; }
.hour {
  flex: 0 0 auto;
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-radius: 14px;
  scroll-snap-align: start;
}
.hour.now { background: var(--card); }
.hour .h-time { font-size: 12px; color: var(--muted); }
.hour .h-ico { font-size: 22px; line-height: 1; }
.hour .h-temp { font-size: 15px; font-weight: 700; }
.hour .h-pop { font-size: 11px; color: var(--light); min-height: 14px; }
.hour .h-wind { font-size: 11px; color: var(--muted); }

/* ---- daily ---- */
.daily { display: flex; flex-direction: column; padding: 0 6px; }
.day-row {
  display: grid;
  grid-template-columns: 70px 26px 46px 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  border-radius: 12px;
}
.day-row + .day-row { border-top: 1px solid var(--card-border); }
.day-row .d-name { font-size: 15px; font-weight: 600; text-transform: capitalize; }
.day-row .d-ico { font-size: 20px; text-align: center; }
.day-row .d-pop { font-size: 12px; color: var(--light); }
.day-row .d-temps {
  display: flex; align-items: center; gap: 10px;
  font-variant-numeric: tabular-nums;
}
.day-row .d-min { color: var(--muted); width: 32px; text-align: right; }
.day-row .d-max { width: 32px; }
.day-row .d-track { flex: 1; height: 6px; border-radius: 4px; background: var(--card-border); overflow: hidden; }
.day-row .d-bar {
  display: block; height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, #6fb0ff, #ffd454, #ff8a54);
}

.updated {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: .7;
}

/* ---- location sheet ---- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index: 20;
  animation: fade .2s ease;
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 21;
  margin: 0 auto;
  max-width: 480px;
  background: var(--bg-grad-a);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  animation: slideUp .26s cubic-bezier(.2,.8,.2,1);
}
.sheet-grip {
  width: 40px; height: 5px; border-radius: 3px;
  background: var(--card-border);
  margin: 6px auto 14px;
}
#searchInput {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  outline: none;
}
#searchInput:focus { border-color: var(--accent); }
.results { margin: 10px 0; max-height: 40vh; overflow-y: auto; }
.result {
  padding: 13px 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.result:hover, .result:active { background: var(--card); }
.result .r-name { font-weight: 600; }
.result .r-admin { font-size: 13px; color: var(--muted); }
.use-gps {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}

/* ---- detail popover ---- */
.popover {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  margin: 0 auto; max-width: 480px;
  background: var(--bg-grad-a);
  border-top-left-radius: 26px; border-top-right-radius: 26px;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 24px);
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  animation: slideUp .26s cubic-bezier(.2,.8,.2,1);
}
.pop-head { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; margin: 4px 2px 14px; }
.pop-head .pop-ico { font-size: 30px; }
.pop-head .pop-sub { font-size: 13px; font-weight: 500; color: var(--muted); }
.pop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pop-cell {
  background: rgba(127,127,127,.06); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 12px 14px;
}
.pop-cell .pc-label { font-size: 12px; color: var(--muted); }
.pop-cell .pc-val { font-size: 18px; font-weight: 700; }
.hour { cursor: pointer; }
.day-row { cursor: pointer; }

/* ---- ios install hint ---- */
.ios-install {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  max-width: 448px;
  margin: 0 auto;
  background: var(--accent);
  color: #fff;
  padding: 14px 40px 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  z-index: 15;
}
.ios-install .share { width: 16px; height: 16px; fill: #fff; vertical-align: -3px; }
.ios-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}

@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(100%); } }

.skeleton { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* ---- detail metrics grid ---- */
.detail-card { padding: 18px 16px 16px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric {
  background: rgba(127,127,127,.06);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.metric .m-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.metric .m-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric .m-sub { font-size: 11px; color: var(--muted); }
.wind-arrow { display: inline-block; transition: transform .3s ease; }

/* sun arc */
.sun-arc { margin-top: 14px; }

/* ---- big climate chart ---- */
.chart-card { padding: 16px 14px 14px; }
.chart-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.chart-tabs button {
  flex: 1; padding: 9px 4px; border-radius: 11px;
  border: 1px solid var(--card-border); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chart-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.bigchart-wrap { position: relative; }
.bigchart { width: 100%; height: 220px; display: block; overflow: visible; }
.bigaxis {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); margin-top: 6px; padding: 0 2px;
}
.chart-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; min-height: 16px; }

/* ---- settings ---- */
.settings-sheet { max-height: 86vh; overflow-y: auto; }
.settings-title { margin: 0 0 14px; font-size: 20px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 2px; border-top: 1px solid var(--card-border);
}
.set-row:first-of-type { border-top: none; }
.set-label { font-size: 15px; font-weight: 600; }
.set-desc { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 210px; }
.set-foot { margin-top: 18px; font-size: 11px; color: var(--muted); text-align: center; opacity: .7; }

/* segmented control */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--card-border); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; color: var(--muted);
  padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.seg button.active { background: var(--accent); color: #fff; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--card-border); border-radius: 30px; transition: .25s;
}
.slider::before {
  content: ""; position: absolute; height: 24px; width: 24px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .25s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---- sun & moon ---- */
.sunmoon-card { padding: 18px 16px 16px; }
.sunmoon { display: flex; align-items: center; gap: 18px; }
.sunmoon .moon-face { font-size: 46px; line-height: 1; }
.sunmoon .sm-info { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.sm-cell .sm-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.sm-cell .sm-value { font-size: 15px; font-weight: 700; }
.sm-cell .sm-sub { font-size: 11px; color: var(--muted); }

/* ---- wind compass ---- */
.wind-card { padding: 18px 16px 18px; }
.wind-wrap { display: flex; align-items: center; gap: 20px; }
.compass { width: 130px; height: 130px; flex-shrink: 0; }
.wind-stats { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wind-stats .ws-big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wind-stats .ws-row { font-size: 13px; color: var(--muted); }
.wind-stats .ws-row b { color: var(--text); font-weight: 700; }

/* ---- activity hints ---- */
.activity-card { padding: 18px 16px 16px; }
.activities { display: flex; flex-direction: column; gap: 10px; }
.act {
  display: flex; align-items: center; gap: 12px;
  background: rgba(127,127,127,.06); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 12px 14px;
}
.act .a-emoji { font-size: 22px; }
.act .a-body { flex: 1; }
.act .a-title { font-size: 14px; font-weight: 700; }
.act .a-when { font-size: 13px; color: var(--muted); }

/* ---- compare to yesterday ---- */
.hero-compare { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ---- rain radar ---- */
.radar-card { padding: 16px 14px 14px; }
.radar-map {
  width: 100%; height: 300px;
  border-radius: 16px; overflow: hidden;
  background: rgba(127,127,127,.08);
}
.radar-map .leaflet-container { background: #0a1422; font: inherit; }
.radar-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 0 4px; }
.radar-ctrl button {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  border: none; background: var(--accent); color: #fff;
  font-size: 15px; cursor: pointer;
}
.radar-ctrl input[type=range] { flex: 1; accent-color: var(--accent); }
.radar-stamp {
  flex-shrink: 0; min-width: 92px; text-align: right;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); line-height: 1.1;
}
.radar-stamp .rs-rel { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.radar-stamp.future { color: var(--light); }

/* ---- air quality + pollen ---- */
.air-card { padding: 18px 16px 16px; }
.aqi { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.aqi-badge {
  width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800; color: #06121f;
}
.aqi-text .aqi-label { font-size: 17px; font-weight: 700; }
.aqi-text .aqi-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pollutants {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px;
}
.poll {
  background: rgba(127,127,127,.06); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 9px 8px; text-align: center;
}
.poll .p-name { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.poll .p-val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pollen-head {
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: var(--muted); text-transform: uppercase;
  margin: 2px 0 10px;
}
.pollen { display: flex; flex-direction: column; gap: 8px; }
.pollen:empty { display: none; }
.pol-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pol-row .pol-name { width: 70px; }
.pol-row .pol-track { flex: 1; height: 7px; border-radius: 4px; background: var(--card-border); overflow: hidden; }
.pol-row .pol-bar { display: block; height: 7px; border-radius: 4px; }
.pol-row .pol-lvl { width: 56px; text-align: right; font-size: 12px; color: var(--muted); }

/* ---- iPad / wide mode ---- */
html[data-ipad="1"] .app { max-width: 960px; }
@media (min-width: 760px) {
  html[data-ipad="1"] .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  /* grid tracks must not grow to fit wide content (hourly strip, SVG charts) */
  html[data-ipad="1"] .content > * { min-width: 0; }
  html[data-ipad="1"] .alerts,
  html[data-ipad="1"] .radar-card,
  html[data-ipad="1"] .chart-card { grid-column: 1 / -1; }
  html[data-ipad="1"] .detail-grid { grid-template-columns: repeat(4, 1fr); }
  html[data-ipad="1"] .sheet,
  html[data-ipad="1"] .ios-install { max-width: 960px; }
}
