:root{color-scheme:light;--surface:#fffdf7;--surface-hover:#e7ede3}
.theme-control{display:inline-flex;align-items:center;font:12px/1.4 system-ui,sans-serif}
.theme-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#theme-choice{font:inherit;min-height:36px;max-width:125px;padding:8px;border:1px solid var(--line,#cdd7cb);border-radius:8px;background:var(--surface);color:var(--ink,#173f35);cursor:pointer}
#theme-choice:focus-visible{outline:3px solid #d09039;outline-offset:3px}
:root[data-theme=dark]{color-scheme:dark;--ink:#e5f0e6;--muted:#b3c3bb;--paper:#111d19;--line:#40574b;--surface:#1a2b23;--surface-hover:#284333;--orange:#efb178}
:root[data-theme=dark] body{background:var(--paper);color:var(--ink)}
:root[data-theme=dark] a{color:inherit}
:root[data-theme=dark] :is(input,select,.stop-type,#language,#theme-choice){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] input::placeholder{color:#a6b8ad;opacity:1}
:root[data-theme=dark] :is(.stats,.point,.weather-insights,.departure-comparison,.journey-light,dialog,#traffic,.map-empty){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.summary,.weather-insight,.share-button,.share-link-row button,.departure-comparison button,.privacy-actions button,.stop-actions button,.departure-buttons button,.search-row button,.results button,.mobile-trip-nav button){background:#243c30;color:var(--ink);border-color:#577460}
:root[data-theme=dark] :is(.share-button,.share-link-row button,.departure-comparison button,.privacy-actions button,.stop-actions button,.departure-buttons button,.search-row button,.results button,.mobile-trip-nav button,.weather-insight):hover:not(:disabled){background:#35533f;color:var(--ink)}
:root[data-theme=dark] :is(.point:hover,.point.active){background:#284333;border-color:#9ac5a6}
:root[data-theme=dark] :is(.point.stop-row,.journey-notices){background:#3b3220;border-color:#746341;color:#f1e8d5}
:root[data-theme=dark] .point .flag{color:#f3b77e}
:root[data-theme=dark] .primary{background:#acd8b7;color:#122b1c}
:root[data-theme=dark] .primary:hover{background:#c5e8cd}
:root[data-theme=dark] .share-link-row button.copied{background:#acd8b7;color:#122b1c}
:root[data-theme=dark] .sun-event{background:#3b3220;border-color:#8d7447;color:#ffe5ab}
:root[data-theme=dark] .sun-event:hover{background:#514329}
:root[data-theme=dark] :is(.eyebrow,.connector,.welcome b,.brand-tagline){color:#becda8}
:root[data-theme=dark] :is(.notice,#setup){background:#3b3220;color:#f1e8d5;border-color:#746341}
:root[data-theme=dark] :is(.map-label,.map-fit,#map-expand,.map-expanded #map-trip-status){background:#1a2b23f5;color:var(--ink);border-color:#688572}
:root[data-theme=dark] .map-empty{box-shadow:0 20px 60px #0005}
:root[data-theme=dark] .leaflet-container{background:#1b2525}
:root[data-theme=dark] .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.8) saturate(.7)}
:root[data-theme=dark] :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-bar a,.leaflet-control-attribution){background:var(--surface);color:var(--ink)}
:root[data-theme=dark] .leaflet-bar a:hover{background:var(--surface-hover)}
:root[data-theme=dark] :is(.leaflet-container a.leaflet-popup-close-button,.leaflet-control-attribution a){color:#c6e7d0}
:root[data-theme=dark] .marker>div{background:#1a2b23;border-color:#b4dfbf;color:#f0f6ed}
:root[data-theme=dark] .marker.stop-marker>div{background:#534225;border-color:#e5c078;color:#fff0cd}
:root[data-theme=dark] #analytics-consent{background:var(--surface);color:var(--ink);border-color:#688572;box-shadow:0 8px 40px #0008}
:root[data-theme=dark] #analytics-consent button{background:#243c30;color:var(--ink);border-color:#779981}
:root[data-theme=dark] #analytics-consent button:hover{background:#35533f}
:root[data-theme=dark] #analytics-consent a{color:#c6e7d0}
:root[data-theme=dark] :is(th,td,#analytics-details,#analytics-consent .analytics-storage th,#analytics-consent .analytics-storage td){border-color:var(--line)}
@media(max-width:700px){.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;height:auto;min-height:70px;gap:8px 10px;padding:12px 16px}.topbar .brand{grid-column:1/3;grid-row:1}.topbar #sources-open{grid-column:3;grid-row:1;justify-self:end}.topbar #language{grid-column:2;grid-row:2}.topbar .theme-control{grid-column:3;grid-row:2}#theme-choice{font-size:11px;max-width:105px}.topbar .topnote{display:none}}
@media(prefers-reduced-motion:no-preference){#theme-choice{transition:background .15s,border-color .15s}}
