/* Approved floating website UI. Map renderer and realtime logic unchanged. */
html body:not(.theme-night) .app-bar,html body:not(.theme-night) .app-bar::before{background:#fff!important;color:#10273e}
html body.theme-night .app-bar,html body.theme-night .app-bar::before{background:var(--surface)!important}
html body .app-bar .brand{color:var(--ink);font-weight:800;font-size:21px}
html body .app-bar{box-shadow:0 1px 5px #142b4020!important}
html body #quickSearchDock{background:var(--surface)!important;border:1px solid var(--line-strong);box-shadow:none;border-radius:22px}
html body #quickSearchDock::before{background:none;box-shadow:none;backdrop-filter:none}
html body #searchInput{color:var(--ink)!important}
html body #searchBox{min-height:40px}
html body #searchBox>#searchInput{height:40px}
html body #ovTabs .ov-tab{gap:7px;color:var(--ink);font-size:13px;font-weight:600}
html body #ovTabs .ov-tab svg{display:block;width:19px;height:19px;flex:none}
html body #ovTabs .ov-tab[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);box-shadow:none}
html body #brandModeCounts{background:var(--surface);padding:4px;gap:5px;border-radius:24px;box-shadow:0 2px 9px #102d4022}
html body #brandModeCounts .brand-mode-stat:not(.visible-stat){background:var(--chip);color:var(--ink);padding:0 10px;height:32px;gap:5px}
html body #brandModeCounts .brand-mode-stat[hidden]{display:none!important}
html body #brandModeCounts .brand-mode-stat svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body #brandModeCounts .brand-mode-stat::before{display:none}
html body #brandModeCounts .brand-mode-stat small{display:inline;color:inherit;font-size:12px}
html body #brandModeCounts .brand-mode-stat b{color:inherit;font-weight:650}
html body #brandModeCounts .brand-mode-stat[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
html body #brandModeCounts .brand-mode-stat.is-zero{opacity:.55}
html body :is(.detail-panel,#exploreDock){background:var(--surface);border:1px solid var(--line);box-shadow:0 8px 26px #142b4028}
html body :is(.detail-panel,#exploreDock)::before{background:var(--surface)!important;box-shadow:none;backdrop-filter:none}
html body #stopPanel.open{background:var(--surface);color:var(--ink)}
html body #stopPanelTitle{color:var(--ink)}
html body :is(.detail-panel,#exploreDock,#quickSearchDock) *{white-space:normal!important;text-overflow:clip!important;-webkit-line-clamp:unset!important;overflow-wrap:anywhere}
html body :is(.detail-panel,#exploreDock) button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
html body #websiteTrip{background:var(--surface);color:var(--ink);padding:0 16px}
html body #websiteTrip header{padding:18px 0 12px;border:0;gap:10px}
html body #websiteTrip header strong{font-size:20px;letter-spacing:-.025em}
html body #websiteTrip header .wbLine{font-size:15px;min-width:42px;padding:8px 10px;border-radius:9px}
html body #websiteTrip header button{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--chip);color:var(--ink)}
html body #websiteTrip small{color:var(--muted);font-size:12px}
html body #websiteTrip .journeyStatus{margin:0 0 12px;padding:12px 14px;background:var(--chip);border-radius:11px}
html body #websiteTrip .journeyStatus.is-live{background:var(--accent-soft)}
html body #websiteTrip .journeyStatus b{color:var(--accent);display:flex;align-items:center;gap:7px;font-size:14px}
html body #websiteTrip .journeyStatus small{font-size:13px}
html body #websiteTrip .journeyBody{padding:0 0 6px;flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
html body #websiteTrip .journeyBody h3{margin:5px 0 12px;font-size:15px;font-weight:750;color:var(--ink);letter-spacing:0}
html body #websiteTrip button.journeyStop{grid-template-columns:66px 20px minmax(0,1fr) 14px;gap:10px;padding:10px 8px;min-height:53px;font-size:14px;border-radius:8px}
html body #websiteTrip li::before{left:94px;background:var(--line-strong)}
html body #websiteTrip li.next{border:0;box-shadow:inset 4px 0 var(--accent);background:var(--accent-soft);border-radius:9px}
html body #websiteTrip li.next::before{left:94px;background:var(--accent)}
html body #websiteTrip li.next .journeyStopName{font-weight:750}
html body #websiteTrip li.next .journeyPoint{border-color:var(--accent)}
html body #websiteTrip .journeyTime.live{color:var(--accent)}
html body #websiteTrip .journeyTime.late{color:var(--late)}
html body #websiteTrip .journeyTime.early{color:var(--early)}
html body #websiteTrip .journeyCountdown{font-size:20px;letter-spacing:-.025em}
html body #websiteTrip .journeyClock{font-size:12px;color:inherit}
html body #websiteTrip .journeyExpand{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px 0 12px;padding:11px 8px;background:var(--chip);color:var(--ink);border-radius:10px;font-weight:600;font-size:13px}
html body #websiteTrip .journeyVehicle{display:flex;align-items:flex-start;gap:12px;margin:0 0 5px;padding:13px;border:1px solid var(--line-strong);border-radius:12px}
html body #websiteTrip .journeyVehicleIcon{display:grid;place-items:center;width:40px;height:40px;flex:none;background:var(--accent-soft);color:var(--accent);border-radius:11px}
html body #websiteTrip .journeyVehicleIcon svg{width:23px;height:23px}
html body #websiteTrip .journeyVehicleInfo{flex:1;min-width:0}
html body #websiteTrip .journeyVehicle h3{margin:0 0 6px}
html body #websiteTrip .journeyVehicle dl{display:flex;flex-wrap:wrap;gap:8px 16px}
html body #websiteTrip .journeyVehicle dl>div{flex:1 1 70px;display:block;padding:0;min-width:0}
html body #websiteTrip .journeyVehicle dt{color:var(--muted);font-size:12px;margin-bottom:4px}
html body #websiteTrip .journeyVehicle dd{font-size:16px;font-weight:750}
html body #websiteTrip .journeyVehicle .journeyAccessible{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--accent)}
html body #websiteTrip .journeyAccessible .wheel{color:var(--accent)}
html body #websiteTrip footer{padding:10px 0 15px;gap:6px;border:0;margin-top:auto;flex-wrap:nowrap}
html body #websiteTrip footer button{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;min-width:0;padding:11px 5px;background:var(--surface);border:1px solid var(--line-strong);border-radius:10px;color:var(--ink);font-weight:600;font-size:12px}
html body #websiteTrip footer button[data-follow]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
html body #websiteTrip .journeyIcon{width:18px;height:18px;flex:none;vertical-align:middle}
html body #websiteTrip .wbArrow .journeyIcon{width:15px;height:15px}
html body #websiteTrip button:hover{filter:brightness(.97)}
html body :is(#contactMapLink,#mapHelpLink){border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
html body .leaflet-bottom.leaflet-right .leaflet-control-zoom{border-radius:20px!important;background:var(--surface)}
html body .leaflet-bottom.leaflet-right .leaflet-control-zoom a{width:42px;height:42px;line-height:42px;font-weight:500}
html body button.wbRow{background:var(--surface);border-bottom-color:var(--line)}
html body button.wbRow:enabled:hover{background:var(--row-hover)}
html body .wbFilters button{background:var(--chip);color:var(--ink)}
html body .wbFilters button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);outline:1px solid var(--accent);outline-offset:0}
html body .wbDest small,html body .wbCounts,html body .wbLegend{color:var(--muted)}
@media(min-width:761px){
 html body #ovTabs{background:none!important;right:14px;gap:4px}
 html body #ovTabs .ov-tab{padding:0 10px;height:40px}
 html body #quickSearchDock{top:10px!important;left:clamp(135px,calc(100% - 880px),calc(100% - 760px))!important;width:clamp(155px,calc(100% - 850px),380px)!important}
 html body :is(#stopPanel,#vehiclePanel,#favoritePanel,#planningPanel,#nearbyPanel).open{position:fixed!important;left:20px!important;right:auto!important;top:88px!important;bottom:18px!important;width:min(470px,43vw)!important;height:auto!important;max-height:calc(100dvh - 106px)!important;border-radius:23px!important}
 html body #vehiclePanel.appJourney.open{bottom:auto!important;max-height:calc(100dvh - 106px)!important}
 html body:has(:is(#stopPanel,#vehiclePanel).open) #map{left:0!important;right:0!important;width:auto!important}
}
@media(min-width:761px) and (max-width:1050px){
 html body #ovTabs .ov-tab{padding:0 7px;font-size:12px;gap:4px}
 html body #ovTabs .ov-tab svg{width:16px;height:16px}
 html body #quickSearchDock{left:140px!important;width:clamp(100px,calc(100vw - 630px),260px)!important}
 html body #websiteTrip footer button{flex-direction:column;gap:4px}
}
@media(max-width:760px){
 html body .app-bar .brand{font-size:16px}
 html body #ovTabs .ov-tab{font-size:10px;gap:3px}
 html body #ovTabs .ov-tab svg{width:21px;height:21px}
 html body #quickSearchDock{border-radius:14px}
 html body #brandModeCounts{max-width:calc(100vw - 20px);overflow-x:auto;flex-wrap:nowrap}
 html body #brandModeCounts .brand-mode-stat:not(.visible-stat){padding:0 8px}
 html body #vehiclePanel.appJourney.open{top:auto!important;bottom:70px!important;left:8px!important;right:8px!important;width:auto!important;height:auto!important;max-height:70dvh!important;min-height:0!important;border-radius:22px!important;padding-bottom:0!important}
 html body #websiteTrip{padding:0 12px;min-height:0}
 html body #websiteTrip header{padding:13px 0 10px;gap:7px}
 html body #websiteTrip header strong{font-size:17px}
 html body #websiteTrip header button{width:32px;height:32px}
 html body #websiteTrip header .wbLine{min-width:36px;padding:7px}
 html body #websiteTrip .journeyStatus{padding:9px 10px;margin-bottom:9px}
 html body #websiteTrip button.journeyStop{min-height:45px;padding:6px;grid-template-columns:57px 15px minmax(0,1fr) 12px;gap:8px;font-size:13px}
 html body #websiteTrip li::before,html body #websiteTrip li.next::before{left:78px}
 html body #websiteTrip .journeyCountdown{font-size:18px}
 html body #websiteTrip footer{padding:8px 0 10px}
 html body #websiteTrip footer button{flex-direction:column;gap:3px;font-size:11px;padding:7px 3px}
 html body #websiteTrip .journeyVehicle{padding:10px}
 html body :is(#stopPanel,#favoritePanel,#planningPanel,#nearbyPanel).open{border-radius:20px 20px 0 0!important}
}

/* Mobile approved layout: shared floating sheets and consistent controls. */
@media(max-width:760px){
 html body .app-bar{height:60px; padding-left:10px}
 html body #quickSearchDock:not(.search-active):not(:focus-within){top:9px!important;left:124px!important;right:9px!important;width:auto!important}
 html body #searchBox{min-height:40px;padding-left:9px}
 html body #searchBox>#searchInput{font-size:14px;min-height:40px}
 html body #ovTabs{border:1px solid var(--line);border-radius:24px;padding:5px;gap:3px;box-shadow:0 3px 14px #102d4022;background:var(--surface)}
 html body #ovTabs .ov-tab{border-radius:17px}
 html body #ovTabs .ov-tab[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}
 html body #vehiclePanel.appJourney.open,html body #stopPanel.open{top:auto!important;bottom:76px!important;left:7px!important;right:7px!important;width:auto!important;max-height:72dvh!important;height:auto!important;min-height:0!important;border-radius:23px!important;padding-bottom:0!important}
 html body #stopPanel.open{height:72dvh!important}
 html body #stopPanel.open>header{padding:9px 10px 12px;gap:7px}
 html body #stopPanel.open>header::before{flex-basis:36px;height:36px;background-size:22px;border-radius:10px}
 html body #stopPanel.open>header button{width:32px;height:32px;flex:none;border-radius:50%}
 html body #stopPanelTitle{font-size:18px;line-height:1.2}
 html body #stopPanelMeta{font-size:12px}
 html body #stopPanel .wbFilters{padding:10px 12px;gap:6px}
 html body #stopPanel .wbCounts{padding:9px 12px}
 html body #stopPanel .wbRow{grid-template-columns:58px 43px minmax(0,1fr) 12px;gap:8px;padding:12px 12px;min-height:60px}
 html body #stopPanel .wbDest strong{font-size:14px}
 html body #stopPanel .wbTime{font-size:15px}
 html body #stopPanel .wbDest small{font-size:12px}
 html body #websiteTrip header{padding:10px 0 9px}
 html body #vehiclePanel.appJourney #websiteTrip::before{content:"";flex:none;display:block;width:34px;height:4px;background:var(--line-strong);border-radius:4px;margin:8px auto 0}
 html body #websiteTrip .journeyStatus{padding:10px 11px}
 html body #websiteTrip .journeyBody h3{margin:5px 0 8px}
 html body #websiteTrip button.journeyStop{grid-template-columns:59px 15px minmax(0,1fr) 12px;min-height:46px;gap:8px;padding:6px}
 html body #websiteTrip li::before,html body #websiteTrip li.next::before{left:80px}
 html body #websiteTrip .journeyVehicle dl>div+div{border-left:1px solid var(--line);padding-left:12px}
 html body #websiteTrip .journeyExpand{margin:8px 0;padding:9px 6px}
 html body #websiteTrip footer button{min-height:44px}
 html body #brandModeCounts .brand-mode-stat{border-radius:18px}
}
@media(max-width:760px) and (max-height:550px){
 html body #vehiclePanel.appJourney.open,html body #stopPanel.open{max-height:calc(100dvh - 144px)!important}
}

/* Vehicle popup: desktop only. The existing mobile sheet and stop board stay intact. */
@media(min-width:761px){
 html body #vehiclePanel.vehicle-anchored.open{
   left:0!important;top:0!important;right:auto!important;bottom:auto!important;
   width:min(358px,calc(100vw - 28px))!important;height:auto!important;
   max-height:var(--popup-max-height,calc(100dvh - 126px))!important;
   border-radius:15px!important;overflow:visible!important;
   transform:translate3d(var(--popup-x,14px),var(--popup-y,110px),0)!important;
   animation:none!important;box-shadow:0 7px 25px #142b403b!important;
   z-index:34;
 }
 html body #vehiclePanel.vehicle-anchored.open::after{
   content:"";position:absolute;width:22px;height:22px;background:var(--surface);
   border:1px solid var(--line-strong);transform:rotate(45deg);pointer-events:none;z-index:2;
   box-shadow:1px 1px 3px #142b4026;
 }
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=below]::after{top:-11px;left:calc(var(--popup-tip) - 11px)}
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=above]::after{bottom:-11px;left:calc(var(--popup-tip) - 11px)}
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=right]::after{left:-11px;top:calc(var(--popup-tip) - 11px)}
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=left]::after{right:-11px;top:calc(var(--popup-tip) - 11px)}
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=offscreen]::after,
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=floating]::after{display:none}
 html body #vehiclePanel.vehicle-anchored #websiteTrip{padding:0 14px;border-radius:14px;overflow:hidden}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header{padding:14px 0 11px;gap:8px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header strong{font-size:17px;line-height:1.25}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header .wbLine{font-size:15px;min-width:40px;padding:8px;border-radius:8px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header button{width:30px;height:30px;padding:5px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header button[data-fav]{width:25px;height:28px;background:transparent;color:var(--muted)}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus{padding:9px 10px;margin-bottom:10px;border-radius:9px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus b{font-size:12px;line-height:1.4}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus small{font-size:12px;margin-top:3px;line-height:1.4}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyBody{min-height:0;padding:0 0 4px;overflow:auto;scrollbar-width:thin}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyBody h3{margin:2px 0 6px;font-size:13px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip button.journeyStop{grid-template-columns:66px 15px minmax(0,1fr) 12px;gap:7px;min-height:39px;padding:5px 6px;font-size:14px;border-radius:6px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip li::before,html body #vehiclePanel.vehicle-anchored #websiteTrip li.next::before{left:85px;width:3px;background:#a0b7cc}
 html body #vehiclePanel.vehicle-anchored #websiteTrip li.next::before{background:#0f4c8e}
 html body.theme-night #vehiclePanel.vehicle-anchored #websiteTrip li::before{background:#738ca3}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyPoint:not(.vehicle){width:11px;height:11px;border-color:#7896b3}
 html body #vehiclePanel.vehicle-anchored #websiteTrip li.next .journeyPoint:not(.vehicle){border-color:#0f4c8e;background:#0f4c8e}
 html body #vehiclePanel.vehicle-anchored #websiteTrip li.next{border:0;box-shadow:none;background:#dcecfb}
 html body.theme-night #vehiclePanel.vehicle-anchored #websiteTrip li.next{background:var(--accent-soft)}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCountdown{font-size:16px;line-height:1.2;color:#0f4c8e}
 html body.theme-night #vehiclePanel.vehicle-anchored #websiteTrip .journeyCountdown{color:#8fbdff}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyClock{font-size:12px;display:block;line-height:1.25;margin-top:1px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCountdown[hidden]+.journeyClock{font-size:15px;font-weight:650;margin-top:0}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCity{font-size:11px;margin-top:2px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyExpand{padding:6px 5px;margin:6px 0;font-size:12px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle{border:0;border-top:1px solid var(--line);border-radius:0;padding:10px 0 5px;gap:9px;margin:0}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle h3{display:none}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicleIcon{width:34px;height:34px;border-radius:8px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dt{font-size:11px;margin:0 0 2px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dd{font-size:14px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer{border-top:1px solid var(--line);padding:10px 0 13px;gap:6px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer button{font-size:12px;padding:8px 4px;flex-direction:row;min-height:34px;border-radius:7px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer button[data-follow]{background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer button[data-follow][aria-pressed=true]{background:#0f4c8e;color:white;border-color:#0f4c8e;font-weight:750}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyOffscreen{display:none}
 html body #vehiclePanel.vehicle-anchored[data-anchor-side=offscreen] #websiteTrip .journeyOffscreen{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:11px;margin-bottom:8px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyOffscreen button{font-size:11px}
 html body #vehiclePopupRouteLegend{position:fixed;left:14px;bottom:18px;z-index:25;display:flex;flex-wrap:wrap;gap:10px;padding:8px 12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm);font-size:11px;max-width:calc(100vw - 100px);pointer-events:none}
 #vehiclePopupRouteLegend span{display:flex;align-items:center;gap:5px}
 #vehiclePopupRouteLegend i{width:24px;border-top:4px solid #123b84;border-radius:2px}
 #vehiclePopupRouteLegend i.remaining{border-top-color:#2285e8;border-top-style:dashed}
 html body .ovl-selected .ovl-pill{box-shadow:0 0 0 2px #fff,0 0 0 4px #2376dc,0 3px 10px #183e7a66}
}
@media(max-width:760px){#vehiclePopupRouteLegend,.journeyOffscreen{display:none!important}}

/* A prediction is not a confirmed arrival. Stale GPS never gets a green header. */
html body #websiteTrip .journeyCountdown[hidden]{display:none!important}
html body #websiteTrip .journeyStatus.is-stale{background:var(--chip)}
html body #websiteTrip .journeyStatus.is-stale b{color:var(--muted)}
html body #websiteTrip .journeyStatus.is-stale small{color:var(--muted)}

/* Keep the visible journey mounted during loading and transient source failures. */
#websiteTrip .journeyStatus.is-unavailable b{color:var(--muted)}
#websiteTrip .journeyStatus.is-unavailable small{color:var(--muted)}
#websiteTrip .journeyPlaceholder{display:flex;align-items:center;gap:12px;padding:8px 6px;min-height:48px}
#websiteTrip li.journeyPlaceholder::before{display:none}
#websiteTrip .journeyPlaceholder span{display:block;height:10px;border-radius:4px;background:var(--chip)}
#websiteTrip .journeyPlaceholder span:first-child{width:55px;flex:none}
#websiteTrip .journeyPlaceholder span:last-child{width:58%}
#websiteTrip .journeyPlaceholder[aria-hidden=true]{pointer-events:none}
#websiteTrip .journeyRetry{width:100%;margin:6px 0}
@media(min-width:761px){
 html body #vehiclePanel.vehicle-anchored #websiteTrip button.journeyStop{min-height:48px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus{min-height:55px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyTime{min-width:0;font-variant-numeric:tabular-nums}
 html body #vehiclePanel.vehicle-anchored.open{transition:none!important}
}

/* Keep the compact journey steady while a user changes map zoom or passes a stop. */
@media(min-width:761px){
 html body #vehiclePanel.vehicle-anchored.open{
   min-height:min(var(--popup-floor,0px),var(--popup-max-height,calc(100dvh - 126px)))!important;
 }
 html body #vehiclePanel.vehicle-anchored.vehicle-zooming.open::after{display:none}
 html body #vehiclePanel.vehicle-anchored.vehicle-reattaching.open{transition:transform 180ms ease-out!important}
}
@media(prefers-reduced-motion:reduce){
 html body #vehiclePanel.vehicle-anchored.vehicle-reattaching.open{transition:none!important}
}

/* Smaller desktop popup; long names wrap, details remain scrollable. */
@media(min-width:761px){
 html body #vehiclePanel.vehicle-anchored.open{width:min(304px,calc(100vw - 28px))!important;border-radius:12px!important;box-sizing:border-box}
 html body #vehiclePanel.vehicle-anchored #websiteTrip{padding:0 10px;border-radius:11px;flex:1 1 auto}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header{padding:8px 0 7px;gap:6px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header strong{font-size:15px;line-height:1.2}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header small{font-size:11px;line-height:1.3;margin-top:2px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header .wbLine{font-size:14px;min-width:34px;padding:6px;border-radius:6px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header button{width:26px;height:26px;padding:4px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip header button[data-fav]{width:22px;height:25px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus{padding:6px 8px;margin-bottom:6px;min-height:44px;border-radius:7px;box-sizing:border-box}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus b,html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus small{font-size:11.5px;line-height:1.25}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyStatus small{margin-top:2px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyBody{flex:1 1 auto;padding-bottom:3px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyBody h3{margin:0 2px 3px;font-size:12px;line-height:1.25}
 html body #vehiclePanel.vehicle-anchored #websiteTrip button.journeyStop{grid-template-columns:58px 13px minmax(0,1fr) 10px;gap:5px;min-height:40px;padding:3px 4px;font-size:14px;line-height:1.25}
 html body #vehiclePanel.vehicle-anchored #websiteTrip li::before,html body #vehiclePanel.vehicle-anchored #websiteTrip li.next::before{left:72.5px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCountdown{font-size:15px;line-height:1.15}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyClock{font-size:11px;line-height:1.2;margin-top:1px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCountdown[hidden]+.journeyClock{font-size:14px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyCity{font-size:11px;line-height:1.2;margin-top:1px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyPlaceholder{min-height:40px;padding:5px 4px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyExpand{padding:4px;margin:4px 0;min-height:28px;line-height:1.25}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle{padding:5px 0 2px;gap:5px;margin:0}
 html body #vehiclePanel.vehicle-anchored:not(.vehicle-expanded) #websiteTrip .journeyVehicleIcon{display:none}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dl{gap:4px 10px;font-size:11px;line-height:1.3}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dl>div{flex:0 1 auto;display:flex;align-items:baseline;gap:4px;flex-wrap:wrap}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dt{font-size:11px;margin:0}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyVehicle dd{font-size:12px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyAccessible{font-size:11px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer{padding:6px 0 8px;gap:4px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip footer button{font-size:11.5px;padding:5px 3px;min-height:30px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyIcon{width:15px;height:15px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .wbArrow .journeyIcon{width:10px;height:10px}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .wheel{width:14px;height:14px;vertical-align:-2px}
}
@media(min-width:761px) and (max-height:460px){
 html body #vehiclePanel.vehicle-anchored #websiteTrip{overflow:auto;overscroll-behavior:contain}
 html body #vehiclePanel.vehicle-anchored #websiteTrip .journeyBody{flex:none;overflow:visible}
}


/* Desktop: one small attached card, with an optional full-height journey panel. */
@media(min-width:761px){
 html body #vehiclePanel.vehicle-anchored.vehicle-mini.open{
   width:min(290px,calc(100vw - 28px))!important;border-radius:13px!important;
 }
 html body #vehiclePanel.vehicle-mini #websiteTrip{
   padding:0 12px;border-radius:12px;overflow:auto;overscroll-behavior:contain;
 }
 html body #vehiclePanel.vehicle-mini #websiteTrip header{padding:10px 0 5px;gap:8px;align-items:center}
 html body #vehiclePanel.vehicle-mini #websiteTrip header strong{font-size:15px;line-height:1.25}
 html body #vehiclePanel.vehicle-mini #websiteTrip header button{width:26px;height:26px;padding:4px}
 html body #vehiclePanel.vehicle-mini #websiteTrip header .wbLine{min-width:35px;font-size:14px;padding:7px 6px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStatus{
   flex:none;min-height:0;margin:0;padding:0 0 9px;background:transparent;
   border-radius:0;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted);
 }
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStatus b{font-size:12px;line-height:1.3;font-weight:600;color:var(--muted)}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStatus.is-live b{color:#187148}
 html body.theme-night #vehiclePanel.vehicle-mini #websiteTrip .journeyStatus.is-live b{color:#83d6a5}
 html body #websiteTrip .journeyLiveDot{width:7px;height:7px;flex:none;border-radius:50%;background:currentColor}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyBody{flex:1 0 auto;overflow:visible;padding:8px 0 0}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyBody h3{margin:0 0 3px;font-size:11px;color:var(--muted);font-weight:500}
 html body #vehiclePanel.vehicle-mini #websiteTrip li,html body #vehiclePanel.vehicle-mini #websiteTrip li.next{background:transparent;box-shadow:none;border:0}
 html body #vehiclePanel.vehicle-mini #websiteTrip li::before,html body #vehiclePanel.vehicle-mini #websiteTrip .journeyPoint,html body #vehiclePanel.vehicle-mini #websiteTrip .wbArrow{display:none}
 html body #vehiclePanel.vehicle-mini #websiteTrip button.journeyStop{
   display:grid;grid-template-columns:minmax(0,1fr) minmax(54px,auto);gap:10px;min-height:34px;
   padding:0 0 3px;line-height:1.3;font-size:14px;
 }
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStop>span:nth-child(3){grid-column:1;grid-row:1;min-width:0}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyTime{grid-column:2;grid-row:1;text-align:right;font-size:14px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyCountdown{font-size:16px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyClock{font-size:11px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStopName{font-weight:650}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyCity{margin-top:0;font-size:11px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyPlaceholder{min-height:35px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyEmpty{font-size:12px;color:var(--muted);margin:4px 0}
 html body #vehiclePanel.vehicle-mini #websiteTrip footer{border:0;padding:7px 0 11px;margin-top:auto}
 html body #vehiclePanel.vehicle-mini #websiteTrip footer button.journeyOpen{
   display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;
   min-height:33px;padding:6px 8px;border:0;border-radius:7px;font-size:13px;
   background:#0f4c8e;color:#fff;
 }
 html body #vehiclePanel.vehicle-mini #websiteTrip footer .journeyIcon{width:16px;height:16px}
 html body #vehiclePanel.vehicle-docked.open{
   position:fixed!important;left:auto!important;right:14px!important;top:76px!important;bottom:14px!important;
   width:min(340px,calc(100vw - 28px))!important;max-height:calc(100dvh - 90px)!important;
   height:auto!important;min-height:0!important;transform:none!important;
   border-radius:15px!important;overflow:hidden!important;animation:none!important;
   z-index:34;
 }
 html body #vehiclePanel.vehicle-docked.open::after{display:none}
 html body #vehiclePanel.vehicle-docked #websiteTrip{padding:0 14px;min-height:0;overflow:hidden}
 html body #vehiclePanel.vehicle-docked #websiteTrip header{padding:13px 0 9px;gap:7px;align-items:flex-start}
 html body #vehiclePanel.vehicle-docked #websiteTrip header strong{font-size:17px;line-height:1.25}
 html body #vehiclePanel.vehicle-docked #websiteTrip header button{width:27px;height:27px;padding:4px}
 html body #vehiclePanel.vehicle-docked #websiteTrip header button[data-fav]{background:transparent;color:var(--muted)}
 html body #vehiclePanel.vehicle-docked #websiteTrip header .wbLine{min-width:36px;font-size:15px;padding:8px 6px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStatus{padding:8px 10px;margin-bottom:8px;border-radius:8px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStatus b{font-size:12px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStatus small{font-size:12px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle{
   border:0;border-block:1px solid var(--line);border-radius:0;padding:9px 0;margin:0;gap:7px;flex:none
 }
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicleIcon,html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle h3{display:none}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle dl{gap:7px 12px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle dl>div{flex:0 1 auto;display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle dt{font-size:11px;margin:0}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyVehicle dd{font-size:13px}
 html body #vehiclePanel.vehicle-docked #websiteTrip footer{margin:0;padding:9px 0;gap:5px;flex-wrap:wrap}
 html body #vehiclePanel.vehicle-docked #websiteTrip footer button{
   min-height:32px;flex-direction:row;font-size:12px;padding:6px 4px;border-radius:7px;
 }
 html body #vehiclePanel.vehicle-docked #websiteTrip footer button[data-follow]{background:var(--surface);color:var(--ink);border-color:var(--line-strong)}
 html body #vehiclePanel.vehicle-docked #websiteTrip footer button[data-follow][aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyBody{flex:1 1 auto;overflow:auto;min-height:0;padding:0 0 12px;scrollbar-width:thin}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyDockHeading{
   display:flex;justify-content:space-between;align-items:center;gap:6px;margin:0 0 6px;
   position:sticky;top:0;z-index:4;background:var(--surface);padding:4px 0
 }
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyDockHeading h3{font-size:13px;margin:0;letter-spacing:0}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyDockHeading button{
   display:flex;align-items:center;gap:3px;background:var(--chip);color:var(--ink);font-size:11px;padding:5px 6px;
 }
 html body #vehiclePanel.vehicle-docked #websiteTrip button.journeyStop{
   grid-template-columns:14px minmax(0,1fr) minmax(64px,auto);gap:9px;
   min-height:48px;padding:7px 6px;border-radius:7px;font-size:14px;line-height:1.3;
 }
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyPoint{grid-column:1;grid-row:1}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStop>span:nth-child(3){grid-column:2;grid-row:1}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyTime{grid-column:3;grid-row:1;text-align:right;font-size:14px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .wbArrow{display:none}
 html body #vehiclePanel.vehicle-docked #websiteTrip li::before,html body #vehiclePanel.vehicle-docked #websiteTrip li.next::before{left:12px;width:2px}
 html body #vehiclePanel.vehicle-docked #websiteTrip li.next{border:0;box-shadow:none}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyCountdown{font-size:16px;color:var(--accent)}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyClock{font-size:11px}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyCity{font-size:11px;margin-top:2px}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStopTail,
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStopTail{display:inline-block;max-width:100%;vertical-align:baseline}
 html body #vehiclePanel.vehicle-mini #websiteTrip .journeyStopTail .wheel,
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyStopTail .wheel{width:13px;height:13px;margin-left:4px;vertical-align:-2px}
 /* Keep existing map controls reachable rather than covering them with the panel. */
 html body:has(#vehiclePanel.vehicle-docked.open) #brandModeCounts{
   right:368px!important;max-width:calc(100vw - 382px);overflow-x:auto;flex-wrap:nowrap;
 }
 html body:has(#vehiclePanel.vehicle-docked.open) #brandModeCounts .brand-mode-stat{flex:none}
 html body:has(#vehiclePanel.vehicle-docked.open) #ovspotOsmAttribution{right:calc(var(--gap) + 496px)}
 html body:has(#vehiclePanel.vehicle-docked.open) .leaflet-right{right:354px}
 html body:has(#vehiclePanel.vehicle-docked.open) #contactMapLink{right:calc(var(--gap) + 402px)}
 html body:has(#vehiclePanel.vehicle-docked.open) #mapHelpLink{right:calc(var(--gap) + 448px)}
}
@media(min-width:761px) and (max-height:500px){
 html body #vehiclePanel.vehicle-docked #websiteTrip{overflow:auto;overscroll-behavior:contain}
 html body #vehiclePanel.vehicle-docked #websiteTrip .journeyBody{flex:none;overflow:visible}
}


/* Stop board: match the desktop journey dock, leaving mobile unchanged. */
.wbFilterToggle{display:none}
@media(min-width:761px){
 html body #stopPanel.open{
   position:fixed!important;left:auto!important;right:14px!important;top:76px!important;bottom:14px!important;
   width:min(340px,calc(100vw - 28px))!important;max-height:calc(100dvh - 90px)!important;
   height:auto!important;min-height:0!important;transform:none!important;
   border-radius:15px!important;overflow:hidden!important;animation:none!important;
   background:var(--surface);color:var(--ink);z-index:34;
 }
 html body #stopPanel.open::before{background:var(--surface)!important}
 html body #stopPanel.open>header{padding:13px 12px 11px;gap:6px;align-items:center}
 html body #stopPanel.open>header::before{flex:0 0 32px;height:32px;border-radius:8px;background-size:19px}
 html body #stopPanelTitle{font-size:17px;font-weight:700;line-height:1.25;color:var(--ink);display:block;overflow:visible}
 html body #stopPanelMeta{font-size:12px;line-height:1.35;color:var(--muted);margin-top:4px}
 html body #stopPanel.open>header>button{flex:0 0 27px;width:27px;height:27px;padding:4px;border-radius:50%;font-size:16px}
 html body #stopPanel.open>header>button svg{width:15px;height:15px}
 html body #stopPanelBody{padding:0 12px 10px;overflow-y:auto;scrollbar-width:thin}
 html body #stopPanel .wbFilterToggle{
   display:flex;align-items:center;gap:8px;width:100%;margin:10px 0 8px;padding:9px 10px;
   background:var(--chip);color:var(--ink);border:1px solid var(--line);border-radius:8px;
   font-size:12px;font-weight:650;text-align:left
 }
 html body #stopPanel .wbFilterToggle small{flex:1;text-align:right;font-size:11px;font-weight:500;color:var(--muted)}
 html body #stopPanel .wbFilters{gap:6px;padding:9px 0 11px}
 html body #stopPanel .wbFiltersMany{padding:0 0 10px}
 html body #stopPanel .wbFiltersMany:not(.wbFiltersExpanded){display:none}
 html body #stopPanel .wbFilters button{font-size:12px;min-height:26px;padding:5px 8px;line-height:1.2}
 html body #stopPanel .wbFilters button[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:1px}
 html body #stopPanel .wbNotice{
   margin:0 0 8px;padding:9px 10px;border-radius:8px;background:var(--accent-soft);color:var(--ink);font-size:12px;line-height:1.45
 }
 html body #stopPanel .wbNotice summary{font-weight:600}
 html body #stopPanel .wbCounts{padding:9px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:11.5px}
 html body #stopPanel button.wbRow{
   grid-template-columns:48px minmax(34px,max-content) minmax(0,1fr) 9px;
   gap:8px;min-height:55px;align-items:start;padding:10px 2px;
   border-bottom:1px solid var(--line);background:var(--surface)
 }
 html body #stopPanel .wbRow .wbLine{font-size:12px;min-width:34px;max-width:64px;padding:5px 6px;border-radius:6px}
 html body #stopPanel .wbTime{font-size:15px;line-height:1.35}
 html body #stopPanel .wbTime small{font-size:11px;margin-top:1px}
 html body #stopPanel .wbDest strong{font-size:14px;font-weight:600;line-height:1.35}
 html body #stopPanel .wbDest small{font-size:11.5px;margin-top:2px;line-height:1.35;color:var(--muted)}
 html body #stopPanel .wbArrow{font-size:16px}
 html body #stopPanel .wbRow.cancelled{color:var(--muted);background:var(--chip)}
 html body #stopPanel .wbRow.skipped{box-shadow:inset 3px 0 #e88b1b;background:var(--surface)}
 html body #stopPanel .wbLegend{padding:12px 0;font-size:11px;gap:8px}
 html body.theme-night #stopPanel .wbRow.live .wbTime{color:#83d6a5}
 html body.theme-night #stopPanel .wbRow.early .wbTime{color:#c4a4ff}
 html body.theme-night #stopPanel .wbRow.late .wbTime{color:#ff9f9f}
 html body.theme-night #stopPanel .wbWarning{color:#f4c283}
 html body:has(#stopPanel.open) #brandModeCounts{
   right:368px!important;max-width:calc(100vw - 382px);overflow-x:auto;flex-wrap:nowrap;
 }
 html body:has(#stopPanel.open) #brandModeCounts .brand-mode-stat{flex:none}
 html body:has(#stopPanel.open) #ovspotOsmAttribution{right:calc(var(--gap) + 496px)}
 html body:has(#stopPanel.open) .leaflet-right{right:354px}
 html body:has(#stopPanel.open) #contactMapLink{right:calc(var(--gap) + 402px)}
 html body:has(#stopPanel.open) #mapHelpLink{right:calc(var(--gap) + 448px)}
}

/* Desktop board finishing: preserve the full notices and mobile layout. */
.wbNoticeToggle{display:none}
.wbNotices{display:contents}
@media(min-width:761px){
 html body #stopPanel .wbNoticeToggle{
   display:flex;align-items:center;gap:7px;width:100%;margin:0 0 6px;padding:8px 10px;
   background:var(--chip);color:var(--ink);border:1px solid var(--line);border-radius:8px;
   font-size:12px;font-weight:600;text-align:left;min-height:32px;
 }
 html body #stopPanel .wbNoticeToggle svg{width:15px;height:15px;flex:none;color:var(--muted)}
 html body #stopPanel .wbNoticeToggleArrow{margin-left:auto;color:var(--muted)}
 html body #stopPanel .wbNotices:not(.wbNoticesExpanded){display:none}
 html body #stopPanel .wbNoticesExpanded{display:contents}
 html body #stopPanel button.wbRow{grid-template-columns:54px minmax(34px,max-content) minmax(0,1fr) 9px}
 html body #stopPanel .wbTime{font-size:17px;font-weight:700;line-height:1.25}
 html body #stopPanel .wbTime small{font-size:12px;line-height:1.3}
}
