.rider-page header { background: #fbf0df; margin-bottom: .85rem; }
.rider-page .top, .rider-main { width: min(100% - 1.4rem, 76rem); }
.rider-page .top a { display: grid; place-items: center; width: 44px; height: 44px; font-size: 1.35rem; }
.rider-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.rider-heading h1 { font-size: clamp(1.65rem, 5.8vw, 2.6rem); }
#rider-count, #rider-status { color: var(--muted); margin: 0 0 .55rem; }
.rider-filters, .rider-coverage { background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; margin-bottom: .75rem; }
.rider-filters > p, .rider-coverage > p { padding: 0 .75rem; font-size: .82rem; color: var(--muted); }
#rider-categories { display: flex; flex-wrap: wrap; gap: .32rem; border: 0; padding: 0 .7rem .55rem; margin: 0; min-width: 0; }
#rider-categories legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#rider-categories label { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.35rem; padding: .2rem .48rem; border: 1px solid var(--border); border-radius: .65rem; font-size: .82rem; cursor: pointer; }
#rider-categories label:has(:checked) { background: #f4e7d7; }
#rider-categories input { margin: 0; accent-color: var(--accent); }
.rider-glyph { color: var(--glyph); font-size: 1rem; font-weight: 800; }
.rider-map-label { text-shadow: 0 0 2px white, 0 0 4px white, 0 0 5px white; }
#rider-map { position: relative; background: #e5e8e3; }
.rider-vector-map { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.rider-vector-map:active { cursor: grabbing; }
.rider-vector-controls { position: absolute; top: .55rem; right: .55rem; display: grid; gap: .3rem; }
.rider-vector-controls button { width: 44px; height: 44px; border: 1px solid #d7cfbf; border-radius: .5rem; background: #fffbf4; color: #913e2d; font: 750 1.3rem system-ui; cursor: pointer; }
.rider-vector-boundaries path { fill: #f4efe3; stroke: #b7b1a3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.rider-osm-tiles { pointer-events: none; }
.rider-vector-map.has-osm-tiles .rider-vector-boundaries path { fill: none; stroke: #897e6c; stroke-opacity: .55; }
#rider-attribution { margin: .18rem 0 .6rem; color: var(--muted); font-size: .75rem; text-align: right; }
#rider-attribution a { color: inherit; }
.rider-vector-district-labels { pointer-events: none; }
.rider-vector-district-labels text { text-anchor: middle; fill: #493a30; font: 700 10px system-ui; paint-order: stroke; stroke: #f4efe3; stroke-width: 1.7; }
.rider-vector-feature { cursor: pointer; }
.rider-vector-feature polygon, .rider-vector-feature polyline {
  stroke: var(--feature);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.rider-vector-feature polyline { fill: none; }
.rider-vector-feature polygon { fill: var(--feature); fill-opacity: .2; stroke-width: 1.8; }
.rider-vector-feature:is(.is-selected, :focus-visible) polygon { fill-opacity: .49; stroke-width: 3.2; }
.rider-vector-feature:is(.is-selected, :focus-visible) polyline { stroke-width: 6; }
.rider-vector-marker circle { fill: var(--feature); stroke: #fffaf0; stroke-width: 1.6; }
.rider-vector-feature:is(.is-selected, :focus-visible) circle { r: 12; stroke-width: 2.4; }
.rider-vector-marker text { fill: white; text-anchor: middle; font: 750 10px system-ui; pointer-events: none; }
.rider-vector-marker .rider-vector-name { display: none; fill: #2d211c; stroke: #fffaf0; stroke-width: 2.6; paint-order: stroke; }
.rider-vector-feature.show-name .rider-vector-name { display: block; }
#rider-map { height: clamp(20rem, 61dvh, 43rem); border: 1px solid var(--border); border-radius: .85rem; overflow: hidden; background: #e5ddcb; }
.rider-page [hidden] { display: none !important; }
#rider-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap: .55rem; padding: 0; margin: 0; list-style: none; }
#rider-list li { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface); }
#rider-list li[data-selected="true"] { outline: 2px solid var(--accent); }
#rider-list button { padding: 0; min-height: 32px; background: none; border: 0; color: var(--accent); text-align: left; font: inherit; font-weight: 750; cursor: pointer; }
#rider-list p { margin: .25rem 0 .45rem; font-size: .9rem; }
#rider-toggle, #rider-info-tour { flex: none; display: inline-flex; align-items: center; min-height: 44px; border: 1px solid var(--accent); border-radius: .6rem; padding: .4rem .65rem; background: var(--surface); color: var(--accent); font: inherit; font-size: .85rem; text-decoration: none; cursor: pointer; }
#rider-info { position: fixed; right: max(1rem, calc((100vw - 76rem) / 2)); bottom: 1rem; z-index: 10; width: min(27rem, calc(100% - 2rem)); max-height: min(49dvh, 36rem); overflow: auto; overscroll-behavior: contain; border: 1px solid #dac6af; border-radius: .95rem; padding: .85rem 2.8rem .85rem .95rem; background: #fdf4e6; box-shadow: 0 .2rem 1.35rem #3321163c; }
#rider-info h2 { margin: 0 0 .18rem; font-size: 1.2rem; }
#rider-info p { margin: 0 0 .45rem; font-size: .92rem; }
#rider-info-meta, #rider-info-note { color: var(--muted); }
#rider-info-stops { padding-left: 1.55rem; margin: .38rem 0 .65rem; font-size: .88rem; }
#rider-info-tour { background: var(--accent); color: white; font-weight: 700; }
#rider-info-source { display: inline-block; color: var(--accent); font-size: .82rem; }
#rider-close { display: grid; place-items: center; position: absolute; top: .1rem; right: .25rem; width: 44px; height: 44px; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 1.55rem; cursor: pointer; }
.rider-coverage { margin-top: .75rem; }
#rider-coverage { overflow: auto; padding: 0 .75rem .5rem; }
#rider-coverage table { border-collapse: collapse; width: 100%; font-size: .78rem; }
#rider-coverage th, #rider-coverage td { padding: .22rem .32rem; text-align: left; border-bottom: 1px solid var(--border); }
@media (max-width: 40rem) {
  #rider-map { height: clamp(19rem, 58dvh, 34rem); }
  #rider-info { left: .35rem; right: .35rem; bottom: 0; width: auto; border-radius: 1.05rem 1.05rem 0 0; padding-bottom: max(.85rem, env(safe-area-inset-bottom)); }
  #rider-categories label { font-size: .77rem; }
}
