.map-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-page .hdr {
  flex: none;
  margin-bottom: 0;
  background: var(--forest);
  border-bottom: 1px solid var(--line);
}
.map-page .hdr-inner {
  max-width: none;
}
.map-page .nav a[aria-current='page'] {
  background: var(--soft);
  color: var(--water);
}
.map-page main {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.map-page .map-wrapper {
  display: flex;
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--soft);
}
.map-page #map {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.map-page .gm-style {
  color: #12231f;
}
.map-page .gm-style img {
  max-width: none;
}

/* Native dialog keeps keyboard focus and Escape handling in the browser. */
.map-page .map-dialog {
  width: min(600px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.map-page .map-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.map-page .map-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.map-page .map-dialog-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.map-page .map-dialog-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.map-page .map-dialog-body {
  padding: 24px;
  overflow-wrap: anywhere;
}
.map-page .map-dialog-body p {
  margin: 0 0 12px;
}
.map-page #modal-adress {
  color: var(--muted);
  margin-top: 12px;
}
.map-page .map-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.map-page .map-dialog-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}
.map-page .map-dialog-link:hover {
  background: var(--forest);
}
@media (max-width: 720px) {
  .map-page .map-dialog-header,
  .map-page .map-dialog-body {
    padding: 18px;
  }
  .map-page .map-dialog-footer {
    padding: 14px 18px;
  }
}
