/* Trail Line City Portal v1 */
:root {
  --accent: #0f7b4b;
  --accent-ink: #0a5c38;
  --ink: #1a2330;
  --ink-2: #4a5568;
  --ink-3: #8b95a5;
  --paper: #f6f7f5;
  --card: #ffffff;
  --line: #e3e7e2;
  --warn: #b45309;
  --closure: #b91c1c;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(16, 32, 24, .10), 0 1px 3px rgba(16, 32, 24, .08);
  --panel-w: 392px;
  --header-h: 56px;
  --band-h: 5px;
  --chrome-top: calc(var(--band-h) + var(--header-h) + env(safe-area-inset-top, 0px));
  --search-h: 56px;
  --mapfilters-h: 0px;
  --linebar-h: 52px;
  --peek-h: 168px;
  --sheet-half-h: min(64dvh, 560px);
  --sheet-scroll-pad: calc(env(safe-area-inset-bottom, 0px) + 72px);
  --sheet-search-h: 0px;
  --explore-top: calc(var(--chrome-top) + 8px + var(--linebar-h) + 6px);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body, #app { height: 100%; width: 100%; min-width: 100%; max-width: 100%; }
#app { position: relative; display: block; overflow: hidden; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  overflow: hidden; font-size: 16px; line-height: 1.45;
}
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
a { color: var(--accent-ink); }

/* ---------- header ---------- */
.band {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex;
  height: calc(var(--band-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}
.band i { flex: 1; }
#hdr {
  position: fixed; top: calc(var(--band-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 40;
  height: var(--header-h);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
}
#hdr .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
#hdr .mark { width: 28px; height: 28px; flex: none; display: block; border-radius: 6px; overflow: hidden; }
#hdr .mark.cityFlag { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
#hdr .t { min-width: 0; }
#hdr .t .city { font-weight: 800; font-size: 16px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hdr .t .sub { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
#hdr .spacer { flex: 1; }
.hdrTools { display: flex; align-items: center; gap: 10px; flex: none; }
.seg {
  display: flex; background: #eef0ed; border-radius: 10px; padding: 3px; gap: 2px; flex: none;
}
.seg button {
  padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.14); }
#alertBtn {
  display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px;
  background: #fdf3e7; color: var(--warn); font-weight: 650; font-size: 12.5px; flex: none;
}
#alertBtn.none { background: #eef0ed; color: var(--ink-3); }
#fsBtn { padding: 7px 9px; border-radius: 10px; background: #eef0ed; flex: none; display: none; }
.dataNote {
  display: none; font-size: 11px; font-weight: 650; color: var(--warn);
  background: #fdf3e7; border-radius: 8px; padding: 6px 10px; max-width: 42vw;
}
.dataNote:not([hidden]) { display: block; }
@media (max-width: 899px) {
  .dataNote { position: fixed; top: calc(var(--chrome-top) + 8px); left: 12px; right: 12px; max-width: none; z-index: 41; }
}
body.embed #fsBtn { display: block; }

/* ---------- map ---------- */
#map { position: absolute; inset: var(--chrome-top) 0 0 0; width: 100%; background: #e8ebe4; }
#hdr .mark.mark-lv,
#veil .mark.mark-lv { display: none; }
html.city-lasvegas body,
body.city-lasvegas { --paper: #faf7f3; }
body.city-lasvegas .band i:nth-child(1) { background: #8f3115; }
body.city-lasvegas .band i:nth-child(2) { background: #b3411f; }
body.city-lasvegas .band i:nth-child(3) { background: #d4a25a; }
body.city-lasvegas .band i:nth-child(4) { background: #2b2320; }
body.city-lasvegas #hdr .mark.mark-tl,
body.city-lasvegas #veil .mark.mark-tl { display: none; }
body.city-lasvegas #hdr .mark.mark-lv,
body.city-lasvegas #veil .mark.mark-lv { display: block; border-radius: 50%; }
body.city-lasvegas #hdr { background: rgba(250, 247, 243, .96); }
body.city-lasvegas #hdr .t .city { color: #8f3115; }
body.no-line-view .seg button[data-view="schematic"] { display: none; }
body.city-lasvegas.citizen #mapLegend {
  background: rgba(255, 252, 248, .94); color: #2b2320;
}
body.city-lasvegas.citizen #mapLegend .asof { display: none; }
.maplibregl-ctrl-bottom-right { margin-bottom: 26px; }
.maplibregl-popup-content {
  font-family: var(--sans); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px;
}
#credit {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; pointer-events: none;
  font-size: 10px; color: #5b6570; background: rgba(255,255,255,.85);
  padding: 3px 10px; padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px)); text-align: right;
}
#credit a { pointer-events: auto; color: inherit; }
.tl-chip {
  display: inline-flex; vertical-align: -2px; width: 11px; height: 11px;
  flex-direction: column; overflow: hidden; border-radius: 2px; margin-right: 3px;
}
.tl-chip i { flex: 1; display: block; }
.tl-chip i:nth-child(1) { background: #28B0E6; }
.tl-chip i:nth-child(2) { background: #0E9850; }
.tl-chip i:nth-child(3) { background: #5A7D2A; }
.tl-chip i:nth-child(4) { background: #D9622B; }

/* ---------- panel ---------- */
#panel {
  position: fixed; z-index: 35; background: var(--card);
  display: flex; flex-direction: column;
  top: calc(var(--chrome-top) + 12px); left: 12px; bottom: 34px; width: var(--panel-w);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  padding-top: 58px;
}
#panelScroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; touch-action: pan-y; scrollbar-width: thin; }
#grab { display: none; }
.pad { padding: 14px 16px; }

/* mobile: bottom sheet */
@media (max-width: 899px) {
  #panel {
    left: 0; right: 0; width: auto; top: auto; bottom: 0;
    border-radius: 18px 18px 0 0;
    height: min(88svh, 88dvh, calc(100svh - var(--chrome-top)));
    max-height: min(88svh, 88dvh, calc(100svh - var(--chrome-top)));
    padding-bottom: 0;
    transform: translateY(calc(100% - var(--peek-h)));
    transition: transform .28s cubic-bezier(.3,.9,.3,1);
    touch-action: pan-y;
    padding-top: 0;
    overflow: hidden;
  }
  #panel.dragging { transition: none; }
  #panel.half { transform: translateY(calc(100% - var(--sheet-half-h))); }
  #panel.full { transform: translateY(0); }
  #grab {
    display: flex; justify-content: center; padding: 12px 0 6px; flex: none; cursor: grab;
    min-height: 28px;
    touch-action: none;
  }
  #grab::before { content: ""; width: 48px; height: 5px; border-radius: 3px; background: #d4d9d2; }
  #panelScroll {
    touch-action: pan-y;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    flex: 0 0 auto;
    height: calc(var(--peek-h) - 36px);
    max-height: calc(var(--peek-h) - 36px);
    padding-bottom: var(--sheet-scroll-pad);
  }
  #panel.half #panelScroll {
    height: calc(var(--sheet-half-h) - 36px);
    max-height: calc(var(--sheet-half-h) - 36px);
  }
  #panel.full #panelScroll {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  #map { inset: var(--explore-top) 0 0 0; }
  :root { --panel-w: 100%; }
  #hdr {
    gap: 6px;
    padding: 0 8px;
    flex-wrap: nowrap;
    height: 48px;
    min-height: 48px;
    align-content: center;
  }
  #hdr .brand { flex: 0 1 auto; gap: 8px; min-width: 0; }
  #hdr .t { min-width: 0; flex: 0 1 auto; }
  #hdr .t .city { overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; letter-spacing: 0; }
  body.city-lasvegas #hdr .t .city {
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    line-height: 1.15;
  }
  #hdr .t .sub { display: none; }
  body.sheet-up #searchDock,
  body.sheet-up #mapFilters,
  body.sheet-up #lineBarWrap {
    visibility: hidden;
    pointer-events: none;
  }
  #hdr .spacer { min-width: 0; flex: 1 1 0; }
  .hdrTools { gap: 4px; margin-left: auto; flex: 0 0 auto; }
  .seg { padding: 2px; gap: 1px; }
  .seg button { padding: 5px 6px; font-size: 11px; min-height: 32px; }
  .seg .full { display: none; }
  #alertBtn { padding: 5px 8px; gap: 4px; }
  #fsBtn { padding: 6px 7px; }
  .backBtn { min-height: 44px; padding: 10px 12px; }
  .rItem { min-height: 52px; }
  .actions { flex-wrap: wrap; }
  .aBtn { min-height: 48px; font-size: 15px; }
  #floBar { bottom: calc(var(--peek-h) + 10px); left: 12px; right: 12px; transform: none; max-width: none; }
  .nearWrap, #filters { display: none; }
  #stats { grid-template-columns: repeat(2, 1fr); }
}
body.embed #panel { max-width: 100%; }
@media (max-width: 899px) {
  body.embed {
    --peek-h: 156px;
    --sheet-half-h: min(88%, 520px);
  }
  body.embed #panel {
    height: min(88%, calc(100% - 4px));
    max-height: min(88%, calc(100% - 4px));
    transform: translateY(calc(100% - var(--peek-h)));
  }
  body.embed #panel.half { transform: translateY(calc(100% - var(--sheet-half-h))); }
  /* (Oct 20) body.embed #panel above outranks #panel.full and the style's #panel.hid, so in the app the sheet never opened
     all the way or put itself away; the same positions again at this rank */
  body.embed #panel.full { transform: translateY(0); }
  body.embed #panel.hid { transform: translateY(calc(100% - var(--sheet-hid-h, 100px))); }
  body.embed #floBar { bottom: calc(var(--peek-h) + 10px); }
}

/* ---------- search + system bar (map-first chrome) ---------- */
#searchDock {
  position: fixed; z-index: 42;
  top: calc(var(--chrome-top) + 12px); left: 12px; width: var(--panel-w);
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 4px;
  pointer-events: none;
}
#searchDock > * { pointer-events: auto; }
#searchBox {
  display: flex; align-items: center; gap: 8px; background: #eef0ed; border-radius: 12px; padding: 10px 12px;
  flex: 1; min-width: 0;
}
#searchBox svg { flex: none; color: var(--ink-3); }
#search {
  border: none; background: none; outline: none; flex: 1; font-size: 16px; color: var(--ink); min-width: 0;
}
#searchClear { color: var(--ink-3); font-size: 18px; line-height: 1; padding: 0 2px; display: none; }
#mapNear {
  display: none; height: 44px; border-radius: 12px; flex: none;
  background: var(--accent); color: #fff; box-shadow: var(--shadow);
  align-items: center; justify-content: center; gap: 5px;
  padding: 0 10px; font-size: 12.5px; font-weight: 700;
}
#sheetSearch { display: none; }
#mapFilters {
  display: none;
}
html.city-fishers #mapFilters,
body.city-fishers #mapFilters,
html.city-fishers #lineBarWrap,
body.city-fishers #lineBarWrap,
html.city-fishers #filters,
body.city-fishers #filters {
  display: none;
}
html.city-fishers,
body.city-fishers {
  --mapfilters-h: 0px;
  --linebar-h: 0px;
}
#lineBarWrap {
  position: fixed; z-index: 36;
  top: calc(var(--chrome-top) + 10px);
  left: calc(12px + var(--panel-w) + 12px);
  right: 12px;
  min-width: 0; max-width: calc(100vw - 24px);
  pointer-events: none;
}
#lineBarTeach {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 14px;
  margin: 0 0 6px; padding: 7px 10px;
  background: rgba(18, 24, 20, .88); color: #f4f7f4;
  border-radius: 10px; pointer-events: auto;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  max-width: 100%; min-width: 0;
}
#lineBarTeach::-webkit-scrollbar { display: none; }
#lineBarTeach button.tk {
  color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; border-radius: 6px;
}
#lineBarTeach[hidden] { display: none; }
#lineBarTeach .teachTitle {
  font-size: 12.5px; font-weight: 750; letter-spacing: .01em;
  flex: none; white-space: nowrap;
}
#lineBarTeach .teachKeys { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 12px; flex: none; }
#lineBarTeach .tk {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650;
}
#lineBarTeach .badge {
  width: 22px; height: 22px; font-size: 8px;
}
#lineBarTeach .tk-line {
  width: 22px; height: 6px; border-radius: 99px; flex: none;
  box-shadow: 0 0 0 2px #fff;
}
#lineBarTeach .tk-xfer {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: #fff; box-shadow: inset 0 0 0 2.2px #1a2330;
}
#lineBar {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 8px; pointer-events: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; touch-action: pan-x;
  overscroll-behavior-x: contain;
}
#lineBar::-webkit-scrollbar { display: none; }
.lineGroup {
  flex: none; align-self: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
  background: rgba(18, 24, 20, .72); padding: 4px 8px; border-radius: 6px;
}
.lineGroup, .linePill { pointer-events: auto; }
.linePill {
  display: flex; align-items: center; gap: 7px; flex: none;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: #fff; color: var(--ink);
  box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700;
  border: 2px solid var(--lc, transparent); min-height: 36px;
}
.linePill .badge {
  width: 26px; height: 26px; font-size: 9px;
}
.linePill .loopTag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; padding: 1px 6px; border-radius: 999px;
  background: #e7f2ea; color: #21683f;
}
.linePill[aria-pressed="true"] {
  background: var(--lc, var(--accent)); color: #fff;
  border-color: rgba(0,0,0,.12);
}
.linePill[aria-pressed="true"] .badge {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
}
.linePill[aria-pressed="true"] .loopTag {
  background: rgba(255,255,255,.22); color: #fff;
}
.linePill.dim { opacity: .38; }
.linePill.loopsPill {
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 5px 14px;
  border-color: var(--accent);
  color: var(--accent-ink);
}
.linePill.loopsPill[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@media (max-width: 899px) {
  :root {
    --mapfilters-h: 40px;
    --header-h: 48px;
    --sheet-half-h: min(56svh, 62dvh, 520px);
    --explore-top: calc(var(--chrome-top) + 8px + var(--search-h) + var(--mapfilters-h) + var(--linebar-h) + 6px);
  }
  html.city-fishers,
  body.city-fishers {
    --mapfilters-h: 0px;
    --linebar-h: 0px;
    --explore-top: calc(var(--chrome-top) + 8px + var(--search-h) + 6px);
  }
  html.city-fishers #mapFilters,
  body.city-fishers #mapFilters,
  html.city-fishers #lineBarWrap,
  body.city-fishers #lineBarWrap {
    display: none;
  }
  #map { top: var(--explore-top); }
  #searchDock {
    top: calc(var(--chrome-top) + 8px); left: 12px; right: 12px; width: auto;
    padding: 0;
  }
  #searchBox { background: #fff; box-shadow: var(--shadow); }
  #mapNear { display: flex; }
  #mapFilters {
    display: block;
    position: fixed; z-index: 34;
    top: calc(var(--chrome-top) + 8px + var(--search-h));
    left: 12px; right: 12px;
    pointer-events: none;
  }
  #mapFilters .chip,
  #mapFilters .clearFilters {
    pointer-events: auto;
    flex: none;
    white-space: nowrap;
  }
  #mapFilters .fRow {
    margin: 0; gap: 6px; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; touch-action: pan-x;
    overscroll-behavior-x: contain; max-width: 100%;
    padding: 2px 0 6px;
    min-height: 40px;
  }
  #mapFilters .fRow::-webkit-scrollbar { display: none; }
  #mapFilters .fLabel { display: none; }
  #mapFilters .chip {
    background: #fff; box-shadow: var(--shadow); min-height: 32px; padding: 6px 11px; font-size: 12.5px;
  }
  #mapFilters .chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
  body.line-view #mapFilters { display: none; }
  #lineBarWrap {
    top: calc(var(--chrome-top) + 8px + var(--search-h) + var(--mapfilters-h));
    left: 8px; right: 8px;
    max-width: calc(100vw - 16px);
    max-height: none;
    overflow: visible;
  }
  #lineBarTeach {
    padding: 5px 8px;
    margin: 0 0 4px;
    flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    max-width: 100%;
  }
  #lineBarTeach .teachTitle { font-size: 11px; flex: none; white-space: nowrap; }
  #lineBar {
    padding: 4px 2px 10px;
    overflow-x: auto; overflow-y: hidden;
    max-width: 100%;
  }
  .linePill { font-size: 12px; min-height: 34px; flex: none; }
}
#nearBtn {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin: 10px 0 2px; padding: 12px 13px;
  background: var(--accent); color: #fff; font-weight: 650; border-radius: 11px; font-size: 14px;
  min-height: 44px;
}
#nearBtn:active { transform: scale(.98); }

/* ---------- stats band ---------- */
.welcome {
  padding: 10px 16px 2px; font-size: 14.5px; color: var(--ink-2); line-height: 1.4;
}
.modeHint {
  padding: 4px 16px 8px; font-size: 14px; color: var(--ink); line-height: 1.4; font-weight: 650;
}
.modeHint[hidden] { display: none; }
body.line-view #stats,
body.line-view #filters,
body.line-view #layers,
body.line-view #mapFilters { display: none; }
#layers { display: none; }
#stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 14px 4px;
}
.stat {
  background: linear-gradient(180deg, #fbfcfa, #f2f5f0); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 6px 8px; text-align: center;
}
.stat b { display: block; font-size: 20px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: 10px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }

/* ---------- filters ---------- */
#filters, #layers { padding: 10px 14px 2px; }
.fRow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.fLabel { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; width: 100%; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: #eef0ed; font-size: 13px; font-weight: 600;
  color: var(--ink-2); border: 1px solid transparent; min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
.clearFilters { font-size: 12px; color: var(--accent-ink); font-weight: 650; padding: 4px 2px; display: none; }

/* ---------- route list ---------- */
#listHead { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px 4px; }
#listHead h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
#listCount { font-size: 12px; color: var(--ink-3); }
.rItem {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 16px; border-bottom: 1px solid #f0f2ee;
}
.rItem .rThumb {
  width: 72px; height: 48px; object-fit: cover; border-radius: 8px; flex: none;
  background: #1a2a22;
}
.rItem:hover { background: #f7f9f6; }
.badge {
  width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex: none;
  box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.85), 0 0 0 1.5px rgba(0,0,0,.08);
}
.rItem .m { min-width: 0; flex: 1; }
.rItem .n { font-weight: 750; font-size: 16px; }
.rItem .d { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.rItem .g { font-size: 11.5px; color: var(--ink-3); text-align: right; flex: none; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1.5px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tag.loop { background: #e7f2ea; color: #21683f; }
.tag.p2p { background: #e9edf7; color: #3c5490; }
.tag.alert { background: #fdf0e0; color: var(--warn); }

/* ---------- detail pages ---------- */
.backRow { display: flex; align-items: center; gap: 6px; padding: 10px 12px 0; }
.backBtn { display: flex; align-items: center; gap: 5px; font-weight: 650; font-size: 13.5px; color: var(--ink-2); padding: 5px 8px; }
.rHead { padding: 6px 16px 12px; }
.rHead .top { display: flex; gap: 12px; align-items: center; }
.badge.big { width: 50px; height: 50px; font-size: 17px; }
.rHead h1 { font-size: 24px; line-height: 1.15; font-weight: 800; }
.rHead .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.routeHero {
  position: relative; margin: 0 16px 8px; border-radius: 12px;
  overflow: hidden; background: #1a2a22; min-height: 120px; height: 140px;
  isolation: isolate; flex: none;
}
.routeHero img {
  display: block; width: 100%; height: 140px; object-fit: cover;
}
.routeHero .photoCredit {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 18px 10px 6px;
  background: linear-gradient(transparent, rgba(16, 24, 20, .58));
  color: #fff; font-size: 10.5px; font-weight: 650; line-height: 1.3;
}
/* No photo on file: a short quiet band, not a dark slab pretending to be a picture. */
.routeHero.noPhoto { background: transparent; min-height: 0; height: 34px; }
.routeHero.noPhoto img { height: 34px; }
@media (max-width: 899px) {
  .routeHero.noPhoto { height: 28px; min-height: 0; }
  .routeHero.noPhoto img { height: 28px; }
}
.segNote {
  font-size: 12.5px; line-height: 1.4; color: var(--ink-2);
  margin-bottom: 8px;
}
.endsBox { display: grid; gap: 8px; }
.endRow {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start;
}
.endK {
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-ink); padding-top: 2px;
}
.endV { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.endV .dir { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.routeLegs { display: flex; flex-wrap: wrap; gap: 6px; }
.routeLeg {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: #eef0ed; font-size: 12.5px; font-weight: 700;
}
.routeLeg .badge { width: 22px; height: 22px; font-size: 8px; }
.addList { display: flex; flex-direction: column; }
.chipsRow { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.statChip {
  background: #f2f5f0; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.statChip b { color: var(--ink); font-weight: 750; }
.actions { display: flex; gap: 8px; padding: 4px 16px 10px; }
.aBtn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 8px; border-radius: 11px; font-weight: 700; font-size: 13.5px;
  background: #eef0ed; color: var(--ink); min-height: 44px;
}
.aBtn.primary { background: var(--accent); color: #fff; }
.aBtn:active { transform: scale(.98); }
.sect { padding: 12px 16px; border-top: 1px solid #f0f2ee; }
.sect h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 8px; }
.sect p { font-size: 13.5px; color: var(--ink-2); }
.paceLine {
  padding: 0 16px 8px; font-size: 13px; font-weight: 650; color: var(--ink-2);
}
.paceMeta { font-weight: 650; color: var(--ink); }
@media (max-width: 899px) {
  .routeHero { height: 108px; min-height: 100px; margin-bottom: 6px; }
  .routeHero img { height: 108px; }
  .rHead { padding-bottom: 4px; }
  .rHead h1 { font-size: 20px; }
  .endsSect { padding-top: 6px; padding-bottom: 6px; }
  .endRow { grid-template-columns: 46px 1fr; gap: 8px; }
  .endV { font-size: 14px; }
  .paceLine { font-size: 12.5px; padding-bottom: 6px; }
  .actions { padding-bottom: 8px; }
  .aBtn { min-height: 44px; padding: 10px 6px; font-size: 13.5px; }
  body.embed .routeHero { height: 96px; min-height: 90px; }
  body.embed .routeHero img { height: 96px; }
}
.surfBar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 4px 0 8px; }
.surfBar div { height: 100%; }
.legendRow { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 11.5px; color: var(--ink-2); }
.legendRow .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.provenance { font-size: 11px; color: var(--ink-3); margin-top: 7px; font-style: italic; }
#elevWrap {
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
#elevCanvas {
  width: 100%; height: 130px; display: block; border-radius: 10px; background: #f7f9f6;
  touch-action: none; pointer-events: none;
}
#elevScrub {
  position: absolute; top: 0; left: 0; width: 0; height: 100%;
  pointer-events: none; z-index: 2;
}
#elevScrub .elevHair {
  position: absolute; left: 0; top: 10px; bottom: 18px;
  border-left: 1.5px dashed #1a2330;
  transform: translateX(-0.5px);
}
#elevScrub .elevKnob {
  position: absolute; left: 0; top: var(--elev-knob-y, 40px);
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: #fff;
  border: 3px solid var(--elev-color, #1a2330);
  box-shadow: 0 1px 4px rgba(16, 32, 24, .28);
}
#elevRead { font-size: 12px; color: var(--ink-2); margin-top: 6px; min-height: 17px; font-variant-numeric: tabular-nums; }
#panel.scrubbing #panelScroll { overflow: hidden; touch-action: none; }
.accessItem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f2f4f0; }
.accessItem:last-child { border-bottom: none; }
.accessItem .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: none; }
.accessItem .nm { font-weight: 650; font-size: 13.5px; }
.amen { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.amen span { font-size: 10.5px; background: #eef0ed; border-radius: 6px; padding: 2px 7px; color: var(--ink-2); font-weight: 600; }
.amen span.on { background: #e7f2ea; color: #21683f; }

/* alerts */
.alertCard { border-left: 4px solid var(--warn); background: #fdf8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.alertCard.closure { border-color: var(--closure); background: #fdf1f1; }
.alertCard .at { font-weight: 700; font-size: 13.5px; }
.alertCard .ad { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.alertCard .aw { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* station */
.qrBox { display: flex; gap: 14px; align-items: center; }
.qrBox img, .qrBox canvas { width: 108px; height: 108px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.scanCount { font-size: 26px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.scanLbl { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.statusPill { display: inline-block; font-size: 10.5px; font-weight: 750; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.statusPill.installed { background: #e7f2ea; color: #21683f; }
.statusPill.proposed { background: #edeef2; color: #5a6478; }

/* search results */
.srGroup { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px 2px; }
.srItem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 16px; }
.srItem:hover { background: #f7f9f6; }
.srItem .ic { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--ink-3); }
.srItem .sn { font-weight: 650; font-size: 13.5px; }
.srItem .sd { font-size: 11.5px; color: var(--ink-3); }
.empty { padding: 22px 16px; color: var(--ink-3); font-size: 13.5px; text-align: center; }

/* footer inside panel */
#panelFoot { padding: 12px 16px 16px; font-size: 10.5px; color: var(--ink-3); border-top: 1px solid #f0f2ee; }
#panelFoot a { color: var(--ink-2); }

/* flyover overlay */
#floBar {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  background: rgba(18,24,20,.86); color: #fff; border-radius: 999px; padding: 9px 10px 9px 18px;
  display: none; align-items: center; gap: 12px; backdrop-filter: blur(6px); box-shadow: var(--shadow);
}
#floBar.on { display: flex; }
#floBar .fn { font-weight: 700; font-size: 13.5px; }
#floBar .fm { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
#floStop { background: rgba(255,255,255,.16); border-radius: 999px; padding: 6px 14px; color: #fff; font-weight: 700; font-size: 12.5px; }

/* intro veil */
#veil {
  position: fixed; inset: 0; z-index: 80; background: #0d1512; display: flex;
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  transition: opacity .6s ease; color: #e8ede9;
}
#veil.hide { opacity: 0; pointer-events: none; }
#veil .mark { width: 56px; height: 56px; display: block; border-radius: 10px; overflow: hidden; }
#veil .mark.cityFlag { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
#veil .vt { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
#veil .vs { font-size: 12.5px; opacity: .65; }
#skipIntro {
  position: fixed; z-index: 70; right: 14px; bottom: calc(34px + env(safe-area-inset-bottom, 0px)); display: none;
  background: rgba(18,24,20,.75); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 650; font-size: 12.5px;
}
#skipIntro.on { display: block; }

/* toast */
#toast {
  position: fixed; z-index: 90; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  background: rgba(18,24,20,.92); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .3s ease; max-width: 90vw;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }


/* map overlay legend: named corridors + icons, stays on phone */
#mapLegend[hidden] { display: none !important; }
#mapLegend {
  position: fixed; z-index: 32; pointer-events: none;
  left: calc(12px + var(--panel-w) + 12px); bottom: 40px;
  background: rgba(18, 24, 20, .88); color: #f4f7f4;
  border-radius: 12px; padding: 8px 12px; max-width: 260px;
  font-size: 11.5px; font-weight: 650; line-height: 1.4;
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 4px;
}
#mapLegend.system {
  pointer-events: auto;
  max-width: 196px;
  max-height: min(46vh, 380px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 7px;
  gap: 1px;
  scrollbar-width: thin;
}
#mapLegend .keyTitle {
  font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; opacity: .72; padding: 1px 4px 4px;
}
#mapLegend .k { display: flex; align-items: center; gap: 7px; }
#mapLegend button.k {
  width: 100%; text-align: left; color: inherit; padding: 3px 4px;
  font-size: 12px; font-weight: 650; border-radius: 6px;
  pointer-events: auto;
}
#mapLegend button.k:hover { background: rgba(255,255,255,.08); }
#mapLegend button.k[aria-pressed="true"] { background: rgba(255,255,255,.16); }
#mapLegend .badge {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; color: #fff; letter-spacing: 0;
}
#mapLegend .fc {
  width: 11px; height: 11px; border-radius: 3px; flex: none;
  background: #0b63b8; box-shadow: inset 0 0 0 1.5px #fff;
}
#mapLegend .st {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: #fff; box-shadow: inset 0 0 0 2px #1a2330;
}
#mapLegend .mk {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #fff; box-shadow: inset 0 0 0 2px #4a5568;
}
#mapLegend .th {
  width: 11px; height: 11px; border-radius: 50%; flex: none; background: #1f5f3f;
}
#mapLegend .pk {
  width: 11px; height: 11px; border-radius: 3px; flex: none;
  background: #1f5f3f; box-shadow: inset 0 0 0 1.5px #fff;
}
#mapLegend .parkfill {
  width: 12px; height: 9px; border-radius: 2px; flex: none;
  background: rgba(125, 184, 122, .85); box-shadow: inset 0 0 0 1px #3e8e3e;
}
#mapLegend .cc {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: #2E4A7D; box-shadow: inset 0 0 0 1.5px #fff;
}
#mapLegend .asof { opacity: .65; font-size: 10px; font-weight: 600; margin-top: 2px; }
@media (max-width: 899px) {
  #mapLegend {
    top: auto;
    bottom: calc(var(--peek-h) + 10px);
    left: 12px; right: auto; max-width: min(72vw, 280px);
    flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: center;
    padding: 7px 10px;
  }
  #mapLegend.system {
    flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    max-width: min(46vw, 168px);
    max-height: min(28vh, 188px);
    overflow-y: auto;
    padding: 6px 6px 5px;
    gap: 0;
  }
  #mapLegend.system .keyTitle { font-size: 9.5px; padding: 0 3px 3px; }
  #mapLegend.system button.k { font-size: 11px; padding: 2px 3px; gap: 6px; }
  #mapLegend.system .badge { width: 18px; height: 18px; font-size: 7px; }
  #mapLegend .asof { width: 100%; margin-top: 0; }
}
/* Fishers Trail Line: search-first, photo-led, quiet type. Do not restyle Vegas. */
html.city-fishers,
body.city-fishers {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink: #14201a;
  --ink-2: #4d5b54;
  --ink-3: #7a877f;
  --paper: #f4f6f3;
  --card: #ffffff;
  --line: #e6ebe6;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(20, 32, 24, .10), 0 1px 3px rgba(20, 32, 24, .06);
  --peek-h: 188px;
  font-feature-settings: "ss01" 1, "cv11" 1;
}
html.city-fishers body,
body.city-fishers {
  font-family: var(--sans);
  letter-spacing: -0.011em;
}
body.city-fishers #hdr {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(20, 32, 24, .06);
}
body.city-fishers #hdr .t .city {
  font-weight: 700;
  letter-spacing: -0.02em;
}
body.city-fishers #hdr .t .sub {
  letter-spacing: .08em;
  font-weight: 500;
  text-transform: uppercase;
}
body.city-fishers #searchBox {
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 11px 14px;
}
body.city-fishers #search {
  font-weight: 500;
}
body.city-fishers #mapNear {
  border-radius: 999px;
}
body.city-fishers #panel {
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(20, 32, 24, .12), 0 1px 3px rgba(20, 32, 24, .06);
}
body.city-fishers .welcome {
  font-size: 15px;
  color: var(--ink-2);
  padding-top: 4px;
}
body.city-fishers #listHead h2 {
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--ink-3);
}
body.city-fishers #stats {
  grid-template-columns: repeat(4, 1fr);
  padding-top: 4px;
}
body.city-fishers .stat {
  background: #f7f8f6;
  border-color: transparent;
  border-radius: 12px;
}
body.city-fishers .stat b { font-weight: 700; letter-spacing: -0.03em; }
body.city-fishers .rItem.rCard,
body.city-lasvegas .rItem.rCard {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 0 12px;
  margin: 0 12px 12px;
  width: auto;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 32, 24, .04), 0 8px 20px rgba(20, 32, 24, .06);
}
body.city-fishers .rItem.rCard .rThumb,
body.city-lasvegas .rItem.rCard .rThumb {
  width: 100%;
  height: 148px;
  border-radius: 0;
}
body.city-fishers .rItem.rCard .badge,
body.city-lasvegas .rItem.rCard .badge { display: none; }
body.city-fishers .rItem.rCard .m,
body.city-lasvegas .rItem.rCard .m { padding: 10px 12px 0; }
body.city-fishers .rItem.rCard .n,
body.city-lasvegas .rItem.rCard .n {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
body.city-fishers .rItem.rCard .d,
body.city-lasvegas .rItem.rCard .d {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
body.city-fishers .rItem.rCard:hover,
body.city-lasvegas .rItem.rCard:hover { background: #fff; }
body.city-fishers .srItem.srCard,
body.city-lasvegas .srItem.srCard {
  align-items: stretch;
  gap: 0;
  padding: 0 0 10px;
  margin: 0 12px 10px;
  width: auto;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 32, 24, .04), 0 6px 16px rgba(20, 32, 24, .06);
}
body.city-fishers .srItem.srCard .rThumb,
body.city-lasvegas .srItem.srCard .rThumb {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 0;
  background: #1a2a22;
}
body.city-fishers .srItem.srCard span:last-child,
body.city-lasvegas .srItem.srCard span:last-child { padding: 8px 12px 0; }
body.city-fishers .routeHero,
body.city-lasvegas .routeHero {
  margin: 0;
  border-radius: 0;
  height: 168px;
  min-height: 148px;
}
body.city-fishers .routeHero img,
body.city-lasvegas .routeHero img { height: 168px; }
body.city-lasvegas .routeHero.noPhoto { height: 34px; min-height: 0; background: transparent; }
body.city-lasvegas .routeHero.noPhoto img { height: 34px; }
body.city-fishers .rHead h1 {
  font-weight: 750;
  letter-spacing: -0.03em;
}
body.city-fishers #mapLegend {
  background: rgba(255,255,255,.92);
  color: #1a2330;
}
body.city-fishers #veil {
  background: #f4f6f3;
  color: #14201a;
}
body.city-fishers #veil .vs { opacity: .55; }
@media (max-width: 899px) {
  html.city-fishers,
  body.city-fishers {
    --peek-h: 196px;
    --sheet-half-h: min(58svh, 64dvh, 540px);
    --sheet-search-h: 56px;
  }
  body.city-fishers #panel {
    left: 8px; right: 8px; width: auto;
    border-radius: 20px 20px 16px 16px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    height: min(86svh, calc(100svh - var(--chrome-top) - 16px));
    max-height: min(86svh, calc(100svh - var(--chrome-top) - 16px));
  }
  body.city-fishers #searchDock {
    left: 12px; right: 12px;
  }
  body.city-fishers #sheetSearch:not([hidden]) {
    display: block;
    flex: none;
    padding: 0 12px 10px;
    background: var(--card);
  }
  body.city-fishers #sheetSearch #searchBox {
    background: #f1f3f0;
    box-shadow: none;
    padding: 10px 13px;
  }
  body.city-fishers #panel.full #grab,
  body.city-fishers #panel.half #grab { padding-bottom: 8px; }
  body.city-fishers.sheet-search #panel.half #panelScroll {
    height: calc(var(--sheet-half-h) - 36px - var(--sheet-search-h));
    max-height: calc(var(--sheet-half-h) - 36px - var(--sheet-search-h));
  }
  body.city-fishers #mapNear { min-width: 44px; }
  body.city-fishers .routeHero,
  body.city-fishers .routeHero img,
  body.city-lasvegas .routeHero,
  body.city-lasvegas .routeHero img { height: 132px; min-height: 120px; }
  body.city-lasvegas .routeHero.noPhoto,
  body.city-lasvegas .routeHero.noPhoto img { height: 28px; min-height: 0; }
  body.city-fishers .rItem.rCard .rThumb,
  body.city-lasvegas .rItem.rCard .rThumb { height: 132px; }
  body.city-fishers #floBar { left: 20px; right: 20px; }
  body.city-fishers #mapLegend {
    bottom: calc(var(--peek-h) + 18px);
    left: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  #skipIntro { display: none !important; }
  [data-act="flyover"] { display: none !important; }
}
