@font-face { font-family: 'Pixelify Sans'; font-weight: 700; font-display: swap; src: url(fonts/pixelify-latin-700.woff2) format('woff2'); unicode-range: U+0041-007A; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2197, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext.woff2) format('woff2-variations'); unicode-range: U+0100-0130, U+0132-0151, U+0154-02BA, U+1E00-1E9F, U+20A0-20AB, U+2C60-2C7F; }

:root {
  --ink: #1d2540;
  --paper: #fffaf0;
  --paper-2: #f5ecd8;
  --line: #e6dac1;
  --soft: #626a80;
  --sun: #ffc93c;
  --coral: #bf3f2f;
  --sea: #62b6c1;
  --logo: 'Pixelify Sans', 'Figtree', system-ui, sans-serif;
  --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lift: 0 2px 0 rgba(29, 37, 64, 0.22);
  --panel: clamp(420px, 38vw, 620px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sea);
  color: var(--ink);
  font: 400 16px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 600 15px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms ease;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.sun { background: var(--sun); }
.btn.sun:hover { background: #ffd663; }

/* Without scripts the page is a plain list of every map. */
#world, .tools, .launch, .zoom, .tally, .close, label[for=q], #q, #atlas-count { display: none; }
#panel { background: var(--paper); padding: 20px 16px 40px; }
.view { max-width: 680px; margin: 0 auto 32px; }

.brand { padding: 20px 16px; color: var(--ink); }
.brand h1 { font: 700 34px/1 var(--logo); letter-spacing: 0.5px; }
.brand h1 a { text-decoration: none; }
.brand p { margin-top: 6px; font-size: 14px; font-weight: 500; }

.js body { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; }
.js #world { display: block; position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.js #world.dragging { cursor: grabbing; }
.js #map { display: block; width: 100%; height: 100%; }

.marker {
  position: absolute;
  top: -46px;
  left: -24px;
  width: 48px;
  height: 54px;
  will-change: transform;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.marker.off, .marker.gone { visibility: hidden; }
.marker[data-spot=none] .tag, .marker.cluster .tag b { display: none; }
.marker[data-spot=right] .tag { top: 26px; left: 50px; transform: none; }
.marker[data-spot=left] .tag { top: 26px; left: auto; right: 50px; transform: none; }
.marker[data-spot=above] .tag { top: -24px; }
.marker:focus-visible { outline-offset: -2px; border-radius: 6px; }

.tag {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink);
  font: 600 13px/1.25 var(--text);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--lift);
}
.tag b { margin-left: 4px; color: var(--coral); font-weight: 700; }
.tag i { color: var(--coral); font-style: normal; font-weight: 700; }
.marker:hover .tag, .marker.selected .tag { background: var(--ink); color: var(--paper); }
.marker:hover .tag b, .marker:hover .tag i, .marker.selected .tag b, .marker.selected .tag i { color: var(--sun); }

#peek {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 236px;
  padding: 6px;
  border-radius: 8px;
  background: var(--paper);
  pointer-events: none;
  box-shadow: 0 0 0 1.5px var(--ink), 0 4px 0 1.5px var(--ink);
}
#peek img { display: block; width: 100%; height: 120px; border-radius: 4px; object-fit: cover; background: var(--paper-2); }
#peek p { padding: 6px 2px 0; font-weight: 600; font-size: 14px; line-height: 1.2; }
#peek small { display: block; padding: 1px 2px; color: var(--soft); font-size: 12px; }

#hint {
  position: absolute;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

.js .brand { position: fixed; top: 16px; left: 16px; padding: 10px 14px 11px; border-radius: 10px; background: rgba(255, 250, 240, 0.94); box-shadow: 0 0 0 1.5px var(--ink), 0 3px 0 1.5px var(--ink); pointer-events: none; }
.js .brand a { pointer-events: auto; }
.js .tools { display: flex; gap: 10px; position: fixed; top: 18px; right: 20px; }
.js .launch { display: flex; flex-direction: column; align-items: center; gap: 7px; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); }
.launch .btn { gap: 9px; min-height: 52px; padding: 10px 26px 10px 20px; font-size: 19px; font-weight: 700; }
.die { width: 28px; height: 28px; transition: transform 200ms ease; }
.launch .btn:hover .die { transform: rotate(-14deg) scale(1.08); }
.launch p { padding: 1px 8px; border-radius: 5px; background: rgba(255, 250, 240, 0.94); font-size: 12px; font-weight: 600; box-shadow: var(--lift); }
.js .zoom { display: flex; flex-direction: column; gap: 10px; position: fixed; right: 20px; bottom: 26px; }
.js .zoom .btn { padding: 0; font-size: 22px; }
.js .tally {
  display: block;
  position: fixed;
  left: 16px;
  bottom: 18px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--lift);
}
#visited { color: var(--coral); }
.panel-open .tools, .panel-open .zoom { right: calc(var(--panel) + 20px); }
.panel-open .launch { left: calc((100vw - var(--panel)) / 2); }

.js #panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: var(--panel);
  padding: 0 24px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  border-left: 1.5px solid var(--ink);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 240ms;
}
.js #panel.open { transform: none; visibility: visible; transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .view { display: none; max-width: none; margin: 0; }
.js .view.open { display: block; }
.js .close { display: inline-flex; position: sticky; top: 16px; z-index: 2; float: right; font-size: 22px; padding: 0; }
.js label[for=q] { display: block; margin-top: 16px; color: var(--soft); font-size: 14px; }
.js #q {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 400 17px var(--text);
}
.js #atlas-count { display: block; margin-top: 10px; color: var(--soft); font-size: 14px; }

.view > header { padding: 24px 56px 16px 0; }
.view h2 { font: 700 34px/1.1 var(--text); letter-spacing: -0.02em; outline: none; overflow-wrap: anywhere; }
.country { color: var(--soft); font-size: 14px; font-weight: 500; }
.count { margin-top: 2px; color: var(--soft); font-size: 14px; }

.card { padding: 0 0 28px; }
.card + .card { padding-top: 28px; border-top: 1px solid var(--line); }

.shot { display: block; position: relative; overflow: hidden; border-radius: 10px; background: var(--paper-2); box-shadow: 0 0 0 1px rgba(29, 37, 64, 0.12); }
.shot a { display: block; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform 300ms ease; }
.shot a:hover img { transform: scale(1.02); }
.shot figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(29, 37, 64, 0.72);
  color: #fff;
  font-size: 12px;
}
.shot.none {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1200 / 630;
  background: #bfe3e2;
  color: var(--ink);
  text-decoration: none;
}
.shot.none span { font-size: 13px; color: var(--ink); opacity: 0.75; }
.ph-art { width: auto; height: 62%; max-width: 60%; }

.card h3 { margin-top: 14px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.by { margin-top: 2px; }
.by a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.by a:hover { color: var(--coral); }
.handle, .amp { color: var(--soft); }
.status { margin-top: 6px; color: var(--coral); font-size: 14px; font-weight: 500; }
.go { margin-top: 14px; padding: 11px 20px; background: var(--sun); font-size: 16px; }
.go:hover { background: #ffd663; }

.spec { margin-top: 12px; color: var(--soft); font-size: 13px; }
.spec summary { display: inline-block; padding: 10px 0; cursor: pointer; }
.spec summary:hover { color: var(--ink); }
.spec[open] summary { color: var(--ink); }
.spec .note { margin-bottom: 8px; color: var(--ink); }
.spec dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.spec dd { color: var(--ink); overflow-wrap: anywhere; }
.spec dd .ns { color: var(--soft); }
.spec .src { margin-top: 10px; font-weight: 600; }
.spec li { padding: 2px 0; overflow-wrap: anywhere; }
.spec > .ns { margin-top: 8px; }

.next {
  display: block;
  margin-top: 4px;
  padding: 16px 0 6px;
  border-top: 1.5px solid var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.next::after { content: ' \2192'; }
.next:hover { color: var(--coral); }
.next[hidden] { display: none; }

#atlas-list { margin-top: 10px; }
#atlas-list a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 4px; border-top: 1px solid var(--line); text-decoration: none; }
#atlas-list a:hover { background: var(--paper-2); }
#atlas-list li[hidden] { display: none; }
#atlas-list .name { font-weight: 600; font-size: 17px; }
#atlas-list .where { color: var(--soft); font-size: 14px; }
#atlas-list .n { margin-left: auto; color: var(--soft); font-variant-numeric: tabular-nums; }
#atlas-empty { margin-top: 12px; }

#about p { margin-top: 12px; }
#about h3 { margin-top: 24px; font-size: 18px; font-weight: 700; }
#about a { text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .panel-open .tools, .panel-open .tally { visibility: hidden; }
}

@media (max-width: 699px) {
  .js .brand { top: 10px; left: 10px; padding: 7px 11px 8px; }
  .js .brand h1 { font-size: 24px; }
  .js .brand p { display: none; }
  .js .tools { top: 66px; left: 10px; right: auto; gap: 8px; }
  .js .tools .btn { font-size: 14px; padding: 8px 12px; }
  .js .zoom { right: 12px; bottom: 18px; }
  .js .tally { left: 10px; bottom: 74px; }
  .js .launch { left: 50%; bottom: 14px; }
  .launch .btn { min-height: 48px; padding: 8px 20px 8px 14px; font-size: 17px; }
  .launch p { display: none; }
  #hint { bottom: 112px; font-size: 13px; }
  .js #panel {
    top: auto;
    left: 0;
    width: auto;
    height: 76dvh;
    padding: 0 16px calc(32px + env(safe-area-inset-bottom));
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    border-radius: 14px 14px 0 0;
    transform: translateY(104%);
  }
  .js #panel.open { transform: none; }
  .panel-open .zoom, .panel-open .tally, .panel-open .tools, .panel-open .brand, .panel-open .launch { visibility: hidden; }
  .view h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .js #panel, .js #panel.open, .btn, .shot img { transition: none; }
}
