/* Full viewport map with optional reading controls. */
.map-shell #scheduleFreshness{flex-basis:100%;font-size:10px;line-height:1.3;color:var(--muted)}
.map-shell .menu-visitors{color:#d8e8e4;font-size:13px;font-weight:600;margin:4px 0 12px;line-height:1.5}
.map-shell.bus-picking #map{cursor:crosshair}
@media(max-width:760px){.map-shell .floating-panel.search-panel,.map-shell .floating-panel.more-panel,.map-shell .floating-panel.health-panel,.map-shell .floating-panel.network-panel:not(.bus-panel){top:166px}}
.map-shell .fleet-counts{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font:11px Arial,sans-serif;color:#bdd2d5}.map-shell .fleet-counts b{font:600 13px monospace;color:#effbf7}
.map-shell #busSelection{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 10px}.map-shell #busSelection button{display:flex;align-items:center;gap:7px;min-height:36px;padding:5px 7px;background:#c7dfd5;color:#10232b}.map-shell .selection-label{font-size:11px;color:#bdcfd0;margin:4px 0}
.map-shell #busAreaControls{display:flex;flex-wrap:wrap;gap:6px}.map-shell #busAreaControls>button{flex:1;min-width:110px;width:auto;font-size:11px;margin:0 0 5px}.map-shell #busAreaControls>p{width:100%}
.map-shell .bus-point-shortcut{position:absolute;left:20px;bottom:115px;z-index:6;padding:9px 13px;font-size:12px}.map-shell .bus-pick-prompt{position:absolute;left:50%;bottom:65px;transform:translateX(-50%);z-index:10;display:flex;align-items:center;gap:12px;padding:10px 14px;max-width:calc(100vw - 24px);font-size:12px;line-height:1.5}.map-shell .bus-pick-prompt button{font-size:12px;min-height:36px}
.map-shell .health-dot{width:14px!important;height:14px!important;border:2px solid #ffffffb3;box-shadow:0 0 0 3px #0005}.map-shell .health-dot.green{background:#16d785!important}.map-shell .health-dot.lime{background:#a7e02e}.map-shell .health-dot.amber{background:#ffca28!important}.map-shell .health-dot.orange{background:#ff8a24}.map-shell .health-dot.red{background:#ff4155!important}.map-shell .health-dot.unknown{background:#607788!important;border-style:dashed}.map-shell .health-method .health-dot{vertical-align:middle;margin:7px 5px}
.map-shell .wait-state{display:inline-block!important;font-size:10px!important;border-radius:12px;padding:3px 7px;margin-top:5px;border:1px solid currentColor;line-height:1.4!important}.map-shell .wait-state.normal{color:#31e8a4;background:#0a3f2e}.map-shell .wait-state.long{color:#ffcd45;background:#46370c}.map-shell .wait-state.very-long{color:#ff8792;background:#501f28}.map-shell .wait-state.unknown{color:#b0c4ca;background:#203139}
@media(max-width:760px){.map-shell .fleet-counts{font-size:10px;gap:10px;margin-top:8px}.map-shell .fleet-counts b{font-size:12px}.map-shell .bus-panel{top:auto!important;bottom:max(12px,env(safe-area-inset-bottom));max-height:56dvh!important}.map-shell .bus-panel .network-mode{flex-wrap:nowrap;overflow-x:auto;gap:5px;margin-bottom:8px}.map-shell .bus-panel .network-mode button{flex:0 0 auto;padding:7px 9px;font-size:11px}.map-shell .bus-panel .panel-heading{margin-bottom:5px}.map-shell .bus-panel #busHint{margin:2px 0 6px;font-size:10px}.map-shell .bus-panel #busAreaControls .panel-note{display:none}.map-shell .bus-panel #busSelectionNotice:not(:empty){display:block}.map-shell .bus-panel #busSelection{gap:5px;margin:4px 0}.map-shell .bus-panel #busSelection button{min-height:38px}.map-shell .bus-panel .bus-lines{max-height:140px}.map-shell .bus-point-shortcut{left:12px;bottom:70px;font-size:11px;padding:8px 10px;max-width:calc(100vw - 84px)}.map-shell .bus-pick-prompt{bottom:120px;width:calc(100vw - 24px);font-size:11px}.map-shell .bus-pick-prompt button{padding:6px 9px}}
html:has(body.map-shell){height:100%;overflow:hidden}
body.map-shell{margin:0;padding:0;height:100dvh;overflow:hidden;background:#0b151b;color:#e3eeec;font-family:Arial,sans-serif;--border:#344c50;--muted:#a5b9bc}
/* Solar palettes affect the map; floating controls retain their readable glass. */
.map-shell *{box-sizing:border-box}.map-shell [hidden]{display:none!important}
.map-shell main{display:block;position:fixed;inset:0;width:100%;max-width:none;margin:0;padding:0;overflow:hidden}
.map-shell .stage,.map-shell .stage.with-detail{position:absolute;inset:0;display:block;height:100%;margin:0;border:0;border-radius:0;overflow:hidden;background:#0c171e}
.map-shell .map-wrap{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;border-radius:0;touch-action:none}
.map-shell #map{display:block;width:100%;height:100%;touch-action:none;outline-offset:-3px}
.map-shell .glass{background:rgba(15,29,35,.78);border:1px solid #375158;border-radius:12px;box-shadow:0 6px 22px #0003;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.map-shell button,.map-shell input,.map-shell select{font:inherit;color:inherit;min-height:42px;border:1px solid #3a5157;border-radius:9px;background:#182c33;padding:9px 12px;cursor:pointer;letter-spacing:0;text-transform:none}
.map-shell button:hover,.map-shell summary:hover{background:#29414a}.map-shell :is(button,summary,a,input,select):focus-visible{outline:2px solid #f2bc97;outline-offset:3px}
.map-shell button[aria-pressed=true]{background:#c7dfd5;color:#10232b;border-color:#c7dfd5}.map-shell button:disabled{opacity:.5;cursor:default}
.map-shell input{cursor:text;width:100%;min-width:0}.map-shell a{color:#c7dfd5}.map-shell h2{font:500 19px Georgia,serif;letter-spacing:0;margin:0}.map-shell p{line-height:1.6}
.map-shell .map-identity{position:absolute;top:20px;left:20px;width:440px;padding:15px;z-index:5}
.map-shell .brand-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
.map-shell .wordmark{display:block;font-size:16px;letter-spacing:.13em;line-height:1.4;color:#ecf4f1;text-decoration:none}.map-shell .wordmark span{display:block;font:9px Arial,sans-serif;letter-spacing:.3em;color:#a7bfc0;margin-top:3px}
.map-shell .connection{display:grid;grid-template-columns:7px auto;gap:3px 7px;align-items:center;font-size:11px;white-space:nowrap}.map-shell .connection time{display:block;grid-column:2;font:11px monospace;color:#aac2c4;border:0;margin:0;padding:0}.map-shell .dot{width:6px;height:6px;background:#b8dccc;box-shadow:none}.map-shell .dot.offline{background:#8a9699}
.map-shell .primary-actions{display:flex;gap:6px}.map-shell .primary-actions button{padding:8px 11px;font-size:12px;white-space:nowrap}.map-shell #networkToggle{flex:0 0 auto;align-self:center;width:max-content;min-width:0;min-height:32px;padding:4px 6px;font-size:11px;line-height:1.2;border-radius:7px;overflow:hidden;text-overflow:ellipsis;text-align:center}.map-shell #moreToggle{font-size:20px;line-height:16px;padding:8px 12px}
.map-shell .controls-toggle{position:absolute;left:474px;top:20px;z-index:15;width:44px;height:44px;padding:0;font-size:21px;background:#10232bee;color:#d6e7e2;border-color:#3a555c}
.map-shell .floating-panel{position:absolute;padding:18px;max-height:calc(100dvh - 205px);overflow-y:auto;overscroll-behavior:contain;z-index:8;margin:0}
.map-shell .panel-heading,.map-shell .gtfs-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.map-shell .panel-heading>button,.map-shell .gtfs-panel-heading>button{flex-shrink:0;min-width:40px;background:transparent;border-color:transparent;padding:6px;font-size:20px}
.map-shell .panel-note{font-size:12px;color:var(--muted);margin:5px 0 15px}.map-shell .network-panel,.map-shell .search-panel,.map-shell .more-panel{top:185px;left:20px;width:360px}
.map-shell .network-mode{margin:0 0 16px;display:flex;gap:8px}.map-shell .network-mode button{flex:1}.map-shell .line-nav{display:flex;flex-wrap:wrap;gap:7px;margin:0;padding:0}.map-shell .line-nav button{min-width:43px;min-height:43px;padding:7px;border-radius:9px}.map-shell .line-nav .all{font-size:12px}.map-shell .line-badge{display:inline-flex;justify-content:center;align-items:center;min-width:24px;width:auto;height:24px;padding:0 5px;font:bold 12px Arial,sans-serif;border-radius:7px;flex-shrink:0}
.map-shell .network-mode{flex-wrap:wrap}.map-shell .network-mode button{flex:1 1 90px;font-size:12px}.map-shell #lineSearchWrap{margin:10px 0}.map-shell .line-nav.bus-lines{display:block}.map-shell .bus-lines button{display:flex;align-items:center;gap:12px;width:100%;height:auto;text-align:left;margin:7px 0}.map-shell .bus-lines button>span:last-child:not(.line-badge){font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.map-shell .line-nav.bus-lines{max-height:230px;overflow:auto;overscroll-behavior:contain;padding:2px}.map-shell #lines.bus-lines button{width:100%;height:auto;flex-basis:auto}.map-shell .bus-lines button>span:nth-child(2){font-size:12px;line-height:1.4;overflow-wrap:anywhere}.map-shell .bus-check{margin-left:auto;font-size:17px!important}.map-shell #busAreaRefresh{width:100%;font-size:12px;margin:3px 0 8px}.map-shell #busAreaControls .panel-note{font-size:11px;margin:4px 0 10px}.map-shell #busSelectionNotice{color:#efc47e}
.map-shell #detail{display:block;position:static;width:auto;min-width:0;padding:10px 0 0;border:0;background:transparent}.map-shell #detail p{font-size:12px;color:var(--muted)}.map-shell #detail select{width:100%;margin:5px 0}
.map-shell .station-results{max-height:45dvh;overflow:auto;margin:10px 0 0}.map-shell .station-results button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:5px 0;text-align:left}.map-shell .station-results button>span{display:flex;gap:3px;flex-wrap:wrap}.map-shell .station-results strong{font-size:13px}.map-shell .station-results .line-badge{min-width:21px;height:21px;font-size:10px}
.map-shell .health-control{position:absolute;top:20px;right:20px;z-index:6}.map-shell .health-control>button{padding:13px 17px;font-size:12px;border-radius:14px;display:flex;align-items:center;gap:10px}
.map-shell .health-menu-icon{font-size:20px;line-height:1}.map-shell .health-panel{top:80px;right:20px;width:330px;max-height:calc(100dvh - 125px)}.map-shell .health-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0;margin-right:3px}.map-shell .health-dot.unknown{background:#7c9098}.map-shell .health-dot.green{background:#9cd2b7}.map-shell .health-dot.amber{background:#efc47e}.map-shell .health-dot.red{background:#ed8f83}
.map-shell .health-row{border-bottom:1px solid #2b4249;padding:10px 0}.map-shell .health-line{display:flex;width:100%;align-items:center;gap:12px;background:transparent;border:0;min-height:34px;padding:2px 0;border-radius:0;font-size:12px;text-align:left}.map-shell .health-line>span:nth-child(2){flex:1}.map-shell .health-row details{font-size:11px;color:#d5c5a8;margin:7px 0 0 35px}.map-shell .health-row details p{color:#c2cfd0;white-space:pre-line}.map-shell .health-method{font-size:11px;margin-top:16px;color:var(--muted)}
.map-shell .more-panel>button{width:100%;text-align:left;margin:3px 0;font-size:13px}.map-shell .more-panel details{margin-top:18px;font-size:12px;color:var(--muted)}.map-shell summary{cursor:pointer;padding:7px 0;line-height:1.5}.map-shell .about-links{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px;font-size:12px}.map-shell .about-links select{width:100%;font-size:12px}
.map-shell .info-card{position:absolute;bottom:55px;left:50%;transform:translateX(-50%);width:400px;max-width:calc(100vw - 125px);max-height:53dvh;overflow:auto;overscroll-behavior:contain;z-index:7;padding:18px;margin:0;border-radius:16px}.map-shell .info-card h2{font-size:18px;display:flex;align-items:center;gap:9px;line-height:1.3}.map-shell .info-card>p{font-size:12px;color:var(--muted);margin:6px 0 12px}.map-shell .gtfs-passage{padding:11px 0;gap:10px;min-height:55px;background:transparent;border:0;border-bottom:1px solid #30464b;border-radius:0}.map-shell .gtfs-passage span{font-size:13px}.map-shell .gtfs-passage strong{font:500 16px Georgia,serif}.map-shell .gtfs-passage small{font-size:10px}.map-shell .arrival-list{list-style:none;padding:0;margin:12px 0 0}.map-shell .arrival-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #2b4249;font-size:13px}.map-shell .arrival-list time{font-variant-numeric:tabular-nums;color:#c3ddd4;white-space:nowrap}.map-shell .info-card [data-follow-trip]{font-size:12px;width:100%}.map-shell .service-messages{border-top:1px solid #3b5153;margin-top:12px;padding-top:8px}.map-shell .service-messages details{font-size:12px;color:#e7c995}.map-shell .service-messages p{white-space:pre-line;color:#bacbc8;font-size:12px}.map-shell .card-caption{font-size:11px!important;color:#9bb4b7!important}
.map-shell .map-tools{position:absolute;right:20px;bottom:60px;z-index:6;display:flex;flex-direction:column;padding:4px;border-radius:12px;gap:2px}.map-shell .map-tools button{width:42px;height:42px;border:0;background:transparent;font-size:22px;padding:0}
.map-shell .map-legend{position:absolute;bottom:55px;left:20px;z-index:6;max-width:300px;padding:0 14px;font-size:12px}.map-shell .map-legend summary{min-height:42px;padding:12px 2px}.map-shell .map-legend .legend{display:flex;flex-direction:column;gap:12px;padding:12px 0;margin:0;font-size:11px}.map-shell .map-legend .legend>span{display:flex;align-items:center;gap:8px;line-height:1.5}.map-shell .map-legend p{font-size:10px;color:var(--muted);max-width:250px}.map-shell .station-key{width:9px;height:9px;border:1px solid #d0e2db;border-radius:50%}.map-shell .route-key{width:19px;height:2px;background:#b7aa85}.map-shell .selected-key{width:12px;height:12px;border:1px solid #f2bc97;border-radius:50%}.map-shell .train-key{display:inline-block;background:#bedccf;width:19px;height:9px;clip-path:polygon(0 0,75% 0,100% 50%,75% 100%,0 100%)}
.map-shell .map-caption{position:absolute;left:20px;bottom:20px;font:9px monospace;letter-spacing:.09em;color:#afc3c4;display:flex;gap:18px;z-index:3}.map-shell .map-attribution{position:absolute;bottom:18px;right:20px;z-index:3;font:9px Arial,sans-serif;background:#0c171eaa;padding:3px;border-radius:3px}.map-shell .map-attribution a{text-decoration:none;color:#a8c0c3}
.map-shell .map-empty{position:absolute;top:48%;left:50%;width:290px;max-width:80vw;transform:translate(-50%,-50%);padding:20px;background:#102029db;border-radius:14px;font-size:13px;pointer-events:none;border:1px solid #36505a}.map-shell .empty-description{font-size:11px;margin-top:8px;line-height:1.6;color:var(--muted)}
.map-shell .time-panel{left:20px;bottom:115px;top:auto;width:360px;max-height:55dvh}.map-shell .time-panel .panel-heading>button{font-size:11px;max-width:130px}.map-shell .schedule-controls{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.map-shell .schedule-controls label{font-size:11px;display:flex;align-items:center;gap:8px}.map-shell #scheduleTime{width:130px}.map-shell #scheduleSpeed{width:90px}.map-shell #scheduleSlider{width:100%;padding:0}.map-shell #scheduleStatus,.map-shell #scheduleHint{font-size:10px;line-height:1.6;color:var(--muted)}.map-shell #scheduleStamp{font-size:11px}
.map-shell .debug-panel{right:80px;bottom:55px;top:auto;width:400px;max-width:calc(100vw - 100px);max-height:60dvh}.map-shell #refreshStatus{padding:0;font-size:11px;overflow-wrap:anywhere}.map-shell #debugContent{font-size:10px;white-space:pre-wrap;overflow-wrap:anywhere;color:#adc3c5}
.map-shell.controls-hidden .map-ui:not(.info-card){display:none!important}.map-shell.controls-hidden .controls-toggle{left:20px}.map-shell.theoretical-view #exploreStationDetail[hidden],.map-shell.theoretical-view #detail[hidden]{display:none!important}.map-shell.theoretical-view.controls-hidden #mapLegend{display:none!important}
@media(max-width:760px){
 .map-shell .search-label{display:none}.map-shell #exploreButton{min-width:40px;font-size:17px;padding:7px}.map-shell #theoryToggle{white-space:normal;flex:1.4;min-width:92px;line-height:1.25}.map-shell #moreToggle{padding:7px 10px}
 .map-shell .map-identity{top:max(12px,env(safe-area-inset-top));left:12px;width:calc(100% - 72px);padding:12px;border-radius:14px}.map-shell .wordmark{font-size:14px}.map-shell .brand-row{margin-bottom:12px}.map-shell .primary-actions{gap:5px}.map-shell .primary-actions button{font-size:11px;padding:8px 10px}.map-shell .connection{font-size:10px}.map-shell .connection time{font-size:10px}.map-shell .controls-toggle{left:auto;right:12px;top:max(12px,env(safe-area-inset-top))}.map-shell.controls-hidden .controls-toggle{left:auto;right:12px}
 .map-shell .health-control{top:70px;right:12px}.map-shell .health-control>button{width:44px;height:44px;padding:0;justify-content:center;gap:0;border-radius:12px}.map-shell .health-control .health-label{display:none}
 .map-shell .floating-panel{max-height:calc(100dvh - 190px);padding:16px}.map-shell .network-panel,.map-shell .search-panel,.map-shell .more-panel,.map-shell .health-panel{top:135px;left:12px;right:12px;width:auto}.map-shell .health-panel{max-height:calc(100dvh - 180px)}
 .map-shell .info-card{bottom:70px;left:12px;transform:none;width:calc(100vw - 84px);max-width:none;max-height:44dvh;padding:14px}.map-shell .info-card h2{font-size:17px}.map-shell .info-card .arrival-list li{padding:10px 0}.map-shell .gtfs-panel-heading{gap:6px}.map-shell .gtfs-panel-heading>button{min-width:30px;padding:0}
 .map-shell .map-tools{right:12px;bottom:70px;padding:3px}.map-shell .map-tools button{width:40px;height:40px}.map-shell .map-legend{left:12px;bottom:18px;max-width:calc(100vw - 84px);max-height:40dvh;overflow:auto;padding:0 12px;background:#0f1d23fa}.map-shell .map-legend summary{min-height:36px;padding:9px 0;font-size:11px}.map-shell .map-caption{display:none}.map-shell .map-attribution{font-size:7px;right:12px;bottom:4px}
 .map-shell .time-panel{left:12px;bottom:70px;width:calc(100% - 84px);max-height:48dvh}.map-shell .debug-panel{left:12px;right:12px;bottom:70px;width:auto;max-width:none;max-height:58dvh}.map-shell .map-empty{top:46%}.map-shell #detail{width:100%}
}

/* Native mode menu, discreet support and an always visible simulation clock. */
.map-shell .network-mode{display:grid;gap:7px}.map-shell .network-mode label{font-size:11px;color:#b6cdca}.map-shell #networkModeSelect{width:100%;font-size:14px;min-height:46px}
.map-shell .support-shortcut{position:absolute;right:20px;top:78px;z-index:7;display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;color:inherit;text-decoration:none;font-size:22px;line-height:1;border-radius:10px}
.map-shell .simulation-clock{position:absolute;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:12;display:grid;grid-template-columns:auto auto auto;align-items:center;gap:0 12px;padding:8px 12px;max-width:calc(100% - 24px);color:#e9f4eb;font-size:11px}.map-shell #simulationTime{grid-column:1;font:20px monospace;font-variant-numeric:tabular-nums}.map-shell #simulationSpeed{grid-column:2;color:#f2ca98;font:12px monospace;white-space:nowrap}.map-shell #simulationReturn{grid-column:3;grid-row:1;min-height:36px;font-size:11px}
.map-shell.theoretical-view .map-legend{bottom:110px}.map-shell.theoretical-view .info-card{bottom:110px}.map-shell.theoretical-view .time-panel{bottom:110px}.map-shell .station-messages h3{font-size:12px;margin:18px 0 6px;color:#ceded6}
@media(max-width:760px){.map-shell .support-shortcut{right:12px;top:116px}.map-shell .simulation-clock{bottom:max(20px,env(safe-area-inset-bottom));gap:0 10px;padding:6px 10px}.map-shell #simulationTime{font-size:19px}.map-shell.theoretical-view .time-panel{bottom:108px;max-height:calc(100dvh - 240px)}.map-shell.theoretical-view .map-legend{bottom:108px}.map-shell.theoretical-view .info-card{bottom:108px}}

@media(max-width:360px){.map-shell .primary-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px}.map-shell #networkToggle,.map-shell #theoryToggle{min-width:0}.map-shell .network-panel,.map-shell .search-panel,.map-shell .more-panel,.map-shell .health-panel{top:198px;max-height:calc(100dvh - 220px)}}

/* Small visible controls, with a little extra touch area around icon buttons. */
.map-shell .floating-panel,.map-shell .info-card{background:rgba(15,29,35,.76)}
.map-shell .primary-actions button,.map-shell .health-control>button{position:relative}
.map-shell :is(.primary-actions button,.controls-toggle,.health-control>button,.support-shortcut)::after{content:'';position:absolute;inset:-3px -2px}
.map-shell .controls-toggle,.map-shell .support-shortcut{position:absolute}
.map-shell .more-panel>button{background:rgba(24,44,51,.45)}
.map-shell #morePanel>button[aria-pressed=true]{background:rgba(199,223,213,.12);color:#d7eee5;border-color:#7ba494}
@media(max-width:760px){
 .map-shell .map-identity{width:calc(100% - 68px);padding:10px;border-radius:12px}.map-shell .brand-row{margin-bottom:8px}.map-shell .wordmark{font-size:13px}.map-shell .primary-actions{gap:5px}.map-shell .primary-actions button{min-height:38px;padding:4px 8px;border-radius:8px;font-size:11px}.map-shell #exploreButton{min-width:36px;min-height:38px;font-size:17px;padding:5px}.map-shell #moreToggle{padding:5px 8px}.map-shell .fleet-counts{margin-top:7px;gap:10px;font-size:9px}.map-shell .fleet-counts b{font-size:11px}
 .map-shell .controls-toggle{width:40px;height:40px;min-height:40px;border-radius:10px}.map-shell .health-control{top:64px}.map-shell .health-control>button{width:40px;height:40px;min-height:40px;border-radius:10px}
 .map-shell .map-tools{padding:2px;border-radius:10px}.map-shell .map-tools button{width:34px;height:36px;min-height:36px;font-size:20px}
 .map-shell .floating-panel{padding:13px;border-radius:12px}.map-shell .floating-panel.search-panel,.map-shell .floating-panel.more-panel,.map-shell .floating-panel.health-panel,.map-shell .floating-panel.network-panel:not(.bus-panel){top:150px}
 .map-shell .info-card{padding:12px;border-radius:12px}.map-shell .info-card h2{font-size:16px}.map-shell .gtfs-passage{min-height:48px;padding:8px 0}.map-shell #lines button{min-width:38px;min-height:38px;width:auto;height:auto;padding:5px}.map-shell #networkModeSelect{min-height:40px;font-size:14px}
 .map-shell .more-panel>button{min-height:38px;padding:7px 10px}.map-shell .map-legend{background:rgba(15,29,35,.8)}.map-shell .time-panel .schedule-controls{gap:8px}.map-shell .time-panel button,.map-shell .time-panel select{min-height:38px;padding:6px 8px}.map-shell #scheduleTime{width:112px;min-height:38px;padding:6px;font-size:16px}.map-shell #simulationReturn{min-height:36px;padding:6px 9px}
}
@media(max-width:360px){.map-shell .primary-actions{grid-template-columns:minmax(0,1fr) 38px}.map-shell #theoryToggle{font-size:10px}.map-shell .floating-panel.search-panel,.map-shell .floating-panel.more-panel,.map-shell .floating-panel.health-panel,.map-shell .floating-panel.network-panel:not(.bus-panel){top:184px}.map-shell.theoretical-view .time-panel{max-height:calc(100dvh - 300px)}}

.map-shell .gtfs-panel-heading h2{flex:1;min-width:0}.map-shell .diorama-open{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;padding:0;border-radius:9px;color:#d8e8e4;background:#ffffff0a}.map-shell.controls-hidden .info-card{max-width:calc(100vw - 32px)}
.map-shell .diorama-key{background:conic-gradient(#b6bd00 0 50%,#cec92a 50%);border:1px solid #d0e2db;width:9px;height:9px;border-radius:50%}

/* Native Mapbox gestures below the transparent transport overlay. */
#sunlitMap{position:absolute;inset:0}
.map-shell .sunlit-active #map{position:absolute;inset:0;pointer-events:none;background:transparent}
.map-shell.sunlit-active .map-attribution{display:none}
.map-shell #sunlitMap .mapboxgl-ctrl-bottom-left,.map-shell #sunlitMap .mapboxgl-ctrl-bottom-right{z-index:4}
.map-shell #sunlitMap .mapboxgl-ctrl-attrib,.map-shell #sunlitMap .mapboxgl-ctrl-attrib a{color:#333}

/* Avoid continuously filtering the moving WebGL map behind every panel. */
.map-shell.sunlit-active .glass{backdrop-filter:none;-webkit-backdrop-filter:none}
.map-shell.sunlit-active .glass:not([aria-pressed=true]){background:rgba(15,29,35,.96)}

/* One mode selector, independent multi-line selection and a quiet walking view. */
.map-shell .primary-actions{grid-template-columns:minmax(80px,1fr) auto auto auto auto}
.map-shell .primary-actions select{min-width:0;max-width:140px;width:100%;font:inherit;border-radius:10px;background:#17333e;color:#e9f4ee;border:1px solid #628081;padding:8px}
.walk-pitch{display:none}.walking .walk-pitch{display:flex;align-items:center;gap:12px;margin:8px 0}
.walk-pitch input{min-width:80px;flex:1}
.walking #map,.walking #fleetCounts,.walking #networkToggle,.walking #theoryToggle,.walking #exploreButton,.walking #healthToggle,.walking #schedulePanel,.walking #simulationClock,.walking #empty,.walking #busPointShortcut,.walking .map-legend,.walking .map-caption{display:none!important}
.replay-help,.replay-follow{font-size:13px;line-height:1.5}.replay-follow{display:grid;gap:5px;margin-top:12px}.replay-follow select{width:100%;min-width:0}.time-panel{max-height:65vh;overflow:auto}.schedule-controls{gap:8px}.schedule-controls input[type=range]{grid-column:1/-1}
@media(max-width:760px){.map-shell .primary-actions{display:flex;gap:5px}.map-shell .primary-actions>button,.map-shell .primary-actions>select{min-width:0;padding:8px 6px;font-size:12px}.map-shell .primary-actions>select{flex:1}.map-shell .primary-actions #networkToggle{white-space:nowrap}.replay-help{margin:6px 0}.time-panel{max-height:58vh}}

.time-panel.replay-collapsed{max-height:140px;overflow:auto}.replay-collapsed .schedule-controls,.replay-collapsed .replay-help,.replay-collapsed .replay-follow,.replay-collapsed #scheduleStatus,.replay-collapsed #scheduleHint{display:none!important}
#replayCollapse{flex:none;font-size:20px;min-width:32px}.time-panel .panel-heading h2{font-size:17px}.time-panel .panel-heading{gap:6px}
@media(max-width:760px){.map-shell .primary-actions{display:grid;grid-template-columns:minmax(90px,1fr) minmax(80px,1fr) 34px}.map-shell .primary-actions #networkModeSelect{grid-column:1;grid-row:1;max-width:none}.map-shell .primary-actions #networkToggle{grid-column:2;grid-row:1}.map-shell .primary-actions #moreToggle{grid-column:3;grid-row:1}.map-shell .primary-actions #exploreButton{grid-column:1;grid-row:2}.map-shell .primary-actions #theoryToggle{grid-column:2/4;grid-row:2}.map-shell .primary-actions .search-label{display:inline}.map-shell.walking .primary-actions{grid-template-columns:1fr 34px}.map-shell.walking .primary-actions #moreToggle{grid-column:2}}

.map-shell #replayFollowNotice{display:block;line-height:1.5;margin-top:6px}.map-shell.theoretical-view .time-panel.replay-collapsed{max-height:140px}
@media(max-width:760px){.map-shell .floating-panel.search-panel,.map-shell .floating-panel.more-panel,.map-shell .floating-panel.health-panel,.map-shell .floating-panel.network-panel:not(.bus-panel){top:190px;max-height:calc(100dvh - 215px)}}

/* Compact translucent controls, with no costly backdrop filter on mobile. */
.map-shell.controls-hidden #exploreStationDetail{display:none!important}
.map-shell #simulationPlay{min-width:40px;font-size:18px}.map-shell #simulationSettings{min-width:36px}
.map-shell.walking #exploreTime,.map-shell.walking #networkVisibility{display:none!important}
@media(max-width:760px){
 .map-shell .primary-actions{grid-template-columns:40px minmax(90px,1fr) minmax(75px,1fr) 32px}
 .map-shell .primary-actions #networkModeSelect{grid-column:1/3;grid-row:1}
 .map-shell .primary-actions #networkToggle{grid-column:3;grid-row:1}
 .map-shell .primary-actions #moreToggle{grid-column:4;grid-row:1}
 .map-shell .primary-actions #exploreButton{grid-column:1;grid-row:2}
 .map-shell .primary-actions #theoryToggle{grid-column:2/5;grid-row:2}
 .map-shell .glass,.map-shell.sunlit-active .glass:not([aria-pressed=true]){background:rgba(15,29,35,.76);backdrop-filter:none;-webkit-backdrop-filter:none}
 .map-shell .map-identity{padding:8px}.map-shell .primary-actions button,.map-shell #networkModeSelect{min-height:34px;font-size:12px;padding:5px 7px}
 .map-shell .floating-panel{padding:10px}.map-shell .panel-heading{margin-bottom:7px}
 .map-shell .arrival-list li{padding:8px 0}.map-shell .fleet-counts{font-size:9px;margin-top:5px}
 .map-shell.walking .primary-actions{grid-template-columns:minmax(0,1fr) 32px}.map-shell.walking .primary-actions #networkModeSelect{grid-column:1}.map-shell.walking .primary-actions #moreToggle{grid-column:2}
 .map-shell .simulation-clock{gap:0 6px}.map-shell #simulationTime{font-size:15px}
}
.map-shell .simulation-clock{display:flex;flex-wrap:nowrap;gap:6px}.map-shell .simulation-clock button{flex:none;min-height:36px;padding:5px 8px}.map-shell #simulationTime{white-space:nowrap}.map-shell #simulationSpeed{font-size:10px}

/* Selection remains reachable in the uncluttered view. */
.map-shell.controls-hidden.selection-visible #exploreStationDetail{display:block!important}
.map-shell #theoryToggle{width:auto;justify-self:start;flex:0 0 auto;min-height:32px;font-size:11px;padding:5px 8px}
.map-shell .debug-panel{width:min(420px,calc(100vw - 24px));max-height:45vh;font-size:11px}
.diorama-viewport{background:#dceef8}.diorama-viewport img{mix-blend-mode:multiply}

.map-shell #mapCompass{font-size:13px}


.map-shell #simulationRate{min-height:36px;min-width:64px;padding:4px;background:#17333e;color:#e9f4ee;border:1px solid #628081;border-radius:8px;font:12px monospace}
.map-shell #mapCompass{display:flex;align-items:center;justify-content:center}.map-shell #mapCompass[hidden]{display:none}
#compassNeedle{transform-origin:12px 12px}

/* One compact row on phones; keep map controls reachable without the menu. */
.map-shell #sunlitToggle{font:600 13px system-ui,sans-serif;letter-spacing:.03em}
.map-shell #sunlitToggle[aria-pressed=true]{color:#16313a;background:#c7dfd5}
.map-shell #sunlitStatus:empty{display:none}
@media(max-width:760px){
 .map-shell .map-identity{padding:7px 8px;background:rgba(15,29,35,.64)!important}
 .map-shell .brand-row{margin-bottom:5px;align-items:center}
 .map-shell .wordmark{font-size:11px}.map-shell .wordmark span{display:none}
 .map-shell .connection{display:flex;gap:5px;align-items:center}.map-shell .connection time{font-size:10px}.map-shell #liveLabel{display:none}
 .map-shell .primary-actions{grid-template-columns:minmax(60px,1fr) max-content 28px 46px 26px;gap:4px}
 .map-shell .primary-actions #networkModeSelect{grid-column:1;grid-row:1}
 .map-shell .primary-actions #networkToggle{grid-column:2;grid-row:1;font-size:10px;padding:3px 2px}
 .map-shell .primary-actions #exploreButton{grid-column:3;grid-row:1;min-width:28px;font-size:17px;padding:3px}
 .map-shell .primary-actions #theoryToggle{grid-column:4;grid-row:1;min-width:0;width:46px;font-size:9px;padding:3px 1px;white-space:nowrap;line-height:1}
 .map-shell .primary-actions #moreToggle{grid-column:5;grid-row:1;padding:3px;min-width:26px}
 .map-shell .primary-actions button,.map-shell #networkModeSelect{min-height:32px;font-size:11px;padding:3px 4px;border-radius:7px}
 .map-shell .fleet-counts{font-size:8px;gap:8px;margin-top:4px;line-height:1.2}.map-shell .fleet-counts b{font-size:10px}
 .map-shell .health-control{top:58px}.map-shell .support-shortcut{top:104px}
 .map-shell .floating-panel.search-panel,.map-shell .floating-panel.more-panel,.map-shell .floating-panel.health-panel,.map-shell .floating-panel.network-panel:not(.bus-panel){top:var(--map-identity-bottom,126px);max-height:calc(100dvh - var(--map-identity-bottom,126px) - 12px)}
 .map-shell.walking .primary-actions{grid-template-columns:minmax(0,1fr) 26px}.map-shell.walking .primary-actions #moreToggle{grid-column:2}
}

.map-shell .map-status{position:absolute;right:80px;bottom:80px;z-index:14;max-width:min(300px,calc(100vw - 100px));padding:10px 12px;font-size:12px;line-height:1.5}.map-shell .map-status:empty{display:none}
@media(max-width:760px){.map-shell .map-status{right:60px;bottom:75px;font-size:11px}}

.map-shell .feed-freshness{margin-top:4px;color:#bdd2d5;font:10px/1.25 Arial,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
.map-shell .feed-freshness.stale{color:#f2bc97}
@media(max-width:760px){.map-shell .feed-freshness{font-size:9px;margin-top:3px}}

.map-shell .primary-actions{display:grid;grid-template-columns:minmax(100px,1fr) auto 34px auto 34px;align-items:center}
.map-shell .primary-actions :is(button,select){height:36px!important;min-height:36px!important;padding:4px 8px!important;font:11px Arial,sans-serif;border-radius:8px!important}
.map-shell #networkToggle{width:auto;align-self:stretch}.map-shell #moreToggle{font-size:19px}.map-shell #exploreButton{font-size:18px}
.map-shell #visitorGuide p,.map-shell #about p{font:12px/1.55 Arial,sans-serif;color:#c4d5d7;margin:8px 0}
.map-shell .terrain-legend{display:none}.sunlit-active .terrain-legend{display:block}
.map-shell [data-orbit]{font-size:21px}.map-shell [data-orbit][hidden]{display:none}
@media(max-width:760px){.map-shell .primary-actions{grid-template-columns:minmax(65px,1fr) auto 30px auto 30px}.map-shell .primary-actions :is(button,select){height:32px!important;min-height:32px!important;padding:3px 5px!important;font-size:10px}.map-shell .primary-actions #theoryToggle{width:auto}.map-shell #visitorGuide p,.map-shell #about p{font-size:11px}}

.map-shell.walking .primary-actions{grid-template-columns:minmax(100px,1fr) 34px}
