:root {
  --bg: #faf7f2;
  --ink: #3b3a36;
  --muted: #8a857c;
  --accent: #c9855b;
  --card: #ffffff;
  --line: #e8e2d8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1e1c;
    --ink: #ece7df;
    --muted: #a39d93;
    --accent: #e0a37a;
    --card: #2a2926;
    --line: #3a3834;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
}
html[data-lang="nl"] [lang="en"],
html[data-lang="en"] [lang="nl"] { display: none !important; }

.right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch button {
  font: inherit;
  font-size: .8rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 2px 6px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { border-color: var(--line); color: var(--ink); }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: .95rem;
}
nav a:first-child { margin-left: 0; }
nav a[aria-current="page"] { color: var(--accent); }

/* Map page */
/* The map and the story panel share the space below the header */
.stage { flex: 1; position: relative; min-height: 300px; }
#map { position: absolute; inset: 0; z-index: 0; }
.count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--card);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  white-space: nowrap;
}
.pin {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.leaflet-popup-content { font-family: "Nunito", system-ui, sans-serif; margin: 12px 14px; }
.popup h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; margin: 0 0 4px; font-size: 1.1rem; }
.popup .meta { color: #8a857c; font-size: .85rem; margin: 0 0 6px; }
.popup p { margin: 6px 0 0; }
.popup img { width: 100%; max-width: 240px; max-height: 180px; object-fit: cover; border-radius: 6px; margin: 0 0 8px; display: block; }
.leaflet-container a.popup-more { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.popup-more:hover { text-decoration: underline; }

/* Story panel: photos and story of one place */
.story {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  z-index: 1000;
  overflow-y: auto;
  background: var(--card);
  color: var(--ink);
  box-shadow: -4px 0 18px rgba(0,0,0,.18);
  padding: 28px 24px 40px;
  line-height: 1.65;
}
.story[hidden] { display: none; }
.story h2 { font-family: "Fraunces", Georgia, serif; font-weight: 500; margin: 0 36px 4px 0; font-size: 1.5rem; }
.story .meta { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.story p { margin: 0 0 14px; }
.story figure { margin: 18px 0; }
.story figure img { width: 100%; border-radius: 8px; display: block; background: var(--line); }
.story figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.story a { color: var(--accent); }
.story-back { text-decoration: none; font-size: .95rem; }
.story-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--bg); color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* About page */
main.about {
  max-width: 620px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  line-height: 1.7;
}
main.about img {
  width: 180px; height: 180px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 28px;
  background: var(--line);
}
main.about h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  text-align: center;
  margin: 0 0 4px;
}
main.about .dates { text-align: center; color: var(--muted); margin: 0 0 32px; }
main.about .closing { text-align: center; margin-top: 40px; }
main.about a { color: var(--accent); }

/* Donate */
.donate {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.donate:hover { filter: brightness(1.05); }
.donate-box {
  margin-top: 40px;
  padding: 24px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.donate-box p { margin: 0 0 16px; }
main.about a.donate { color: #fff; }
.donate.big { display: inline-block; font-size: 1rem; padding: 10px 22px; }

/* Dimi Classic page */
main.about img.classic-logo { width: 300px; max-width: 100%; height: auto; border-radius: 16px; }
main.about h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.25rem;
  margin: 40px 0 12px;
}
.facts { list-style: none; padding: 0; margin: 20px 0 0; }
.facts li { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { flex: 0 0 96px; font-weight: 600; color: var(--accent); }
.editions { list-style: none; padding: 0; margin: 0; }
.editions li { display: flex; gap: 14px; padding: 6px 0; }
.editions .year { font-family: "Fraunces", Georgia, serif; color: var(--accent); min-width: 44px; }
