.community-atlas {
  border: 1px solid #b7c6cb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-height: 48px;
  padding: 8px 18px;
  border-bottom: 1px solid #bfced2;
}
.map-toolbar p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #324a59;
  font-size: .95rem;
  line-height: 1.45;
}
.map-key {
  flex: 0 0 17px;
  height: 14px;
  border: 1px solid #517c90;
  background: #a8cfdf;
  border-radius: 2px;
}
.map-window { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #7e9aa5 #e3ecee; }
.map-window:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.map-sheet { overflow: hidden; }
.map-drawing { display: block; width: 100%; max-width: none; height: auto; }
.map-drawing a { cursor: pointer; }
.map-water { fill: #dcecf0; }
.map-outer-land, .map-context-land { fill: #f1f1e7; }
.map-context-land { stroke: #cbd0c4; stroke-width: .8; stroke-linejoin: round; }
.map-area path {
  fill: #aacfdc;
  stroke: #658b99;
  stroke-width: 1.15;
  stroke-linejoin: round;
}
.map-area.tone-1 path { fill: #c0dce2; }
.map-area.tone-2 path { fill: #9ec4d6; }
.map-area.tone-3 path { fill: #b2d6d2; }
.map-area:is(:hover, :focus, .is-active) path { fill: #598ba5; stroke: #153e55; stroke-width: 2.4; }
.map-label:focus { outline: none; }
.map-hit { fill: transparent; pointer-events: all; }
.map-town-name {
  font: 700 15.5px var(--sans); letter-spacing: -.25px;
  fill: #152e3e; stroke: #f4f8f7; stroke-opacity: .96; stroke-width: 3.1;
  paint-order: stroke; stroke-linejoin: round;
}
.map-leader { fill: none; stroke: #446772; stroke-width: 1.3; stroke-linejoin: round; }
.map-leader-dot { fill: #355c6c; stroke: #f3f7f6; stroke-width: 1; }
.map-label:is(:hover, :focus, .is-active) .map-hit { fill: #183f55; stroke: #fff; stroke-width: 1.4; }
.map-label:is(:hover, :focus, .is-active) .map-town-name { fill: #fff; stroke: none; }
.map-label:focus-visible .map-hit { stroke: #062536; stroke-width: 3; }
.map-orientation { fill: #636f67; font: 13px var(--sans); }
.map-orientation > text { paint-order: stroke; stroke: #f1f1e7; stroke-width: 2.5; }
.map-orientation .map-bay { font: italic 18px Georgia, serif; letter-spacing: 1.3px; fill: #547482; stroke: none; }
.map-compass { fill: #52656c; font: bold 13px var(--sans); }
.map-compass path { stroke: #52656c; stroke-width: 1; }
.map-compass .map-compass-light { fill: #f8fbfa; }
.map-scale { fill: #4e6672; font: 12px var(--sans); }
.map-scale path { stroke: #4e6672; stroke-width: 1.6; fill: none; }
.map-pan { display: flex; align-items: center; gap: 6px; color: #455b66; font-size: .82rem; }
.map-pan[hidden] { display: none; }
.map-pan button {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0;
  border: 1px solid #b3c1c6; border-radius: 4px; color: var(--ink);
  background: #fff; font: 700 21px var(--sans); cursor: pointer;
}
.map-pan button:disabled { color: #828d94; background: #f4f6f7; cursor: default; }
.map-pan button:enabled:hover { background: #e4f0f5; }
.map-pan button:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
@media (max-width: 1000px) {
  /* Trim the quiet margins around the mapped towns, keeping labels at a readable scale. */
  .map-sheet { min-width: 720px; }
  .map-drawing { width: calc(100% + 315px); margin-left: -160px; }
}
@media (max-width: 700px) {
  .map-toolbar { padding: 9px 12px; }
  .map-toolbar p { font-size: .88rem; }
  .map-pan { margin-left: auto; }
}
@media (forced-colors: active) {
  .map-area path { fill: Highlight; stroke: Canvas; }
  .map-town-name { fill: LinkText; stroke: Canvas; }
  .map-label:focus-visible .map-hit { fill: Canvas; stroke: Highlight; }
  .map-label:focus-visible .map-town-name { fill: LinkText; }
}
