/* Public interface only. ID scope isolates it from the shared administration styles. */
body.is-public-map-open {
  --ui-page: color-mix(in srgb, var(--map-accent) 8%, #1b191a);
  --ui-surface: var(--ui-page);
  --ui-raised: color-mix(in srgb, var(--ui-page) 90%, #ffffff);
  --ui-line: rgba(255, 255, 255, 0.12);
  --ui-text: #f1f5f2;
  --ui-muted: #b5c2b9;
  font-family: "Segoe UI", system-ui, sans-serif;
}

#mapView {
  font-size: 15px;
  line-height: 1.5;
}

#mapView .ui-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#mapView :is(button, a, input, [role="button"]):focus-visible {
  outline: 2px solid #b8efc2 !important;
  outline-offset: 3px !important;
}

#mapView button { touch-action: manipulation; }
#mapView button:disabled { opacity: .45; cursor: default; }

#mapView .map-edge-controls {
  top: max(16px, env(safe-area-inset-top)) !important;
  left: max(16px, env(safe-area-inset-left)) !important;
}

body.is-public-map-panel-fullscreen #mapView .map-edge-controls { z-index: 75; }

#mapView .map-round-button {
  display: grid;
  place-content: center;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 13px !important;
  color: #f1f8f2 !important;
  box-shadow: 0 4px 14px #10261930 !important;
}

#mapView .map-schedules-control {
  position: fixed;
  z-index: 70;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}

#mapView .map-favorites-control {
  top: calc(max(16px, env(safe-area-inset-top)) + 54px) !important;
  right: max(16px, env(safe-area-inset-right)) !important;
}

body.is-public-map-panel-open #mapView .map-schedules-control,
body.is-map-drawer-open #mapView .map-schedules-control { display: none; }

#mapView .map-side-drawer {
  width: min(280px, calc(100dvw - 48px));
  padding: max(18px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 0 20px 20px 0;
  box-shadow: 12px 0 36px #0003;
}

#mapView .map-drawer-brand { gap: 10px; padding: 0 4px; }
#mapView .map-drawer-brand strong { font-size: 17px; font-weight: 700; }
#mapView .map-drawer-brand span { font-size: 12px; font-weight: 400; }
#mapView .map-drawer-logo { flex: 0 0 42px; }
#mapView .map-drawer-brand .ui-icon-button { margin-left: auto; }

#mapView .ui-icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ffffff12;
  color: inherit;
  font: 28px/1 "Segoe UI", sans-serif;
  cursor: pointer;
}

#mapView .map-drawer-nav { gap: 6px; }
#mapView .map-drawer-nav button,
#mapView .map-drawer-footer a {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}

#mapView .map-drawer-nav button.is-active { font-weight: 650; }
#mapView .map-drawer-footer a { font-size: 12px; overflow-wrap: anywhere; }
#mapView .map-drawer-footer .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }

#mapView .public-map-panel {
  color: var(--ui-text) !important;
  font-size: 15px !important;
  border: 1px solid var(--ui-line) !important;
}

/* Keep headers fixed while their content scrolls, including short landscape screens. */
#mapView .public-map-panel .map-panel-body {
  min-width: 0;
  min-height: 0 !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #7f9184 transparent;
}

#mapView .map-panel-head h2 {
  font-weight: 650 !important;
  line-height: 1.35 !important;
  letter-spacing: -.015em;
}

#mapView .map-panel-head .eyebrow:empty { display: none; }
#mapView :is(h1, h2)[tabindex="-1"]:focus { outline: none; }

#mapView #mapPanelCloseButton {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 44px;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #ffffff10 !important;
  color: var(--ui-text) !important;
  font: 28px/1 "Segoe UI", sans-serif !important;
}

#mapView #mapPanelCloseButton::before,
#mapView #mapPanelCloseButton::after { content: none !important; }

#mapView .public-map-panel.is-fullscreen:not(.is-blog-panel) {
  padding: max(18px, env(safe-area-inset-top)) 24px 0 !important;
  background: var(--ui-surface) !important;
}

#mapView .public-map-panel.is-fullscreen:not(.is-blog-panel) .map-panel-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  min-height: 52px !important;
  width: min(960px, 100%);
  margin: 0 auto 20px !important;
  padding: 0 0 12px 54px !important;
  border-bottom: 1px solid var(--ui-line) !important;
}

#mapView .public-map-panel.is-fullscreen .map-panel-head h2 { font-size: 22px !important; }
#mapView .public-map-panel.is-fullscreen:not(.is-blog-panel) .map-panel-body {
  width: min(960px, 100%);
  margin: 0 auto !important;
  padding: 0 2px max(24px, env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  gap: 20px !important;
}

/* The line chooser fills the screen; route details keep the glass bottom panel. */
#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) {
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)) !important;
  border: 0 !important;
  background: var(--ui-page) !important;
  color: #dedadb !important;
  font-family: Arial, sans-serif;
}

#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) .map-panel-head {
  width: 100%;
  min-height: 60px !important;
  margin: 0 !important;
  padding: 0 0 0 44px !important;
  border: 0 !important;
}

#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) .map-panel-head::after { content: none !important; }
#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) .map-panel-head h2 {
  margin: 0 !important;
  color: inherit !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0;
}

#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) #mapPanelCloseButton { display: none !important; }
#mapView:has(.public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel):not([hidden])) .map-edge-controls {
  top: calc(env(safe-area-inset-top) + 8px) !important;
  left: calc(max(16px, env(safe-area-inset-left)) - 6px) !important;
}

#mapView:has(.public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel):not([hidden])) #mapMenuButton .menu-line {
  width: 18px !important;
  height: 2px !important;
  background: #dedadb !important;
}

#mapView .public-map-panel.is-fullscreen:is(.is-schedules-panel, .is-settings-panel) .map-panel-body {
  width: 100%;
  margin: 0 !important;
  padding: 2px 0 max(24px, env(safe-area-inset-bottom)) !important;
  gap: 8px !important;
}

#mapView .is-schedules-panel .public-line-search { position: relative; width: 100%; margin: 0 !important; }
#mapView .is-schedules-panel .public-line-search input {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px 0 46px;
  border: 0 !important;
  border-radius: 999px !important;
  color: #dedadb !important;
  background: var(--ui-raised) !important;
  font-family: inherit;
  font-size: 16px !important;
  font-weight: 400 !important;
}

#mapView .is-schedules-panel .public-line-search input::placeholder { color: #a29b9d; opacity: 1; }
#mapView .is-schedules-panel .public-line-search span { width: 13px; height: 13px; border-color: #dedadb; }
#mapView .is-schedules-panel .public-line-search span::after { width: 7px; right: -5px; bottom: -3px; background: #dedadb; }
#mapView .is-schedules-panel .public-line-grid {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}

#mapView .is-schedules-panel .public-line-button {
  flex: 0 0 auto;
  width: 80px;
  min-width: 80px !important;
  min-height: 30px !important;
  gap: 6px;
  border: 0 !important;
  border-radius: 14px !important;
  padding: 4px 8px !important;
  background: var(--line-color) !important;
  color: #e5e2e3;
  font: 700 18px/22px Arial, sans-serif;
}

#mapView .is-schedules-panel .public-line-button span { font: inherit; }
#mapView .is-schedules-panel .public-line-button .line-badge-icon { width: 14px; height: 16px; flex: 0 0 14px; background: currentColor; }

@media (pointer: coarse) {
  #mapView .is-schedules-panel .public-line-button { min-height: 40px !important; }
}

#mapView .is-settings-panel .map-settings-stack { width: 100%; margin: 0; gap: 4px !important; }
#mapView .public-map-panel.is-fullscreen.is-settings-panel {
  padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)) !important;
}
#mapView .public-map-panel.is-fullscreen.is-settings-panel .map-panel-head { padding-left: 36px !important; }
#mapView .is-settings-panel .map-settings-section {
  min-height: 152px;
  gap: 0;
  padding: 18px 16px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: var(--ui-raised) !important;
}
#mapView .is-settings-panel .map-settings-section:first-child { border-radius: 16px 16px 4px 4px !important; }
#mapView .is-settings-panel .map-settings-section h3 { margin: 0 0 2px; font-size: 24px; line-height: 30px; font-weight: 700; }
#mapView .is-settings-panel .map-settings-options { gap: 0; }
#mapView .is-settings-panel .check-row { min-height: 42px; gap: 12px; font-size: 16px; font-weight: 400; color: inherit; }
#mapView .is-settings-panel .check-row input { width: 18px; height: 18px; min-height: 18px; margin: 0; flex: 0 0 18px; }
#mapView .is-settings-panel .map-settings-actions button {
  min-height: 56px;
  border-radius: 4px 4px 16px 16px;
  background: var(--ui-raised);
  font-size: 18px;
  font-weight: 700;
}
#mapView .is-settings-panel .map-settings-actions button:is(:hover, :focus-visible) { background: var(--map-accent-deep); }
#mapView .is-settings-panel .settings-action-icon { width: 20px; height: 20px; color: inherit; }

#mapView .public-map-panel.is-bottom {
  --bottom-panel-edge: 16px;
  --bottom-panel-icon-size: 36px;
  --bottom-panel-icon-gap: 8px;
  width: min(600px, calc(100dvw - 32px)) !important;
  max-width: calc(100dvw - 32px) !important;
  height: var(--panel-height, min(46dvh, 440px)) !important;
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top))) !important;
  padding-inline: var(--bottom-panel-edge) !important;
  /* One glass surface shared by stops, courses and favorites. */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .018) 42%, rgba(0, 0, 0, .045)),
    rgba(24, 27, 24, .52) !important;
  -webkit-backdrop-filter: blur(36px) saturate(150%) contrast(106%) !important;
  backdrop-filter: blur(36px) saturate(150%) contrast(106%) !important;
  border: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  box-shadow: 0 18px 54px #00000052, inset 0 1px 0 #ffffff24, inset 1px 0 0 #ffffff0d, inset -1px 0 0 #0000001f !important;
}

#mapView .public-map-panel.is-bottom > .map-panel-grip { height: 12px !important; }
#mapView .public-map-panel.is-bottom > .map-panel-grip::before { width: 36px !important; height: 4px !important; box-shadow: none !important; }
#mapView .public-map-panel.is-bottom .map-panel-head {
  min-height: 44px !important;
  margin-bottom: 0 !important;
  padding-bottom: 8px !important;
}
#mapView .public-map-panel.is-bottom .map-panel-head::after {
  content: "" !important;
  position: absolute !important;
  right: calc(0px - var(--bottom-panel-edge)) !important;
  bottom: -16px !important;
  left: calc(0px - var(--bottom-panel-edge)) !important;
  z-index: 4 !important;
  display: block !important;
  height: 17px !important;
  pointer-events: none !important;
  background: linear-gradient(to bottom, rgba(4, 8, 6, .38), rgba(4, 8, 6, .14) 36%, transparent) !important;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .28) !important;
}
#mapView .public-map-panel.is-bottom .map-panel-head h2 { min-height: 36px !important; font-size: 16px !important; line-height: 1.25 !important; font-weight: 700 !important; }
#mapView .public-map-panel.is-bottom #mapPanelCloseButton,
#mapView .public-map-panel.is-bottom :is(.favorite-stop-button, .vehicle-icon-button, .line-direction-button, .line-loop-indicator) {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  background: rgba(44, 41, 46, .56) !important;
}
#mapView .public-map-panel.is-bottom #mapPanelCloseButton { font-size: 25px !important; }
#mapView .public-map-panel.is-bottom .favorite-stop-button img { width: 21px !important; height: 21px !important; }
#mapView .public-map-panel.is-bottom :is(.vehicle-panel-actions, .line-panel-actions) { top: 12px !important; }
#mapView .public-map-panel.is-bottom :is(.stop-type-icon, .favorite-title-icon) { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 28px; }
#mapView .public-map-panel.is-bottom .stop-panel-title-main { gap: 8px !important; }
#mapView .public-map-panel.is-bottom .map-panel-body {
  background: transparent !important;
  padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  scrollbar-color: rgba(255, 255, 255, .5) transparent;
}

#mapView .public-map-panel.is-bottom .map-panel-body::-webkit-scrollbar-track { background: transparent !important; }
#mapView .departure-info > strong,
#mapView .favorite-stop-heading strong,
#mapView .favorite-departure-direction,
#mapView .route-stop-name strong { font-weight: 600 !important; }
#mapView .departure-status, #mapView .favorite-departure-time { font-size: 13px; font-weight: 500; }
#mapView .route-stop-name strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
#mapView .line-route-actions .map-action-button { background: #ffffff0d !important; font-weight: 600; }
#mapView .departure-list { gap: 0 !important; }
#mapView .departure-card {
  min-height: 70px !important;
  gap: 2px !important;
  padding: 12px var(--bottom-panel-edge) !important;
  margin-inline: calc(0px - var(--bottom-panel-edge));
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#mapView .departure-card:hover,
#mapView .departure-card:focus-within { background: #ffffff08 !important; }
#mapView .departure-card.is-expanded { background: #ffffff10 !important; }
#mapView .departure-card .line-badge { min-width: 38px; min-height: 22px; padding: 0 6px; border-radius: 6px !important; font-size: 13px; }
#mapView .departure-card .line-badge-icon { width: 13px; height: 13px; }
#mapView .departure-main {
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#mapView .departure-info { gap: 7px; }
#mapView .departure-info > strong { white-space: normal; line-height: 1.3; font-size: 14px !important; }
#mapView .departure-status { flex-wrap: wrap; row-gap: 3px; margin-top: 2px; padding-right: 40px; font-size: 13px; line-height: 1.3; }
#mapView .departure-status strong { font-weight: 600; }
#mapView .departure-minutes { position: relative; align-self: start; min-width: 32px; line-height: 22px; }
#mapView .departure-minutes strong { font-size: 14px !important; font-weight: 600; }
#mapView .departure-minutes span { position: absolute; right: 0; top: 22px; font-size: 12px; line-height: 16px; font-weight: 500; }
#mapView .favorite-stop-open {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: 600 15px/1.4 "Segoe UI", system-ui, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
#mapView .favorite-stop-remove { width: 36px; min-width: 36px; height: 36px; border-radius: 50%; background: rgba(44, 41, 46, .56); }
#mapView .favorite-stop-card { background: transparent !important; }
#mapView .favorite-departure-direction { white-space: normal; line-height: 1.4; }
#mapView .public-route-stop[role="button"]:focus-visible { outline-offset: -3px !important; }
#mapView .vehicle-mini-menu { width: min(260px, calc(100dvw - 40px)); max-height: 55dvh; overflow-y: auto; border: 1px solid var(--ui-line); background: var(--ui-surface); }
#mapView .vehicle-mini-menu button { min-height: 44px; font-weight: 500; }
#mapView .departure-actions .show-course-button { min-height: 48px; font-weight: 600 !important; }
#mapView .map-empty-copy { color: var(--ui-muted) !important; padding: 28px 16px; font-size: 15px; font-weight: 400; line-height: 1.6; text-align: center; }
#mapView .favorites-empty { padding: 28px 16px; gap: 12px; }
#mapView .favorites-empty strong { font-size: 18px; font-weight: 600; }

/* The line overview has no selected departure, so it keeps a compact route. */
#mapView .line-route-panel .is-static-route {
  --timeline-left: 1px;
  --timeline-center: 8px;
  --timeline-width: 14px;
  --timeline-radius: 7px;
  --timeline-end-offset: 12px;
  margin: 0 !important;
  padding: 0 0 8px !important;
}
#mapView .line-route-panel .is-static-route .public-route-stop {
  grid-template-columns: 16px minmax(0, 1fr) !important;
  column-gap: 24px !important;
  min-height: 39px !important;
  padding: 0 !important;
}
#mapView .vehicle-course-list.is-static-route {
  --route-time-column: 48px;
  --route-dot-column: 28px;
  --route-column-gap: 0px;
  --timeline-width: 14px;
  --timeline-left: 55px;
  --timeline-center: 62px;
  --timeline-radius: 7px;
  --timeline-end-offset: 12px;
  width: 100%;
  min-width: 0;
  padding-right: 4px !important;
}
#mapView .vehicle-course-list.is-static-route .public-route-stop {
  grid-template-columns: var(--route-time-column) var(--route-dot-column) minmax(0, 1fr) 42px !important;
  grid-template-areas: "time dot stop minutes";
  column-gap: 0 !important;
  width: 100%;
  min-width: 0;
  padding: 0 4px 10px 0 !important;
}
#mapView .vehicle-course-list.is-static-route .route-time { display: grid !important; grid-area: time; min-width: 0; }
#mapView .vehicle-course-list.is-static-route .route-minutes { display: block !important; grid-area: minutes; min-width: 0; }
#mapView .is-static-route .route-dot { grid-area: dot; width: 12px !important; height: 12px !important; }
#mapView .is-static-route .public-route-stop > div { grid-area: stop; width: 100%; min-width: 0; padding-inline: 6px; }
#mapView .is-static-route .route-stop-name { display: flex; width: 100%; min-width: 0; }
#mapView .is-static-route .route-stop-name strong {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}
#mapView .is-static-route .route-status { width: auto !important; max-width: 100%; white-space: normal; overflow-wrap: break-word; word-break: normal; }

/* Keep live-course content in stable columns. Extra vehicle/status icons must not
   participate in grid auto-placement and squeeze the stop name. */
#mapView .vehicle-course-list.is-active-route {
  --route-time-column: 48px;
  --route-dot-column: 28px;
  --route-column-gap: 0px;
  --timeline-width: 14px;
  --timeline-left: 55px;
  --timeline-center: 62px;
  --timeline-radius: 7px;
  --timeline-end-offset: 12px;
  width: 100%;
  min-width: 0;
  padding-right: 4px !important;
}
#mapView .vehicle-course-list.is-active-route .public-route-stop {
  grid-template-columns: var(--route-time-column) var(--route-dot-column) minmax(0, 1fr) 42px !important;
  grid-template-areas: "time dot stop minutes";
  column-gap: 0 !important;
  width: 100%;
  min-width: 0;
  padding: 0 4px 10px 0 !important;
}
#mapView .vehicle-course-list.is-active-route .route-time { grid-area: time; min-width: 0; }
#mapView .vehicle-course-list.is-active-route .route-dot { grid-area: dot; }
#mapView .vehicle-course-list.is-active-route .public-route-stop > div {
  grid-area: stop;
  width: 100%;
  min-width: 0;
  padding-inline: 6px;
}
#mapView .vehicle-course-list.is-active-route .route-minutes { grid-area: minutes; min-width: 0; }
#mapView .vehicle-course-list.is-active-route .route-between-bus {
  grid-area: unset !important;
  grid-column: auto !important;
  grid-row: auto !important;
}
#mapView .vehicle-course-list .route-between-bus {
  left: var(--timeline-center) !important;
  top: var(--between-bus-y, 0px) !important;
}
#mapView .vehicle-course-list .public-route-stop:first-child::before {
  top: calc(50% - var(--timeline-end-offset)) !important;
  bottom: -1px !important;
  height: auto !important;
  border-radius: 999px 999px 0 0 !important;
}
#mapView .vehicle-course-list .public-route-stop:last-child::before {
  top: -1px !important;
  bottom: auto !important;
  height: calc(50% + var(--timeline-end-offset)) !important;
  border-radius: 0 0 999px 999px !important;
}
#mapView .vehicle-course-list .public-route-stop:only-child::before {
  top: calc(50% - var(--timeline-end-offset)) !important;
  bottom: auto !important;
  height: calc(var(--timeline-end-offset) * 2) !important;
  border-radius: 999px !important;
}
#mapView .vehicle-course-list .public-route-stop:first-child,
#mapView .vehicle-course-list .public-route-stop:last-child { overflow: visible !important; }
#mapView .line-route-panel .vehicle-course-list.is-static-route {
  --timeline-left: 1px;
  --timeline-center: 8px;
  --timeline-width: 14px;
  --timeline-radius: 7px;
  --timeline-end-offset: 12px;
  margin: 0 !important;
  padding: 0 0 8px !important;
}
#mapView .line-route-panel .vehicle-course-list.is-static-route .public-route-stop {
  grid-template-columns: 16px minmax(0, 1fr) !important;
  grid-template-areas: "dot stop" !important;
  column-gap: 24px !important;
  min-height: 39px !important;
  padding: 0 !important;
}
#mapView .line-route-panel .vehicle-course-list.is-static-route :is(.route-time, .route-minutes) { display: none !important; }
#mapView .vehicle-course-list .route-dot { width: 10px !important; height: 10px !important; }
#mapView .vehicle-course-list.is-active-route .route-stop-name {
  display: flex;
  width: 100%;
  min-width: 0;
}
#mapView .vehicle-course-list.is-active-route .route-stop-name strong {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}
#mapView .vehicle-course-list.is-active-route .route-status {
  width: auto !important;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
#mapView .line-route-actions { margin: 8px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 4px !important; }
#mapView .line-route-actions .map-action-button { min-width: 0; min-height: 52px; gap: 8px; justify-content: center; padding: 8px; border-radius: 4px !important; background: var(--ui-raised) !important; font-size: 16px; }
#mapView .line-route-actions .map-action-button:first-of-type { border-radius: 16px 4px 4px 16px !important; }
#mapView .line-route-actions .map-action-button:last-of-type { border-radius: 4px 16px 16px 4px !important; }

#mapView .public-brigade-modal-layer { padding: 6px; }
#mapView .public-brigade-modal {
  width: min(600px, calc(100dvw - 12px));
  max-height: calc(100dvh - 12px);
  padding: 80px 16px 0;
  border: 0;
  border-radius: 16px;
  background: var(--ui-page);
  font-family: Arial, sans-serif;
}
#mapView .public-brigade-modal.is-detail { height: min(900px, calc(100dvh - 12px)); }
#mapView .public-brigade-modal-head { margin: 0 16px 24px; }
#mapView .public-brigade-modal-head h2 { font-size: 24px; font-weight: 600; line-height: 30px; }
#mapView .public-brigade-modal-body,
#mapView .public-brigade-modal.is-detail .public-brigade-modal-body {
  min-height: 0;
  margin-right: -16px;
  padding: 8px 16px 16px 0;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffffff80 transparent;
  scrollbar-gutter: stable;
}
#mapView .public-date-strip { grid-template-columns: 24px minmax(0, 1fr) 24px !important; gap: 4px !important; min-height: 46px !important; }
#mapView .public-date-scroll {
  display: flex !important;
  gap: 0 !important;
  min-width: 0;
  overflow-x: auto !important;
  padding: 0;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
#mapView .public-date-button {
  flex: 1 1 20%;
  min-width: 86px;
  min-height: 46px !important;
  padding: 4px 2px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  scroll-snap-align: start;
}
#mapView .public-date-arrow { min-width: 0; min-height: 46px !important; border: 0 !important; background: transparent !important; }
#mapView .public-date-arrow:disabled { opacity: .28; cursor: default; }
#mapView .public-date-button strong { font-size: 14px !important; font-weight: 600 !important; line-height: 18px !important; }
#mapView .public-date-button span { font-size: 13px !important; font-weight: 600 !important; line-height: 16px !important; }
#mapView .public-date-button.is-active { border-bottom-color: color-mix(in srgb, var(--map-accent) 45%, white) !important; color: color-mix(in srgb, var(--map-accent) 45%, white) !important; }
#mapView .brigade-line-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px; }
#mapView .brigade-line-tabs .line-badge { min-width: 80px; min-height: 30px; border-radius: 14px; justify-content: center; }
#mapView .brigade-day-list { gap: 4px; padding-bottom: 0; }
#mapView .public-brigade-modal .brigade-timeline-card {
  grid-template-columns: 42px 16px minmax(0, 1fr);
  gap: 8px;
  min-height: 99px;
  padding: 8px;
  border: 0;
  border-radius: 20px !important;
  background: var(--ui-raised);
  box-shadow: none;
}
#mapView .public-brigade-modal .brigade-timeline-card:is(:hover, :focus-visible) { background: var(--map-accent-deep); }
#mapView .brigade-course-time { padding: 5px 0; font-size: 14px; font-weight: 600; }
#mapView .brigade-course-time b { font-weight: 600; }
#mapView .brigade-timeline-line { width: 16px; background: var(--line-color); border-radius: 8px; }
#mapView .brigade-timeline-line::before { top: 3px; }
#mapView .brigade-timeline-line::after { bottom: 3px; }
#mapView .brigade-course-copy { min-width: 0; gap: 2px; align-content: start; }
#mapView .brigade-course-copy strong { font-size: 14px; line-height: 20px; font-weight: 700; gap: 6px; overflow-wrap: anywhere; }
#mapView .brigade-course-copy .line-badge { min-height: 22px; padding: 0 6px; font-size: 14px; border-radius: 6px; }
#mapView .brigade-course-copy small { font-size: 13px; line-height: 18px; font-weight: 600; }
#mapView .brigade-break { margin: 0 0 0 32px; font-size: 13px; line-height: 16px; font-weight: 600; }
#mapView .public-brigade-modal .public-brigade-list.is-picker {
  gap: 0 !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: var(--ui-raised) !important;
}
#mapView .public-brigade-modal .public-brigade-choice {
  padding: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#mapView .public-brigade-modal .public-brigade-choice + .public-brigade-choice { border-top: 1px solid rgba(0, 0, 0, .28) !important; }
#mapView .public-brigade-modal .public-brigade-choice:first-child { border-radius: 16px 16px 0 0 !important; }
#mapView .public-brigade-modal .public-brigade-choice:last-child { border-radius: 0 0 16px 16px !important; }
#mapView .public-brigade-modal .public-brigade-choice:only-child { border-radius: 16px !important; }
#mapView .public-brigade-modal .public-brigade-choice strong { font-size: 14px !important; font-weight: 500 !important; line-height: 20px; text-align: left; }
#mapView .public-brigade-modal .public-brigade-choice:is(:hover, :focus-visible) { background: var(--map-accent-deep) !important; }
#mapView .live-icon.is-passed { opacity: .62; }
#mapView .departure-passed-label { font-size: 13px; color: var(--ui-muted); }
#mapView .brigade-schedule-empty { font-size: 15px !important; font-weight: 400 !important; }
#mapView .brigade-modal-icon { width: 34px !important; height: 34px !important; }
#mapView .map-theme-popover { max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--ui-surface); }
#mapView .map-theme-grid { gap: 20px; padding: 24px 8px 8px; }
#mapView .map-theme-choice, #mapView .map-theme-close { width: 44px; height: 44px; min-width: 44px; }
#mapView .public-blog-content { line-height: 1.75; overflow-wrap: anywhere; }
#mapView .public-map-panel.is-blog-panel,
#mapView .public-map-panel.is-blog-panel .map-panel-body,
#mapView .public-blog-screen { background: var(--ui-page) !important; }
#mapView .public-blog-screen {
  max-width: none;
  margin: 0;
  padding: env(safe-area-inset-top) max(24px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  font-family: Arial, sans-serif;
}
#mapView .public-blog-topbar { min-height: 60px; margin-inline: -14px; padding: 0; border: 0; }
#mapView .public-blog-icon-button { width: 44px; height: 44px; border-radius: 50%; background: transparent; }
#mapView .public-blog-icon-button .ui-icon { width: 18px; height: 18px; }
#mapView .public-blog-icon-button:is(:hover, :focus-visible) { background: var(--ui-raised); }
#mapView .public-blog-screen > h1 { margin: 18px 16px 34px; font-size: 24px; font-weight: 700; line-height: 29px; overflow-wrap: anywhere; }
#mapView .public-blog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#mapView .public-blog-card {
  min-width: 0;
  min-height: 380px;
  grid-template-rows: 220px 1fr;
  border: 0;
  border-radius: 24px;
  background: var(--ui-raised);
  transition: background-color 160ms ease;
}
#mapView .public-blog-card:is(:hover, :focus-visible) { background: var(--map-accent-deep); }
#mapView .public-blog-card-image { height: 220px; border-radius: 24px; }
#mapView .public-blog-card-copy { padding: 18px 16px 24px; gap: 10px; }
#mapView .public-blog-card-copy strong { font-size: 24px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
#mapView .public-blog-card-copy small { font-size: 14px; line-height: 20px; font-weight: 400; color: #ffffffb3; }
#mapView .public-blog-date { font-weight: 400; color: var(--ui-muted); }
@media (max-width: 1200px) { #mapView .public-blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { #mapView .public-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  #mapView .public-blog-grid { grid-template-columns: minmax(0, 1fr); }
  #mapView .public-blog-screen { padding-inline: 16px; }
  #mapView .public-blog-topbar { margin-inline: -6px; }
  #mapView .public-blog-screen > h1 { margin-left: 8px; }
}
#mapView .public-blog-empty { margin: 24px 0; padding: 32px 20px; border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-raised); color: var(--ui-muted); font-weight: 400; text-align: center; }
#mapView .public-blog-retry { min-height: 44px; padding: 10px 18px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--map-accent-deep); color: var(--ui-text); font: inherit; cursor: pointer; }

body.is-public-map-open .cookie-notice {
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border-radius: 16px;
}
body.is-public-map-open .cookie-actions { flex-wrap: wrap; }
body.is-public-map-open .cookie-actions button { min-height: 44px; font-weight: 600; }

@media (max-width: 600px) {
  #mapView .public-map-panel.is-bottom { width: calc(100dvw - 16px) !important; max-width: calc(100dvw - 16px) !important; }
  #mapView .public-map-panel.is-fullscreen:not(.is-blog-panel):not(.is-schedules-panel):not(.is-settings-panel) { padding-inline: 16px !important; }
  #mapView .public-map-panel.is-fullscreen:not(.is-blog-panel):not(.is-schedules-panel):not(.is-settings-panel) .map-panel-head { padding-left: 56px !important; margin-bottom: 16px !important; }
  #mapView .public-map-panel.is-fullscreen .map-panel-head h2 { font-size: 20px !important; }
  #mapView .map-settings-section { padding: 16px !important; }
  #mapView .favorite-departure-list { padding-left: 0; }
  #mapView .line-route-actions .map-action-button { font-size: 13px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  #mapView *, #mapView *::before, #mapView *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-height: 500px) {
  #mapView .public-map-panel.is-bottom { height: var(--panel-height, 76dvh) !important; }
  #mapView .favorites-empty { min-height: 150px; padding-block: 16px; }
}

@media (max-width: 420px) {
  #mapView .public-map-panel.is-bottom .stop-panel-title-main > span:last-child { white-space: normal !important; overflow-wrap: anywhere; }
}
