.map-page {
  height: calc(100vh - 82px);
  min-height: 640px;
  position: relative;
}

#map {
  height: 100%;
  width: 100%;
}

.map-controls,
.map-status {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, .94);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.map-controls {
  top: 1rem;
  right: 1rem;
  padding: .75rem;
  display: grid;
  gap: .45rem;
}

.map-controls label {
  display: flex;
  gap: .45rem;
  align-items: center;
  margin: 0;
  font-size: .85rem;
}

.map-controls button {
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 4px;
  padding: .35rem .55rem;
  cursor: pointer;
}

.map-status {
  left: 1rem;
  bottom: 1rem;
  padding: .45rem .65rem;
  font-size: .8rem;
}

.map-popup {
  max-width: min(72vw, 720px);
}

.map-popup img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

@media (max-width: 700px) {
  .map-page {
    height: calc(100vh - 70px);
    min-height: 520px;
  }

  .map-controls {
    left: .75rem;
    right: .75rem;
    top: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
