:root {
  --bg: #f6f1e7;
  --ink: #2b2118;
  --accent: #9c4221;
  --line: #6b5842;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

.page-header { text-align: center; padding: 2rem 1rem 0; }
.page-header h1 { margin: 0; letter-spacing: .08em; text-transform: uppercase; font-size: 1.5rem; }
.empty { text-align: center; margin-top: 4rem; }

.timeline-scroll { overflow-x: auto; padding: 0 4rem; }

.timeline {
  position: relative;
  min-width: 1400px;
  height: 70vh;
  min-height: 460px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.timeline-point { position: absolute; top: 50%; transform: translateX(-50%); }

.dot {
  display: block;
  width: 20px; height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--accent);
  cursor: pointer;
  padding: 0;
}
.dot:hover, .dot:focus-visible { transform: scale(1.3); outline: 2px solid var(--ink); }

.point-label {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-size: .8rem;
}
.timeline-point.above .point-label { bottom: 28px; }
.timeline-point.below .point-label { top: 28px; }

.timeline-point.active { z-index: 10; }

.popup {
  position: absolute;
  left: 50%; transform: translateX(calc(-50% + var(--shift, 0px)));
  max-width: calc(100vw - 16px);
  width: 280px;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.popup[hidden] { display: none; }
.timeline-point.above .popup { bottom: 50px; }
.timeline-point.below .popup { top: 50px; }
.popup h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.popup p { margin: .5rem 0 0; font-size: .9rem; line-height: 1.4; }
.popup .popup-date { color: var(--accent); font-style: italic; margin-top: 0; }
.popup-media { width: 100%; border-radius: 4px; margin-top: .5rem; }
