:root {
  --bg: #10120f;
  --panel: #151812;
  --panel-2: #1a1f16;
  --line: #2c3228;
  --line-2: #3b4433;
  --text: #f1f2eb;
  --muted: #979f90;
  --dim: #6f7867;
  --lime: #c2f65a;
  --lime-2: #d3ff82;
  --lime-bg: #29361c;
  --warn: #f5b84a;
  --bad: #f06a5f;
  --sidebar: 236px;
  --top: 64px;
  color-scheme: dark;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 13px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: transparent; padding: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { flex-shrink: 0; }
button, a, input { transition: background .16s, color .16s, border-color .16s, opacity .16s, transform .16s; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 26px 16px 16px; display: flex; flex-direction: column; z-index: 1200; overflow-y: auto;
}
.wordmark {
  font-family: "Barlow Condensed", Impact, sans-serif; font-weight: 800; font-style: italic;
  font-size: 34px; letter-spacing: -1.4px; line-height: 1; display: flex; align-items: flex-start; gap: 4px;
  padding: 0 8px; margin-bottom: 26px;
}
.wordmark span { font-family: "DM Sans", sans-serif; font-size: 11px; font-style: normal; padding-top: 4px; color: var(--lime); letter-spacing: 0; }
.workspace { border: 1px solid var(--line); border-radius: 8px; padding: 11px 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; }
.workspace-icon { height: 32px; width: 32px; background: #28311e; color: var(--lime); border-radius: 7px; display: grid; place-items: center; }
.workspace small { display: block; color: var(--muted); font-size: 9px; letter-spacing: 1px; margin-top: 4px; font-weight: 400; }
.nav-label { font-size: 9px; letter-spacing: 1.6px; color: var(--dim); margin: 24px 8px 10px; font-weight: 600; }

.brand-filters { display: flex; flex-direction: column; gap: 4px; }
.brand-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; text-align: left;
  color: #a9b09f; font-weight: 500; font-size: 12px; width: 100%;
}
.brand-row:hover { background: #20261b; }
.brand-row.active { color: var(--text); background: #1f2819; }
.brand-row:not(.active) .brand-logo { filter: grayscale(1); opacity: .45; }
.brand-row .bar { flex: 1; height: 3px; background: #262d20; border-radius: 3px; overflow: hidden; margin: 0 4px; }
.brand-row .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.brand-row.active .bar i { box-shadow: 0 0 8px var(--brand); }
.brand-row .num { font-size: 10px; background: #2a3322; padding: 3px 6px; border-radius: 4px; min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.brand-row.active .num { background: #3b4e26; color: var(--lime); }

.facility-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: #181d14;
  color: #c3cbb9; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 500;
}
.chip:hover { border-color: #667257; }
.chip.active { background: var(--lime); border-color: var(--lime); color: #18210e; }
.chip svg { width: 13px; height: 13px; }

.radius { padding: 0 6px; }
.radius-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; color: var(--muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: linear-gradient(to right, var(--lime) var(--fill, 0%), #2b3324 var(--fill, 0%)); border-radius: 4px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); border: 3px solid #1a2212; box-shadow: 0 0 0 1px var(--lime); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); border: 3px solid #1a2212; cursor: pointer; }
input[type="range"]:disabled { opacity: .4; }
.text-button { font-size: 11px; color: var(--muted); text-decoration: underline; text-decoration-color: #4b5642; text-underline-offset: 3px; }
.text-button:hover { color: var(--lime); }

.sidebar-bottom { margin-top: auto; padding-top: 26px; }
.rail-graphic {
  position: relative; border: 1px solid #344029; overflow: hidden; height: 128px; border-radius: 8px; padding: 16px;
  background: repeating-linear-gradient(125deg, transparent, transparent 25px, #26311c 25px, #26311c 26px), #1c2515;
}
.rail-graphic span { position: relative; z-index: 1; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 28px; font-weight: 700; line-height: .95; display: block; }
.rail-graphic em { color: var(--lime); font-style: normal; }
.rail-graphic > svg { position: absolute; right: 14px; bottom: 14px; color: var(--lime); width: 36px; height: 36px; }
.connection { font-size: 9px; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); display: inline-block; flex-shrink: 0; }
.status-dot.off { background: #59614f; }
.status-dot.pulse { box-shadow: 0 0 0 0 #c2f65a88; animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px #c2f65a00; } 100% { box-shadow: 0 0 0 0 #c2f65a00; } }
.scrim { display: none; }

/* ---------- main / topbar ---------- */
.main-shell { margin-left: var(--sidebar); height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar { height: var(--top); flex-shrink: 0; border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.breadcrumb { font-size: 11px; color: var(--muted); display: flex; gap: 11px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; }
.breadcrumb span { color: #4c5644; }
.breadcrumb strong { font-weight: 600; color: #d5dbcd; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.live-label { font-size: 9px; letter-spacing: 1.6px; display: flex; align-items: center; gap: 8px; color: #b4bea9; white-space: nowrap; }
.icon-button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #a8b29e; }
.icon-button:hover { background: #252c20; }
.mobile-toggle { display: none; }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: 7px;
  padding: 10px 14px; white-space: nowrap; font-size: 12px; min-height: 38px;
}
.primary { background: var(--lime); color: #18210e; }
.primary:hover { background: var(--lime-2); }
.primary.on { background: #22301a; color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.secondary { border: 1px solid var(--line-2); background: #1a2015; color: #d4ddca; }
.secondary:hover { border-color: #667257; background: #252c20; }
.full { width: 100%; }

.workspace-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 410px) 1fr; }

/* ---------- panel ---------- */
.panel { position: relative; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); overflow: hidden; }
.sheet-handle { display: none; }
.panel-head { padding: 20px 20px 0; }
.eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 2px; color: #a3ae97; display: flex; gap: 8px; align-items: center; }
.tiny-square { height: 5px; width: 5px; background: var(--lime); }
h1 { font-family: "Barlow Condensed", Impact, sans-serif; font-size: 40px; font-weight: 600; letter-spacing: -.6px; line-height: 1.05; margin: 6px 0 14px; }
h1 em { font-style: normal; color: var(--lime); font-variant-numeric: tabular-nums; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; color: var(--text); background: #12150f; border: 1px solid var(--line); border-radius: 8px; padding: 11px 40px 11px 36px; }
.search input:focus { outline: 1px solid var(--lime); border-color: var(--lime); }
.search input::placeholder { color: #717a69; }
.search kbd { position: absolute; right: 10px; font: 600 10px "DM Sans"; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; }
.panel-tabs { display: flex; gap: 4px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.panel-tabs button { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.panel-tabs button:hover { color: var(--text); }
.panel-tabs button.active { color: var(--lime); border-color: var(--lime); }

.origin-bar { margin: 12px 20px 0; }
.origin-card { display: flex; align-items: center; gap: 10px; border: 1px solid #3a4a2a; background: linear-gradient(120deg, #1d2815, #151a12); border-radius: 9px; padding: 10px 12px; font-size: 11px; }
.origin-card .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #2a3a1a; color: var(--lime); }
.origin-card b { display: block; font-size: 12px; color: var(--text); }
.origin-card small { color: var(--muted); font-size: 10px; }
.origin-card button { margin-left: auto; }
.origin-card.prompt { border-style: dashed; border-color: var(--line-2); background: transparent; }

.list { flex: 1; overflow-y: auto; padding: 10px 12px 24px; scrollbar-width: thin; scrollbar-color: #33402a transparent; }
.list-section { font-size: 9px; letter-spacing: 1.6px; color: var(--dim); font-weight: 600; padding: 14px 8px 6px; display: flex; justify-content: space-between; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; line-height: 1.7; }
.empty b { display: block; font-family: "Barlow Condensed"; font-size: 24px; color: var(--text); }

.station {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border-radius: 9px;
  border: 1px solid transparent; position: relative;
}
.station:hover { background: #181d14; border-color: var(--line); }
.station.selected { background: #1c2616; border-color: #4b6233; }
.station .meta { min-width: 0; flex: 1; }
.station strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station .tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.tag { font-size: 9px; font-weight: 600; letter-spacing: .4px; padding: 2px 6px; border-radius: 4px; background: #232a1e; color: #b7c2aa; }
.tag.open { background: #263719; color: var(--lime); }
.tag.unk { background: #2b2a1c; color: #cbbf86; }
.dist { text-align: right; font-variant-numeric: tabular-nums; }
.dist b { display: block; font-family: "Barlow Condensed"; font-size: 22px; font-weight: 700; line-height: 1; color: var(--text); }
.dist span { font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.dist .arrow { display: inline-block; color: var(--lime); font-size: 10px; margin-right: 3px; }
.rank { position: absolute; left: -2px; top: 8px; font: 700 9px "DM Sans"; color: #18210e; background: var(--lime); border-radius: 4px; padding: 1px 4px; }

.brand-logo { width: 40px; height: 40px; border-radius: 9px; background: #f8f9f3; display: grid; place-items: center; border: 2px solid var(--brand); flex-shrink: 0; }
.brand-logo img { width: 28px; height: 28px; object-fit: contain; }
.brand-logo.sm { width: 26px; height: 26px; border-radius: 6px; border-width: 1.5px; }
.brand-logo.sm img { width: 18px; height: 18px; }

.city { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; background: #13160f; }
.city > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; text-align: left; }
.city > button:hover { background: #1a2015; }
.city h3 { font-family: "Barlow Condensed"; font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.city .city-sub { font-size: 10px; color: var(--muted); }
.city .stack { display: flex; margin-left: auto; }
.city .stack .brand-logo { margin-left: -8px; box-shadow: 0 0 0 2px #13160f; }
.city .count { font: 700 11px "DM Sans"; background: #2a3322; color: var(--lime); border-radius: 5px; padding: 4px 7px; min-width: 30px; text-align: center; }
.city .chev { transition: transform .2s; color: var(--muted); }
.city.open .chev { transform: rotate(90deg); }
.city .city-body { display: none; padding: 0 6px 6px; border-top: 1px solid var(--line); }
.city.open .city-body { display: block; }
.city .city-body .zoom-city { margin: 8px 6px 4px; font-size: 11px; color: var(--lime); display: inline-flex; gap: 6px; align-items: center; }

/* ---------- detail drawer ---------- */
.detail {
  position: absolute; inset: 0; background: var(--bg); z-index: 20; overflow-y: auto; transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.detail.open { transform: none; }
.detail-hero {
  position: relative; padding: 18px 20px 20px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
              repeating-linear-gradient(125deg, transparent, transparent 25px, #1d2517 25px, #1d2517 26px), #141911;
}
.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 500; }
.back:hover { color: var(--lime); }
.detail-hero .brand-logo { width: 58px; height: 58px; border-radius: 13px; border-width: 3px; }
.detail-hero .brand-logo img { width: 42px; height: 42px; }
.detail-title { display: flex; gap: 14px; align-items: center; }
.detail-title h2 { font-family: "Barlow Condensed"; font-size: 30px; font-weight: 700; line-height: 1.05; letter-spacing: -.3px; }
.detail-title p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 18px; }
.big-stats > div { background: #141810; padding: 11px 12px; }
.big-stats b { display: block; font-family: "Barlow Condensed"; font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.big-stats b small { font-size: 12px; color: var(--muted); margin-left: 2px; font-family: "DM Sans"; font-weight: 500; }
.big-stats span { font-size: 9px; letter-spacing: 1.3px; color: var(--muted); }
.big-stats .lime { color: var(--lime); }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.detail-body { padding: 4px 20px 30px; }
.block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border: 0; }
.block-label { font-size: 9px; letter-spacing: 1.6px; color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.kv { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.kv svg { color: var(--lime); }
.kv .grow { flex: 1; min-width: 0; }
.coord-box { display: flex; align-items: center; gap: 10px; background: #12150f; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font: 500 13px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .3px; }
.coord-box span { flex: 1; }
.coord-sub { font-size: 11px; color: var(--muted); margin-top: 7px; font-family: ui-monospace, Consolas, monospace; }
.copy { font: 600 10px "DM Sans"; color: var(--lime); border: 1px solid #44582f; border-radius: 5px; padding: 4px 8px; }
.copy:hover { background: #22301a; }
.amen { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.amen span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #cfd8c4; background: #161a12; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
.amen svg { color: var(--lime); width: 14px; height: 14px; }
.route-result { margin-top: 10px; display: none; }
.route-result.show { display: block; }
.route-steps { display: flex; gap: 8px; }
.route-steps > div { flex: 1; background: #1a2414; border: 1px solid #3f5329; border-radius: 8px; padding: 10px; }
.route-steps b { font-family: "Barlow Condensed"; font-size: 24px; color: var(--lime); display: block; line-height: 1; }
.route-steps span { font-size: 9px; color: var(--muted); letter-spacing: 1.2px; }
.nearby-list .station { padding: 7px 8px; }

/* ---------- map ---------- */
.map-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.map-shell { position: relative; flex: 1; min-height: 0; background: #0e1210; isolation: isolate; }
.map-canvas { position: absolute; inset: 0; z-index: 0; background: #0e1210; }
.leaflet-container { background: #0e1210; font-family: "DM Sans", sans-serif; }
.map-shell.light .leaflet-container { background: #e9ece4; }
.map-shell:not(.light) .leaflet-tile-pane { filter: invert(1) hue-rotate(155deg) saturate(0.45) brightness(1.05) contrast(0.82); }
.map-top-label {
  position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; z-index: 500;
  background: #171c16ef; border: 1px solid #414d36; border-radius: 6px; padding: 9px 12px; font-size: 9px; letter-spacing: 1.5px; box-shadow: 0 4px 20px #0006; font-weight: 600;
}
.map-top-label i { height: 6px; width: 6px; background: var(--lime); border-radius: 50%; }
.map-top-label span { color: #879b76; margin-left: 10px; }
.map-tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; z-index: 500; }
.map-tools button { background: #1b2318; color: #d6e3ca; border: 1px solid #46543b; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; box-shadow: 0 3px 12px #0005; }
.map-tools button:hover { background: #26321f; }
.map-tools button.on { background: var(--lime); color: #18210e; border-color: var(--lime); }
.map-scale-note { position: absolute; bottom: 18px; left: 18px; font-family: "Barlow Condensed", Impact, sans-serif; font-size: 15px; letter-spacing: 2px; color: #b1bd9e; text-shadow: 0 1px 4px #000; z-index: 500; pointer-events: none; }
.map-shell.light .map-scale-note { color: #3a4630; text-shadow: none; }
.measure-hud { position: absolute; top: 66px; right: 16px; z-index: 500; background: #171c16f2; border: 1px solid var(--lime); border-radius: 8px; padding: 10px 14px; min-width: 190px; box-shadow: 0 6px 24px #0007; font-size: 11px; color: var(--muted); }
.measure-hud b { display: block; font-family: "Barlow Condensed"; font-size: 28px; color: var(--lime); line-height: 1.1; }
.measure-hud button { margin-top: 6px; }
.map-footer { height: 36px; flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 10px; color: #a5b297; background: #141811; white-space: nowrap; overflow: hidden; }
.map-footer > span:first-child { display: flex; align-items: center; gap: 6px; }
#foot-coords { font-family: ui-monospace, Consolas, monospace; color: #8a9a7b; }
.map-footer button { color: #c0d0af; font-size: 10px; margin-left: auto; }

.toast { position: absolute; left: 50%; bottom: 56px; transform: translate(-50%, 20px); opacity: 0; background: #1d2716; border: 1px solid #5b7540; color: #e7f4dc; padding: 10px 16px; border-radius: 8px; font-size: 12px; z-index: 900; pointer-events: none; transition: all .25s; box-shadow: 0 8px 30px #0008; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* markers */
.station-marker { background: transparent; border: 0; }
.map-pin { width: 38px; height: 38px; position: relative; background: #f8f9f3; border: 2px solid var(--brand); border-radius: 10px; display: grid; place-items: center; box-shadow: 0 3px 12px #0009; transition: transform .15s; }
.map-pin::after { content: ""; position: absolute; bottom: -8px; left: 12px; width: 10px; height: 8px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.map-pin img { width: 27px; height: 27px; object-fit: contain; }
.station-marker:hover .map-pin { transform: translateY(-4px) scale(1.06); }
.station-marker.selected { z-index: 9999 !important; }
.station-marker.selected .map-pin { transform: translateY(-6px) scale(1.25); box-shadow: 0 0 0 4px #c2f65a66, 0 8px 22px #000b; border-color: var(--lime); }
.station-marker.selected .map-pin::after { background: var(--lime); }

.cluster-marker { background: transparent; border: 0; }
.map-cluster { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 50% 40%, #2c3d1b, #18210f); border: 2px solid var(--lime); box-shadow: 0 0 0 5px #c2f65a26, 0 4px 16px #000a; color: var(--text); }
.map-cluster b { font: 700 15px "Barlow Condensed"; line-height: 1; }
.map-cluster span { font: 600 7px "DM Sans"; letter-spacing: 1px; color: var(--lime); }
.map-cluster.lg { box-shadow: 0 0 0 8px #c2f65a22, 0 0 0 16px #c2f65a10, 0 4px 16px #000a; }
.map-cluster.lg b { font-size: 19px; }

.me-marker { background: transparent; border: 0; }
.me-dot { width: 22px; height: 22px; border-radius: 50%; background: #4aa3ff; border: 3px solid #fff; box-shadow: 0 0 0 0 #4aa3ffaa, 0 2px 8px #0008; animation: me 2s infinite; position: relative; }
.me-dot i { position: absolute; left: 50%; top: -15px; width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid #4aa3ff; transform-origin: 6px 26px; display: none; }
@keyframes me { 70% { box-shadow: 0 0 0 16px #4aa3ff00, 0 2px 8px #0008; } 100% { box-shadow: 0 0 0 0 #4aa3ff00, 0 2px 8px #0008; } }
.origin-pin { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #1c2e0a; color: var(--lime); border: 3px solid #f1ffde; font: 700 12px "DM Sans"; box-shadow: 0 0 0 6px #c2f65a30; }
.measure-pt { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 3px solid #10120f; box-shadow: 0 0 0 2px var(--lime); }

.leaflet-control-zoom { border: 1px solid #48583b !important; border-radius: 7px !important; overflow: hidden; box-shadow: 0 3px 12px #0005 !important; }
.leaflet-control-zoom a { background: #1b2615 !important; color: #d1e7bd !important; border-color: #48583b !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.leaflet-control-attribution { font: 9px "DM Sans", sans-serif !important; background: #151c12e8 !important; color: #c4d2b8 !important; padding: 3px 6px !important; }
.leaflet-control-attribution a { color: #d0edb2 !important; }
.leaflet-tooltip { background: #1b2416 !important; border: 1px solid #627c48 !important; color: #e7f4dc !important; font: 11px "DM Sans", sans-serif !important; border-radius: 6px !important; padding: 6px 9px !important; box-shadow: 0 4px 14px #0007 !important; }
.leaflet-tooltip-top::before { border-top-color: #627c48 !important; }
.leaflet-tooltip b { color: var(--lime); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #1b2416; color: var(--text); border: 1px solid #627c48; }
.leaflet-popup-content { margin: 10px 12px; font-size: 12px; }
.leaflet-popup-content button { margin-top: 8px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --sidebar: 210px; }
  .workspace-grid { grid-template-columns: 340px 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 280px; box-shadow: 10px 0 40px #000a; }
  .app.menu-open .sidebar { transform: none; }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: #000a; z-index: 1100; }
  .main-shell { margin-left: 0; }
  .mobile-toggle { display: inline-flex; }
  .topbar { padding: 0 12px; gap: 8px; }
  .breadcrumb { display: none; }
  .live-label { font-size: 8px; }
  .workspace-grid { display: block; position: relative; }
  .map-column { position: absolute; inset: 0; }
  .map-footer { display: none; }
  .map-scale-note { display: none; }
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; height: 42dvh; border: 1px solid var(--line); border-bottom: 0;
    border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px #000b; transition: height .28s cubic-bezier(.2,.8,.2,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.expanded { height: calc(100dvh - var(--top) - 10px); }
  .panel.collapsed { height: 120px; }
  .sheet-handle { display: grid; place-items: center; height: 22px; cursor: grab; flex-shrink: 0; touch-action: none; }
  .sheet-handle i { width: 42px; height: 5px; border-radius: 5px; background: #3b4433; }
  .panel-head { padding: 0 16px; }
  .panel-head .eyebrow { display: none; }
  h1 { font-size: 26px; margin: 0 0 10px; }
  .search kbd { display: none; }
  .origin-bar { margin: 10px 16px 0; }
  .detail { border-radius: 18px 18px 0 0; }
  .map-top-label { top: 12px; left: 12px; }
  .map-tools { top: 12px; right: 12px; }
  .measure-hud { top: 60px; right: 12px; }
  .leaflet-bottom.leaflet-right { bottom: calc(42dvh + 4px); transition: bottom .28s; }
  .toast { bottom: calc(42dvh + 16px); }
  .primary span { display: none; }
  .primary { padding: 10px; }
}
@media (max-width: 860px) and (min-width: 480px) { .primary span { display: inline; } .primary { padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
