html:has(.album-layout) {
  scroll-behavior: smooth;
}
.album-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: start;
  gap: 48px;
  padding-bottom: 32px;
}
.album-timeline {
  position: sticky;
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 4px 12px 12px 4px;
}
.timeline-title {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12px;
}
.timeline-title > span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
}
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 4px;
  border-left: 1px solid var(--line);
}
.timeline-year {
  margin: 24px 0 8px;
  padding-left: 16px;
  font-family: var(--font-display);
  font-size: 17px;
}
.timeline-list > li:first-child .timeline-year {
  margin-top: 0;
}
.timeline-list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px 8px 16px;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.timeline-list a::before {
  content: '';
  position: absolute;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}
.timeline-list a:hover,
.timeline-list a[aria-current] {
  background: var(--surface);
  color: var(--accent);
}
.timeline-list a[aria-current] {
  font-weight: 600;
}
.timeline-list a[aria-current]::before {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline-count {
  font-size: 11px;
  font-weight: 400;
}
.album-month {
  scroll-margin-top: 32px;
}
.album-month-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.album-month-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}
.album-month-heading > span {
  color: var(--muted);
  font-size: 12px;
}
.album-content .photo-grid {
  padding-bottom: 40px;
}
@media (max-width: 800px) {
  .album-layout {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
  }
  .album-content .photo-grid {
    column-gap: 20px;
  }
}
@media (max-width: 540px) {
  .album-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }
  .album-timeline {
    top: 16px;
    max-height: calc(100dvh - 32px);
    padding-right: 4px;
  }
  .timeline-year {
    padding-left: 10px;
    font-size: 15px;
  }
  .timeline-list a {
    min-height: 44px;
    padding: 8px 4px 8px 10px;
    font-size: 12px;
    gap: 4px;
  }
  .timeline-count {
    display: none;
  }
  .album-month-heading h2 {
    font-size: 19px;
  }
  .album-content .photo-grid {
    columns: 1;
  }
  .album-content .photo-grid figcaption {
    flex-wrap: wrap;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.album-layout) {
    scroll-behavior: auto;
  }
}
