/* The map stays clear: every persistent action belongs to the bottom drawer. */
.update-notice{position:fixed;z-index:1200;top:calc(12px + var(--safe-top,0px));left:50%;transform:translateX(-50%);width:min(460px,calc(100% - 28px - var(--safe-left,0px) - var(--safe-right,0px)));max-height:calc(80dvh - var(--safe-top,0px));overflow:auto;background:var(--white);color:var(--ink);border:2px solid var(--forest);border-radius:20px;padding:18px;box-shadow:0 10px 40px #102d3545}
.update-notice-heading{display:flex;align-items:center;gap:12px}.update-notice-heading>.icon{width:34px;height:34px;flex:none;color:var(--forest)}.update-notice-heading strong{display:block;font-size:19px;font-weight:900;line-height:1.2}.update-notice-heading span{display:block;margin-top:5px;font-size:13px;color:var(--muted)}
.update-notice p{font-size:15px;line-height:1.45;margin:12px 0 0;overflow-wrap:anywhere}.update-notice p.update-notice-status{font-size:13px;color:var(--muted)}.update-notice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.update-notice-actions .button{flex:1;min-height:46px;font-size:15px;padding:10px;white-space:nowrap}.update-notice-actions .button:disabled{opacity:.6;cursor:wait}
body[data-beta-route=true] .update-notice,body[data-beta-guiding=true] .update-notice,body[data-beta-route-busy=true] .update-notice{display:none}
.app-frame,body[data-beta-guiding=true] .app-frame{display:block;padding:0}
.map-stage{position:absolute;inset:0;width:100%;height:100%}
.control-panel{position:fixed;inset:0;display:block;width:100%;height:100%;background:none;border:0;box-shadow:none;pointer-events:none;overflow:visible;padding:0}
.control-panel>*{pointer-events:auto}
.brand-row,.map-top-note,.map-bottom-note{display:none}
.discovery-panel,body[data-beta-guiding=true] .discovery-panel,body[data-beta-guiding=true][data-sheet=compact] .discovery-panel{position:absolute;left:50%;right:auto;bottom:0;transform:translateX(-50%);width:calc(100% - var(--safe-left) - var(--safe-right));max-width:780px;height:calc(172px + var(--safe-bottom));min-height:0;max-height:80dvh;display:flex;flex-direction:column;gap:0;padding:26px 12px calc(8px + var(--safe-bottom));border:1px solid var(--line);border-bottom:0;border-radius:22px 22px 0 0;background:var(--white);box-shadow:0 -5px 22px #183d3a19;overflow:hidden}
body{--sheet-height:172px}
.sheet-toggle,body[data-beta-guiding=true][data-sheet=compact] .sheet-toggle,body[data-beta-guiding=true] .sheet-toggle{display:flex;position:absolute;top:0;left:50%;transform:translateX(-50%);width:220px;height:26px;gap:7px;background:transparent;align-items:center;justify-content:center;color:var(--muted)}
.sheet-toggle span{width:25px;height:4px;flex:none;background:#9eafa7;border-radius:3px}
.sheet-toggle small{font-size:10px;font-weight:800}
.bottom-tools{display:flex;align-items:stretch;gap:5px;flex:none;min-width:0;margin-bottom:8px}
.bottom-tools>button,.secondary-tools>button{position:static;inset:auto;transform:none;visibility:visible!important;flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;width:auto;max-width:none;min-height:48px;height:48px;padding:4px 3px;margin:0;border:1px solid var(--line);border-radius:11px;background:var(--white);color:var(--forest);box-shadow:none;font-size:10px;font-weight:850;line-height:1.1;text-align:center;white-space:normal}
.bottom-tools>button .icon,.secondary-tools>button .icon{width:22px;height:22px;flex:none}
.bottom-tools>button>span,.secondary-tools>button>span{display:block;font-size:10px}
.bottom-tools #route-voice,body[data-beta-guiding=true] .bottom-tools #route-voice{width:auto;min-width:0;height:48px;min-height:48px;flex:1 1 0;padding:4px 3px}
.bottom-tools #network-toggle{position:static;inset:auto;max-width:none;padding:4px 3px;visibility:visible;gap:2px}
.bottom-tools #network-toggle strong{font-size:12px}.bottom-tools #network-toggle small{font-size:9px;max-width:none;line-height:1.1}
.bottom-tools #network-toggle-icon:not([hidden]){width:18px;height:18px}
.bottom-tools>button[aria-pressed=true],.theme-choices button[aria-pressed=true]{background:#244e46;color:#fff;border-color:#39715e}
:is(.bottom-tools,.secondary-tools) .night-sun{display:none}body[data-theme=night] :is(.bottom-tools,.secondary-tools) .night-sun{display:block}body[data-theme=night] :is(.bottom-tools,.secondary-tools) .night-moon{display:none}
.secondary-tools{display:none;flex:none;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.secondary-tools>button{flex:1 1 60px;height:52px;min-height:52px}
.secondary-tools .route-actions,.secondary-tools #route-tools,body[data-beta-guiding=true] .secondary-tools #route-tools{position:static;display:flex;margin:0;gap:5px;flex:1 1 64px;min-width:0;align-items:stretch}
.secondary-tools #route-tools button,body[data-beta-guiding=true] .secondary-tools #route-tools button{height:auto;min-height:48px;padding:7px 10px;font-size:12px;flex:1}
.secondary-tools .places-toggle{position:static;min-width:75px;max-width:none;inset:auto}
.secondary-tools .places-toggle strong{font-size:10px}.secondary-tools .places-toggle small{font-size:9px}
.discovery-panel .search-area{display:none;position:relative;inset:auto;width:100%;max-width:none;padding:0 0 10px;margin:0;flex:none}
.discovery-panel .desktop-intro{display:none}.discovery-panel .location-block{margin:0 0 7px;padding:0 6px}
.discovery-panel .search-form{height:48px}.discovery-panel .search-form input{font-size:16px;min-width:0}
.discovery-panel .search-results{position:relative;inset:auto;max-height:28dvh;margin-top:6px}
.discovery-panel :is(.discovery-heading,.service-filters,.results-caption,.more-places,.panel-footer){display:none}
.discovery-panel .nearby-list,body[data-beta-guiding=true][data-sheet=compact] .nearby-list{display:flex;flex-direction:row;flex:1;min-height:0;gap:8px;overflow:auto hidden;scroll-snap-type:x proximity}
.discovery-panel .stop-card,body[data-beta-guiding=true][data-sheet=compact] .stop-card{display:flex;flex-direction:column;justify-content:center;width:calc(100vw - 60px - var(--safe-left) - var(--safe-right));max-width:330px;height:100%;min-height:0;flex:none;padding:7px 10px;scroll-snap-align:start}
.discovery-panel .stop-title{font-size:13px;line-height:1.15}.discovery-panel .stop-distance{font-size:17px}
.stop-distances{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;max-width:125px;gap:2px}
.stop-detour{display:block;max-width:125px;font-size:10px;line-height:1.2;font-weight:650;color:var(--muted);text-align:right;white-space:normal}
.discovery-panel .stop-card,body[data-beta-guiding=true][data-sheet=compact] .stop-card{padding-top:4px;padding-bottom:4px}
.discovery-panel .service svg{width:14px;height:14px}
.discovery-panel .stop-services{margin-top:5px}.discovery-panel .stop-meta{display:none}.discovery-panel .service{font-size:10px;min-height:20px;padding:3px 5px}
.discovery-panel .stop-icon{width:27px;height:27px}.discovery-panel .stop-icon svg{width:21px;height:21px}
.discovery-panel .list-empty{width:100%;min-height:0;font-size:12px;padding:8px;gap:8px;flex-direction:row;text-align:left}
body[data-sheet=expanded] .discovery-panel{height:76dvh;overflow-y:auto}
body[data-sheet=expanded] .route-panel{display:none!important}
body[data-map-picking=true] .route-panel{display:none!important}
body[data-theme=night] .discovery-panel :is(.list-empty,.empty-state,.empty){background:#263c45;color:#c9d9d5;border-color:#50676b}
body[data-sheet=expanded] .discovery-panel :is(.secondary-tools,.discovery-heading,.results-caption,.panel-footer){display:flex}
body[data-sheet=expanded] .discovery-panel .search-area{display:block}
body[data-sheet=expanded] .discovery-panel .service-filters{display:flex;overflow-x:auto;flex:none}
body[data-sheet=expanded] .discovery-panel .filter{flex:none;min-height:40px}
body[data-sheet=expanded] .discovery-panel .nearby-list{overflow:visible;flex-direction:column;flex:1 0 auto}
body[data-sheet=expanded] .discovery-panel .stop-card{width:100%;max-width:none;min-height:85px;height:auto}
body[data-sheet=expanded] .discovery-panel .more-places:not([hidden]){display:flex}
.route-panel,body[data-beta-guiding=true] .route-panel{position:absolute;top:calc(10px + var(--safe-top));left:calc(14px + var(--safe-left));right:auto;width:360px;max-width:calc(100% - 28px - var(--safe-left) - var(--safe-right));max-height:42dvh;padding:9px 10px;display:grid;grid-template-columns:minmax(0,1fr);gap:5px;border:1px solid var(--line);border-radius:16px;background:var(--white);overflow-y:auto}
body[data-beta-guiding=true] .route-heading{grid-column:1/-1;grid-row:auto;padding:0;min-height:16px}
body[data-beta-guiding=true] .route-emblem{display:none}
body[data-beta-guiding=true] .route-heading h2{font-size:11px;color:var(--muted)}
.guidance-panel,body[data-beta-guiding=true] .guidance-panel{grid-template-columns:90px minmax(0,1fr);padding:7px 8px;gap:4px 8px;margin:0}
.guidance-diagram,body[data-beta-guiding=true] .guidance-diagram{width:90px;height:90px}
.guidance-copy .route-instruction,body[data-beta-guiding=true] .guidance-copy .route-instruction{font-size:20px!important;display:block;overflow:visible}
body[data-beta-guiding=true] #guidance-distance{font-size:20px}body[data-beta-guiding=true] #guidance-road{font-size:14px}body[data-beta-guiding=true] #guidance-toward{font-size:14px}
body[data-beta-guiding=true] .route-metrics{padding:2px 0;display:flex;justify-content:space-between;gap:8px}
body[data-beta-guiding=true] .route-metrics>div{display:block}body[data-beta-guiding=true] .route-metrics strong{font-size:16px;color:var(--ink)}
body[data-beta-guiding=true] .route-metrics span,body[data-beta-guiding=true] .route-note{display:none}
.mapped-speed{top:var(--nav-banner-bottom,180px);left:calc(20px + var(--safe-left))}
body:not([data-beta-route=true]) .mapped-speed,body[data-sheet=expanded] .mapped-speed,body[data-map-picking=true] .mapped-speed{top:calc(14px + var(--safe-top))}
body[data-dev-progress=true]:not([data-beta-route=true]) .mapped-speed,body[data-dev-progress=true][data-sheet=expanded] .mapped-speed,body[data-dev-progress=true][data-map-picking=true] .mapped-speed{top:calc(52px + var(--safe-top))}
.mapped-speed strong{width:32px;height:32px;min-width:32px;border-width:3px;font-size:16px;box-shadow:0 1px 4px #0003}
.mapped-speed strong[data-known=false]{border-color:#8e9c9f;color:#6b777c;background:#eef1f2}
.mapped-speed span{max-width:60px;font-size:9px;line-height:1.1;padding:3px 4px}
.speed-warning{top:var(--nav-banner-bottom,180px)}
body[data-overspeed=true] .speed-warning{top:calc(var(--nav-banner-bottom,180px) + 40px)}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:20px 0}
.theme-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:80px;padding:10px 4px;border:1px solid var(--line);border-radius:14px;background:var(--white);color:var(--forest);font-size:27px}
.theme-choices strong{font-size:13px}.theme-choices button[aria-pressed=true]{border:2px solid #80b398}
.map-picked-pin{font-size:24px;line-height:32px;text-align:center;color:#f38630;filter:drop-shadow(0 2px 3px #0006);text-shadow:0 0 2px #fff}
.map-picked-content{font:14px/1.3 var(--font);color:var(--ink);min-width:190px}
.map-picked-content>strong{display:block;font-size:17px}.map-picked-content>small{display:block;font-size:12px;margin:6px 0 12px}
.map-picked-actions{display:flex;gap:6px}.map-picked-actions button{min-height:44px;flex:1;padding:7px 9px;border-radius:9px;background:var(--paper);color:var(--ink);font-weight:800}
.map-picked-actions .map-picked-go{background:#244e46;color:#fff}
.map-picked-popup .maplibregl-popup-content{background:var(--white);border-radius:13px;padding:14px;color:var(--ink)}
.map-picked-popup{z-index:620}
body[data-network-probing=true] .network-toggle{position:fixed;z-index:900;bottom:calc(20px + var(--safe-bottom));left:calc(14px + var(--safe-left));max-width:calc(100vw - 28px - var(--safe-left) - var(--safe-right))}
.map-stage #network-toggle{pointer-events:auto}
.leaflet-bottom,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left{bottom:calc(172px + var(--safe-bottom))}
body[data-network-probing=true] :is(.leaflet-bottom,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left){bottom:0}
.toast{left:50%;bottom:calc(180px + var(--safe-bottom));max-width:calc(100vw - 28px)}
@media(max-width:760px){.route-panel,body[data-beta-guiding=true] .route-panel{width:calc(100% - 28px - var(--safe-left) - var(--safe-right))}}
@media(max-height:520px) and (orientation:landscape){
 .discovery-panel,body[data-beta-guiding=true] .discovery-panel,body[data-beta-guiding=true][data-sheet=compact] .discovery-panel{left:auto;right:calc(12px + var(--safe-right));transform:none;width:330px;height:calc(184px + var(--safe-bottom));padding-top:26px}
 .route-panel,body[data-beta-guiding=true] .route-panel{width:300px;max-height:calc(100dvh - 60px - var(--safe-top) - var(--safe-bottom))}
 body[data-sheet=expanded] .discovery-panel{height:calc(100dvh - 20px - var(--safe-top));max-height:90dvh}
 .discovery-panel .stop-card,body[data-beta-guiding=true][data-sheet=compact] .discovery-panel .stop-card{width:100%;max-width:100%}.mapped-speed,.speed-warning{left:calc(20px + var(--safe-left))}
 .leaflet-bottom,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-bottom-left{bottom:0}
}

.planned-stops{display:none;flex:none;margin:0 0 8px}.planned-stop{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);font-size:13px}.planned-stop>span{flex:1;min-width:0;overflow-wrap:anywhere}.planned-stop .text-button{flex:none;font-size:12px}body[data-sheet=expanded] .planned-stops:not([hidden]){display:block}

.stop-access{display:block;font-size:10px;line-height:1.3;color:var(--muted)}

.planned-arrival{font-size:13px;font-weight:800;margin:8px 0;color:var(--forest)}
