.timeline-wrapper {
  width: min(100% - 2.5rem, 1440px);
  margin: 0 auto;
  padding: 0 0 0.5rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: clip;
}

.timeline-wrapper > .section-title-wrap { margin-bottom: 0.85rem; flex: 0 0 auto; }
.timeline-rail-section { padding: 0.5rem 0 1.25rem; flex: 0 0 auto; }
.timeline-rail-scroll { overflow-x: auto; scrollbar-width: thin; padding: 0.5rem 0 0.8rem; }
.timeline-rail {
  --rail-color: #9e9a91;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-width: max(100%, calc(var(--year-count, 1) * 5.25rem));
  padding-top: 0;
}
.timeline-rail::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rail-color);
}
.timeline-rail::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: var(--selected-left, 0%);
  width: var(--selected-width, 0%);
  height: 2px;
  background: #161616;
  transition: left 220ms ease, width 220ms ease;
  pointer-events: none;
}
.timeline-year {
  position: relative;
  flex: 1 0 5.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #615e58;
  font: inherit;
  cursor: pointer;
}
.timeline-year::before {
  content: "";
  width: 2px;
  height: 0.8rem;
  margin-top: 0;
  background: #77736b;
  transition: height 180ms ease, background-color 180ms ease, width 180ms ease;
}
.timeline-year-label { font-size: 0.95rem; letter-spacing: 0.04em; }
.timeline-year[aria-pressed="true"] { color: #161616; font-weight: 700; }
.timeline-year[aria-pressed="true"]::before { height: 1.05rem; width: 3px; background: #161616; }
.timeline-year[aria-pressed="true"] .timeline-year-label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.28rem; }
.timeline-year:focus-visible { outline: 2px solid #161616; outline-offset: 4px; }
.timeline-photos[hidden] { display: none; }
.timeline-photos { position: relative; width: 100%; }
.timeline-scrollport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #b7b2a8 transparent;
}
.timeline-scrollport:focus-visible { outline: 2px solid #77736b; outline-offset: -2px; }
.timeline-scroll-cue {
  position: sticky;
  top: 48%;
  z-index: 0;
  height: 0;
  overflow: visible;
  text-align: center;
  color: #615e58;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 160ms linear;
  transform: translateY(-50%);
}
.timeline-viewport {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 12rem);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
@supports (height: 100dvh) {
  .timeline-viewport { min-height: calc(100dvh - 12rem); }
}
.timeline-cards-field {
  position: relative;
  width: 100%;
  height: 100%;
}
.timeline-card {
  position: absolute;
  top: 0;
  width: 52.6316%;
  opacity: var(--card-opacity, 0);
  transition: opacity 100ms linear;
  will-change: transform, opacity;
  pointer-events: auto;
  z-index: var(--card-depth, 1);
  transform: translate3d(0, var(--card-y, -700px), 0);
}
.timeline-card--col-1 { left: 0; }
.timeline-card--col-2 { right: 0; }
.timeline-photo-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; box-shadow: 0 18px 40px -4px rgba(0,0,0,0.32), 0 8px 16px -2px rgba(0,0,0,0.18); overflow: hidden; }
.timeline-photo-button:focus-visible { outline: 3px solid #161616; outline-offset: 4px; }
.timeline-photo-button img { display: block; width: 100%; height: auto; transition: transform 500ms cubic-bezier(.2,.7,.2,1); }
.timeline-photo-button:hover img { transform: scale(1.035); }
.timeline-photo-caption { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.65rem 0.1rem; color: #504d47; font-size: 0.78rem; letter-spacing: 0.025em; }
.timeline-photo-caption span:last-child { text-align: right; }
.timeline-scroll-track { width: 100%; pointer-events: none; }
.timeline-empty { text-align: center; padding: 2rem; color: #615e58; }

.timeline-page { height: 100vh; min-height: 0; overflow: hidden; }
@supports (height: 100dvh) {
  .timeline-page { height: 100dvh; }
}

@media (min-width: 800px) {
  .timeline-wrapper { width: min(100% - 5rem, 1440px); }
  .timeline-rail { min-width: 100%; }
  .timeline-year { flex-basis: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-year::before, .timeline-photo-button img { transition: none; }
  .timeline-card { will-change: auto; }
}

@media (max-width: 420px) {
  .timeline-wrapper { width: min(100% - 1.25rem, 1440px); }
}
