/* One full-width dock for the map legend and community links. */
#bottomBar {
    position: fixed; z-index: 30; inset: auto 0 0; display: grid;
    grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px;
    padding: 12px max(24px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
    border-top: 1px solid #dce3ec; background: #fff;
    box-shadow: 0 -3px 20px #0f172a06;
}
#bottomBar #legendPanel { position: static; display: block; min-width: 0; max-width: none; width: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#bottomBar #legendPanel > div:first-child { justify-content: flex-start; gap: 8px; margin-bottom: 3px; }
#bottomBar #legendTitle { font-size: 10px; color: #64748b; letter-spacing: .055em; }
#bottomBar .legend-toggle { width: 25px; height: 25px; }
#bottomBar #legendItems { display: flex; flex-wrap: wrap; gap: 7px 18px; max-height: 58px; overflow: auto; font-size: 11px; }
#bottomBar #legendItems > div { flex: 0 0 auto; gap: 6px; min-height: 20px; }
#bottomBar #legendItems .truncate { max-width: 230px; white-space: nowrap; }
#bottomBar .legend-count { margin-left: 3px; font-size: 10px; color: #94a3b8; }
#bottomBar .map-coverage { display: inline-block; margin: 5px 0 0; padding: 0; border: 0; font-size: 10px; }
#bottomBar .map-data-note { margin: 3px 0 0; padding: 0; border: 0; font-size: 10px; line-height: 1.4; }
#bottomBar #legendPanel.is-collapsed #legendItems,
#bottomBar #legendPanel.is-collapsed .map-coverage,
#bottomBar #legendPanel.is-collapsed .map-data-note { display: none; }
#bottomBar #followBanner { position: relative; inset: auto; display: flex; align-items: center; gap: 18px; width: auto; min-width: 0; min-height: 0; padding: 0 0 0 24px; overflow: visible; border: 0; border-left: 1px solid #e2e8f0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
#bottomBar #followBanner::before { display: none; }
.dock-follow-label { display: grid; gap: 4px; color: #64748b; font-size: 11px; }
.dock-follow-label strong { color: #0f172a; font-size: 12px; font-weight: 800; }
#bottomBar .follow-links { display: flex; gap: 6px; }
#bottomBar .follow-link { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: none; }
#bottomBar .follow-link img { width: 20px; height: 20px; }
#bottomBar .follow-link span { font-size: 11px; font-weight: 700; }
#bottomBar .follow-link:hover { transform: none; background: #f8fafc; border-color: #cbd5e1; }
#bottomBar .community-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #475569; font-size: 11px; font-weight: 700; white-space: nowrap; }
#bottomBar .community-toggle svg { width: 15px; height: 15px; }
#bottomBar .community-toggle[aria-expanded="true"] { background: #f1f5f9; border-color: #94a3b8; }
#bottomBar #communityDetails { position: absolute; display: none; right: 0; bottom: calc(100% + 24px); width: min(440px,calc(100vw - 32px)); max-height: min(380px,60dvh); overflow-y: auto; padding: 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 14px 55px #0f172a24; }
#bottomBar #followBanner.is-expanded #communityDetails { display: flex; align-items: flex-start; }
#bottomBar .follow-pitch > img { width: 40px; height: 40px; border-radius: 10px; box-shadow: none; }
#bottomBar .follow-pitch strong { font-size: 14px; }
#bottomBar .follow-pitch p { display: block; font-size: 11px; }
#bottomBar .follow-eyebrow { font-size: 10px; }
#bottomBar .follow-actions { margin-top: 12px; gap: 7px; }
#bottomBar .follow-actions a,#bottomBar .follow-actions button { min-height: 38px; font-size: 11px; }
.maplibregl-ctrl-bottom-right { bottom: calc(var(--follow-height,110px) + 14px) !important; }
body > #sidebar { bottom: calc(var(--follow-height,110px) + 14px); }
.overview-open #bottomBar { grid-template-columns: 1fr; }
.overview-open #bottomBar #legendPanel { display: none; }
.overview-open #bottomBar #followBanner { justify-content: flex-end; border: 0; padding-left: 0; }
.overview-open #bottomBar .dock-follow-label { margin-right: auto; }
@media(max-width:1600px) {
    #bottomBar .follow-link { padding: 9px; }
    #bottomBar .follow-link span { display: none; }
    #bottomBar #followBanner { gap: 12px; padding-left: 20px; }
}
@media(max-width:1050px) {
    #bottomBar { padding-left: 16px; padding-right: 16px; gap: 16px; }
    #bottomBar .dock-follow-label { display: none; }
    #bottomBar #legendItems .truncate { max-width: 155px; }
}
@media(max-width:720px), (max-height:500px) and (max-width:1000px) {
    #bottomBar { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 5px max(10px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
    #bottomBar #legendPanel { padding: 0 2px 5px; border-bottom: 1px solid #edf0f5; }
    #bottomBar #legendPanel > div:first-child { justify-content: space-between; margin: 0; min-height: 28px; }
    #bottomBar .legend-toggle { width: 38px; height: 28px; }
    #bottomBar #legendItems { padding: 5px 0; gap: 7px 14px; max-height: 30dvh; }
    #bottomBar #legendItems .truncate { max-width: 230px; }
    #bottomBar #followBanner { justify-content: space-between; gap: 8px; border: 0; padding: 6px 0 0; }
    #bottomBar .follow-links { flex: 1; gap: 6px; }
    #bottomBar .follow-link { flex: 1; padding: 7px; min-width: 40px; min-height: 44px; }
    #bottomBar .community-toggle { flex: 0 0 auto; padding: 8px; font-size: 10px; }
    #bottomBar #communityDetails { position: fixed; left: 10px; right: 10px; bottom: calc(var(--follow-height,100px) + 8px); width: auto; padding: 16px; max-height: 50dvh; }
    #bottomBar .follow-actions a,#bottomBar .follow-actions button { min-height: 44px; }
    body > #sidebar { bottom: max(.5rem,env(safe-area-inset-bottom)); }
    .overview-open #bottomBar #followBanner { justify-content: space-between; padding-top: 0; }
}
