:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-sunk: #eef0f4;
  --line: #e3e6eb;
  --text: #1c232d;
  --text-2: #4a5462;
  --text-3: #6b7582;
  --accent: #E4572E;
  --violet: #7B2CBF;
  --teal: #17A398;
  --blue: #2f6fdb;
  --green: #1f9d55;
  --amber: #c77d00;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .06), 0 16px 40px rgba(16, 24, 40, .14);
  --panel-w: 400px;
  --gap: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#map { position: fixed; inset: 0; z-index: 0; background: #f2f3f0; }

/* ---------- Panel ---------- */
.panel {
  position: fixed;
  top: var(--gap); left: var(--gap); bottom: var(--gap);
  width: var(--panel-w);
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}
.sheet-handle { display: none; }
.panel-header { padding: 18px 20px 0; border-bottom: 1px solid var(--line); flex: none; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
h1 { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.badge-draft {
  font-size: 11px; font-weight: 600; color: #8a4b00; background: #fff4e0;
  border: 1px solid #f6dcae; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.subtitle { margin: 6px 0 12px; color: var(--text-2); font-size: 13.5px; }
.tabs { display: flex; gap: 0; justify-content: space-between; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; cursor: pointer; white-space: nowrap; flex: none;
  padding: 10px 6px 11px; font-size: 12.5px; font-weight: 600; color: var(--text-3);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button:focus-visible { outline-offset: -2px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.panel-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; scroll-behavior: smooth; }
.panel-footer {
  flex: none; padding: 10px 20px; font-size: 11px; color: var(--text-3);
  border-top: 1px solid var(--line); background: var(--bg-soft);
}
.pane[hidden] { display: none; }

.h-sm { font-size: 13px; font-weight: 700; margin: 0; }
.h-md { font-size: 16px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.mt { margin-top: 24px; }
.lead { color: var(--text-2); margin: 0 0 14px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.kpi {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 10px 9px; min-width: 0;
}
.kpi-v { font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.kpi-l { font-size: 11.5px; color: var(--text-3); line-height: 1.35; margin-top: 3px; }
.kpi-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; margin-top: 4px; }

.callout {
  background: linear-gradient(180deg, #fff7f3, #fff);
  border: 1px solid #f6d6ca; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px;
}
.callout h2 { font-size: 13px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.callout h2 small { font-weight: 500; color: var(--text-3); font-size: 11px; }
.callout ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.callout li { min-width: 0; }
.callout li button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  border: 0; background: none; padding: 4px 4px; border-radius: 6px; cursor: pointer;
}
.callout li button:hover { background: rgba(228, 87, 46, .07); }
.callout .t5-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.callout .t5-v { font-weight: 700; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Filters ---------- */
.filters {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: grid; gap: 10px; margin-bottom: 12px;
}
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.link-btn { border: 0; background: none; color: var(--blue); cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 2px 4px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
select {
  width: 100%; min-width: 0; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7582' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 22px 6px 8px; font-size: 13px; cursor: pointer;
  text-overflow: ellipsis;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px;
  font-size: 12.5px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.chip-btn:hover { border-color: #c5cbd4; }
.chip-btn[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch small { color: var(--text-3); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 32px; height: 18px; background: #cfd5dd; border-radius: 999px; position: relative; flex: none; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }
.layer-toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.layer-toggles label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.layer-toggles input { accent-color: var(--text); }

.list-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; }
.count { margin: 0; font-size: 12.5px; color: var(--text-3); font-weight: 500; }

/* ---------- Hotspot list ---------- */
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-item {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  width: 100%; text-align: left; background: #fff; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hs-item:hover { border-color: #c9cfd8; box-shadow: var(--shadow); }
.hs-item.active { border-color: var(--text); box-shadow: var(--shadow); }
.hs-id {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
}
.hs-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin: 0 0 4px; }
.hs-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--text-3); }
.hs-meta b { color: var(--text); font-weight: 700; }
.mini-bar { display: inline-block; width: 46px; height: 5px; background: var(--bg-sunk); border-radius: 3px; overflow: hidden; vertical-align: middle; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; }
.empty { text-align: center; padding: 24px 8px; color: var(--text-3); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Chips / pills ---------- */
.phase {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.phase-quick { background: #e6f6ec; color: #146c3a; border-color: #c4e9d2; }
.phase-next { background: #e9f0fd; color: #1f4fa3; border-color: #cbdaf8; }
.phase-rehab { background: #f3ecfb; color: #5c1f91; border-color: #e0d0f3; }
.phase-design { background: #fff1e6; color: #a04400; border-color: #f8d6bb; }
.phase-resident { background: #e7f6f5; color: #0d6e66; border-color: #c2e8e4; }
.tier { font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.pill-real { background: #e6f6ec; color: #146c3a; }
.pill-est { background: #fff3db; color: #8a5a00; }
.pill-verdict { background: var(--bg-sunk); color: var(--text-2); }
.pill-verdict.v-go { background: #e6f6ec; color: #146c3a; }
.pill-verdict.v-ask { background: #e9f0fd; color: #1f4fa3; }
.pill-verdict.v-maybe { background: #fff3db; color: #8a5a00; }
.grade {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px;
  font-size: 10.5px; font-weight: 800; color: #fff; flex: none;
}
.grade-A { background: var(--green); }
.grade-B { background: var(--blue); }
.grade-C { background: #8b95a3; }
.grade-label { font-size: 11px; font-weight: 600; }
.grade-label.g-A { color: var(--green); }
.grade-label.g-B { color: var(--blue); }
.grade-label.g-C { color: #6b7582; }
.grade-key { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 14px; }
.grade-key .grade { margin-left: 4px; }
.grade-key .grade:first-child { margin-left: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 10px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card-head { display: flex; gap: 10px; align-items: flex-start; }
.card-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 18px; flex: none;
}
.card h3 { font-size: 14px; margin: 0; line-height: 1.3; }
.card .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.card p { margin: 8px 0 0; color: var(--text-2); font-size: 13px; }
.card .k { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; display: block; margin-top: 10px; }
.card .k + p { margin-top: 2px; }
.src-links { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.src-links a::before { content: "↗ "; color: var(--text-3); }
.cost { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.card-title-row { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.platform-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; margin-top: 8px; }
.platform-grid dt { color: var(--text-3); }
.platform-grid dd { margin: 0; font-weight: 600; }

.prose h3 { font-size: 14px; margin: 14px 0 4px; }
.prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); font-size: 13.5px; }
.prose ul { margin: 6px 0 0; padding-left: 18px; }
.prose li { margin: 3px 0; }
.prose code { font-size: 12px; background: var(--bg-sunk); padding: 1px 4px; border-radius: 4px; }
.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
  background: #11161d; color: #e6edf3; border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0; display: grid; gap: 3px;
}
.src-line { font-size: 12.5px; margin-top: 10px !important; }

.rules { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 8px; }
.rules li {
  counter-increment: r; position: relative; padding: 10px 12px 10px 44px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); font-size: 13.5px;
}
.rules li strong { color: var(--text); }
.rules li::before {
  content: counter(r); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: #eaf3fb; color: #1f4fa3; font-weight: 800; font-size: 12px; display: grid; place-items: center;
}
.diagram { margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.diagram figcaption { display: grid; gap: 2px; margin-bottom: 8px; font-size: 13px; }
.diagram figcaption span { color: var(--text-3); font-size: 12px; }
.diagram svg { width: 100%; height: auto; display: block; }
.cites h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 0 0 6px; }

.steps { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; position: relative; }
.steps li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 13.5px; color: var(--text-2); }
.steps strong { color: var(--text); }
.step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; }

/* ---------- Map markers ---------- */
.hs-marker { background: none; border: 0; }
.hs-dot {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(16,24,40,.35);
  transition: transform .15s ease, box-shadow .15s;
  cursor: pointer;
}
.hs-marker:hover .hs-dot, .hs-marker.active .hs-dot { transform: scale(1.15); box-shadow: 0 0 0 3px rgba(28,35,45,.85), 0 4px 12px rgba(16,24,40,.35); }
.leaflet-marker-icon.hs-marker:focus-visible { outline: none; }
.leaflet-marker-icon.hs-marker:focus-visible .hs-dot { box-shadow: 0 0 0 3px var(--blue); }

.aadt-label {
  background: rgba(255,255,255,.92); border: 0; border-radius: 6px; box-shadow: var(--shadow);
  color: #1f4fa3; font: 600 11.5px var(--font); padding: 3px 7px;
}
.aadt-label::before { display: none; }

/* ---------- Leaflet popup ---------- */
.leaflet-container { font-family: var(--font); font-size: 14px; }
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0; }
.leaflet-popup-content { margin: 0; width: auto !important; min-width: 260px; max-width: 340px; line-height: 1.45; }
.leaflet-popup-tip { box-shadow: none; }
.leaflet-container a.leaflet-popup-close-button { top: 8px; right: 8px; width: 26px; height: 26px; font-size: 20px; color: var(--text-3); border-radius: 50%; }
.leaflet-container a.leaflet-popup-close-button:hover { background: var(--bg-sunk); color: var(--text); }
.pop { padding: 14px 16px 14px; max-height: min(60vh, 520px); overflow-y: auto; }
.pop-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; padding-right: 22px; flex-wrap: wrap; }
.pop-id { font-size: 11px; font-weight: 800; color: var(--text-3); letter-spacing: .04em; }
.pop h3 { font-size: 15px; margin: 0 0 10px; line-height: 1.3; padding-right: 18px; }
.pop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stat { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 7px 9px; }
.stat-l { font-size: 10.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-v { font-size: 13.5px; font-weight: 700; }
.stat-v small { font-weight: 500; color: var(--text-3); }
.vbar { margin: 0 0 12px; }
.vbar-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.vbar-head b { color: var(--text); }
.vbar-track { height: 8px; background: var(--bg-sunk); border-radius: 4px; overflow: hidden; }
.vbar-track i { display: block; height: 100%; border-radius: 4px; }
.pop .k { font-size: 10.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 2px; }
.pop p { margin: 0; font-size: 13px; color: var(--text-2); }
.m-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.m-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 8px; font-size: 12px; background: #fff; }
.m-chip .grade { width: 16px; height: 16px; font-size: 9.5px; border-radius: 50%; }
.evidence { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--text-3); }
.evidence li { margin: 2px 0; }
.pop-corr h3 { margin-bottom: 6px; }
.corr-swatch { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.pop-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; }
.pop-list button {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 5px 8px;
  text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 12.5px;
}
.pop-list button:hover { border-color: #c5cbd4; background: var(--bg-soft); }
.pop-list b { white-space: nowrap; }
.pop-list .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.x-pop { font-size: 12.5px; padding: 8px 10px; }

/* ---------- Legend ---------- */
.legend {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 12px; color: var(--text-2);
  width: 210px; overflow: hidden;
}
.legend-toggle {
  width: 100%; border: 0; background: none; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; font-weight: 700; font-size: 12.5px; color: var(--text); cursor: pointer;
}
.legend-toggle .chev { transition: transform .2s; }
.legend.collapsed .chev { transform: rotate(180deg); }
.legend-body { padding: 0 12px 10px; display: grid; gap: 8px; }
.legend.collapsed .legend-body { display: none; }
.lg-sec h4 { margin: 0 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.lg-row { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.lg-line { width: 22px; border-radius: 3px; flex: none; }
.lg-grad { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #d64545, #e9a23b, #2aa15f); }
.lg-grad-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.lg-circ { border-radius: 50%; background: rgba(47,111,219,.25); border: 1.5px solid #2f6fdb; flex: none; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.leaflet-control-attribution { font-size: 10.5px; border-radius: 6px 0 0 0; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a { width: 32px !important; height: 32px !important; line-height: 32px !important; color: var(--text) !important; }

.load-error {
  position: fixed; top: 16px; right: 16px; z-index: 2000; background: #fff1f0; color: #8a1c13;
  border: 1px solid #f5c2bd; border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); max-width: 360px; font-size: 13px;
}

/* ---------- Mobile: bottom sheet ---------- */
@media (max-width: 760px) {
  :root { --sheet-collapsed: 42vh; --sheet-expanded: 88vh; }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto;
    height: var(--sheet-collapsed);
    border-radius: 16px 16px 0 0;
    transition: height .3s cubic-bezier(.2,.8,.2,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.expanded { height: var(--sheet-expanded); }
  .panel.minimized { height: 132px; }
  .sheet-handle {
    display: grid; place-items: center; flex: none; width: 100%; height: 22px; border: 0; background: none; cursor: pointer; padding: 0;
  }
  .grip { width: 40px; height: 5px; border-radius: 3px; background: #cfd5dd; }
  .panel-header { padding: 0 16px; }
  .tabs { margin: 0 -16px; padding: 0 10px; justify-content: flex-start; }
  .panel-body { padding: 14px 16px 20px; }
  .panel-footer { padding: 8px 16px; }
  h1 { font-size: 18px; }
  .subtitle { font-size: 12.5px; margin-bottom: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:last-child { grid-column: span 2; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid .field:last-child { grid-column: span 2; }
  .legend { width: 180px; }
  .leaflet-popup-content { min-width: 240px; max-width: 300px; }
  .pop { max-height: 46vh; }
  .leaflet-bottom.leaflet-right { bottom: calc(var(--sheet-collapsed)); transition: bottom .3s; }
  body.sheet-expanded .leaflet-bottom.leaflet-right { bottom: var(--sheet-expanded); }
  body.sheet-min .leaflet-bottom.leaflet-right { bottom: 132px; }
}
@media (max-width: 400px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .field:last-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
