body {
  background: #ad1d1d;
  margin: 0;
  overflow-x: hidden;
  font-family: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif;
  font-weight: normal;
  color: #fff;
}

.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 24px;
  font-size: 18px;
}

.pages a {
  color: #adadad;
  text-decoration: none;
}

.pages a[aria-current] {
  color: #fff;
}

.menu-toggle {
  display: none;  /* shown only on mobile (see media query) */
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 18px;
  color: #adadad;
  cursor: pointer;
}

.strip-section {
  /* Full-bleed horizontally; the strip carries its own left offset so
     photos can scroll off both edges. */
  padding: 24px 0 8px;
}

.strip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding-left: 24px;
}

.strip-section h2 {
  margin: 0;
  font-weight: normal;
  font-size: 18px;
}

.strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* 24px leading buffer that scrolls away; snap rests photos here.
     Inter-photo spacing is a per-figure margin (see below) rather than
     `gap`, so it doesn't stack with the trailing ::after spacer. */
  padding-left: 24px;
  scroll-padding-left: 24px;
}

.strip::-webkit-scrollbar {
  display: none;
}

.strip::after {
  /* Trailing buffer mirroring the leading padding, so the last photo
     rests 24px off the right edge. */
  content: "";
  flex: 0 0 24px;
}

.strip figure {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  scroll-snap-align: start;
}

.strip figure + figure {
  margin-left: 24px;  /* 24px between photos; the first has none (leading buffer) */
}

.strip figure img {
  width: auto;
  height: auto;
  max-width: 480px;
  max-height: 480px;
  display: block;
  border: 12px solid #ffffff;
  box-sizing: content-box;
  cursor: zoom-in;
}

.strip figcaption {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #adadad;
}

.nav-row {
  display: flex;
  gap: 4px;
}

.nav {
  background: none;
  border: none;
  padding: 0 4px;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.strip-wrap.at-start .nav.prev,
.strip-wrap.at-end .nav.next {
  color: #adadad;
  cursor: default;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(80, 80, 80, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  border: 0 solid #ffffff;
  box-sizing: content-box;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  padding: 4px 12px;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.85;
}

.lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  /* Collapse the nav: hide the links, show the tappable menu button. */
  .pages {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 16px;
  }
  .menu-toggle {
    display: block;
  }
  .pages a {
    display: none;
    padding: 6px 0;
  }
  .pages.open a {
    display: block;
  }

  /* Scale strip photos close to the viewport width. */
  .strip-section {
    padding: 12px 0 4px;
  }
  .strip-head {
    padding-left: 16px;
  }
  /* Size every photo to a viewport-width short edge: portraits fill the
     width and fit; landscapes are as tall as the phone is wide, so their
     width overflows and they pan across. */
  .strip figure img {
    width: calc(100vw - 48px);
    height: auto;
    max-width: none;
    max-height: none;
  }
  .strip figure.landscape img {
    width: auto;
    height: calc(100vw - 48px);
  }

  /* Center each photo; swipe to scroll (arrows hidden). Proximity snap so
     wide landscapes pan freely instead of being force-centered. */
  .nav-row {
    display: none;
  }
  .strip {
    padding-left: 0;
    scroll-padding-left: 0;
    scroll-snap-type: x proximity;
  }
  .strip figure {
    scroll-snap-align: center;
  }
  .strip figure.landscape {
    scroll-snap-align: none;  /* wide landscapes pan freely, no odd center pull */
  }
  .strip::before,
  .strip::after {
    content: "";
    /* Small end buffers. Every photo is >= viewport width, so 24px is
       enough to center the first/last (symmetric 24px margins). */
    flex: 0 0 24px;
  }

  /* No close button on mobile — tap outside the photo to dismiss. */
  .lightbox-close {
    display: none;
  }
}
