.map-shell {
  position: relative;
  width: 100%;
  min-height: 520px;
  background: var(--pit-theme-bg);
  overflow: hidden;
  --map-floating-panels-top: 172px;
}

@media (min-width: 1101px) {
  .map-shell:not(.map-shell-embed) {
    height: 100dvh !important;
    min-height: 100dvh;
  }

  .map-left-panel,
  .map-right-panel {
    height: min(72dvh, calc(100% - var(--map-floating-panels-top) - 24px));
  }
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-canvas-inner {
  height: 100%;
  width: 100%;
}

.map-shell-embed {
  min-height: 0;
  padding-bottom: 0 !important;
}

.map-shell-embed .map-canvas {
  position: absolute;
  inset: 0;
  height: 100% !important;
}

.map-topbar {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 5;
  pointer-events: none;
}

.map-panel {
  background: var(--pit-theme-surface);
  border: 1px solid var(--pit-theme-line-soft);
  border-radius: 16px;
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-topbar-panel {
  padding: 14px 16px;
  pointer-events: auto;
}

.map-topbar-panel .map-panel-header {
  padding-bottom: 16px;
}

.map-topbar-panel .map-topbar-grid {
  padding-top: 12px;
}

.map-topbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) 150px auto auto;
  gap: 12px;
  align-items: start;
}

.map-field-address {
  grid-column: 1;
}

.map-field-radius {
  grid-column: 2;
}

.map-field-search {
  grid-column: 3;
  align-self: end;
}

.map-field-tender {
  grid-column: 4;
  margin-left: 96px;
}

.map-field-search .map-button {
  min-height: 40px;
  white-space: nowrap;
}

.map-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pit-theme-muted);
  font-weight: 800;
}

.map-input,
.map-select {
  margin-top: 6px;
  width: 100% !important;
  border: 1px solid var(--pit-theme-line) !important;
  border-radius: 10px;
  padding: 8px 10px !important;
  font-size: 14px !important;
  line-height: normal !important;
  color: var(--pit-theme-ink) !important;
  background: var(--pit-theme-surface) !important;
  box-shadow: var(--pit-theme-shadow-soft);
  min-height: 40px !important;
  box-sizing: border-box !important;
}

.map-location-controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-location-status.is-error {
  color: #b91c1c;
}

.map-button {
  border: none;
  border-radius: 10px;
  background: #047857;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}

.map-button:hover {
  background: #059669;
}

.map-overlay-button-copy {
  min-width: 0;
  display: block;
  justify-content: center;
}

.map-overlay-button-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pit-theme-ink);
  text-align: center;
}

.map-overlay-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-pill-group {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--pit-theme-line-soft) !important;
  background: var(--pit-theme-surface) !important;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-ink);
}

.map-select-all {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #047857;
  border: none;
  cursor: pointer;
  padding: 5px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  line-height: 1.4;
}

.map-select-all:hover,
.map-select-all:focus-visible {
  background: #059669;
}

.map-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--pit-theme-ink);
}

.map-location-trigger {
  border: 1px solid var(--pit-theme-line-soft) !important;
  border-radius: 8px;
  background: var(--pit-theme-surface) !important;
  color: var(--pit-theme-ink) !important;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
}

.map-location-trigger:hover {
  background: var(--pit-theme-surface-low);
}

.map-location-status {
  font-size: 12px;
  color: var(--pit-theme-muted);
  text-align: right;
}

.map-location-status.is-active {
  color: var(--pit-theme-primary);
}

.map-dot {
  height: 8px;
  width: 8px;
  border-radius: 999px;
}

.map-checkbox {
  height: 14px;
  width: 14px;
  accent-color: var(--pit-theme-primary);
}

html.dark .map-checkbox {
  background-color: var(--pit-theme-surface) !important;
  border-color: var(--pit-theme-line) !important;
}

.map-left-panel {
  position: absolute;
  left: 16px;
  top: var(--map-floating-panels-top);
  height: min(60vh, calc(100% - var(--map-floating-panels-top) - 16px));
  bottom: auto;
  width: 260px;
  z-index: 5;
  overflow: hidden;
  pointer-events: auto;
}

.map-right-panel {
  position: absolute;
  right: 16px;
  top: var(--map-floating-panels-top);
  height: min(60vh, calc(100% - var(--map-floating-panels-top) - 16px));
  bottom: auto;
  width: 300px;
  z-index: 5;
  overflow: hidden;
  pointer-events: auto;
}

.map-left-panel.is-collapsed,
.map-right-panel.is-collapsed {
  height: auto;
  top: auto;
  bottom: 8px;
}

.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.map-overlay[hidden],
.map-mobile-panel-backdrop[hidden] {
  display: none !important;
}

.map-mobile-toolbar,
.map-mobile-panel-backdrop {
  display: none;
}

.map-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}

.map-overlay-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  background: var(--pit-theme-surface);
  border: 1px solid var(--pit-theme-line-soft);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--pit-theme-shadow-medium);
}

html.dark .map-overlay-panel {
  background: var(--pit-theme-surface);
  border-color: var(--pit-theme-line-soft);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-overlay-close {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--pit-theme-muted);
  cursor: pointer;
  margin-bottom: 14px;
}

.map-overlay-logo {
  height: 40px;
  max-width: 140px;
  object-fit: contain;
  margin-bottom: 14px;
}

.map-overlay-logo.is-hidden {
  display: none;
}

.map-overlay-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--pit-theme-ink);
  letter-spacing: -0.02em;
}

.map-overlay-address {
  margin-top: 6px;
  font-size: 14px;
  color: var(--pit-theme-muted);
}

.map-overlay-help {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pit-theme-muted);
}

.map-overlay-actions {
  margin-top: 12px;
  align-items: stretch;
  gap: 12px;
}

.map-overlay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid var(--pit-theme-line-soft);
  padding: 12px 10px;
  color: var(--pit-theme-ink);
  text-decoration: none;
  background: var(--pit-theme-surface);
  box-shadow: var(--pit-theme-shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  min-width: 0;
  min-height: 62px;
}

.map-overlay-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--pit-theme-shadow-medium);
}

.map-overlay-button-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  display: block;
}

.map-overlay-button-copy {
  min-width: 0;
  display: block;
  justify-content: center;
}

.map-overlay-button-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  text-align: center;
}

html.dark .map-overlay-button-google {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.8);
}

html.dark .map-overlay-button-google:hover {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

html.dark .map-overlay-button-apple {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.8);
}

html.dark .map-overlay-button-apple:hover {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

.map-overlay-button-google {
  border-color: #d9e5ff;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.map-overlay-button-google:hover {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.map-overlay-button-apple {
  border-color: #dde3ea;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.map-overlay-button-apple:hover {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.map-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pit-theme-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--pit-theme-ink);
}

.map-panel-hide {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-muted);
  cursor: pointer;
  touch-action: manipulation;
}

.map-panel-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-panel-body {
  padding: 12px 14px;
  height: calc(100% - 56px);
  overflow-y: auto;
}

.map-panel.is-collapsed .map-panel-body,
.map-panel.is-collapsed .map-panel-subtitle,
.map-panel.is-collapsed .map-topbar-grid {
  display: none;
}

.map-panel.is-collapsed .map-panel-header {
  padding-bottom: 10px;
}

.map-checklist {
  display: grid;
  gap: 8px;
}

.map-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--pit-theme-ink);
}

.map-location-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--pit-theme-muted);
}

.map-location-list a {
  color: var(--pit-theme-ink);
  font-weight: 600;
  text-decoration: none;
}

.map-location-list a:hover {
  text-decoration: underline;
}

.map-location-meta {
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-location-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pit-theme-line-soft);
}

.map-location-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.map-location-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-location-index {
  height: 26px;
  width: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.map-location-distance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--pit-theme-muted);
}

.map-location-view {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--pit-theme-primary);
  cursor: pointer;
  text-decoration: underline;
}

.map-location-name {
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pit-theme-ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.map-location-name:hover {
  text-decoration: underline;
  color: var(--pit-theme-primary);
}

.map-location-address {
  margin-top: 4px;
  font-size: 13px;
  color: var(--pit-theme-muted);
}

.map-location-count {
  color: var(--pit-theme-primary);
  font-weight: 700;
}

.map-overlay-button[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.admin-map-shell {
  height: 70vh;
}

.admin-map-panel-surface {
  display: grid;
  gap: 8px;
}

.admin-map-shell .map-topbar-panel {
  padding: 10px 12px;
}

.admin-map-shell .map-label {
  font-size: 10px;
}

.admin-map-shell .map-input,
.admin-map-shell .map-select {
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 13px;
}

.admin-map-shell .map-button {
  padding: 7px 12px;
  font-size: 13px;
}

.admin-map-shell .map-pill-group {
  margin-top: 4px;
  gap: 6px;
}

.admin-map-shell .map-pill {
  padding: 4px 8px;
  font-size: 11px;
}

.admin-map-shell .map-checkbox {
  height: 12px;
  width: 12px;
}

.admin-map-shell .map-dot {
  height: 6px;
  width: 6px;
}

.admin-map-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-map-panel-hide {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--pit-theme-muted);
  cursor: pointer;
}

.admin-map-panel.is-collapsed .map-panel-body,
.admin-map-panel.is-collapsed .map-panel-subtitle {
  display: none;
}

.admin-map-panel.is-collapsed .admin-map-filter-grid {
  display: none;
}

.admin-map-panel.is-collapsed .map-topbar-panel {
  padding: 8px 12px;
}

.admin-map-filter-grid {
  grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  row-gap: 8px;
}

.admin-map-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-map-clear {
  font-size: 12px;
  color: #0f172a;
  text-decoration: none;
}

.admin-map-clear:hover {
  text-decoration: underline;
}

.admin-map-address-status {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}


.admin-map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 220px;
  z-index: 5;
  pointer-events: auto;
}

.admin-map-summary {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 240px;
  z-index: 5;
  pointer-events: auto;
}

.admin-map-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}

.admin-map-legend-row:last-child {
  margin-bottom: 0;
}

.admin-map-summary-count {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.admin-map-summary-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.admin-map-toggles {
  position: absolute;
  right: 16px;
  top: 112px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.admin-map-toggle {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.admin-map-toggle[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.admin-map-overlay-meta {
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1100px) {
  .map-shell {
    display: flex;
    flex-direction: column;
    height: auto !important;
    padding-bottom: 12px;
  }

  .map-topbar {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    margin: 12px 16px 0;
    pointer-events: auto;
    order: 1;
  }

  .map-topbar-panel {
    padding: 12px;
  }

  .map-topbar-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .map-field-search .map-button {
    width: 100%;
  }

  .map-location-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-location-status {
    text-align: left;
  }

  .map-left-panel,
  .map-right-panel {
    position: static;
    width: auto;
    margin: 12px 16px 0;
    max-height: 40vh;
    height: auto;
  }

  .map-left-panel {
    order: 3;
  }

  .map-right-panel {
    order: 4;
  }

  .admin-map-legend,
  .admin-map-summary {
    position: static;
    width: auto;
    margin: 12px 16px 0;
  }

  .map-canvas {
    position: relative;
    height: 48vh;
    min-height: 280px;
    order: 2;
  }

  .map-shell-embed {
    height: 100vh !important;
    padding-bottom: 0 !important;
  }

  .map-shell-embed .map-canvas {
    position: absolute;
    inset: 0;
    height: 100% !important;
  }
}

@media (max-width: 640px) {
  .map-shell {
    height: 100dvh !important;
    min-height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }

  .map-left-panel,
  .map-right-panel {
    max-height: min(58dvh, 480px);
  }

  .map-mobile-toolbar {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    z-index: 14;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    pointer-events: auto;
  }

  .map-mobile-toolbar-button {
    min-height: 48px !important;
    border: 1px solid var(--pit-theme-line-soft);
    border-radius: 10px;
    background: var(--pit-theme-surface);
    color: var(--pit-theme-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    touch-action: manipulation;
  }

  .map-mobile-panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 11;
    background: rgba(15, 23, 42, 0.4);
    pointer-events: auto;
  }

  .map-mobile-panel-backdrop:not([hidden]) {
    display: block;
  }

  .map-topbar,
  .map-left-panel,
  .admin-map-legend,
  .admin-map-summary {
    margin: 0;
  }

  .map-panel {
    border-radius: 12px;
    box-shadow: var(--pit-theme-shadow-medium);
  }

  .map-panel-header {
    padding: 10px 12px;
  }

  .map-panel-body {
    padding: 10px 12px;
    height: auto;
    overflow: auto;
  }

  .map-canvas {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    order: initial;
  }

  .map-topbar,
  .map-left-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(env(safe-area-inset-top, 0px) + 58px);
    width: auto;
    height: calc(100dvh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    display: none;
    z-index: 15;
    overflow: hidden;
  }

  .map-topbar.is-mobile-open,
  .map-left-panel.is-mobile-open {
    display: flex;
    flex-direction: column;
  }

  .map-topbar.is-mobile-open .map-topbar-panel {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .map-topbar.is-mobile-open .map-panel-header,
  .map-left-panel.is-mobile-open .map-panel-header,
  .map-topbar.is-mobile-open .map-location-controls {
    flex: 0 0 auto;
  }

  .map-topbar.is-mobile-open .map-topbar-grid {
    grid-template-columns: minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .map-topbar.is-mobile-open .map-field,
  .map-topbar.is-mobile-open .map-field-address,
  .map-topbar.is-mobile-open .map-field-radius,
  .map-topbar.is-mobile-open .map-field-search,
  .map-topbar.is-mobile-open .map-field-tender {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .map-topbar.is-mobile-open .map-field-tender {
    margin-left: 0;
  }

  .map-topbar.is-mobile-open .map-field-search .map-button,
  .map-topbar.is-mobile-open .map-location-trigger {
    width: 100%;
  }

  .map-topbar.is-mobile-open .map-pill-group,
  .map-topbar.is-mobile-open .map-location-controls {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .map-topbar.is-mobile-open .map-pill-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .map-topbar.is-mobile-open .map-pill {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
  }

  .map-topbar.is-mobile-open .map-pill span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .map-topbar.is-mobile-open .map-location-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .map-topbar.is-mobile-open .map-location-status {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .map-left-panel.is-mobile-open .map-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .map-right-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    top: auto;
    width: auto;
    margin: 0;
    z-index: 9;
    max-height: min(58dvh, 480px);
  }

  .map-right-panel .map-panel-body {
    max-height: calc(min(58dvh, 480px) - 58px);
    overflow-y: auto;
  }

  .map-right-panel .map-location-header {
    gap: 8px;
    padding: 4px 10px;
  }

  .map-right-panel .map-location-header .map-panel-title {
    line-height: 1.15;
  }

  .map-right-panel .map-location-header .map-panel-subtitle {
    display: none;
  }

  .map-right-panel .map-location-header-actions {
    gap: 6px;
  }

  .map-right-panel .map-location-header .map-panel-hide {
    min-height: 44px;
    min-width: 44px;
  }

  .map-right-panel .map-location-header .map-location-mode-toggle {
    display: none;
  }

  .map-shell.mobile-panel-open .map-right-panel {
    z-index: 10;
  }

  .map-input,
  .map-select {
    min-height: 48px;
    font-size: 16px;
    box-sizing: border-box !important;
  }

  .map-button,
  .map-location-trigger,
  .map-overlay-button {
    min-height: 48px;
    touch-action: manipulation;
  }

  .map-panel-hide,
  .map-select-all,
  .map-pill,
  .map-check,
  .map-location-view,
  .map-location-name,
  .map-location-mode-toggle,
  .map-location-favorite,
  .map-overlay-close {
    min-height: 48px;
    touch-action: manipulation;
  }

  .map-panel-hide,
  .map-select-all,
  .map-location-view,
  .map-location-name,
  .map-location-mode-toggle,
  .map-overlay-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .map-panel-hide {
    min-width: 48px;
    padding: 0 10px;
  }

  .map-select-all {
    width: 100%;
    margin-bottom: 10px;
  }

  .map-pill,
  .map-check {
    padding: 10px 12px;
  }

  .map-check {
    align-items: center;
    border-radius: 10px;
  }

  .map-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .map-location-row {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
  }

  .map-location-view,
  .map-location-name {
    min-height: 44px;
    padding: 0 2px;
  }

  .map-location-distance {
    gap: 6px;
    justify-content: flex-end;
    margin-left: auto;
  }

  .map-location-list {
    gap: 6px;
  }

  .map-location-item {
    padding-bottom: 4px;
  }

  .map-location-index {
    height: 22px;
    width: 22px;
    font-size: 11px;
  }

  .map-location-name-row {
    gap: 8px !important;
  }

  .map-location-name {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.2;
  }

  .map-location-address {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.25;
  }

  .map-location-meta,
  .map-location-distance {
    font-size: 11px;
    line-height: 1.2;
  }

  .map-overlay {
    padding: 8px;
    display: flex;
    align-items: flex-end;
    z-index: 16;
  }

  .map-overlay-panel {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    padding: 16px;
    border-radius: 14px;
  }

  .map-overlay-actions {
    gap: 8px;
  }
}
/* ------------------------------------------------------------------ */
/*  DARK MODE — explicit overrides to match site theme                */
/* ------------------------------------------------------------------ */

html.dark .map-input,
html.dark .map-select {
  background: #121c20 !important;
  color: #ecf4f1 !important;
  border-color: rgba(101, 121, 116, 0.78) !important;
}

html.dark .map-input::placeholder,
html.dark .map-select::placeholder {
  color: #aec0bb !important;
}

html.dark .map-pill {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.58) !important;
}

html.dark .map-select-all {
  background: #0f766e;
  color: #f0fdfa;
}

html.dark .map-select-all:hover,
html.dark .map-select-all:focus-visible {
  background: #0d9488;
}

html.dark .map-location-trigger {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.78) !important;
  color: #ecf4f1 !important;
}

html.dark .map-location-trigger:hover {
  background: #1a262a !important;
}

html.dark .map-panel {
  background: #121c20 !important;
  border-color: rgba(101, 121, 116, 0.58) !important;
}

html.dark .map-button {
  color: #ecf4f1 !important;
}

html.dark .map-button:hover {
  background: #0d9488 !important;
}

  .map-overlay-button {
    min-height: 58px;
    padding: 10px 8px;
    gap: 8px;
  }

  .map-overlay-button-logo {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .map-overlay-button-title {
    font-size: 12px;
  }
}
