* { box-sizing: border-box; }
:root { font-family: system-ui, sans-serif; color: #26392f; background: #d1d5a4; }
body { margin: 0; }
#atlas { position: relative; width: 100%; height: 100dvh; min-height: 390px; overflow: hidden; isolation: isolate; }
#map { position: absolute; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map:active { cursor: grabbing; }
#map:focus-visible { outline: 3px solid #f7de8e; outline-offset: -4px; }
header, .places, #detail, .tools, footer { position: absolute; }
header, .places, #detail, .zoom, #mini, footer { border: 1px solid #596649; background: #fff8e7; box-shadow: 3px 4px 0 #293c3050; }
header { top: 22px; left: 22px; padding: 16px 22px 17px; pointer-events: none; }
header p { margin: 0; font-size: 0.84rem; }
.eyebrow, .places label { letter-spacing: 0.15em; font: 700 0.68rem ui-monospace, monospace; letter-spacing: 0.12em; }
h1 { font: 700 clamp(1.75rem, 4vw, 3rem)/1.08 Georgia, serif; margin: 4px 0 6px; }
.places { right: 22px; top: 22px; display: grid; gap: 5px; padding: 8px 10px; }
select { font: inherit; font-size: 0.8rem; color: inherit; background: transparent; border: 0; max-width: 190px; }
#markers { position: absolute; inset: 0; pointer-events: none; }
.marker { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; white-space: nowrap; padding: 4px 8px; border: 1px solid #54634a; background: #fff8e7; box-shadow: 2px 2px #32483965; font: 700 11px ui-monospace, monospace; }
.marker[aria-pressed="true"], .marker:hover { background: #f8db92; }
.marker::after { content: ""; position: absolute; top: 100%; left: calc(50% - 3px); border: 4px solid transparent; border-top-color: #54634a; }
#detail { left: 22px; bottom: 54px; padding: 12px 16px; width: min(285px, calc(100% - 100px)); }
#detail h2 { margin: 0 0 4px; font: bold 1.22rem Georgia, serif; }
#detail p { margin: 0; font-size: 0.84rem; line-height: 1.4; }
.tools { right: 22px; bottom: 22px; display: flex; align-items: end; gap: 10px; }
.zoom { display: grid; }
button { cursor: pointer; color: inherit; }
.zoom button { border: 0; background: transparent; width: 37px; height: 34px; font-size: 1.2rem; }
.zoom button + button { border-top: 1px solid #c6c2a8; }
.zoom button:hover { background: #f8db92; }
button:focus-visible, select:focus-visible { outline: 2px solid #954f25; outline-offset: 2px; }
#mini { display: block; image-rendering: pixelated; }
footer { bottom: 22px; left: 22px; padding: 4px 8px; display: flex; gap: 14px; font: 0.68rem ui-monospace, monospace; }
@media (max-width: 640px) {
  header { top: 12px; left: 12px; padding: 10px 13px; }
  .places { top: 109px; left: 12px; right: auto; }
  .tools { bottom: 12px; right: 12px; }
  footer { bottom: 12px; left: 12px; }
  #detail { left: 12px; bottom: 42px; }
  #mini, .hint { display: none; }
  .marker { font-size: 9px; padding: 3px 5px; }
}

:root { color: #f4eed9; background: #223934; }
#atlas { background: #a8b37b; }
.focus {
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(1.8px);
  mask-image: linear-gradient(#000 0%, transparent 19%, transparent 81%, #000 100%);
}
#atlas::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, #162e29a8, transparent 27%, transparent 74%, #192e287a);
  pointer-events: none;
}
header, .places, #detail, .tools, footer, #markers, #loading { z-index: 2; }
header {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  top: 26px;
  left: 28px;
  text-shadow: 0 2px 12px #172b25;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.65rem); font-weight: 500; letter-spacing: -0.052em; margin: 3px 0; }
header p { color: #fff3d4; }
.places, #detail, .zoom, #mini {
  background: #203830ee;
  border-color: #e6dfc95c;
  box-shadow: 0 3px 12px #17292455;
}
.places { min-width: 142px; }
select option { color: #f4eed9; background: #203830; }
.marker {
  color: #f4eed9;
  background: #203830e8;
  border-color: #efe6c988;
  box-shadow: 0 3px 10px #17292455;
  border-radius: 2px;
  padding: 5px 8px;
}
.marker::after { border-top-color: #203830; }
.marker[aria-pressed="true"], .marker:hover, .zoom button:hover { color: #233c32; background: #f6df9e; }
.zoom button + button { border-color: #e6dfc94d; }
footer { background: none; border: 0; box-shadow: none; text-shadow: 0 1px 5px #172924; }
footer a { color: inherit; text-underline-offset: 2px; }
#loading { position: absolute; inset: 45% 0 auto; text-align: center; color: #233c32; font-weight: 700; }
@media (max-width: 640px) {
  header { top: 16px; left: 15px; }
  .places { top: 107px; left: 15px; }
}

@media (max-width: 960px) { .hint { display: none; } }

footer { flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 80px); }
