/* The header and search dock stay available while the current screen scrolls. */
:root {
  --navigation-height: 112px;
}

html {
  scroll-padding-bottom: max(8px, env(safe-area-inset-bottom));
}

#topDock {
  position: sticky;
  top: 0;
  z-index: 720;
}

#home {
  padding: 0 max(8px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));
}

#home .brand {
  display: flex;
  gap: 4px;
  max-width: 960px;
  min-height: 48px;
}

#home h1 {
  flex: 1;
  min-width: 0;
  font-size: clamp(14px, 4.4vw, 19px);
  line-height: 1.2;
}

#brandHomeLink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

#home .header-action,
#sideMenuToggle {
  display: grid;
  place-items: center;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

#sideMenuToggle {
  width: 44px;
  flex: none;
  font-size: 23px;
}

#home .header-action:hover,
#sideMenuToggle:hover {
  background: #ffffff22;
}

#sideMenu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(var(--side-width, 245px), 88vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: #f4f8fb;
  color: var(--ink);
  overscroll-behavior: contain;
}

#sideMenu::backdrop {
  background: #10243a8f;
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sideMenuClose {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  font-size: 23px;
}

#sideMenu #modePicker {
  margin: 8px 0;
  padding: 0;
}

#sideMenu #modePicker button {
  min-height: 44px;
  white-space: nowrap;
}

#sideMenu #pageTabs {
  position: static;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.side-menu-group {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 4px;
  margin-top: 9px;
}

.side-menu-group:first-child button,
.side-menu-group h2 {
  grid-column: 1 / -1;
}

.side-menu-group h2 {
  margin: 0 0 3px;
  font-size: 13px;
  color: #485e71;
}

#sideMenu .side-menu-group button,
#sideMenu .side-menu-group a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 6px;
  border: 1px solid #c9d8e5;
  border-radius: 6px;
  background: white;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}

#sideMenu .side-menu-group [aria-current="page"] {
  border-color: #77a8c8;
  outline: 0;
  background: #d9ebf7;
}

.side-menu-width {
  margin: 12px 0 4px;
  font-size: 13px;
}

#assistantPanel {
  position: relative;
  margin: 0;
  padding: 4px max(7px, env(safe-area-inset-right)) 4px max(7px, env(safe-area-inset-left));
  border-bottom: 3px solid #ffae68;
  border-radius: 0;
  background: #bc3f09;
}

#siteSearchForm {
  max-width: 960px;
  margin: auto;
}

#assistantPanel .search-field {
  min-height: 46px;
  padding: 0 2px;
  box-shadow: none;
}

#assistantPanel .search-field input[type="search"] {
  padding-inline: 10px 0;
  font-size: 16px;
}

#assistantPanel .search-notice {
  margin: 2px 4px 0;
  color: #ffedc4;
  font-size: 11px;
  line-height: 1.3;
}

#assistantPanel #siteSearchSubmit {
  background: #a63206;
  color: white;
}

#assistantPanel :is(#searchVoiceStatus, #assistantImageStatus, #searchInputStatus) {
  color: white;
}

#assistantPanel .search-field:focus-within {
  outline-color: #ffd49e;
}

#assistantPanel #searchVoiceButton[data-listening] {
  background: #f9d9dc;
  color: #9b2329;
}

#searchAttachmentOptions:not([hidden]) {
  inset: calc(100% + 4px) 0 auto auto;
  max-height: 45dvh;
  overflow: auto;
}

#searchAttachmentOptions button {
  min-height: 44px;
}

#assistantImagePreview:not([hidden]) {
  max-height: 30dvh;
  overflow: auto;
  align-items: flex-start;
}

#offlineMaps {
  padding: 8px;
}

#offlineMaps h2 {
  font-size: 17px;
}

#mapEmpty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  padding: 44px 8px 4px;
  border: 1px solid #d6e4ee;
  border-radius: 8px;
  background: #f1f7fb;
}

#mapEmpty[hidden] {
  display: none;
}

#mapEmpty p {
  flex: 1 1 145px;
  font-size: 13px;
}

#mapEmpty a {
  width: auto;
  min-height: 44px;
  font-size: 13px;
}

#mapFrame {
  position: relative;
  isolation: isolate;
  width: min(100%, 92dvh);
  margin: 0 auto;
}



.map-tools {
  position: absolute;
  z-index: 3;
  inset: 4px 4px auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
}

#mapPlaceForm,
.map-tools-actions button {
  pointer-events: auto;
  background: white;
  border: 1px solid #9eb1c0;
  border-radius: 7px;
}

#mapPlaceForm {
  display: flex;
  width: min(164px, calc(50% - 20px));
}

#mapPlaceForm input {
  flex: 1;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0 0 0 6px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

#mapPlaceForm button,
.map-tools-actions button:not([hidden]) {
  display: grid;
  place-items: center;
  flex: none;
  width: 33px;
  min-height: 34px;
  margin: 0;
  padding: 0;
  color: #123b5d;
}

#mapPlaceForm button {
  border: 0;
  background: transparent;
}

.map-search-icon {
  position: relative;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.map-search-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 7px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.map-tools-actions {
  display: flex;
  gap: 3px;
}

.map-tools-actions button:not([hidden]) {
  display: flex;
  justify-content: center;
  gap: 3px;
  width: auto;
  min-height: 36px;
  padding: 0 6px;
  font-size: 12px;
}

#mapPinToggle[aria-pressed="true"] {
  background: #9d3610;
  color: white;
}

#mapHereShortcut span {
  font-size: 15px;
}

#mapTopViewport {
  position: relative;
}

#mapTopViewport #mapLegendToggle {
  position: absolute;
  z-index: 4;
  bottom: 19px;
  left: 4px;
  width: auto;
  height: 34px;
  padding: 0 7px;
  border: 1px solid #9eb1c0;
  border-radius: 6px;
  background: white;
  font-size: 12px;
}

#mapLegend {
  box-sizing: border-box;
  width: min(540px, calc(100% - 22px));
  max-width: none;
  max-height: none;
  padding: 12px;
  overflow: visible;
  border: 1px solid #9eb1c0;
  border-radius: 10px;
  background: white;
  color: #123b5d;
}

#mapLegend::backdrop { background: #142f4959; }

.map-legend-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#mapLegend .map-legend-heading h2 { margin: 0; }

#mapLegend .map-legend-heading button {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 5px 9px;
}

#mapLegend ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

#mapLegend li {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  font-size: 13px;
  line-height: 1.3;
}

#mapLegend li span {
  flex: none;
  width: 14px;
}

#mapLegend .note { margin: 0; }

@media (min-width: 560px) and (max-height: 430px) {
  #mapLegend ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

#mapLegend .legend-route { border-top: 3px solid #9a2370; }
#mapLegend .legend-original { border-top: 3px dashed #0067bf; }
#mapLegend .legend-road { border-top: 3px dotted #8a5400; }
#mapLegend .legend-area { height: 10px; background: #d4334d60; border: 1px solid #b42336; }
#mapLegend .legend-location { width: 12px; height: 12px; border: 2px solid white; outline: 1px solid #0761bc; border-radius: 50%; background: #0761bc; }
#mapLegend .legend-pin { width: 10px; height: 10px; border-radius: 50%; background: #c2410c; }
#mapLegend .legend-shelter { width: 18px; height: 18px; border-radius: 4px; background: #1264aa; }
#mapLegend .legend-evacuation { width: 18px; height: 18px; border-radius: 4px; background: #b14a12; }

#mapLegend .legend-tag {
  display: grid;
  place-items: center;
  height: 18px;
  border-radius: 2px;
  color: white;
  font-size: 10px;
  font-weight: 700;
}

#mapLegend .legend-water { background: #007c88; }
#mapLegend .legend-stay { background: #286548; }
#mapLegend .legend-support { background: #6936a4; }
#mapLegend .legend-memo { width: auto; color: #9a2727; font-weight: 700; }

.place-choices:not([hidden]) {
  display: grid;
  gap: 3px;
  margin: 3px 0 6px;
}

.place-choices button {
  min-height: 44px;
  margin: 0;
  padding: 5px 8px;
  border-color: #b6c9da;
  background: #f3f8ff;
  text-align: left;
  font-size: 13px;
  overflow-wrap: anywhere;
}

#mapPlaceStatus {
  margin: 4px 0;
}

:is(#autoRouteStatus, #routePointStatus, #mapPlaceStatus, .route-place-error)[data-tone="error"],
.route-place-error:not([hidden]) {
  padding: 6px 8px;
  border-left: 3px solid #b4232c;
  background: #fff0f0;
  color: #8c2027;
}

#autoRouteForm input[aria-invalid="true"] {
  border: 2px solid #b4232c;
  background: #fff5f5;
}

.route-place-error {
  margin: 3px 0 6px;
  font-size: 13px;
}

#offlineCanvas {
  display: block;
  border-radius: 8px;
  touch-action: none;
  cursor: grab;
}

#offlineCanvas:active {
  cursor: grabbing;
}

#mapTopViewport button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #123b5d;
  line-height: 1;
  touch-action: manipulation;
}

.map-directions button {
  position: absolute;
  z-index: 2;
}

.map-directions span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #9eb1c0;
  border-radius: 5px;
  background: #fffffff5;
  font-size: 12px;
}

.map-directions [data-map-move="north"] { top: 0; left: 50%; transform: translateX(-50%); }
.map-directions [data-map-move="south"] { bottom: 0; left: 50%; transform: translateX(-50%); }
.map-directions [data-map-move="west"] { left: 0; top: 50%; transform: translateY(-50%); }
.map-directions [data-map-move="east"] { right: 0; top: 50%; transform: translateY(-50%); }

#mapZoomControls {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  display: flex;
  align-items: center;
  border: 1px solid #9eb1c0;
  border-radius: 7px;
  background: #fffffff5;
}

#mapZoomControls button {
  font-size: 20px;
}

#mapZoomControls button + button {
  border-left: 1px solid #d6e4ee;
}

#mapTopViewport #mapControlDragHandle {
  width: 32px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#mapControlDragHandle:active {
  cursor: grabbing;
}

#mapAttribution {
  margin: 3px 0 0;
  font-size: 11px;
  text-align: right;
}

#mapRouteTools {
  margin: 6px 0;
  padding: 6px;
  border: 1px solid #ccdce8;
  border-radius: 8px;
  background: #f4f8fb;
}

.map-route-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
}

#mapRouteSelector:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 13px;
}

#mapRouteSelector select {
  width: auto;
  min-height: 44px;
  padding: 4px 6px;
  font-size: 16px;
}

#routeBuildToggle {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 4px 8px;
  font-size: 13px;
}

#routeBuildStep:not([hidden]) {
  margin-top: 6px;
  padding: 6px;
  border-top: 1px solid #ccdce8;
}

#mapPinRouteActions:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  width: 100%;
}

#mapPinRouteActions button {
  min-height: 40px;
  padding: 4px 7px;
  border: 1px solid #aac2d5;
  background: #eef7ff;
  border-radius: 6px;
  text-decoration: none;
}

#mapPinMemo {
  flex: 1 0 100%;
  margin: 0;
}

#mapPinMemoInput {
  width: 100%;
  min-height: 56px;
  font-size: 16px;
}

#savedRouteMemoList {
  margin: 4px 0;
  padding-inline-start: 1.4em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#offlineRouteStatus {
  margin: 4px 0;
  font-size: 12px;
}

#mapShortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin-top: 4px;
}

#mapShortcuts a:not([hidden]),
#mapShortcuts button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 3px;
  font-size: 12px;
  font-weight: 700;
}

#mapShortcuts button {
  width: auto;
  margin: 0;
  border: 0;
  color: #12558c;
  text-decoration: underline;
}

#floatingScrollNav:not([hidden]) {
  position: fixed;
  right: max(2px, env(safe-area-inset-right));
  bottom: max(calc(10px + env(safe-area-inset-bottom)), min(var(--floating-scroll-bottom, 76px), calc(100dvh - var(--navigation-height) - 120px)));
  z-index: 705;
  display: grid;
  gap: 1px;
  padding: 2px;
  border-radius: 6px;
  background: #123b5dbe;
  touch-action: none;
  cursor: grab;
}

#floatingScrollNav button {
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}

#floatingScrollNav .scroll-end-top { border-top: 2px solid currentColor; }
#floatingScrollNav .scroll-end-bottom { border-bottom: 2px solid currentColor; }
#floatingScrollNav.dragging { opacity: .8; }

@media print {
  body { padding-bottom: 0; }
  #assistantPanel, #sideMenu, #floatingScrollNav { display: none !important; }
}

.related-links:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  margin: 3px 0;
  padding: 0;
  list-style: none;
}

.related-links a,
.related-links button,
main button.section-share {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #12558c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}

#shareMapFrame { position: relative; isolation: isolate; }

#shareGps {
  position: absolute;
  z-index: 500;
  top: 5px;
  right: 5px;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 3px 7px;
  font-size: 12px;
  background: white;
}

#sharePinMap {
  height: clamp(170px, 33dvh, 245px);
  overflow: hidden;
  border: 1px solid #abb7c3;
  border-radius: 8px;
  background: #e7eef5;
}

#sharePinMap > p { padding: 5px 8px; }
#shareMapOptions small { color: #506377; font-weight: 400; }
:is(#shareGpsStatus, #sharePinStatus, #position):empty { display: none; }
#autoRouteStatus[data-tone="success"] { border-left-color: #23744e; background: #edf9f2; color: #195538; }
#offlineCanvas.map-pinning { cursor: crosshair; }

.stage-guide details {
  margin: 3px 0;
  padding: 0 8px;
}

.stage-guide summary {
  min-height: 40px;
  padding: 7px 0;
  font-size: 14px;
}

.stage-guide ul {
  margin: 0 0 7px;
  padding-left: 20px;
}

.stage-guide li {
  padding: 2px 0;
  font-size: 14px;
}

.stage-guide li span {
  display: block;
  color: #40566c;
  font-size: 12px;
}

/* Compact white tool strips: keep controls off the map image. */
#mapEmpty {
  padding: 5px 7px 6px;
}
#mapFrame .map-tools {
  position: relative;
  inset: auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-height: 42px;
  gap: 6px;
  padding: 3px 5px;
  border: 1px solid #d6e4ee;
  border-radius: 8px 8px 0 0;
  background: #fff;
  pointer-events: auto;
}
#mapFrame #mapPlaceForm {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 255px;
  width: auto;
  height: 34px;
  margin: 0;
  overflow: hidden;
}
#mapFrame #mapPlaceForm input {
  min-width: 0;
  width: 100%;
  height: 32px;
  line-height: 32px;
}
#mapFrame .map-tools-actions {
  flex: none;
  min-width: 0;
}
#mapFrame .map-tools-actions #mapHereShortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  height: 34px;
  min-height: 34px;
  padding: 0 7px;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
#mapTopViewport[hidden] { display:none; }
#mapTopViewport:not([hidden]){
  display:block;
  position:relative;
  width:100%;
}
#mapCanvasSurface {
  position:relative;
  width:100%;
  overflow:hidden;
}
#mapTopViewport #offlineCanvas {
  display:block;
  width:100%;
  height:auto;
  max-height:none;
  border-radius:0;
}
#mapCanvasSurface .map-directions {
  pointer-events:none;
}
#mapCanvasSurface .map-directions button {
  pointer-events:auto;
}
#mapRightControls {
  position:absolute;
  z-index:5;
  inset:5px 5px 5px auto;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
  pointer-events:none;
}
#mapRightControls button {
  pointer-events:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:70px;
  width:auto;
  min-height:38px;
  margin:0;
  padding:4px 6px;
  border:1px solid #7997ad;
  border-radius:8px;
  background:#fffffff2;
  color:#134968;
  font:bold 12px system-ui;
  box-shadow:0 1px 4px #102d4240;
  touch-action:manipulation;
}
#mapRightControls #mapOrientationToggle[aria-pressed="true"] {
  color:#fff;
  background:#1769aa;
  border-color:#1769aa;
}
#mapCompassNeedle {display:inline-block;font-size:15px;color:#df4c2a;transform-origin:center}
#mapRightControls #mapOrientationToggle[aria-pressed="true"] #mapCompassNeedle {color:#fff}
#mapRightControls #mapHereShortcut {background:#e4f5ff;color:#075592;border:2px solid #2076b5}
#mapRightControls #mapHereShortcut span {font-size:20px;line-height:1}
#mapRightControls #walkNavToggle {margin-top:7px;background:#e8f6ed;border-color:#36805b;color:#165c3a}
#mapRightControls #walkNavToggle[aria-pressed="true"] {background:#be4922;color:#fff;border-color:#983a1e}
#mapBottomToolbar {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:5px;
  width:100%;
  height:43px;
  padding:4px 5px;
  border:1px solid #d6e4ee;
  border-top:0;
  border-radius:0 0 8px 8px;
  box-sizing:border-box;
  background:#fff;
}
#mapTopViewport #mapLegendToggle,
#mapTopViewport #mapPlaceLabelsToggle {
  position:static;
  inset:auto;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-width:67px;
  height:34px;
  min-height:34px;
  padding:0 7px;
  margin:0;
  border:1px solid #9eb1c0;
  border-radius:6px;
  background:#f8fafc;
  color:#123b5d;
  font:bold 12px system-ui;
  white-space:nowrap;
}
#mapTopViewport #mapZoomControls {
  position:static!important;
  inset:auto!important;
  display:flex;
  flex:0 0 auto;
  align-items:center;
  width:auto;
  height:34px;
  margin:0 0 0 auto;
  padding:0;
  border:1px solid #9eb1c0;
  border-radius:6px;
  background:#fff;
}
#mapTopViewport #mapZoomControls button {
  display:grid;
  place-items:center;
  width:39px;
  height:33px;
  min-height:33px;
  margin:0;
  padding:0;
  font-size:21px;
}
#mapTopViewport #mapZoomControls #mapControlDragHandle {
  display:none!important;
}
@media(max-width:360px){
  #mapBottomToolbar{gap:3px;padding:3px}
  #mapTopViewport #mapLegendToggle,
  #mapTopViewport #mapPlaceLabelsToggle{min-width:59px;padding:0 5px;font-size:11px}
  #mapTopViewport #mapZoomControls button{width:34px}
  #mapFrame .map-tools-actions #mapHereShortcut{padding:0 5px}
}


/* Small-screen layout guardrails: resize controls or stack them, never crop labels. */
@media (max-width: 650px) {
  main, main > [data-pane], main section, main article, main details, main form,
  main fieldset, main .route-step, main .task-card {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  main :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  main :is(button, .btn, summary) {
    overflow-wrap: anywhere;
  }
  main :is(.row, .route-actions, .related-links) {
    flex-wrap: wrap;
    min-width: 0;
  }
  main :is(pre, table) {
    max-width: 100%;
    overflow-x: auto;
  }
  #assistantPanel .search-field > input { min-width: 0; }
  #favoriteRouteHub .favorite-route-row { min-width: 0; }
  #favoriteRouteHub .favorite-route-label { overflow-wrap: anywhere; }
  #mapRouteTools .map-route-bar { flex-wrap: wrap; }
  #mapRouteTools .map-route-bar > * { min-width: 0; }
}
@media (max-width: 380px) {
  #home .brand { gap: 2px; }
  #home h1 { font-size: clamp(12px, 3.7vw, 15px); }
  #home .header-action { padding-inline: 4px; font-size: 11px; }
  #sideMenuToggle { width: 37px; font-size: 21px; }
  .route-location-grid, .compact-pair-grid { grid-template-columns: 1fr!important; }
  #favoriteRouteHub .favorite-route-row { grid-template-columns: minmax(0,1fr); }
  #favoriteRouteHub .favorite-buttons { display: flex; flex-wrap: wrap; }
  #favoriteRouteHub .favorite-buttons button { flex: 1 1 auto; }
  #mapRouteTools .map-route-bar > :is(button, label) { flex: 1 1 100%; }
  #mapRouteTools #mapRouteSelector select { width: 100%; }
}

/* One-tap compact AI search bar on both Android and iPhone. */
#assistantPanel{position:relative}
#assistantPanel #assistantFoldToggle{
  position:absolute;right:6px;bottom:3px;z-index:4;
  display:flex;align-items:center;justify-content:center;
  width:36px;min-width:36px;height:24px;min-height:24px;
  margin:0!important;padding:0!important;
  border:1px solid #ffd4a2;border-radius:6px;
  background:#ffe2ba;color:#733008;
  font-size:17px;font-weight:850;line-height:1;
}
#assistantPanel[data-collapsed="false"] .search-notice{padding-right:41px}
#assistantPanel[data-collapsed="true"]{
  padding:3px max(7px,env(safe-area-inset-right)) 3px max(7px,env(safe-area-inset-left));
  border-bottom-width:2px;
}
#assistantPanel[data-collapsed="true"] #siteSearchForm{display:none!important}
#assistantPanel[data-collapsed="true"] #assistantFoldToggle{
  position:static;display:flex;justify-content:space-between;
  width:100%;max-width:960px;height:31px;min-height:31px;
  padding:3px 12px!important;margin:0 auto!important;
  background:#fff1da;color:#80310c;
  border:1.5px solid #ffbd71;border-radius:8px;
  font-size:14px;line-height:1.3;text-align:left;
}

/* Always-visible warning shortcut to the right of AI search, even when folded. */
#assistantPanel #mapLiveAlertsOpen{
  position:absolute;top:4px;right:7px;z-index:7;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  box-sizing:border-box;width:64px;min-width:64px;height:46px;min-height:46px;
  margin:0!important;padding:2px!important;border:2px solid #ffdb9a;border-radius:10px;
  background:#fff8dd;color:#9b2e16;box-shadow:0 1px 4px #42210b40;
  font-size:11px;font-weight:900;line-height:1.03;text-align:center;white-space:nowrap
}
#assistantPanel #mapLiveAlertsOpen span:first-child{font-size:18px;line-height:1.05}
#assistantPanel #mapLiveAlertsOpen:focus-visible{outline:3px solid #ffdf65;outline-offset:1px}
#assistantPanel[data-collapsed="false"] #siteSearchForm>.search-field{margin-right:69px}
#assistantPanel[data-collapsed="true"] #assistantFoldToggle{
  width:calc(100% - 69px)!important;max-width:calc(100% - 69px)!important;
  margin-left:0!important;margin-right:0!important
}
#assistantPanel[data-collapsed="true"] #mapLiveAlertsOpen{
  top:3px;right:7px;height:31px;min-height:31px;
  flex-direction:row;gap:1px;border-radius:7px;font-size:9px;line-height:1.02
}
#assistantPanel[data-collapsed="true"] #mapLiveAlertsOpen span:first-child{font-size:16px}
