/* The same photography album on the homepage and the Host page. */
.moments-section, #photography { scroll-margin-top: 90px; }
.photo-album { margin: 0 auto; max-width: 1440px; padding: 0 32px; }
.photo-track { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--red) transparent; padding: 0 0 16px; }
.photo-track:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.photo-frame { flex: 0 0 min(72%, calc(500px * var(--photo-ratio, 1.5))); margin: 0; min-width: 0; scroll-snap-align: start; }
.photo-frame img { background: var(--paper-deep); display: block; height: clamp(340px, 38vw, 500px); object-fit: contain; width: 100%; }
.photo-frame figcaption { color: var(--ink-soft); font-size: 13px; line-height: 1.5; padding: 14px 0 0; }
.photo-controls { align-items: center; display: flex; gap: 20px; justify-content: space-between; padding-top: 16px; }
.photo-note { color: var(--ink-soft); font-size: 13px; line-height: 1.6; margin: 0; }
.photo-pagination { align-items: center; display: flex; flex-shrink: 0; gap: 18px; }
.photo-pagination button { align-items: center; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: inline-flex; font: inherit; font-size: 21px; height: 44px; justify-content: center; width: 44px; }
.photo-pagination button:disabled { cursor: default; opacity: .3; }
.photo-pagination button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.photo-counter { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 50px; text-align: center; }
.photo-album [hidden] { display: none; }
@media (max-width: 680px) {
  .photo-album { padding: 0 22px; }
  .photo-track { gap: 12px; }
  .photo-frame { flex-basis: calc(100% - 20px); }
  .photo-frame img { height: 380px; max-height: 60svh; }
  .photo-controls { align-items: start; flex-direction: column; gap: 14px; }
  .photo-pagination { align-self: flex-end; }
  .photo-frame figcaption { min-height: 54px; }
}

/* Keep the existing album styling, with navigation visible before the photos. */
.photo-album { display: flex; flex-direction: column; }
.photo-controls { order: -1; padding: 0 0 20px; }
.photo-pagination button { border-color: var(--ink-soft); }
.photo-counter { color: var(--ink); font-size: 14px; }
.photo-expand { display: block; padding: 0; border: 0; width: 100%; background: transparent; cursor: zoom-in; }
.photo-expand:focus-visible { outline: 2px solid var(--red); outline-offset: -3px; }
.photo-viewer { box-sizing: border-box; background: #11110f; color: #f5f1e9; border: 0; margin: 0; padding: 66px 28px 20px; width: 100vw; max-width: none; height: 100dvh; max-height: none; }
.photo-viewer::backdrop { background: #11110f; }
.photo-viewer[open] { display: flex; flex-direction: column; gap: 16px; }
.photo-viewer-image { min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; }
.photo-viewer-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-viewer-close { position: absolute; top: 12px; right: 22px; width: 44px; height: 44px; border: 1px solid #777; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 30px; }
.photo-viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.photo-viewer-caption { margin: 0; font-size: 14px; line-height: 1.5; }
.photo-viewer .photo-pagination button, .photo-viewer .photo-counter { color: inherit; border-color: #777; }
.photo-viewer button:focus-visible { outline: 2px solid #f5f1e9; outline-offset: 3px; }
@media (max-width: 680px) {
  .photo-controls { flex-direction: column-reverse; gap: 12px; }
  .photo-pagination { align-self: flex-end; }
  .photo-viewer { padding: 64px 16px max(16px, env(safe-area-inset-bottom)); }
  .photo-viewer-footer { align-items: stretch; flex-direction: column; }
  .photo-viewer-caption { min-height: 21px; }
}
