.project-map-dialog {
  width: min(1120px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: clamp(13px, 2.2vw, 25px);
  overflow: auto;
  overscroll-behavior: contain;
  color: #fff5e6;
  background: #0e1d26;
  border: 1px solid #eec8956b;
  border-radius: 16px;
  box-shadow: 0 28px 100px #071119ee;
}

.project-map-dialog::backdrop { background: #071824ba; backdrop-filter: blur(5px); }
.project-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.project-map-heading h2 { margin: 0; font: clamp(1.72rem, 3.1vw, 2.5rem)/1.08 Georgia, serif; letter-spacing: -.035em; }
.project-map-dialog button:focus-visible, .project-map-surface:focus-visible { outline: 2px solid #ffd68f; outline-offset: 3px; }
.project-map-header-actions { display: flex; align-items: center; gap: 8px; }
.project-map-back { padding: 8px 10px; background: #1b2c37; border: 1px solid #cdb88a66; border-radius: 8px; }
.project-map-film { width: min(100%, max(320px, 125dvh)); margin-inline: auto; }
.project-map-film iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #091620; border-radius: 9px; }
.project-map-film-source { display: inline-block; margin-top: 10px; color: #ffe0a9; font-size: .83rem; }

.project-map-close {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #cdb88a66;
  border-radius: 8px;
  background: #1b2c37;
}
.project-map-close::before, .project-map-close::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 2px;
  top: calc(50% - 1px);
  left: calc(50% - 7.5px);
  border-radius: 1px;
  background: #f7ddb4;
  rotate: 45deg;
}
.project-map-close::after { rotate: -45deg; }

.project-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(252px, 1fr);
  gap: 13px;
  min-width: 0;
}

.project-map-frame {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  height: min(62dvh, 590px);
  border: 1px solid #d6b98077;
  border-radius: 11px;
  background:
    repeating-linear-gradient(#2a43535c 0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg, #2a43535c 0 1px, transparent 1px 54px),
    #223647;
}
.project-map-surface, .project-map-tiles, .project-map-markers { position: absolute; inset: 0; }
.project-map-surface { cursor: grab; overflow: hidden; touch-action: none; }
.project-map-surface[data-dragging] { cursor: grabbing; }
.project-map-tiles, .project-map-markers, .project-map-tile { pointer-events: none; }
.project-map-tiles { filter: contrast(.98) saturate(.72) brightness(.93); }
.project-map-tile { position: absolute; inset: 0 auto auto 0; max-width: none; opacity: 0; user-select: none; }
.project-map-tile[data-state='ready'] { opacity: 1; }
.project-map-tile-notice {
  position: absolute;
  top: 11px;
  left: 11px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 5px;
  background: #0c1c27ee;
  color: #fff3dc;
  font-size: .75rem;
  pointer-events: none;
}

.project-map-pin {
  --pin-size: 18px;
  box-sizing: border-box;
  position: absolute;
  z-index: 1;
  width: var(--pin-size);
  height: var(--pin-size);
  padding: 0;
  translate: -50% -50%;
  border: 2px solid #fff4dc;
  border-radius: 100%;
  background: #a07034;
  box-shadow: 0 0 0 1px #472c0be6, 0 3px 9px #0d223b72;
  pointer-events: auto;
}
.project-map-pin:focus-visible, .project-map-pin[aria-pressed='true'] { z-index: 3; background: #ffd38b; box-shadow: 0 0 0 4px #70511e88, 0 3px 9px #0d223b72; }
.project-map-pin-area { border-style: dashed; background: #283f51; }
.project-map-pin-label {
  position: absolute;
  translate: calc(var(--pin-size) / 2) calc(var(--pin-size) / 2);
  padding: 4px 7px;
  white-space: nowrap;
  border: 1px solid #e0c394a8;
  border-radius: 5px;
  background: #102530ed;
  color: #fff5e8;
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.2;
  box-shadow: 0 2px 6px #0c21314d;
}
.project-map-pin[aria-pressed='true'] .project-map-pin-label {
  border-color: #f0cd96;
  background: #f0cd96;
  color: #18242c;
}

.project-map-controls {
  position: absolute;
  z-index: 4;
  display: flex;
  gap: 4px;
  right: 9px;
  bottom: 29px;
}
.project-map-controls button {
  min-width: 34px;
  min-height: 34px;
  padding: 0 7px;
  border: 1px solid #eddbbc77;
  border-radius: 6px;
  background: #142633f5;
  color: #fff5e7;
  font-size: 1.1rem;
  font-weight: 650;
}
.project-map-controls button:disabled { opacity: .72; cursor: default; color: #abb7c2; }
.project-map-controls .project-map-reset { font-size: .74rem; padding-inline: 9px; }
.project-map-attribution {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 3px 6px;
  border-radius: 5px 0 0;
  background: #0e2331ee;
  color: #fff1d9;
  font-size: .69rem;
  text-underline-offset: 2px;
}

.project-map-side {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
}
.project-map-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 3px;
  list-style: none;
  border-radius: 8px;
}
.project-map-project {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  text-align: left;
  border: 1px solid #8f9aa540;
  border-radius: 7px;
  background: #172a35;
}
.project-map-project strong { font-size: .85rem; font-weight: 680; }
.project-map-project small { color: #c9d7de; white-space: nowrap; font-size: .72rem; }
.project-map-project[aria-pressed='true'] { border-color: #d5ab6d; background: #332b24; }
.project-map-project[aria-pressed='true'] strong { color: #ffdfa9; }
.project-map-detail { padding: 12px; border: 1px solid #bf9b645e; border-radius: 8px; background: #182a34; }
.project-map-detail-name { font-size: 1.02rem; }
.project-map-detail-location { margin: 5px 0; color: #e2e7e7; font-size: .84rem; }
.project-map-detail-accuracy { margin: 0; color: #f4d19a; font-size: .76rem; }
.project-map-open {
  margin-top: 10px;
  min-height: 35px;
  padding: 5px 11px;
  border: 1px solid #eccc94;
  border-radius: 6px;
  background: #edc78c;
  color: #15252e;
  font-size: .83rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .project-map-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .project-map-heading { margin-bottom: 10px; }
  .project-map-layout { grid-template-columns: 1fr; gap: 9px; }
  .project-map-frame { min-height: 255px; height: clamp(255px, 42dvh, 410px); }
  .project-map-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .project-map-project { padding: 6px 8px; }
  .project-map-project small { display: none; }
  .project-map-pin-label { font-size: .69rem; }
}
