.map-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.explorer {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
}
.explorer.locations-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.discovery[hidden],
.locations-toggle[hidden] {
  display: none;
}
.locations-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.locations-toggle svg {
  flex-shrink: 0;
}
.discovery {
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 2;
}
.search-panel {
  padding: 28px 24px 14px;
  flex-shrink: 0;
  max-height: 65%;
  overflow-y: auto;
}
.search-panel h1 {
  font-size: 31px;
  letter-spacing: -1.2px;
  margin-bottom: 8px;
  line-height: 1.15;
}
.intro {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #c9d1d4;
  box-shadow: 0 2px 4px #202c3505;
  border-radius: 10px;
  padding: 4px 4px 4px 12px;
  background: white;
}
.search-box > span {
  font-size: 25px;
  color: var(--muted);
}
.search-box input {
  min-width: 0;
  border: 0;
  padding: 10px;
  min-height: 44px;
  background: transparent;
  font-size: 16px;
}
.search-box button {
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: white;
  font-size: 23px;
}
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.filter-toolbar .button {
  min-height: 44px;
  padding: 8px 12px;
}
.coverage {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.view-switch {
  display: none;
}
#filters {
  padding-top: 16px;
}
#filters select {
  margin-bottom: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips:not(:empty) {
  padding-top: 12px;
}
.chip {
  min-height: 32px;
  border: 1px solid #ead2d7;
  background: var(--tint);
  color: var(--accent);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
}
.results-heading {
  padding: 16px 24px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.results-heading h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
  margin: 0 0 3px;
}
.results-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.camera-list {
  flex: 1;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 0 12px 16px;
}
.camera-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  text-align: left;
  width: 100%;
  padding: 18px 12px;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  min-height: 104px;
}
.camera-row:hover {
  background: var(--wash);
}
.camera-row[aria-pressed="true"] {
  background: var(--tint);
  box-shadow: inset 3px 0 var(--accent);
}
.camera-row .street {
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.camera-row .segment {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  grid-column: 1;
}
.camera-row .row-meta {
  font-size: 10px;
  color: var(--muted);
  grid-column: 1;
}
.camera-row .speed {
  grid-column: 2;
  grid-row: 1/4;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--wash);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}
.speed small {
  font-size: 9px;
  font-weight: 500;
  margin-top: 4px;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #0002;
}
.green {
  background: #287655;
}
.yellow {
  background: #b18b22;
}
.orange {
  background: #ce7024;
}
.red {
  background: #bd304b;
}
.panel-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-footer a {
  margin-left: auto;
  font-size: 10px;
}
.source-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #287655;
}
.map-region {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.map-notice {
  padding: 13px 22px;
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  z-index: 600;
}
.map-notice > span {
  color: var(--muted);
}
.map-notice summary {
  color: var(--muted);
  min-height: 20px;
}
.map-notice p {
  max-width: 800px;
  line-height: 1.7;
  margin: 12px 0 0;
}
@media (min-width: 769px) {
  .map-notice {
    align-items: center;
    padding: 8px 14px;
  }
  .map-notice > details {
    min-width: 0;
  }
}
.map-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}
#map {
  height: 100%;
  background: #e9eeec;
  z-index: 1;
}
.area-button {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.map-status {
  position: absolute;
  top: 76px;
  left: 16px;
  right: 70px;
  z-index: 501;
  max-width: 480px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.map-status span {
  display: block;
}
.map-legend {
  position: absolute;
  left: 24px;
  bottom: 36px;
  z-index: 450;
  padding: 14px 18px;
  background: #fffffff5;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 11px;
}
.map-legend .legend-title {
  font-weight: 650;
  min-height: 20px;
  margin: 0;
}
.map-legend .legend-title > span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.legend-items {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}
.legend-items span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-legend .legend-note {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 0;
}
.camera-details {
  position: absolute;
  top: 20px;
  left: 24px;
  width: 340px;
  max-width: calc(100% - 92px);
  max-height: calc(100% - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 550;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 12px 48px #202c3526;
}
.detail-summary, .detail-footer { flex-shrink: 0; }
.detail-heading { display: flex; align-items: flex-start; gap: 8px; }
.camera-details h2 {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.detail-heading .detail-close { width: 44px; height: 44px; flex-shrink: 0; }
.detail-range { font-size: 12px; color: var(--muted); line-height: 1.4; margin: 0 0 6px; overflow-wrap: anywhere; }
.detail-key-facts { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 1.4; }
.detail-compact-speed { font-weight: 700; white-space: nowrap; }
.detail-status { font-weight: 600; }
.detail-toggle { display: block; min-height: 44px; padding: 8px 0; font-size: 12px; }
#detail-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; font-size: 13px; line-height: 1.6; }
#detail-content[hidden] { display: none; }
.detail-actions { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.detail-actions .button { flex: 1; min-width: 0; padding: 10px 8px; font-size: 12px; }
#share-result { margin: 4px 0 0; font-size: 11px; }
#share-result:empty { margin: 0; }
.empty-state {
  padding: 28px 12px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 14px;
}
.empty-state h3 {
  color: var(--ink);
  font-size: 18px;
}
.leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  color: var(--ink) !important;
}
.leaflet-top.leaflet-right {
  top: 10px;
  right: 10px;
}
.leaflet-control-attribution {
  font-size: 10px !important;
}
.leaflet-interactive {
  cursor: pointer;
}
.leaflet-container a {
  color: #a32440;
}
.leaflet-container:focus-visible {
  outline-offset: -3px;
}
.details-open .area-button {
  left: auto;
  right: 76px;
  transform: none;
}
.detail-close {
  width: 36px;
  height: 36px;
  font-size: 22px;
}
.detail-notice {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}
@media (min-width: 769px) {
  .map-legend {
    min-width: 240px;
  }
}
@media (max-width: 1100px) and (min-width: 769px) {
  .explorer {
    grid-template-columns: 350px minmax(0, 1fr);
  }
  .camera-details {
    width: 300px;
  }
  .search-panel {
    padding-inline: 20px;
  }
  .details-open .area-button {
    top: auto;
    bottom: 120px;
    right: 20px;
  }
}
@media (max-width: 768px) {
  .explorer {
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .discovery {
    display: contents;
  }
  .search-panel {
    order: 0;
    background: white;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--line);
    max-height: 55%;
    overflow: auto;
    z-index: 3;
  }
  .search-panel .eyebrow,
  .search-panel h1,
  .search-panel .intro {
    display: none;
  }
  .search-panel label[for="search"] {
    font-size: 12px;
    margin-bottom: 7px;
  }
  .search-box input {
    font-size: 16px;
  }
  .filter-toolbar {
    margin-top: 10px;
  }
  .coverage {
    display: none;
  }
  .view-switch {
    display: flex;
    margin-left: auto;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
  }
  .view-switch button {
    border: 0;
    min-height: 38px;
    min-width: 58px;
    border-radius: 5px;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
  }
  .view-switch button[aria-pressed="true"] {
    background: white;
    color: var(--accent);
    box-shadow: 0 1px 4px #202c3515;
  }
  .results-heading {
    order: 1;
    background: white;
    padding: 10px 16px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    min-height: 55px;
  }
  .results-heading h2 {
    font-size: 13px;
  }
  .results-heading p {
    font-size: 10px;
  }
  .camera-list {
    display: none;
    order: 2;
    background: white;
    padding: 0 12px 16px;
  }
  .panel-footer {
    display: none;
  }
  .map-region {
    order: 2;
    flex: 1;
    min-height: 0;
  }
  .map-notice {
    padding: 9px 14px;
    font-size: 10px;
    gap: 7px;
  }
  .map-notice summary {
    min-height: 18px;
  }
  .map-legend {
    bottom: 26px;
    left: 12px;
    padding: 8px 10px;
    max-width: calc(100% - 24px);
    font-size: 10px;
    border-radius: 10px;
    background: rgb(255 255 255 / 84%);
    border-color: rgb(255 255 255 / 65%);
    box-shadow: 0 2px 10px #202c350a;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    pointer-events: none;
  }
  .map-legend .legend-title {
    min-height: 0;
    line-height: 16px;
  }
  .map-legend .legend-title > span {
    margin-left: 6px;
    font-size: 9px;
  }
  .map-legend .legend-items {
    margin-top: 5px;
    gap: 16px;
    line-height: 16px;
  }
  .map-legend .legend-note {
    display: none;
  }
  .leaflet-top.leaflet-right {
    top: 2px;
    right: 2px;
  }
  .leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
  }
  .area-button {
    top: 12px;
    font-size: 12px;
    padding: 10px 14px;
  }
  .map-canvas-wrap {
    display: flex;
    flex-direction: column;
  }
  #map {
    flex: 1;
    height: 0;
    min-height: 0;
  }
  .camera-details {
    position: relative;
    flex: 0 0 auto;
    top: auto;
    left: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 16px 16px 0 0;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom));
  }
  .camera-details[data-expanded="true"] {
    flex: 0 1 auto;
    max-height: calc(100% - 132px);
  }
  .details-open #map { min-height: 132px; }
  .explorer.details-expanded .search-panel { display: none; }
  .camera-details h2 { font-size: 18px; }
  .details-open .area-button {
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .details-open .map-legend {
    display: none;
  }
  .explorer[data-view="list"] .map-region {
    display: none;
  }
  .explorer[data-view="list"] .camera-list {
    display: block;
  }
  .explorer[data-view="list"] .panel-footer {
    display: flex;
    order: 3;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .camera-row {
    min-height: 100px;
  }
  .map-status {
    top: 68px;
    left: 12px;
    right: 12px;
  }
  .search-panel:has(#filters:not([hidden])) {
    max-height: 60%;
  }
  #explorer.details-open .search-panel {
    max-height: max(0px, calc(100% - 132px - var(--location-summary-height, 240px)));
  }
  /* Map first: while a location is open on a phone, the map and its card
     take the screen. Search, filters and the List switch come back as soon
     as the card is closed with its × button (or Escape). */
  .explorer[data-view="map"].details-open .search-panel { display: none; }
}
@media (max-height: 600px) and (max-width: 768px) {
  .search-panel {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .filter-toolbar {
    margin-top: 4px;
  }
  .map-notice {
    display: none;
  }
}

/* Operational status and historical collision details. */
.row-status { display:block; font-size:0.78rem; color:#334d60; margin:4px 0; }
.status-freshness { padding:10px 18px; border-top:1px solid #d8dfe5; font-size:0.72rem; color:#425466; background:#f6f8fa; }
.status-freshness p { margin:0 0 4px; }
.status-freshness a, .operating-status a { color:#304e66; text-decoration:underline; }
.operating-status { padding:12px 0; border-bottom:1px solid #d8dfe5; }
.operating-status p { margin:6px 0; }

.row-status { grid-column: 1; }
.camera-row .speed { grid-row: 1 / 5; }
@media(max-width:768px) {
  .status-freshness { order: 1; padding: 5px 12px; flex-shrink: 0; }
  .explorer.details-open .status-freshness { display: none; }
  .detail-toggle { font-size: 11px; text-align: left; }
}


/* Compact status strip: one stable row, independent pressed states. */
.status-panel { display: flex; align-items: center; gap: 18px; padding: 8px 18px; background: #ffffff80; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.status-heading { display: flex; align-items: center; gap: 12px; font-size: 12px; white-space: nowrap; }
.status-heading button { min-height: 44px; padding: 8px; }
.status-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; flex: 1; min-width: 0; }
.status-buttons button { --status-ink: #526779; --status-tint: #e9eef2; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 3px; min-height: 48px; padding: 5px 10px; border: 1px solid transparent; border-radius: 10px; color: #53616c; background: transparent; font: inherit; font-size: 11px; cursor: pointer; text-align: left; position: relative; }
.status-buttons button > span:nth-child(2) { grid-row: 1; grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; }
.status-buttons button[aria-pressed="true"] { background: var(--status-tint); color: var(--status-ink); }
.status-buttons button[aria-pressed="false"] { border-color: #c6cdd2; }
.status-buttons button strong { grid-column: 1; grid-row: 2; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.status-check { grid-column: 2; grid-row: 2; font-size: 11px; }
.status-buttons button[aria-pressed="false"] .status-check { visibility: hidden; }
/* Status icons are decorative emoji beside a text label. Naming the color
   emoji fonts keeps the warning sign from falling back to a text glyph. */
.status-symbol, .road-dot { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; font-style: normal; }
.status-symbol { display: inline-block; margin-right: 4px; }
.status-buttons button { grid-template-columns: auto 1fr auto; }
.status-buttons .status-symbol { grid-column: 1; grid-row: 1 / 3; align-self: center; margin-right: 4px; font-size: 17px; line-height: 1; }
.status-buttons button > span:nth-child(2) { grid-column: 2 / -1; }
.status-buttons button strong { grid-column: 2; }
.status-check { grid-column: 3; }
.status-buttons.has-planned { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Status colors as classes, so the Content-Security-Policy needs no inline
   styles. tests/security-headers.test.js keeps these equal to STATUS_COLORS. */
.status-color-warning { color: #a65f00; }
.status-color-construction { color: #2463b4; }
.status-color-citation { color: #a4586a; }
.status-color-unknown { color: #616974; }
.status-color-mixed { color: #334155; }
.status-color-planned { color: #6d4aa8; }
.road-dot.warning { --marker-color: #a65f00; }
.road-dot.construction { --marker-color: #2463b4; }
.road-dot.citation { --marker-color: #a4586a; }
.road-dot.unknown { --marker-color: #616974; }
.road-dot.mixed { --marker-color: #334155; }
.road-dot.planned { --marker-color: #6d4aa8; }
[data-status="warning"] { --status-ink: #854900 !important; --status-tint: #fff0ce !important; }
[data-status="construction"] { --status-ink: #194f96 !important; --status-tint: #deebff !important; }
[data-status="citation"] { --status-ink: #864253 !important; --status-tint: #f3e8ec !important; }
[data-status="unknown"] { --status-ink: #565e68 !important; --status-tint: #edf0f2 !important; }
[data-status="planned"] { --status-ink: #5b3c93 !important; --status-tint: #efe9f8 !important; }
#status-selection-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#show-all-statuses { min-height: 44px; white-space: nowrap; font-size: 11px; }
@media (max-width: 1100px) and (min-width: 769px) {
  .status-panel { gap: 8px; padding: 8px; }
  .status-heading { flex-direction: column; gap: 0; }
  /* Narrow buttons: the label keeps the full width and the icon sits by the count. */
  .status-buttons .status-symbol { grid-row: 2; margin-right: 3px; font-size: 13px; }
  .status-buttons button > span:nth-child(2) { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .status-panel { padding: 4px 0; margin-top: 0; gap: 0; border: 0; }
  .status-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .status-buttons { gap: 5px; }
  .status-buttons button { padding: 5px 8px; font-size: 10px; }
  /* Narrow buttons: the label keeps the full width and the icon sits by the count. */
  .status-buttons .status-symbol { grid-row: 2; margin-right: 3px; font-size: 12px; }
  .status-buttons button > span:nth-child(2) { grid-column: 1 / -1; }
  .results-heading { min-height: 44px; }
}

.road-cluster, .road-marker { display: grid; place-items: center; background: transparent; border: 0; }
.road-cluster > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #526779; background: #edf3f6; color: #263d4b; font: 650 13px/1 system-ui, sans-serif; box-shadow: 0 1px 4px #263d4b28; }
/* One marker for every location, Los Angeles or another city: a white disc
   with the status-colored ring and the status icon inside. The ring keeps the
   status readable where a platform draws the emoji differently. */
.road-dot { display: grid; place-items: center; box-sizing: border-box; width: 26px; height: 26px; border-radius: 50%; background: #fcfdfd; border: 3px solid var(--marker-color); box-shadow: 0 1px 3px #263d4b30; color: var(--marker-color); font-size: 14px; font-weight: 700; line-height: 1; overflow: hidden; user-select: none; }
.road-dot.mixed { border-style: dashed; border-color: #526779; }
.road-marker.selected .road-dot { width: 32px; height: 32px; font-size: 18px; outline: 2px solid #263d4b; outline-offset: 2px; }
.road-marker:focus-visible, .road-cluster:focus-visible { outline: 2px solid #263d4b; border-radius: 50%; outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) {
  .leaflet-cluster-anim .leaflet-marker-icon,
  .leaflet-cluster-spider-leg { transition: none !important; }
}

/* "Near me" sits inside the search field so it adds no row on phones. */
.search-box .locate-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  height: 44px;
  min-width: 44px;
  margin-right: 4px;
  padding: 0 12px;
  border: 1px solid #c9d1d4;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.search-box .locate-button:hover { background: var(--wash); }
.search-box .locate-button[aria-busy="true"] { opacity: 0.7; }
.search-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.empty-actions .button { min-height: 44px; }
.camera-row .row-distance { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 380px) {
  .search-box .locate-button { padding: 0; justify-content: center; }
  .locate-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (max-width: 768px) {
  .search-note { margin: 2px 0 0; font-size: 11px; }
}

/* Compact site links at the foot of the sidebar. Phones show them only in
   List view, like the panel footer, so the map keeps its full height. */
.map-footer {
  flex-shrink: 0;
  padding: 0 20px 12px;
  font-size: 11px;
}
.map-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.map-footer a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); }
@media (max-width: 768px) {
  .map-footer { display: none; }
  .explorer[data-view="list"] .map-footer {
    display: block;
    order: 4;
    background: white;
    padding: 0 16px max(12px, env(safe-area-inset-bottom));
  }
  .explorer[data-view="list"] .panel-footer { padding-bottom: 8px; }
}

/* Non-modal signup prompt shown after engagement (audit Fix 5). It overlays
   the map canvas, so it never changes the map's size, and updates.js hides it
   whenever it would overlap the selected-location card. */
.updates-prompt {
  position: absolute;
  z-index: 560;
  right: 16px;
  bottom: 36px;
  width: min(340px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px 12px 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 48px #202c3526;
}
.updates-prompt[hidden] { display: none; }
.updates-prompt p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.updates-prompt p { grid-column: 1; grid-row: 1; }
.updates-prompt .icon-button { grid-column: 2; grid-row: 1; align-self: start; width: 44px; height: 44px; font-size: 22px; }
.updates-prompt .button { grid-column: 1 / -1; grid-row: 2; justify-self: start; min-height: 44px; }
@media (max-width: 768px) {
  .updates-prompt {
    top: 12px;
    bottom: auto;
    left: 12px;
    right: 64px;
    width: auto;
    padding: 8px 8px 8px 12px;
    gap: 4px 8px;
  }
  #search-area:not([hidden]) ~ .updates-prompt { top: 64px; }
  .updates-prompt p { font-size: 12px; }
}
