:root {
  --ink: #1c2b2e;
  --ink-soft: #4a6063;
  --paper: #f7f3e8;
  --paper-edge: #e7ddc3;
  --sea: #cfe3e1;
  --brass: #a8763a;
  --coral: #bb4a2c;
  --border: #cbb98a;
  --shadow: 0 18px 40px -20px rgba(20, 35, 38, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ede6d3;
    --ink-soft: #b7ad93;
    --paper: #17262a;
    --paper-edge: #243639;
    --sea: #0d1b1e;
    --brass: #d19a54;
    --coral: #e0714a;
    --border: #3a4d4f;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sea);
  color: var(--ink);
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.6rem;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.lede {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 1.6rem;
}

#map {
  height: min(70vh, 620px);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--sea);
}

.pin-icon svg { width: 100%; height: 100%; overflow: visible; }
.pin-icon path.body {
  fill: var(--brass);
  stroke: var(--paper);
  stroke-width: 1.5;
  transition: fill 0.15s ease;
}
.pin-icon circle.dot { fill: var(--paper); }
.pin-icon.is-active path.body { fill: var(--coral); }

.pin-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  line-height: 15px;
  text-align: center;
  border: 1.5px solid var(--paper);
}

.detail-wrap { margin-top: 1rem; }

.detail {
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.detail.active { display: flex; animation: rise 0.2s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .detail.active { animation: none; } }

.place-name {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 0.1rem;
}
.place-country {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--brass);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.visit-grid { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.visit-card { display: flex; flex-direction: column; align-items: center; width: 132px; }

.photo {
  position: relative;
  width: 132px;
  height: 158px;
  border-radius: 6px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
  overflow: hidden;
}
.visit-card:nth-child(even) .photo { transform: rotate(1.5deg); }
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 14, 15, 0.88);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(247, 243, 232, 0.4);
  background: transparent;
  color: #f7f3e8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(247, 243, 232, 0.15); }

.v-site {
  margin: 0 0 0.4rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.2;
  height: 2.4em;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink);
}
.v-site.is-empty { visibility: hidden; }

.v-date {
  margin: 0.6rem 0 0.1rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-align: center;
}
.v-people { margin: 0; font-size: 0.82rem; color: var(--ink-soft); text-align: center; }

.placeholder-note { margin: 0.85rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

.leaflet-container { font-family: "Work Sans", sans-serif; background: var(--sea) !important; }
