body:not(.exploring) .intro,body:not(.exploring) .island-switch,body:not(.exploring) .tabs,body:not(.exploring) #locate{display:none}body:not(.exploring) .sidebar{padding:26px 28px 0}body:not(.exploring) #panel{padding:16px 0 30px}.topbar{height:70px}.topbar .brand{font-size:23px}.topbar #browse-toggle{margin-left:auto;border:0;font-size:12px}main{height:calc(100dvh - 70px);grid-template-columns:400px 1fr}.simple-heading{margin:4px 0 25px}.simple-heading h1{font:800 36px Manrope,Arial,sans-serif;letter-spacing:-1.4px;margin:10px 0}.simple-heading p{font-size:13px;color:var(--muted);line-height:1.6}.step-count{font-size:10px;letter-spacing:1.8px;font-weight:700;color:#547969}.simple-input{width:100%;padding:17px 14px;border:1px solid #cddbd2;border-radius:12px;background:#fff;color:var(--ink);font-size:15px}.simple-links{display:flex;align-items:center;justify-content:space-between;margin:12px 0 0}.simple-links a,.simple-links button{font-size:12px;color:var(--accent);text-decoration:none;padding:8px 0}.maps-tip{color:var(--muted);font-size:12px;line-height:1.7;margin:4px 0 18px}.chosen-destination{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--soft);padding:12px 14px;border-radius:10px;margin-bottom:24px;font-size:13px;line-height:1.6}.chosen-destination .text-button{font-size:12px}.location-primary{width:100%;padding:17px 12px;border-radius:11px;background:var(--ink);color:white;font-weight:600;font-size:15px}.or-divider{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted);margin:20px 0}.or-divider:before,.or-divider:after{content:'';height:1px;background:var(--line);flex:1}#origin-section>.text-button{font-size:12px;margin-top:5px}#calculate-trip{margin-top:15px;padding:16px;justify-content:center}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.first-step{padding:21px;background:#eaf3dd;border:1px solid #dce8ce;border-radius:15px;margin-bottom:22px}.first-step h2{font-size:25px;line-height:1.3;letter-spacing:-.7px;margin:10px 0}.first-step p{font-size:13px;color:#507052}.directions-button{display:block;text-align:center;text-decoration:none;margin-top:20px;font-size:14px}.first-step small{display:block;text-align:center;margin-top:8px;font-size:10px;color:#597353}.simple-bus-step{display:flex;gap:14px;padding:17px 0;border-bottom:1px solid var(--line)}.step-number{flex-shrink:0;width:27px;height:27px;border-radius:50%;background:var(--soft);border:1px solid var(--line);text-align:center;font-size:12px;line-height:25px}.simple-bus-step strong{font-size:16px}.simple-bus-step p{font-size:12px;color:var(--muted);line-height:1.7;margin:6px 0}.simple-bus-step a,.simple-bus-step button{font-size:12px;color:var(--accent)}.other-routes{font-size:12px;margin-top:24px;color:var(--accent)}.other-routes summary{cursor:pointer}.alternative-route{display:block;width:100%;text-align:left;padding:13px;margin-top:10px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink)}.journey-note{font-size:11px;color:var(--muted);line-height:1.7;margin:20px 0}.map-tools{top:112px}.trip-status:empty{display:none}@media(max-width:760px){.topbar{height:58px;padding:0 14px;gap:7px}.topbar .brand{font-size:19px;gap:7px}.brand-mark{width:29px;height:29px;font-size:22px;line-height:29px}.topbar #browse-toggle{font-size:11px;padding:7px}main{height:calc(100dvh - 58px);grid-template-columns:1fr;grid-template-rows:42% 58%}body:not(.exploring) .sidebar{padding:17px 21px 0;border-radius:20px 20px 0 0;margin-top:-15px;z-index:500}body:not(.exploring) #panel{padding:7px 0 25px}.simple-heading{margin:0 0 18px}.simple-heading h1{font-size:31px;margin:6px 0}.simple-input{padding:14px}.simple-links{margin-top:7px}.maps-tip{font-size:11px;margin:1px 0 11px}.chosen-destination{margin-bottom:14px;padding:9px 12px}.location-primary{padding:14px}.or-divider{margin:14px 0}.first-step{padding:18px}.first-step h2{font-size:23px}}

[hidden]{display:none!important}
.google-stop{cursor:pointer}.gm-style .endpoint{margin:0}
.setup-page{max-width:680px;margin:40px auto;padding:0 24px;line-height:1.65}.setup-page h1{font-size:30px}.setup-page li{margin:12px 0}.setup-page input{width:100%;padding:14px;font-size:16px}.setup-page button{padding:12px 18px;margin:12px 8px 12px 0}.setup-page code{overflow-wrap:anywhere}.setup-page a{color:#127c80}

.map-provider{position:absolute;top:18px;left:18px;z-index:500;background:#fffef0ee;color:#244b36;padding:7px 11px;border-radius:8px;font-size:11px;box-shadow:0 2px 8px #1232;pointer-events:none}.exploring .map-provider{display:none}#map.street-active .place-label{display:none}

.next-bus{margin:14px 0;padding:16px;border-radius:14px;background:#edf5dd;border:1px solid #c8d9af;color:#143d3f}.next-bus>strong{display:block;font-size:24px;line-height:1.3;margin:6px 0}.next-bus>small{display:block;line-height:1.5;margin:5px 0}.next-bus>a{display:inline-block;margin-top:6px;font-size:13px}
.map-tools{justify-items:end}
/* One visual hierarchy for every journey action. */
#trip-results .simple-heading{margin:0 0 2px}
#trip-results .simple-heading h1{font-size:22px;letter-spacing:-.5px;margin:0 0 4px}
#trip-results .simple-heading .journey-route-summary{margin:0 0 12px;font-size:12px;font-weight:600;color:var(--accent)}
.journey-endpoints{display:grid;gap:5px;margin:0;padding:0 0 12px;border-bottom:1px solid var(--line)}
.journey-endpoints>div{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:baseline}
.journey-endpoints dt{font-size:12px;color:var(--muted);line-height:20px}
.journey-endpoints dd{margin:0;font-size:14px;font-weight:500;line-height:20px;overflow-wrap:anywhere}
.journey-endpoints>div:last-child dd{font-weight:600}
.journey-step{display:flex;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
.journey-step:first-child{padding-top:0}
.journey-step .step-number{width:24px;height:24px;line-height:24px;margin-top:1px;background:#f3f6f3;color:var(--ink)}
.step-content{flex:1;min-width:0}
.step-kind{display:block;font-size:11px;font-weight:700;color:var(--accent);margin-bottom:3px}
.journey-step h2{font-size:16px;font-weight:600;line-height:1.35;letter-spacing:-.15px;margin:0 0 4px;overflow-wrap:anywhere}
.journey-step p{font-size:13px;line-height:1.45;color:var(--muted);margin:4px 0}
.journey-step .step-action,.journey-step a,.journey-step button{font-size:12px;color:var(--accent)}
.journey-step .step-action{display:inline-flex;align-items:center;min-height:32px;white-space:nowrap;padding:5px 0;text-underline-offset:3px}
.walk-meta{display:flex;flex-wrap:wrap;align-items:center;gap:0 12px}
.journey-step .next-bus{padding:0;margin:8px 0 2px;border:0;border-radius:0;background:none}
.journey-step .next-bus>strong{font-size:16px;font-weight:600;margin:2px 0;line-height:1.4}
.journey-step .next-bus>small,.time-label,.bus-time-muted{font-size:12px;line-height:1.5;color:var(--muted)}
.time-label{display:block}.journey-note{margin:8px 0;font-size:12px}
.journey-endpoint-key{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:6px;border-radius:6px;background:#12676b;color:white;font-size:12px;font-weight:800}
.journey-endpoints>div:last-child .journey-endpoint-key{background:#a54d13}
/* Keep endpoints and bus changes visible without adding ordinary stop labels. */
.journey-pin{background:none;border:0;overflow:visible;color:#12676b;font-family:Arial,sans-serif}
.journey-transfer{display:grid;place-items:center;box-sizing:border-box;border:3px solid #fff;border-radius:50%;background:#a6491e;color:#fff;box-shadow:0 2px 5px #173c3455}
.journey-transfer svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.journey-pin svg{display:block;width:40px;height:48px;fill:currentColor;stroke:white;stroke-width:3;filter:drop-shadow(0 2px 3px #173c3455)}
.journey-pin>b{position:absolute;top:7px;left:0;width:40px;text-align:center;font-size:23px;line-height:28px;font-weight:800;color:#fff}
.journey-finish{color:#a54d13}
@media(max-width:760px){#trip-results .journey-heading h1,#trip-results .journey-heading .journey-route-summary{display:none}}

/* Street-map controls and offline cartography share the detailed map palette. */
#map{background:#a1d5e2}
#map .place-label{color:#3c4043;font:500 12px Arial,sans-serif;text-shadow:0 1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff}
#map .leaflet-control-zoom{border-radius:8px!important;box-shadow:0 1px 5px #0004!important}
#map .leaflet-control-zoom a{color:#5f6368!important;font-weight:400}
#map .leaflet-gl-layer{pointer-events:none}
.map-provider{background:#fff;color:#3c4043;border-radius:5px;box-shadow:0 1px 4px #0003}

/* Compact map switch and expandable layer tiles. */
.map-tools #switch-map{width:auto;min-height:40px;height:auto;max-width:150px;padding:10px 12px;font-size:12px;font-weight:600}
.map-layers{position:absolute;left:20px;bottom:36px;z-index:600;display:flex;align-items:stretch;padding:5px;gap:0;background:#fff;border:1px solid #dce3df;border-radius:13px;box-shadow:0 2px 12px #16393230;max-width:calc(100% - 40px)}
.map-layers button{background:white;color:#3c4043;border-radius:9px;font:500 14px 'DM Sans',Arial,sans-serif}
#layers-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:72px;min-height:76px;flex-shrink:0}
#layers-button svg{width:25px;height:25px}
.map-layers button:hover{background:#f2f5f3}.map-layers button:focus-visible{outline:2px solid #127c80;outline-offset:-2px}
#layers-options{display:flex;gap:5px;padding-left:6px;border-left:1px solid #e5e9e6;margin-left:4px;animation:layers-reveal .16s ease-out}
#layers-options button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:4px;width:72px;border:2px solid transparent}
#layers-options button[aria-pressed="true"]{border-color:#127c80;color:#0b676b;background:#eff8f6}
.layer-preview{display:block;width:56px;height:48px;border-radius:6px;overflow:hidden;background-color:#e5eddf}
.preview-street{background:linear-gradient(26deg,transparent 42%,#fff 43% 49%,#c9c5b7 50% 52%,#fff 53% 58%,transparent 59%),linear-gradient(100deg,transparent 39%,#fff 40% 47%,transparent 48%),linear-gradient(145deg,#c3ddc7 35%,#e9e8df 36% 68%,#aad7e5 69%)}
.preview-satellite{background:linear-gradient(32deg,transparent 42%,#9f9d7e 43% 45%,transparent 46%),repeating-linear-gradient(112deg,#293b2a88 0 5px,transparent 5px 13px),linear-gradient(135deg,#587449,#263e28 55%,#344f58 56%)}
.preview-island{background:radial-gradient(ellipse at 48% 50%,#659968 0 23%,#b9d6a7 24% 32%,transparent 33%),#a1d5e2}
@keyframes layers-reveal{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:760px){.map-layers{left:10px;bottom:35px;max-width:calc(100% - 20px)}#layers-button{width:58px;min-height:67px}#layers-options{gap:2px;padding-left:3px;margin-left:2px}#layers-options button{width:62px;font-size:14px}.layer-preview{width:48px;height:40px}.map-tools #switch-map{max-width:130px}}
@media(prefers-reduced-motion:reduce){#layers-options{animation:none}}

/* Mobile destination-first home, with a separate full-height map view. */
.selection-header,#selection-pick{display:none}
.selection-browser{display:block;min-width:0}
.selection-tabs{display:flex;gap:10px;margin:12px 0;flex-shrink:0}
.selection-tabs button{background:white;border-radius:24px;color:#707370;min-height:40px;padding:9px 16px;font-size:14px;font-weight:600}
.selection-tabs button.active{background:#eefafa;color:#204c42}
.selection-place{display:flex;gap:14px;align-items:flex-start;text-align:left;width:100%;background:white;color:#272c28;padding:12px 0;border-bottom:1px solid #f0f2f0}
.selection-place>span:first-child{color:#333;width:20px;flex-shrink:0;padding-top:2px}
.selection-place svg{width:20px;height:20px}
.selection-place>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.selection-place>span:last-child{color:#929991;padding-top:8px}
.selection-place strong{display:block;font-size:15px;line-height:1.4;font-weight:600}
.selection-place small{display:block;color:#68736c;font-size:12px;line-height:1.5;margin-top:4px}
.selection-empty{font-size:14px;color:#637269;line-height:1.6;padding:12px 0}
.selection-results-label{color:#637269;font-size:12px;margin:14px 0 2px}
.selection-more{display:block;width:100%;padding:14px;margin:12px 0;background:#eefafa;color:#204c42;border-radius:12px;font-size:14px}
.selection-place:focus-visible,.selection-more:focus-visible,.selection-tabs button:focus-visible{outline:2px solid #008653;outline-offset:-2px;border-radius:8px}
.google-suggestions{padding:0 0 12px;border-bottom:1px solid #d9e5dc;margin-bottom:12px}
.google-attribution{font:400 12px/1.5 Arial,sans-serif;color:#5e5e5e;white-space:nowrap;margin:0;padding:8px 0}
#selection-places{min-height:0;scroll-padding:8px;overflow-wrap:anywhere;touch-action:pan-y}
#mobile-map-toggle{display:none}
/* One mobile-first look at every width; only the phone structure (map over
   the list) stays behind the breakpoint. */
:root{--accent:#008653;--ink:#183e34}
body{background:#fff}
.topbar{height:76px;padding:12px 20px;background:#008653;border:0;color:#fff;gap:10px}
.topbar .brand{color:#fff;font-size:22px;letter-spacing:-.8px}
.brand-mark{background:#ffffff24;color:white;border-radius:50%}
.topbar #browse-toggle{color:white;font-size:12px;min-height:44px;padding:8px}
.simple-input,.searchbox input,.stop-input{font-size:16px;min-height:56px;border-radius:16px}
.simple-heading h1{font-size:30px;letter-spacing:-1px}
.simple-heading .step-count{font-size:11px}
.location-primary,#trip-location{min-height:54px;background:#008653;color:#fff;border:0;border-radius:14px;font-size:16px}
.simple-links{gap:16px}.simple-links a,.simple-links button{min-height:44px;font-size:12px;display:flex;align-items:center;text-align:left}
.place-choice{min-height:70px;gap:14px}.place-choice strong{font-size:16px}.place-choice small{font-size:13px}
.place-choice>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.map-tools button{min-height:44px;min-width:44px}
.map-provider{top:20px;left:16px}
.tabs button{min-height:48px}.chosen-destination{font-size:14px}.chosen-destination strong{overflow-wrap:anywhere}
main{height:calc(100dvh - 76px)}
.has-journey .mobile-home{display:none}
@media(max-width:760px){
 #mobile-map-toggle{display:block;flex-shrink:0;border-radius:24px;padding:12px 16px;background:#ffffff26;color:white;font-weight:700;min-height:44px}
 main{display:block;position:relative;height:calc(100dvh - 76px);isolation:isolate}
 main .sidebar,body:not(.exploring) .sidebar{position:relative;height:100%;width:100%;padding:20px 22px 0;margin:0;border-radius:0;z-index:2;box-shadow:none}
 main .map-wrap{position:absolute;inset:0;z-index:0;visibility:hidden}
 .mobile-map-open main .map-wrap{visibility:visible;z-index:3}
 .mobile-map-open main .sidebar{visibility:hidden;pointer-events:none}
 #panel,body:not(.exploring) #panel{padding:8px 0 28px;overscroll-behavior:contain}
 .map-tools{top:20px}
}
@media(max-width:360px){.topbar{padding:10px 12px;gap:4px}.topbar .brand{font-size:19px}.topbar #browse-toggle{font-size:11px}#mobile-map-toggle{padding:12px}}

/* Compact mobile place search, including the Google Places shadow parts. */
#trip-location svg{width:20px;height:20px;vertical-align:middle;margin-right:6px}
@media(max-width:760px){
 body.place-selecting:not(.exploring):not(.mobile-map-open) .topbar{display:none}
 body.place-selecting:not(.exploring):not(.mobile-map-open) main{height:100dvh}
}
 body.place-selecting:not(.exploring) .sidebar{padding:0;background:white;color:#252a28;border-radius:0;margin-top:0}
 body.place-selecting:not(.exploring) #panel{padding:0 16px max(20px,env(safe-area-inset-bottom));background:white;scroll-padding-top:12px}
 .place-selecting:not(.exploring) #panel>.simple-heading,.place-selecting .mobile-home{display:none}
 .place-selecting .selection-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0 20px}
 .selection-header button{display:grid;place-items:center;background:white;color:#202622;width:44px;height:44px;padding:10px;border-radius:50%}
 .selection-header svg{width:24px;height:24px}
 .selection-header strong{background:#f5f5f5;border-radius:24px;padding:10px 16px;font-size:14px;font-weight:600}
 body.place-selecting:not(.exploring) #place-trip-form{display:flex;flex-direction:column;margin:0}
 .place-selecting #origin-section,.place-selecting #destination-section{position:relative;padding-left:38px;margin:0 0 18px;min-width:0}
 .place-selecting #origin-section{order:0;display:flex;flex-direction:column}
 .place-selecting #destination-section{order:1}
 .place-selecting #origin-section:before,.place-selecting #destination-section:before{content:'';position:absolute;left:4px;top:12px;width:20px;height:23px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath fill='%231676d2' d='M12 0a12 12 0 0 0-12 12c0 6 12 16 12 16s12-10 12-16A12 12 0 0 0 12 0Z'/%3E%3Ccircle cx='12' cy='11' r='4' fill='white'/%3E%3C/svg%3E")}
 .place-selecting #destination-section:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath fill='%23de3025' d='M12 0a12 12 0 0 0-12 12c0 6 12 16 12 16s12-10 12-16A12 12 0 0 0 12 0Z'/%3E%3Ccircle cx='12' cy='11' r='4' fill='white'/%3E%3C/svg%3E")}
 .place-selecting #origin-section:after{content:'';position:absolute;top:40px;bottom:-14px;left:12px;border-left:3px dotted #ddd}
 .place-selecting #origin-section .chosen-destination,.place-selecting .or-divider,.place-selecting .simple-links,.place-selecting .maps-tip,.place-selecting #origin-section>[data-pick]{display:none}
 body.place-selecting.mobile-start:not(.exploring):not(.has-journey) #trip-destination,body.place-selecting:not(.exploring) #trip-destination,body.place-selecting:not(.exploring) #trip-origin{box-sizing:border-box;width:100%;min-height:44px;height:44px;margin:0;padding:10px 12px;border:1px solid #d9d9d9;border-radius:12px;background:white;color:#252a28;font:400 16px/22px Arial,sans-serif;box-shadow:none;outline:none}
 body.place-selecting:not(.exploring) .simple-input:focus{border-color:#008653!important;box-shadow:0 0 0 2px #00865320!important;outline:none}
 .place-selecting #trip-origin{order:0;padding-right:44px!important}
 .place-selecting #trip-location{position:absolute;z-index:1;right:1px;top:1px;display:grid;place-items:center;width:42px;height:42px;min-height:0;padding:0;margin:0;background:transparent;color:#737b77;border-radius:11px}
 .place-selecting #trip-location span{display:none}
 .place-selecting #trip-location svg{width:20px;height:20px;margin:0}
 .place-selecting .selection-browser{display:flex;flex-direction:column;flex:1;min-height:0;order:3}
 .place-selecting .selection-tabs{display:flex;order:3;gap:10px;margin:12px 0 12px;justify-content:flex-start}
 .selection-tabs button{background:white;border-radius:24px;color:#707370;min-height:40px;padding:9px 16px;font-size:14px;font-weight:600}
 .selection-tabs button.active{background:#eefafa;color:#204c42}
 .place-selecting #selection-places{order:5}
 .selection-place{display:flex;gap:14px;align-items:flex-start;text-align:left;width:100%;background:white;color:#272c28;padding:12px 0;border-bottom:1px solid #f0f2f0}
 .selection-place>span:first-child{color:#333;width:20px;flex-shrink:0;padding-top:2px}
 .selection-place svg{width:20px;height:20px}
 .selection-place>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
 .selection-place>span:last-child{color:#929991;padding-top:8px}
 .selection-place strong{display:block;font-size:15px;line-height:1.4;font-weight:600}
 .selection-place small{display:block;color:#68736c;font-size:12px;line-height:1.5;margin-top:4px}
 .selection-empty{font-size:14px;color:#758077;line-height:1.6;padding:12px 0}
 body.place-selecting:not(.exploring) #trip-status{order:6;color:#637269;font-size:13px}
 .place-selecting #calculate-trip{order:7;margin-bottom:15px;min-height:46px;background:#008653;font-size:16px;border-radius:12px}
 .place-selecting #selection-pick{display:flex;align-items:center;justify-content:center;gap:8px;order:8;background:white;color:#27362f;padding:12px;font-size:14px;min-height:44px}
 #selection-pick svg{width:20px;height:20px}
 .mobile-map-open #selection-pick{display:none}
/* The map sits beside the list on wide screens, so no map button is needed. */
@media(min-width:761px){#selection-map{visibility:hidden}}

/* Calculated journeys lead with the map; directions expand over it. */
#journey-sheet-toggle{display:none}
body.has-journey:not(.exploring) main{display:block;position:relative}
body.has-journey:not(.exploring) main .map-wrap{position:absolute;inset:0;visibility:visible;z-index:3}
body.has-journey:not(.exploring) main .sidebar{display:none}
body.has-journey:not(.exploring) #journey-sheet-toggle{display:flex;position:absolute;z-index:750;left:50%;bottom:18px;transform:translateX(-50%);flex-direction:column;gap:7px;text-align:left;width:min(420px,calc(100% - 32px));min-height:72px;padding:15px 20px;background:white;color:#183e34;border:1px solid #e0e8e2;border-radius:18px;box-shadow:0 5px 25px #183e3430}
#journey-sheet-toggle small{font-size:12px;color:#64796c}#journey-sheet-toggle strong{font-size:16px}
body.has-journey.journey-details-open:not(.exploring) main .sidebar{display:flex;position:absolute;z-index:710;bottom:100px;left:50%;transform:translateX(-50%);height:min(60dvh,540px);width:min(440px,calc(100% - 24px));padding:14px 20px 0;margin:0;border-radius:22px;background:white;visibility:visible;pointer-events:auto;box-shadow:0 4px 30px #173c3433}
body.has-journey:not(.exploring) .map-layers{bottom:112px}
body.has-journey:not(.exploring) .road-status{bottom:110px}
@media(max-width:760px){body.has-journey:not(.exploring) #journey-sheet-toggle{bottom:max(16px,env(safe-area-inset-bottom))}body.has-journey.journey-details-open:not(.exploring) main .sidebar{bottom:max(100px,calc(env(safe-area-inset-bottom) + 86px))}}

body.setup-body{height:auto;overflow:auto;background:var(--soft)}
.setup-page{margin:28px auto 50px}.setup-page #key-form{background:white;border:1px solid var(--line);border-radius:16px;padding:20px;margin:24px 0 8px}.setup-page #maps-key{margin-top:10px;border:1px solid #cddbd2;border-radius:10px}.setup-page details{margin:24px 0}.setup-page summary{cursor:pointer;font-weight:600}.key-storage-note{font-size:13px;color:var(--muted)}

/* One continuous sheet: its arrow header travels with the directions. */
body.has-journey:not(.exploring) main{--sheet-height:min(58dvh,480px,calc(100dvh - 190px));--sheet-bottom:max(16px,env(safe-area-inset-bottom));overflow:hidden}
body.has-journey:not(.exploring) #journey-sheet-toggle{width:min(440px,calc(100% - 24px));height:84px;min-height:84px;bottom:var(--sheet-bottom);padding:17px 20px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;border:0;border-radius:22px;transform:translate(-50%,0);transition:transform 340ms cubic-bezier(.22,1,.36,1),border-radius 340ms ease,box-shadow 340ms ease}
.sheet-label{display:flex;flex-direction:column;gap:2px;min-width:0}
#journey-sheet-toggle small{font-size:12px;line-height:1.4;font-weight:600;color:var(--accent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#journey-sheet-toggle strong{font-size:18px;line-height:1.3;font-weight:700;letter-spacing:-.3px}
.sheet-arrow{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border-radius:50%;background:#eaf6ee;color:#008653}
.sheet-arrow svg{width:24px;height:24px;transition:transform 340ms cubic-bezier(.22,1,.36,1)}
body.has-journey:not(.exploring) main .sidebar{display:flex;position:absolute;z-index:710;bottom:var(--sheet-bottom);left:50%;height:var(--sheet-height);width:min(440px,calc(100% - 24px));padding:0 20px;margin:0;border-radius:0 0 22px 22px;background:#fff;box-shadow:0 16px 30px #173c3424;transform:translate(-50%,calc(100% + 40px));visibility:hidden;pointer-events:none;transition:transform 340ms cubic-bezier(.22,1,.36,1),visibility 0s linear 340ms}
body.has-journey.journey-details-open:not(.exploring) main .sidebar{transform:translate(-50%,0);visibility:visible;pointer-events:auto;transition:transform 340ms cubic-bezier(.22,1,.36,1),visibility 0s}
body.has-journey.journey-details-open:not(.exploring) #journey-sheet-toggle{transform:translate(-50%,calc(-1 * var(--sheet-height)));border-radius:22px 22px 0 0;box-shadow:0 -5px 25px #173c341c}
.journey-details-open .sheet-arrow svg{transform:rotate(180deg)}
body.has-journey:not(.exploring) #panel{padding:4px 0 22px;overscroll-behavior:contain}
body.has-journey:not(.exploring) .journey-step{padding:12px 0}
body.has-journey:not(.exploring) .journey-step .step-number{background:#eef7f1;border:0;color:#008653;font-weight:700}
body.has-journey:not(.exploring) .step-kind{color:#008653}
#journey-sheet-toggle:focus-visible{outline:3px solid #008653;outline-offset:-4px}
@media(prefers-reduced-motion:reduce){body.has-journey:not(.exploring) main .sidebar,body.has-journey:not(.exploring) #journey-sheet-toggle,.sheet-arrow svg{transition:none}}
body.has-journey.journey-details-open:not(.exploring) main .sidebar{bottom:var(--sheet-bottom);height:var(--sheet-height);padding:0 20px;border-radius:0 0 22px 22px}
body.has-journey:not(.exploring) .map-tools{top:120px}
@media(prefers-reduced-motion:reduce){body.has-journey.journey-details-open:not(.exploring) main .sidebar,body.has-journey.journey-details-open:not(.exploring) #journey-sheet-toggle{transition:none}}
.live-arrivals{margin:18px 0;padding:0 14px 12px;border:1px solid #dbe7e0;border-radius:14px;background:#f6faf7}
.live-arrivals .section-title{margin-bottom:8px}.live-arrival-row{padding:12px 0;border-top:1px solid #dbe7e0;display:grid;gap:5px}.live-arrival-row>span{font-size:13px;color:#53685d}.live-arrival-row .next-bus{margin:0}.live-label{color:#007647!important}.live-label::before{content:'● ';font-size:10px}.live-empty,.live-fallback{color:#66746c;font-size:13px}.live-fallback{display:block;margin-top:6px}.live-arrivals .hint{margin-bottom:0}.live-arrivals .next-bus strong{display:block}

/* Desktop journeys keep the original left-hand directions panel. */
@media(min-width:761px){
 body.has-journey:not(.exploring) main{display:grid;grid-template-columns:420px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 body.has-journey:not(.exploring) main .map-wrap{position:relative;inset:auto;grid-column:2;grid-row:1;min-width:0}
 body.has-journey:not(.exploring) main .sidebar,
 body.has-journey.journey-details-open:not(.exploring) main .sidebar{display:flex;position:relative;grid-column:1;grid-row:1;left:auto;bottom:auto;width:auto;height:auto;min-height:0;padding:26px 28px 0;margin:0;border-radius:0;box-shadow:none;transform:none;visibility:visible;pointer-events:auto;transition:none}
 body.has-journey:not(.exploring) #journey-sheet-toggle{display:none}
 body.has-journey:not(.exploring) #panel{padding:16px 0 30px}
 body.has-journey:not(.exploring) .map-layers{bottom:36px}
}



/* Map adjustment screen: floating search bar, fixed pin and confirmation sheet. */
body.pin-confirming .topbar,body.pin-confirming .map-tools,body.pin-confirming .map-layers,body.pin-confirming .map-provider,body.pin-confirming #journey-sheet-toggle,body.pin-confirming .road-status{display:none!important}
body.pin-confirming main{height:100dvh}
body.pin-confirming .sidebar{visibility:hidden;pointer-events:none}
body.pin-confirming main .map-wrap{position:fixed;inset:0 0 238px;visibility:visible;z-index:800;border-radius:0;transition:none}
#location-confirmation{position:absolute;inset:0;z-index:1100;pointer-events:none;font-family:Arial,sans-serif;color:#252a28}
#location-confirmation button{pointer-events:auto}
.pin-search-bar{position:absolute;top:max(16px,env(safe-area-inset-top));left:16px;right:16px;display:flex;gap:8px}
#pin-back{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border-radius:50%;background:white;color:#242924;box-shadow:0 2px 10px #0002}
#pin-search{display:flex;align-items:center;gap:10px;flex:1;min-width:0;background:white;color:#777;padding:10px 14px;border-radius:14px;box-shadow:0 2px 10px #0002;font-size:16px;text-align:left}
#pin-search>span:nth-child(2){flex:1}
#location-confirmation svg{width:24px;height:24px;flex-shrink:0}
.pin-dot{width:17px;height:17px;background:#147bd1;border:6px solid #147bd1;box-shadow:inset 0 0 0 3px white;border-radius:50%}
#adjust-location-pin{position:absolute;left:50%;top:50%;transform:translate(-50%,-100%);width:52px;height:64px;padding:0;background:transparent;color:#159be0;filter:drop-shadow(0 3px 3px #0003);touch-action:none;cursor:grab}
#adjust-location-pin:active{cursor:grabbing}
#adjust-location-pin svg{width:52px;height:64px;fill:#159be0;stroke:#087ec4;stroke-width:1}
#adjust-location-pin svg circle{fill:white;stroke:white}
.pin-map-actions{position:absolute;bottom:20px;right:16px}
#pin-reset{display:grid;place-items:center;width:44px;height:44px;background:white;color:#28332d;border-radius:50%;box-shadow:0 2px 10px #0002}
.pin-confirm-sheet{position:fixed;bottom:0;left:0;right:0;height:238px;box-sizing:border-box;border-radius:24px 24px 0 0;background:white;padding:10px 16px max(16px,env(safe-area-inset-bottom));pointer-events:auto;box-shadow:0 -3px 16px #0000000a}
.pin-sheet-handle{display:block;width:32px;height:4px;border-radius:3px;background:#c6c6c6;margin:0 auto 12px}
.pin-confirm-sheet h2{margin:0;font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pin-place-position{margin:7px 0 14px;font-size:12px;color:#7a7e7c}
.pin-place-summary{display:flex;gap:12px;background:#eefafa;margin:0 -16px;padding:12px 20px;align-items:center}
.pin-place-summary>svg{color:#ed6447}
.pin-place-summary strong{display:block;font-size:14px;font-weight:600}
.pin-place-summary small{display:block;margin-top:5px;font-size:12px;color:#6f7974}
#pin-validation{font-size:12px;color:#aa392c;margin:5px 0;min-height:14px}
#pin-confirm{width:100%;min-height:50px;border-radius:28px;background:#008653;color:white;font-size:16px;font-weight:600}
#pin-confirm:disabled{opacity:.5}
@media(min-width:761px){.pin-search-bar{max-width:520px;left:50%;transform:translateX(-50%);width:calc(100% - 32px)}.pin-confirm-sheet{left:50%;transform:translateX(-50%);max-width:540px;width:100%}}
@media(max-height:540px){body.pin-confirming main .map-wrap{bottom:205px}.pin-confirm-sheet{height:205px}.pin-place-summary{padding-top:8px;padding-bottom:8px}#pin-place-position{margin:4px 0 8px}.pin-sheet-handle{margin-bottom:8px}#pin-confirm{min-height:44px}}

body.pin-confirming .leaflet-control-zoom{margin-top:76px}

/* Once both endpoints are confirmed, lead with the route action. */
#place-trip-form.trip-ready:not(.trip-choosing) .selection-browser,
#place-trip-form.trip-ready:not(.trip-choosing) #selection-pick{display:none!important}
@media(max-width:760px){
 .place-selecting #place-trip-form.trip-ready{padding-bottom:88px}
 .place-selecting #place-trip-form.trip-ready #calculate-trip{position:fixed;left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:calc(100% - 32px);z-index:600;margin:0;min-height:52px;border-radius:16px;background:#008653;color:white;box-shadow:0 0 0 12px white;font-size:17px;font-weight:700}
 .mobile-map-open #place-trip-form.trip-ready #calculate-trip{visibility:hidden}
}

/* Full-width mobile directions with the route fitted into the visible map. */
body.has-journey:not(.exploring) .map-tools,
body.has-journey:not(.exploring) .map-layers,
body.has-journey:not(.exploring) .leaflet-control-zoom,
body.has-journey:not(.exploring) .map-provider{display:none!important}
@media(max-width:760px){
 body.has-journey:not(.exploring) .topbar{display:none}
 body.has-journey:not(.exploring) main{height:100dvh;--journey-map-height:clamp(230px,32dvh,320px);--sheet-height:calc(100dvh - var(--journey-map-height) - 64px);--sheet-bottom:0px}
 body.has-journey:not(.exploring) main .map-wrap{position:fixed;inset:0 0 64px;height:auto;min-height:0;border-radius:0}
 body.has-journey.journey-details-open:not(.exploring) main .map-wrap{bottom:calc(100dvh - var(--journey-map-height))}
 body.has-journey:not(.exploring) #journey-sheet-toggle{position:fixed;bottom:0;left:50%;width:100%;height:64px;min-height:64px;border-radius:20px 20px 0 0;padding:10px 16px}
 body.has-journey:not(.exploring) main .sidebar,
 body.has-journey.journey-details-open:not(.exploring) main .sidebar{position:fixed;bottom:0;width:100%;height:var(--sheet-height);border-radius:0;padding:0 16px;box-shadow:none}
 body.has-journey:not(.exploring) #panel{padding:0 0 max(16px,env(safe-area-inset-bottom))}
 body.has-journey:not(.exploring) .road-status{display:none}
}

#journey-back{display:none}
body.has-journey:not(.exploring):not(.pin-confirming) #journey-back{display:grid;place-items:center;position:absolute;top:max(16px,env(safe-area-inset-top));left:16px;z-index:760;width:44px;height:44px;padding:10px;border-radius:50%;background:white;color:#24352e;box-shadow:0 2px 10px #0002}
#journey-back svg{width:24px;height:24px}
#journey-back:focus-visible{outline:3px solid #008653;outline-offset:3px}
/* Side-by-side layout: the map's corner can be off-screen, so the back button sits beside the heading. */
#journey-panel-back{display:none}
@media(min-width:761px){
 body.has-journey:not(.exploring):not(.pin-confirming) #journey-back{display:none}
 .journey-title-row{display:flex;align-items:center;gap:8px;margin-left:-10px}
 #journey-panel-back{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:10px;border-radius:50%;background:transparent;color:#24352e}
 #journey-panel-back:hover{background:#f0f4f1}
 #journey-panel-back svg{width:24px;height:24px}
 #journey-panel-back:focus-visible{outline:3px solid #008653;outline-offset:2px}
}

/* Search stays in the existing pane while the two endpoint fields stay visible. */
 body.place-selecting:not(.exploring):not(.mobile-map-open) #panel{display:flex;flex-direction:column;min-height:0;overflow:hidden}
 .place-selecting .selection-header{flex-shrink:0}
 body.place-selecting:not(.exploring) #place-trip-form{flex:1;min-height:0}
 .place-selecting #origin-section,.place-selecting #destination-section{flex-shrink:0}
 .place-selecting #selection-places{overflow-y:auto;overscroll-behavior-y:contain;flex:1}
 .place-selecting #trip-status,.place-selecting #selection-pick,.place-selecting #calculate-trip{flex-shrink:0}
/* When the keyboard or landscape leaves little height, let the whole form scroll. */
.alternative-route[aria-pressed="true"]{border-color:#008653;background:#eefafa;box-shadow:inset 3px 0 #008653}
.trip-time-controls{display:none;flex-shrink:0;order:2;margin:12px 0;padding:12px;background:#eef5f0;border-radius:12px}
.trip-ready .trip-time-controls{display:block}
.trip-time-controls label{display:block;font-size:12px;font-weight:600;margin-bottom:6px;color:#23443d}
.trip-time-controls select,.trip-time-controls input{width:100%;min-height:42px;border:1px solid #bccfc5;border-radius:8px;padding:8px;background:white;color:#193f3d;font:inherit;box-sizing:border-box}
#trip-departure-fields{margin-top:10px}
.journey-timing{padding:12px;margin:12px 0;border-radius:12px;background:#eef5f0;color:#23443d;font-size:13px;line-height:1.5}
.journey-timing p{margin:0 0 6px}
.journey-timing .hint{font-size:11px}
@media(max-height:540px){
 body.place-selecting:not(.exploring):not(.mobile-map-open) #panel{display:block;overflow-y:auto}
 body.place-selecting:not(.exploring) #place-trip-form{flex:none;min-height:0}
 .place-selecting .selection-header{padding:6px 0 10px}
 .place-selecting #origin-section,.place-selecting #destination-section{margin-bottom:10px}
 .place-selecting .selection-browser{flex:none;min-height:180px}
 .place-selecting #selection-places{flex:none;max-height:45dvh;min-height:110px;overflow-y:auto}
 .place-selecting #place-trip-form.trip-ready{padding-bottom:20px}
 .place-selecting #place-trip-form.trip-ready #calculate-trip{position:static;width:100%;margin:16px 0 0;box-shadow:none}
}

/* Pair each journey time with its boarding or alighting stop. */
.journey-stop-time{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:9px 0;color:var(--ink)}
.journey-stop-time+ .journey-stop-time{border-top:1px solid var(--line)}
.journey-stop-time span{min-width:0;font-size:14px;line-height:1.5;color:#456257}
.journey-stop-time b{display:block;font-size:16px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.journey-stop-time strong{flex-shrink:0;font-size:16px;line-height:1.5;white-space:nowrap;text-align:right}
.journey-stop-time strong small{display:block;font-size:12px;font-weight:400;line-height:1.3;color:var(--muted)}
.journey-stop-time .live-tag{display:inline-block;margin-left:4px;padding:0 6px;border-radius:999px;background:#e3f4ea;color:#0b6b3a;font-size:11px;font-style:normal;font-weight:700;line-height:18px;letter-spacing:.02em;text-transform:uppercase;vertical-align:1px}
.journey-stop-time .live-tag::before{content:"";display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:currentColor;vertical-align:1px}
.journey-step .step-kind,.journey-step .step-action{font-size:14px}
.journey-step .walk-meta p{font-size:14px}
@media(max-width:360px){.journey-stop-time{flex-direction:column;gap:2px}}
.timing-caveat{display:block;margin:2px 0 6px;color:#8a5a12;font-size:13px;line-height:1.45}
.selection-clear{display:block;margin:10px auto 4px}
/* One answer first: the journey summary card, options and quiet caveats. */
.journey-when{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 0;padding-right:8px;font-size:13px;color:var(--muted)}
.journey-when .text-button{font-size:13px;font-weight:700;color:var(--accent);min-height:32px}
.journey-summary{margin:14px 0 6px;padding:16px 16px 14px;border-radius:16px;background:#edf5ee;border:1px solid #cfe2d4;color:var(--ink)}
.journey-summary:empty{display:none}
.journey-summary p{margin:0}
.summary-kicker{font-size:12px;font-weight:700;letter-spacing:.2px;color:#2f6f57}
.summary-headline{margin:4px 0 6px!important;font-size:21px;font-weight:800;line-height:1.25;letter-spacing:-.3px}
.summary-line{font-size:14px;line-height:1.5}
.summary-meta{margin-top:8px!important;padding-top:8px;border-top:1px solid #d4e5d9;font-size:12px;color:var(--muted)}
.summary-alert{margin:0 0 10px!important;padding:9px 11px;border-radius:10px;background:#fff4dc;border:1px solid #f0d79b;color:#6b4a07;font-size:13px;font-weight:600;line-height:1.45}
.other-routes{margin:6px 0 12px;font-size:13px}
.other-routes summary{min-height:36px;display:flex;align-items:center;font-weight:700;color:var(--accent)}
.alternative-route{display:flex;gap:12px;align-items:center;margin-top:8px;padding:11px 12px;border-radius:12px}
.alternative-chips{display:flex;align-items:center;gap:3px;flex-shrink:0;color:var(--muted)}
.alternative-chips .route-chip{min-width:30px;height:26px;font-size:12px}
.alternative-text{display:grid;gap:2px;min-width:0}
.alternative-text strong{font-size:13px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.alternative-text small{font-size:12px;color:var(--muted)}
.route-variant{font-weight:700;color:#2f6f57}
/* The map keeps one control for layers; route/stop toggles live inside it. */
.layer-toggles{display:flex;flex-direction:column;justify-content:center;gap:8px;margin-left:4px;padding:0 6px 0 10px;border-left:1px solid #e5e9e6;font-size:13px;font-weight:600;color:var(--ink)}
.layer-toggles label{display:flex;align-items:center;gap:6px;min-height:28px;cursor:pointer;white-space:nowrap}
.layer-toggles input{accent-color:#127c80;width:16px;height:16px;margin:0}
body:not(.exploring) .layer-toggles{display:none}
/* Wide screens: the phone column sits beside the map. */
@media(min-width:761px){
 main,.exploring main{grid-template-columns:420px minmax(0,1fr)}
 body.properties-open main .sidebar{max-width:720px}
}

/* Outside Routes & stops the header is a plain white bar too, like the Routes & stops bar. */
body:not(.exploring) .topbar{height:64px;padding:0 24px;background:var(--paper);color:var(--ink);border-bottom:1px solid var(--line)}
body:not(.exploring) .topbar .brand{color:var(--ink);font-size:22px;gap:8px}
body:not(.exploring) .topbar #browse-toggle{display:none}
body:not(.exploring) main{height:calc(100dvh - 64px)}
@media(max-width:760px){
 body:not(.exploring) .topbar{padding:0 16px}
 body:not(.exploring) .topbar .brand{font-size:19px}
 body:not(.exploring) #mobile-map-toggle{margin-left:auto;background:#e8f1eb;color:var(--accent)}
}
.brand-bis{color:#167c78}
/* Last bus back: shown under the directions once the reverse trip is checked. */
.journey-when>span{flex:1}
.last-bus{margin:14px 0 18px;padding:14px 16px;border:1px solid #dfe7e1;border-radius:14px;background:#f7faf7}
.last-bus h2{margin:0 0 8px;font-size:15px}
.last-bus p{margin:6px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
.last-bus .last-bus-time{display:flex;align-items:center;gap:8px;color:var(--ink,#193f3d);font-size:15px}
.last-bus-warning{color:#8a3b12!important}
.last-bus-none{color:#8a3b12;font-weight:600}
/* Live trip sharing: the rider's pill and the viewer's status. */
.live-pill{position:fixed;z-index:1200;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;background:#193f3d;color:white;font-size:13px;box-shadow:0 6px 20px #0003}
.live-pill>span:nth-child(2){flex:1;min-width:0}
.live-pill button{min-height:36px;padding:6px 10px;border-radius:10px;background:#ffffff1f;color:white;font-weight:600;font-size:12px}
.live-dot-small{width:10px;height:10px;border-radius:50%;background:#4fd18b;box-shadow:0 0 0 4px #4fd18b44;flex-shrink:0}
.live-status{display:flex;gap:10px;align-items:flex-start;margin:12px 0 0;padding:12px 14px;border-radius:14px;background:#193f3d;color:white}
.live-status[hidden]{display:none}
.live-status strong{display:block;font-size:14px}
.live-status small{display:block;font-size:12px;opacity:.8;margin-top:3px}
.live-status.live-ended{background:#5a6a66}
.live-badge{padding:3px 7px;border-radius:7px;background:#4fd18b;color:#123;font-size:10px;font-weight:800;letter-spacing:1px}
.live-dot span{display:block;width:22px;height:22px;border-radius:50%;background:#1f7ae0;border:4px solid white;box-shadow:0 0 0 6px #1f7ae033,0 2px 6px #0004;box-sizing:border-box}
