/* ============================================================
   Amaara Grove — Connectivity Map
   Plain CSS on top of Bootstrap 5. Palette: forest / charcoal /
   ivory / brass. Bootstrap handles grid, offcanvas, buttons.
   ============================================================ */
:root {
  --forest: #153D32;
  --forest-deep: #0E2C24;
  --charcoal: #253238;
  --ivory: #F6F3EA;
  --paper: #FFFEFA;
  --brass: #B89A60;
  --brass-lt: #D9C49A;
  --muted: #67756D;
  --line: #DFE3D8;
  --op: #28734A;
  --con: #C58B36;
  --plan: #5C83A5;
  --shadow-sm: 0 1px 2px rgba(21,61,50,.06), 0 2px 8px rgba(21,61,50,.05);
  --shadow: 0 2px 6px rgba(21,61,50,.07), 0 12px 32px rgba(21,61,50,.09);
  --shadow-lg: 0 4px 10px rgba(21,61,50,.09), 0 24px 60px rgba(21,61,50,.16);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --topbar: 62px;
  --legend: 44px;
  --side: 292px;
  --detail: 372px;
  --r: 3px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; }

.app {
  height: 100dvh;
  overflow: hidden;
}

/* ------------------------------------------------------------ topbar */
.topbar {
  flex: 0 0 var(--topbar);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: var(--forest);
  color: #F2EFE6;
  border-bottom: 1px solid #0a241d;
  z-index: 1030;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 26px; height: 26px; flex: 0 0 auto;
  border: 1px solid var(--brass); border-radius: 50%;
  position: relative; box-shadow: inset 0 0 0 3px var(--forest);
}
.brand-mark::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--brass); }
.brand-txt h1 {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  letter-spacing: .11em; line-height: 1.05; color: #FBF8EF; margin: 0;
}
.brand-txt h1 em { font-style: normal; color: var(--brass-lt); }
.brand-txt p {
  margin: 2px 0 0; font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: #9FB3A8;
}
.top-meta { gap: 26px; margin-left: auto; }
.meta-item { display: flex; flex-direction: column; gap: 1px; }
.meta-item span { font-size: 8.5px; letter-spacing: .13em; text-transform: uppercase; color: #8FA79B; }
.meta-item b { font-size: 11.5px; font-weight: 600; color: #EFEADF; }
.top-actions { display: flex; gap: 7px; margin-left: auto; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.19) !important;
  color: #E8E4D8 !important; border-radius: var(--r) !important;
  font-size: 10.5px !important; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 500 !important;
}
.icon-btn:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.32) !important; }
.icon-btn.on { background: var(--brass) !important; border-color: var(--brass) !important; color: #1B2A22 !important; font-weight: 700 !important; }
.rm-ico { font-size: 9px; }

/* ------------------------------------------------------------ shell */
.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr) var(--detail);
  min-height: 0;
  position: relative;
}

/* ------------------------------------------------------------ sidebar */
.sidebar {
  --bs-offcanvas-width: var(--side);
  background: var(--paper);
  border-right: 1px solid var(--line);
  min-height: 0;
  z-index: 12;
}
.sidebar .offcanvas-header { display: none; }
.sidebar, .detail {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0; overflow: hidden;
}
/* .offcanvas-body is a flex container in Bootstrap 5.3; these panels are a
   single scrolling column, so it is reset to block and given the scroll. */
.sidebar .offcanvas-body.side-scroll,
.detail .offcanvas-body.detail-inner {
  display: block; flex: 1 1 auto; min-height: 0;
  padding: 16px 16px 26px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: #CBD3C8 transparent; color: var(--ink);
}
.side-scroll::-webkit-scrollbar, .detail-inner::-webkit-scrollbar { width: 7px; }
.side-scroll::-webkit-scrollbar-thumb, .detail-inner::-webkit-scrollbar-thumb {
  background: #CBD3C8; border-radius: 4px;
}
/* Bootstrap zeroes button colour; the map panels set their own ink. */
.sidebar .btn,
.detail .btn,
.side-scroll .btn {
  text-transform: none; letter-spacing: normal; border-radius: 0;
}
.sidebar button:not(.btn), .detail button:not(.btn) { color: inherit; }
.side-sec + .side-sec { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.side-h {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--forest); font-weight: 700;
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 9px;
}
.side-h em { font-style: normal; color: var(--muted); font-weight: 600; letter-spacing: 0; font-size: 10px; }

.view-list { display: grid; gap: 4px; }
.view-btn {
  text-align: left; background: transparent; border: 1px solid transparent;
  border-left: 2px solid transparent; padding: 7px 9px; border-radius: 0;
  transition: background .14s, border-color .14s; width: 100%;
}
.view-btn:hover { background: #F4F6F0; }
.view-btn.on { background: #EDF1E8; border-color: #DCE3D4; border-left-color: var(--forest); }
.vb-eyebrow { display: block; font-size: 7.5px; letter-spacing: .15em; color: #9AA79D; text-transform: uppercase; }
.vb-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--charcoal); margin-top: 1px; }
.view-btn.on .vb-label { color: var(--forest); }
.view-btn.on .vb-eyebrow { color: var(--brass); }
.view-blurb {
  margin: 10px 0 0; font-size: 10.5px; line-height: 1.6; color: var(--muted);
  border-left: 1px solid var(--brass-lt); padding-left: 9px;
}

.toggle-list { display: grid; gap: 1px; }
.toggle {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 0 4px; cursor: pointer; border-radius: var(--r);
  transition: background .12s; margin: 0;
}
.toggle:hover { background: #F5F7F1; }
.toggle.empty { opacity: .45; }
.toggle input {
  appearance: none; width: 15px; height: 15px; flex: 0 0 auto;
  border: 1.5px solid #B9C3B8; border-radius: 2px; background: #fff;
  display: grid; place-items: center; margin: 0; cursor: pointer;
}
.toggle input:checked { background: var(--forest); border-color: var(--forest); }
.toggle input:checked::after {
  content: ''; width: 7px; height: 4px;
  border: 1.6px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-1px);
}
.toggle span.tg-name { font-size: 11.5px; flex: 1; }
.toggle b { font-size: 9.5px; color: var(--muted); font-weight: 600; }
.tg-line { width: 20px; border-top-width: 3px; border-top-style: solid; display: inline-block; flex: 0 0 auto; }
.tg-ico { width: 15px; height: 15px; display: inline-flex; color: var(--forest); opacity: .8; flex: 0 0 auto; }
.tg-ico svg { width: 100%; height: 100%; }

.reset {
  margin-top: 10px; height: 34px;
  background: transparent !important; border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  font-size: 10px !important; letter-spacing: .09em; text-transform: uppercase;
  color: var(--forest) !important;
}
.reset:hover { background: #F1F4EC !important; border-color: #C9D2C2 !important; }

.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.place-btn {
  width: 100%; display: grid; grid-template-columns: 16px 1fr auto auto;
  gap: 7px; align-items: center; text-align: left;
  background: transparent; border: 0; border-radius: var(--r);
  padding: 6px 5px; min-height: 30px;
}
.place-btn:hover { background: #F4F6F0; }
.place-btn.on { background: #EBF0E4; box-shadow: inset 2px 0 0 var(--brass); }
.place-btn .pi { width: 14px; height: 14px; color: var(--forest); opacity: .72; display: inline-flex; }
.place-btn .pi svg { width: 100%; height: 100%; }
.pn { font-size: 11.5px; font-weight: 500; }
.pd { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pt { font-size: 10px; color: var(--brass); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.side-fine { margin: 9px 0 0; font-size: 9px; line-height: 1.55; color: #93A096; }

/* ------------------------------------------------------------ map */
.map-col { min-width: 0; min-height: 0; }
.map-wrap { position: relative; height: 100%; overflow: hidden; background: #F2EFE4; }
#map { position: absolute; inset: 0; z-index: 1; isolation: isolate; background: #F2EFE4; font-family: var(--sans); }
#map:focus { outline: none; }

.map-heading {
  position: absolute; top: 16px; right: 18px; z-index: 6;
  max-width: 296px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,254,250,.96), rgba(255,254,250,.86));
  border: 1px solid #E4E7DA; border-top: 2px solid var(--brass);
  box-shadow: var(--shadow-sm); padding: 12px 15px 13px;
}
.map-wrap.has-pill .map-heading { top: 76px; }
.map-heading .eyebrow { font-size: 8px; letter-spacing: .17em; color: var(--brass); font-weight: 700; text-transform: uppercase; }
.map-heading h2 { font-family: var(--serif); font-size: 25px; line-height: 1.08; color: var(--forest); margin: 3px 0 5px; letter-spacing: -.01em; }
.map-heading p { margin: 0; font-size: 10.5px; line-height: 1.6; color: #5C6B60; }

.reach-dock {
  position: absolute; left: 18px; bottom: 46px; z-index: 7;
  background: rgba(255,254,250,.97); border: 1px solid #E4E7DA;
  box-shadow: var(--shadow); padding: 11px 13px 12px; max-width: 340px;
}
.reach-lbl { font-size: 8px; letter-spacing: .15em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.reach-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.reach-btn {
  text-align: left; background: #F7F9F3 !important; border: 1px solid #DCE3D4 !important;
  border-radius: var(--r) !important; padding: 7px 9px; color: var(--charcoal) !important;
}
.reach-btn b { display: block; font-size: 11.5px; color: var(--forest); }
.reach-btn span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.reach-btn:hover { background: #EFF3E8 !important; }
.reach-btn.on { background: #E7EFE0 !important; border-color: var(--forest) !important; }

.route-pill {
  position: absolute; z-index: 8; left: 50%; transform: translateX(-50%);
  top: 16px; display: flex; align-items: center; gap: 12px;
  background: var(--forest); color: #F5F2E7;
  padding: 9px 10px 9px 15px; box-shadow: var(--shadow-lg);
  border-radius: 2px; border-left: 3px solid var(--brass);
  max-width: min(620px, calc(100% - 40px));
}
.rp-main { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; min-width: 0; }
.rp-lbl { font-size: 7.5px; letter-spacing: .16em; text-transform: uppercase; color: #9FB3A8; }
.rp-main b { font-size: 13px; font-family: var(--serif); }
.rp-stat { font-size: 10.5px; color: var(--brass-lt); font-variant-numeric: tabular-nums; }
.rp-btn {
  background: var(--brass) !important; border: 0 !important; color: #1B2A22 !important;
  height: 28px; padding: 0 12px; border-radius: 2px !important;
  font-size: 10px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase;
}
.rp-clear { background: transparent; border: 0; color: #9FB3A8; font-size: 17px; line-height: 1; padding: 0 2px; }

/* mobile details launcher */
.detail-tab {
  display: none; position: absolute; z-index: 27;
  left: 10px; right: 10px; bottom: 62px;
  align-items: center; justify-content: space-between; gap: 10px;
  height: 44px; padding: 0 14px; border: 1px solid #DDE3D6 !important; border-radius: 2px !important;
  background: rgba(255,254,250,.97) !important; color: var(--forest) !important;
  box-shadow: var(--shadow);
}
.detail-tab span { font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: #93A096; }
.detail-tab b { font-family: var(--serif); font-size: 13.5px; font-weight: 600; }

/* leaflet chrome */
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; margin-right: 16px !important; margin-bottom: 16px !important; }
.leaflet-control-zoom a {
  width: 34px !important; height: 34px !important; line-height: 33px !important;
  background: rgba(255,254,250,.97) !important; color: var(--forest) !important;
  border: 1px solid #E2E6D9 !important; font-size: 16px !important; border-radius: 2px !important;
}
.leaflet-control-zoom a:first-child { border-bottom: 0 !important; }
.leaflet-control-zoom a:hover { background: #F1F4EC !important; }
.leaflet-control-scale-line {
  border: 1px solid #9CAA9D !important; border-top: 0 !important;
  background: rgba(255,254,250,.82) !important; color: #4D5C51 !important;
  font-size: 9px !important; letter-spacing: .04em; padding: 1px 4px 2px !important;
  margin-left: 16px !important; margin-bottom: 6px !important;
}
.leaflet-control-attribution {
  background: rgba(255,254,250,.86) !important; color: #6C7A6E !important;
  font-size: 9px !important; padding: 2px 6px !important;
}
.leaflet-control-attribution a { color: var(--forest) !important; }

/* ------------------------------------------------------------ detail */
.detail {
  --bs-offcanvas-width: var(--detail);
  background: var(--paper);
  border-left: 1px solid var(--line);
  min-height: 0;
  z-index: 14;
}
.detail .offcanvas-header { display: none; }
.detail-inner { padding: 18px 18px 30px; }

.panel-body { padding: 20px 20px 34px; }
.panel-eyebrow {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 8px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); font-weight: 700; margin-bottom: 9px;
}
.panel-eyebrow .tag { color: #93A096; letter-spacing: .1em; font-weight: 600; }
.panel-title {
  font-family: var(--serif); font-size: 28px; line-height: 1.07; letter-spacing: -.015em;
  color: var(--forest); margin: 0 0 6px;
}
.panel-sub { margin: 0 0 12px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.panel-sub span { color: var(--brass); }
.panel-quote {
  font-family: var(--serif); font-size: 15px; font-style: italic; color: #6E7F72;
  border-left: 2px solid var(--brass-lt); padding-left: 11px; margin: 0 0 15px; line-height: 1.5;
}
.panel-summary { font-size: 12px; line-height: 1.68; color: #44594C; margin: 14px 0 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 2px;
}
.chip-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }
.budget-note {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; color: #7A6238;
  background: #FBF6E9; border: 1px dashed #DFCFA8; padding: 4px 7px; border-radius: 2px;
}
.budget-note i { width: 5px; height: 5px; background: #B08C42; border-radius: 50%; }

.stat-grid { display: grid; gap: 1px; background: var(--line); margin: 14px 0 0; border: 1px solid var(--line); }
.stat-grid.two { grid-template-columns: 1fr 1fr; }
.stat { background: #FAFBF5; padding: 9px 11px; }
.stat span { display: block; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: #8A968B; margin-bottom: 3px; }
.stat b { font-size: 12px; color: var(--forest); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.big b { font-size: 19px; font-family: var(--serif); }

.fine { font-size: 9.5px; line-height: 1.6; color: #93A096; margin: 7px 0 0; }

.sect { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sect h3 {
  font-size: 8.5px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--forest); font-weight: 700; margin-bottom: 8px;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.facts li { position: relative; padding-left: 12px; font-size: 11px; line-height: 1.62; color: #4E6155; }
.facts li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; background: var(--brass); border-radius: 50%; }
.facts.warn-li li::before { background: var(--con); }

.row-line { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dotted #E7EBE0; font-size: 11px; }
.row-line:last-child { border-bottom: 0; }
.row-line span { color: #7C8A80; flex: 0 0 auto; max-width: 46%; }
.row-line b { font-weight: 600; color: #3A4C42; text-align: right; }

.notice {
  margin-top: 14px; background: #FAF7EE; border-left: 2px solid var(--brass);
  padding: 10px 12px; font-size: 10.5px; line-height: 1.62; color: #6B5D42;
}
.notice b { display: block; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #7A6238; margin-bottom: 3px; }
.notice p { margin: 0; }
.notice.warn { background: #FDF4E8; border-left-color: var(--con); color: #7A5A2A; }
.notice.warn b { color: #8A5A15; }

.mini-list { display: grid; gap: 1px; }
.mini-row {
  display: grid; grid-template-columns: 15px 1fr auto; gap: 8px; align-items: center;
  width: 100%; text-align: left; background: transparent; border: 0;
  padding: 6px 5px; border-radius: 2px; min-height: 30px; font-size: 11px;
}
.mini-row:hover { background: #F3F6EE; }
.mini-row b { font-size: 10px; color: var(--forest); font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-row .dot { width: 6px; height: 6px; border-radius: 50%; margin-left: 4px; }

.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-forest {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  background: var(--forest) !important; color: #F6F3EA !important; text-decoration: none;
  font-size: 10px !important; letter-spacing: .06em; text-transform: uppercase; font-weight: 600 !important;
  border-radius: 2px !important; border: 1px solid var(--forest) !important;
}
.btn-forest:hover { background: #1C4C3F !important; }
.btn-forest.ghost { background: transparent !important; color: var(--forest) !important; border-color: #C9D2C2 !important; }

.src-link {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px dotted #E7EBE0;
  font-size: 10.5px; line-height: 1.5; color: var(--forest); text-decoration: none;
}
.src-link:last-child { border-bottom: 0; }
.src-link:hover { color: var(--brass); }
.src-link .ref { font-size: 9px; font-weight: 700; letter-spacing: .06em; color: #A9915F; flex: 0 0 auto; }
.src-link em { font-style: normal; color: #93A096; font-size: 9.5px; }
.src-link.muted { color: #8A968B; }

.disclaimer { margin: 20px 0 0; font-size: 9px; line-height: 1.6; color: #9AA69C; border-top: 1px solid var(--line); padding-top: 11px; }

/* ------------------------------------------------------------ legend bar */
.legend-bar {
  flex: 0 0 var(--legend);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 0 16px; background: var(--forest-deep); color: #C9D6CC;
  border-top: 1px solid #0a241d; font-size: 9.5px; overflow-x: auto;
}
.legend-items { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg > i { width: 22px; border-top-width: 3px; border-top-style: solid; display: inline-block; }
.lg-op { border-color: var(--op); }
.lg-con { border-color: var(--con); border-top-style: dashed !important; }
.lg-plan { border-color: var(--plan); border-top-style: dotted !important; }
.lg-dot { width: 9px !important; height: 9px; border-radius: 50%; background: var(--brass); border: 0 !important; box-shadow: 0 0 0 2px rgba(184,154,96,.28); }
.lg-route-line { border-top: 3px solid var(--brass-lt) !important; }
.legend-right { margin-left: auto; gap: 15px; color: #7E9186; flex-wrap: wrap; }
.legend-right b { color: #B9CBBF; font-weight: 600; }

/* ------------------------------------------------------------ loader */
.loader-veil {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--ivory); transition: opacity .4s;
}
.loader-veil.gone { opacity: 0; pointer-events: none; }
.loader-veil p { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.loader-rings { position: relative; width: 46px; height: 46px; }
.loader-rings i {
  position: absolute; inset: 0; border: 1px solid var(--brass); border-radius: 50%;
  animation: ringpulse 2.4s infinite ease-out;
}
.loader-rings i:nth-child(2) { animation-delay: .8s; }
.loader-rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ringpulse { 0% { transform: scale(.4); opacity: .85; } 100% { transform: scale(1.35); opacity: 0; } }

/* ------------------------------------------------------------ responsive
   Bootstrap's lg breakpoint (992px) drives the offcanvas behaviour; these
   rules handle the map chrome. */
@media (max-width: 1399.98px) {
  .top-meta .meta-item:nth-child(2) { display: none; }
}
@media (max-width: 1199.98px) {
  :root { --side: 260px; --detail: 340px; }
}
@media (max-width: 991.98px) {
  :root { --side: 0px; --detail: 0px; --topbar: 58px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .detail {
    --bs-offcanvas-width: 340px;
    /* Bootstrap's backdrop sits at 1040; the drawers must stay above it,
       otherwise the backdrop swallows every tap. */
    z-index: var(--bs-offcanvas-zindex, 1045);
  }
  .sidebar .offcanvas-header, .detail .offcanvas-header {
    display: flex; border-bottom: 1px solid var(--line); padding: 12px 16px;
  }
  .offcanvas-title { font-family: var(--serif); font-size: 18px; color: var(--forest); margin: 0; }
  .side-scroll { padding-bottom: 90px; }
  .detail-inner { padding-bottom: 20px; }
  .detail-tab { display: flex; }
  .map-heading { max-width: 258px; }
  .leaflet-control-zoom { margin-bottom: 118px !important; }
  .reach-dock { bottom: 118px; }
  .toast-stack { bottom: 118px; }
}
@media (max-width: 767.98px) {
  :root { --topbar: 56px; --legend: 32px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .brand-txt h1 { font-size: 14.5px; letter-spacing: .08em; }
  .brand-txt p { font-size: 8px; letter-spacing: .1em; }
  .icon-btn { height: 34px; padding: 0 9px; }
  .rm-lbl { display: none; }
  .map-heading { top: 10px; left: 10px; right: 10px; max-width: none; padding: 8px 11px 9px; }
  .map-heading h2 { font-size: 18px; margin: 2px 0 3px; }
  .map-heading p { display: none; }
  .map-wrap.has-pill .map-heading { top: 10px; }
  .route-pill { left: 8px; right: 8px; transform: none; top: 62px; max-width: none; padding: 8px 9px 8px 12px; }
  .reach-dock { left: 10px; right: 10px; max-width: none; }
  /* one scrollable legend row — never wrap into a second line that the
     32px legend bar would clip */
  .legend-bar { font-size: 8.5px; gap: 8px; padding: 0 9px; overflow-x: auto; flex-wrap: nowrap; }
  .legend-bar::-webkit-scrollbar { height: 0; }
  .legend-items { gap: 10px; flex-wrap: nowrap; }
  .legend-items .lg-route { display: none; }
  .lg > i { width: 15px; }
  .lg-dot { width: 8px !important; height: 8px; }
  .panel-title { font-size: 24px; }
  .panel-body { padding: 16px 16px 30px; }
  .stat-grid.two { grid-template-columns: 1fr; }
  .sidebar, .detail { --bs-offcanvas-width: 100%; }
  .leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 39px !important; }
  /* 44px minimum tap targets */
  .toggle { min-height: 44px; }
  .view-btn { min-height: 46px; padding: 9px 10px; }
  .place-btn { min-height: 40px; }
  .reset { height: 42px; }
  .toast-stack { left: 10px; right: 10px; bottom: 118px; }
}
@media (max-width: 400px) {
  .brand-txt p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
