/* Load last. The root class can be present in HTML before initMapShell runs. */
body.map-shell {
  --shell-gap: 20px;
  --shell-safe-top: env(safe-area-inset-top, 0px);
  --shell-top: calc(env(safe-area-inset-top, 0px) + 84px);
  --shell-footer: calc(env(safe-area-inset-bottom, 0px) + 24px);
  --shell-bottom: calc(var(--shell-footer) + 90px);
  --shell-panel-width: 366px;
  --shell-shadow: 0 6px 28px #102d3f16, 0 1px 3px #102d3f0c;
  --shell-accent: var(--night-link, var(--navy));
  padding: 0;
  background: var(--cream);
}

body.map-shell.map-shell-dock-collapsed { --shell-bottom: calc(var(--shell-footer) + 60px); }

body.map-shell > :is(.topbar, .ambient),
body.map-shell .planner-route-art,
body.map-shell .control-panel::before,
body.map-shell .app-shell::before,
body.map-shell .map-panel::after,
body.map-shell .map-heading,
body.map-shell .map-gesture-hint,
body.map-shell #map-back-top {
  display: none !important;
}

body.map-shell:not([data-map-shell-view]),
body.map-shell[data-map-shell-view="transport"] {
  height: 100dvh;
  overflow: hidden;
}

body.map-shell .app-shell.product-view {
  position: fixed;
  inset: 0;
  z-index: auto;
  display: block;
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.map-shell .app-shell .map-panel,
body.map-shell .app-shell.commute-results-view .map-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.map-shell .app-shell #map {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
}

body.map-shell .workspace-tabs {
  position: fixed;
  z-index: 610;
  top: calc(var(--shell-safe-top) + 20px);
  left: max(var(--shell-gap), env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: var(--shell-panel-width);
  max-width: calc(100vw - 2 * var(--shell-gap));
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shell-shadow);
}

body.map-shell .workspace-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: none;
}

body.map-shell .workspace-tab[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
}

body.map-shell .workspace-tab svg { width: 20px; height: 20px; flex: 0 0 20px; }

body.map-shell .map-shell-brand {
  position: fixed;
  top: auto;
  bottom: calc(var(--shell-footer) + 8px);
  right: max(var(--shell-gap), env(safe-area-inset-right, 0px));
  z-index: 605;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  opacity: .8;
}

body.map-shell .map-shell-brand .brand-logo { width: 110px; height: auto; }
body.map-shell .map-shell-brand small { display: none; }

body.map-shell .app-shell .control-panel {
  position: fixed;
  z-index: 600;
  top: var(--shell-top);
  left: max(var(--shell-gap), env(safe-area-inset-left, 0px));
  width: var(--shell-panel-width);
  max-width: calc(100vw - 2 * var(--shell-gap));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - var(--shell-top) - var(--shell-bottom) - 12px);
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shell-shadow);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scroll-padding: 12px;
}

body.map-shell.map-shell-planner-open .app-shell .control-panel {
  max-height: calc(100dvh - var(--shell-top) - var(--shell-bottom) - 12px);
}

body.map-shell .map-shell-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body.map-shell .map-shell-panel-head > strong { font-size: 12px; color: var(--muted); }
body.map-shell .map-shell-fold { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px; border: 0; border-radius: 10px; background: var(--cream); color: var(--shell-accent); font-size: 12px; font-weight: 700; }
body.map-shell .map-shell-fold svg { width: 16px; height: 16px; }
body.map-shell:not(.map-shell-ready) :is(#favorite-stops-panel, #recent-trips) { display: none; }
body.map-shell:not(.map-shell-planner-open) .map-shell-panel-head,
body.map-shell:not(.map-shell-planner-open) .control-panel :is(.hero-copy, .boarding-steps, .line-search-panel),
body.map-shell .control-panel .nearby-start { display: none; }
body.map-shell.map-shell-arrivals-open .app-shell .control-panel { display: none !important; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-heading { flex-wrap: nowrap; gap: 8px; margin: 0 0 6px; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-heading > div > span { display: none; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-heading h2 { margin: 0; font-size: 15px; line-height: 1.3; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-heading > b { flex-shrink: 0; padding: 4px 6px; font-size: 9px; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-heading > b::after { content: ''; }
body.map-shell:not(.map-shell-planner-open) .nearby-stop-list { padding-top: 2px; }
body.map-shell .control-panel .nearby-stop-choice { min-height: 64px; padding: 9px 10px; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px; border-radius: 12px; }
body.map-shell .control-panel .nearby-stop-choice .nearby-stop-icon { width: 28px; height: 30px; border-radius: 8px; }
body.map-shell .control-panel .nearby-stop-choice strong { font-size: 13px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
body.map-shell .control-panel .nearby-stop-choice :is(small, i) { font-size: 11px; line-height: 1.35; }
body.map-shell.large-reading .control-panel .nearby-stop-choice strong { font-size: 16px; }
body.map-shell.large-reading .control-panel .nearby-stop-choice :is(small, i) { font-size: 13px; }
body.map-shell .control-panel .stop-finder { margin: 0; }
body.map-shell .control-panel #location-button { margin: 0; min-height: 64px; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; padding: 10px; border-radius: 12px; box-shadow: none; }
body.map-shell .control-panel .location-icon { width: 36px; height: 36px; border-radius: 10px; }
body.map-shell .control-panel #location-button b { font-size: 13px; line-height: 1.4; }
body.map-shell .control-panel #location-button em { font-size: 11px; line-height: 1.4; }
body.map-shell .control-panel #location-button small { font-size: 9px; }
body.map-shell .control-panel #location-button .button-arrow { font-size: 11px; }
body.map-shell .control-panel #location-button > span:nth-child(2) { min-width: 0; }
body.map-shell .control-panel .line-search-panel { margin-top: 8px; }
body.map-shell .control-panel .line-search-panel > summary { min-height: 44px; padding: 10px 4px; align-items: center; }
body.map-shell .control-panel .results-region { margin-top: 10px; }
body.map-shell .control-panel .results-region:has(> .nearby-start:only-child),
body.map-shell .control-panel .results-region:empty { margin: 0; }
body.map-shell .control-panel .hero-copy { margin: 10px 0 14px; }
body.map-shell .control-panel #boarding-title { margin: 0 0 6px; font-size: 24px; line-height: 1.15; }
body.map-shell .control-panel .boarding-steps { margin: 0; }
body.map-shell .control-panel #commute-workspace { min-width: 0; margin: 0; padding: 0; }
body.map-shell .control-panel .commute-intro { margin: 4px 0 14px; }
body.map-shell .control-panel .commute-intro > .eyebrow { display: none; }
body.map-shell .control-panel .commute-intro h1 { margin: 6px 0; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
body.map-shell .control-panel .commute-intro h1 em { color: inherit; }
body.map-shell .control-panel .commute-intro p { font-size: 12px; line-height: 1.5; }
body.map-shell .control-panel .saved-places { margin: 12px 0; gap: 8px; }
body.map-shell .control-panel .place-card { min-height: 60px; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; padding: 10px; border-radius: 12px; box-shadow: none; }
body.map-shell .control-panel .place-icon { width: 32px; height: 32px; border-radius: 9px; }
body.map-shell .control-panel .place-icon svg { width: 19px; height: 19px; }
body.map-shell .control-panel .place-copy strong { font-size: 13px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
body.map-shell .control-panel .commute-direction-help { margin: 12px 0 8px; font-size: 12px; line-height: 1.5; }
body.map-shell .control-panel .direction-picker { margin: 0 0 12px; gap: 8px; }
body.map-shell .control-panel .direction-picker button { min-width: 0; min-height: 58px; padding: 9px 8px; border-radius: 12px; font-size: 12px; }
body.map-shell .control-panel .direction-picker button span { font-size: 14px; }
body.map-shell .control-panel .plan-button { min-height: 54px; margin: 0; padding: 12px; border-radius: 12px; }
body.map-shell .control-panel .commute-help { margin-top: 14px; gap: 8px; }
body.map-shell .control-panel .commute-empty { padding: 10px; border-radius: 12px; }
body.map-shell .control-panel .commute-route-panel { margin-top: 14px; }
body.map-shell .control-panel .commute-route-panel .journey-list { grid-template-columns: minmax(0, 1fr); }
body.map-shell .control-panel input { font-size: 16px; }
body.map-shell.map-list-mode .app-shell .control-panel { max-height: calc(100dvh - var(--shell-top) - var(--shell-bottom) - 12px); }

body.map-shell .map-shell-dock {
  position: fixed;
  z-index: 2201;
  left: 50%;
  bottom: calc(var(--shell-footer) + 8px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(480px, calc(100% - 24px));
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 40px #102d3f25;
}

body.map-shell .map-shell-dock-toggle {
  position: fixed;
  z-index: 2201;
  left: calc(50% + 252px);
  bottom: calc(var(--shell-footer) + 21px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  transform: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--shell-accent);
  box-shadow: var(--shell-shadow);
  font: 600 12px/1.2 'DM Sans', sans-serif;
}
body.map-shell .map-shell-dock-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; }
body.map-shell .map-shell-dock-toggle > span { display: none; }
body.map-shell.map-shell-dock-collapsed .map-shell-dock-toggle { left: 50%; bottom: calc(var(--shell-footer) + 8px); width: auto; min-width: 96px; padding: 8px 12px; transform: translateX(-50%); }
body.map-shell.map-shell-dock-collapsed .map-shell-dock-toggle > span { display: inline; }

body.map-shell .map-shell-dock > button {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 56px;
  margin: 0;
  padding: 6px 2px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1.2 'DM Sans', sans-serif;
  text-align: center;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}

body.map-shell .map-shell-dock > button > span { display: block; min-width: 0; max-width: 100%; }
body.map-shell .map-shell-dock > button i { display: flex; font-style: normal; }
body.map-shell .map-shell-dock svg { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
body.map-shell .map-shell-dock #account-avatar { display: flex; justify-content: center; align-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 0; border-radius: 8px; background: var(--cream); color: var(--shell-accent); font-size: 11px; }
body.map-shell .map-shell-dock #account-avatar.guest { background: transparent; color: inherit; }
body.map-shell .map-shell-dock #account-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; }
body.map-shell .map-shell-dock #account-detail { display: none; }
/* Legacy arrival/admin rules hide the old floating trigger, not this persistent navigation item. */
body.map-shell .map-shell-dock #mobile-nav-trigger { display: flex !important; opacity: 1 !important; pointer-events: auto !important; transform: none !important; }
body.map-shell .map-shell-dock .menu-close,
body.map-shell .map-shell-dock #mobile-nav-trigger.is-open .menu-open { display: none; }
body.map-shell .map-shell-dock #mobile-nav-trigger.is-open .menu-close { display: block; }
body.map-shell .map-shell-dock > button[data-shell-current] { background: var(--night-selected, #eaf1fb); color: var(--shell-accent); box-shadow: inset 0 -2px 0 var(--shell-accent); }

body.map-shell .map-shell-menu-scrim { position: fixed; z-index: 2198; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: #102d3f28; cursor: default; }
body.map-shell .map-shell-menu-scrim > * { display: none; }
body.map-shell #mobile-nav {
  position: fixed;
  z-index: 2200;
  left: 50%;
  right: auto;
  bottom: var(--shell-bottom);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--shell-bottom) - env(safe-area-inset-top, 0px) - 16px);
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 45px #102d3f24;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%);
  transition: none;
  backdrop-filter: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body.map-shell #mobile-nav[aria-hidden="true"] { display: none !important; }
body.map-shell #mobile-nav .map-shell-menu-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
body.map-shell #mobile-nav h2 { margin: 0; font: 700 22px/1.2 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; }
body.map-shell #mobile-nav #live-pill { display: flex; order: 3; width: max-content; padding: 6px 0; border: 0; background: transparent; font-size: 11px; }
body.map-shell #mobile-nav #live-pill span { width: 6px; height: 6px; }
body.map-shell #mobile-nav .map-shell-menu-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
body.map-shell #mobile-nav h3 { grid-column: 1 / -1; margin: 0 0 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
body.map-shell #mobile-nav #official-sources-link { display: flex; align-items: center; min-height: 48px; padding: 10px; border-radius: 12px; background: var(--cream); color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
body.map-shell #mobile-nav button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; min-height: 48px; height: auto; margin: 0; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: var(--cream); color: var(--ink); text-align: left; box-shadow: none; transform: none; }
body.map-shell #mobile-nav button > span { min-width: 0; }
body.map-shell #mobile-nav button :is(span, small, strong) { font-size: 12px; line-height: 1.35; letter-spacing: 0; overflow-wrap: anywhere; }
body.map-shell #mobile-nav button :is(i, .favorite-summary-icon) { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--shell-accent); }
body.map-shell #mobile-nav button svg { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
body.map-shell #mobile-nav .favorites-launcher { grid-column: 1 / -1; }
body.map-shell #mobile-nav .favorites-launcher > span:nth-child(2) { flex: 1; }
body.map-shell #mobile-nav .favorites-launcher small { display: block; color: var(--ink); font-weight: 700; text-transform: none; }
body.map-shell #mobile-nav .favorites-launcher strong { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
body.map-shell #mobile-nav .favorites-launcher > b { color: var(--shell-accent); background: transparent; font-size: 13px; }
body.map-shell #mobile-nav button[aria-current="page"] { border-color: var(--shell-accent); }
body.map-shell #mobile-nav .map-shell-menu-close { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
body.map-shell #mobile-nav #map-shell-dock-toggle { position: static; grid-column: 1 / -1; order: 4; justify-content: flex-start; width: 100%; min-width: 44px; min-height: 44px; padding: 10px; transform: none; }
body.map-shell #mobile-nav #map-shell-dock-toggle > span { display: inline; }

body.map-shell :is(.map-shell-dock, #mobile-nav, .workspace-tabs, .map-shell-panel-head, .map-shell-brand) :focus-visible,
body.map-shell .map-shell-dock-toggle:focus-visible,
body.map-shell .map-shell-brand:focus-visible { outline: 3px solid var(--shell-accent); outline-offset: 3px; }
body.map-shell .maplibregl-ctrl-top-right { top: calc(var(--shell-safe-top) + 20px); right: max(10px, env(safe-area-inset-right, 0px)); }
body.map-shell .maplibregl-ctrl-bottom-right { bottom: env(safe-area-inset-bottom, 0px); right: env(safe-area-inset-right, 0px); }
body.map-shell .maplibregl-ctrl-bottom-left { bottom: env(safe-area-inset-bottom, 0px); left: env(safe-area-inset-left, 0px); }
body.map-shell .maplibregl-ctrl-attrib { max-width: calc(100vw - 16px); }
body.map-shell .maplibregl-ctrl-bottom-right > .maplibregl-ctrl-attrib { margin: 0 8px 2px 0; }
body.map-shell .map-legend { bottom: calc(var(--shell-footer) + 8px); left: max(var(--shell-gap), env(safe-area-inset-left, 0px)); max-width: calc(100vw - 88px); }
body.map-shell .recenter-button { bottom: calc(var(--shell-bottom) + 44px); right: max(var(--shell-gap), env(safe-area-inset-right, 0px)); width: 44px; height: 44px; }
body.map-shell .traffic-button { top: calc(var(--shell-safe-top) + 128px); right: var(--shell-gap); min-height: 44px; }
body.map-shell .traffic-button:disabled { display: none; }
body.map-shell .map-status { max-width: calc(100% - 32px); }
body.map-shell .map-panel :is(.traffic-button, .recenter-button, .maplibregl-ctrl-top-right) { z-index: 10; }
body.map-shell:is(.map-shell-planner-open, .map-shell-arrivals-open, .map-shell-menu-open, .origin-picking, .travel-active, .journey-navigation-active) :is(.traffic-button, .recenter-button, .maplibregl-ctrl-top-right),
body.map-shell:has(dialog[open], .maplibregl-popup) :is(.traffic-button, .recenter-button, .maplibregl-ctrl-top-right) { visibility: hidden; pointer-events: none; }

/* Only geometry changes here: original arrival, origin and travel interactions stay intact. */
body.map-shell #arrival-drawer,
body.map-shell #journey-guide,
body.map-shell #origin-map-picker,
body.map-shell #travel-sheet { bottom: var(--shell-bottom); max-height: calc(100dvh - var(--shell-bottom) - env(safe-area-inset-top, 0px) - 18px); }
body.map-shell #travel-mini { bottom: var(--shell-bottom); }
body.map-shell .toast { bottom: calc(var(--shell-bottom) + 12px); }
body.map-shell:is(.travel-active, .journey-navigation-active) .map-shell-top { display: none; }
body.map-shell.origin-picking :is(.map-shell-top, .control-panel) { display: none !important; }
body.map-shell:is(.travel-active, .journey-navigation-active):not(.map-shell-planner-open) .control-panel { display: none; }
body.map-shell.map-shell-planner-open:is(.travel-active, .journey-navigation-active) .control-panel { display: block; z-index: 1801; }
body.map-shell.map-shell-planner-open:is(.travel-active, .journey-navigation-active) #journey-guide { display: none; }
body.map-shell[data-map-shell-view]:not([data-map-shell-view="transport"]) { height: auto; overflow-y: auto; }
body.map-shell[data-map-shell-view]:not([data-map-shell-view="transport"]) > .product-view { margin-top: 0; padding-top: calc(env(safe-area-inset-top, 0px) + 76px); padding-bottom: calc(var(--shell-bottom) + 24px); }
body.map-shell[data-map-shell-view]:not([data-map-shell-view="transport"]) :is(#arrival-drawer, #travel-toolbar, #travel-sheet, #travel-mini, #journey-guide, #origin-map-picker) { display: none !important; }
body.map-shell.admin-auth-pending :is(.map-shell-navigation, .map-shell-dock, .map-shell-dock-toggle, .map-shell-menu-host, .map-shell-top, .map-shell-brand, #mobile-nav) { visibility: hidden !important; }

@media (max-width: 900px) {
  body.map-shell .map-legend { display: none !important; }
  body.map-shell .map-shell-brand { bottom: calc(var(--shell-footer) + 82px); }
  body.map-shell.map-shell-dock-collapsed .map-shell-brand { bottom: calc(var(--shell-footer) + 8px); }
  body.map-shell:is(.map-shell-planner-open, .map-shell-arrivals-open, .travel-active, .journey-navigation-active, .origin-picking) .map-shell-brand { visibility: hidden; }
}

@media (max-width: 600px) {
  body.map-shell { --shell-gap: 12px; --shell-panel-width: calc(100vw - 24px); --shell-top: calc(var(--shell-safe-top) + 74px); }
  body.map-shell .workspace-tabs { top: calc(var(--shell-safe-top) + 10px); }
  body.map-shell .workspace-tab { font-size: 12px; }
  body.map-shell .map-shell-brand { bottom: calc(var(--shell-footer) + 82px); min-height: 44px; padding: 8px 0; background: transparent; }
  body.map-shell .map-shell-brand .brand-logo { width: 92px; }
  body.map-shell.map-shell-dock-collapsed .map-shell-brand { bottom: calc(var(--shell-footer) + 8px); }
  body.map-shell .app-shell .control-panel { max-height: min(37dvh, calc(100dvh - var(--shell-top) - var(--shell-bottom) - 12px)); padding: 10px; }
  body.map-shell .map-shell-dock { width: calc(100% - 16px); gap: 2px; border-radius: 20px; }
  body.map-shell.map-shell-dock-collapsed .map-shell-dock-toggle { left: max(var(--shell-gap), env(safe-area-inset-left, 0px)); transform: none; }
  body.map-shell #mobile-nav .map-shell-menu-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
  body.map-shell #mobile-nav .map-shell-menu-head h2 { min-width: 0; font-size: 20px; }
  body.map-shell #mobile-nav #live-pill { grid-column: 1 / -1; }
  body.map-shell .map-shell-dock > button { min-height: 56px; }
  body.map-shell .map-shell-dock #account-label { max-width: 100%; }
  body.map-shell .maplibregl-ctrl-top-right { top: auto; bottom: calc(var(--shell-bottom) + 106px); }
  body.map-shell .traffic-button { top: auto; bottom: calc(var(--shell-bottom) + 206px); font-size: 11px; }
  body.map-shell #arrival-drawer,
  body.map-shell #journey-guide,
  body.map-shell #origin-map-picker { max-height: min(66dvh, calc(100dvh - var(--shell-bottom) - env(safe-area-inset-top, 0px) - 18px)); }
  body.map-shell .map-legend { display: none !important; }
}

@media (max-width: 359px) {
  body.map-shell .map-shell-dock > button { font-size: 10px; }
  body.map-shell .workspace-tab { font-size: 11px; gap: 5px; }
  body.map-shell .control-panel #location-button .button-arrow { display: none; }
  body.map-shell .control-panel #location-button { grid-template-columns: 32px minmax(0, 1fr); }
  body.map-shell #mobile-nav { padding: 14px; }
  body.map-shell #mobile-nav .map-shell-menu-group { grid-template-columns: minmax(0, 1fr); }
}

@media (max-height: 520px) and (min-width: 601px) {
  body.map-shell { --shell-top: calc(var(--shell-safe-top) + 72px); --shell-panel-width: 320px; }
  body.map-shell .workspace-tabs { top: calc(var(--shell-safe-top) + 10px); }
}

@media (hover: hover) {
  body.map-shell .map-shell-dock > button:hover,
  body.map-shell #mobile-nav button:hover { background: var(--night-selected, #eaf1fb); color: var(--shell-accent); }
}

@media (prefers-reduced-motion: reduce) {
  body.map-shell :is(.control-panel, .workspace-tab, .map-shell-dock button, #mobile-nav) { transition: none; animation: none; scroll-behavior: auto; }
}

body.map-shell.reduce-motion :is(.control-panel, .workspace-tab, .map-shell-dock button, #mobile-nav) { transition: none; animation: none; scroll-behavior: auto; }
