/* Shared gallery and expansion experience: film albums and travel journals. */
.gallery-frame { min-width: 0; margin: 0; }
.gallery-frame .photo-frame { position: relative; content-visibility: visible; contain-intrinsic-size: none; }
.gallery-frame img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; background: transparent; }
.gallery-frame figcaption { padding-top: .8rem; color: var(--paper-soft, #596452); font-size: .9rem; line-height: 1.5; }
.gallery-caption { margin: 0; white-space: pre-wrap; text-transform: none; font: inherit; }
.gallery-frame figcaption small { display: block; margin-top: .35rem; color: var(--muted, #596452); }
.photo-frame .expand-hint { position: absolute; bottom: .6rem; right: .6rem; padding: .35rem .6rem; color: #f4f0e7; background: #18201ddd; font: .7rem/1.4 Arial, sans-serif; text-transform: none; }
.photo-grid--journal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 2.5rem 1.5rem; padding-block: 1rem 3rem; }
.photo-grid--journal > .gallery-frame:only-child { grid-column: 1 / -1; max-width: 1000px; width: 100%; margin-inline: auto; }
.photo-grid--archive { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding-block: 1rem 3rem; align-items: start; }
.photo-grid--archive .gallery-frame img { max-height: 360px; }
@media (min-width: 1101px) {
  .photo-grid--archive { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.gallery-view-nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 1rem 0; font-size: .9rem; }
.gallery-view-nav [aria-current] { font-weight: 700; text-decoration-thickness: 2px; }
.photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(96vw, 1800px); height: 96dvh; max-height: 96dvh; padding: 0; color: #eee9dd; background: #111614; border: 1px solid #3a4640; }
.photo-viewer::backdrop { background: #030605ed; }
.photo-viewer .viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; min-height: 60px; border-bottom: 1px solid #3a4640; }
.photo-viewer .viewer-bar p { max-height: 25dvh; overflow: auto; margin: 0; color: #eee9dd; white-space: pre-wrap; font: .9rem/1.5 Arial, sans-serif; text-transform: none; }
.photo-viewer .viewer-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.photo-viewer button { min-width: 44px; min-height: 44px; padding: .5rem; cursor: pointer; border: 1px solid #3a4640; background: #202a26; color: #eee9dd; }
.photo-viewer .viewer-stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; height: auto; min-height: 0; padding: .75rem; gap: .75rem; }
.photo-viewer .viewer-stage button { position: static; }
.photo-viewer .viewer-image-wrap { min-width: 0; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.photo-viewer .viewer-stage img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-viewer .viewer-image-wrap.is-zoomed { overflow: auto; }
.photo-viewer .viewer-image-wrap.is-zoomed img { width: auto; height: auto; max-width: none; max-height: none; }
.photo-viewer :focus-visible { outline: 3px solid #d6d39a; outline-offset: 3px; }
@media (max-width: 680px) {
  .photo-grid--journal { grid-template-columns: 1fr; gap: 2rem; }
  .photo-grid--archive { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem .8rem; }
  .photo-grid--archive .gallery-frame figcaption { font-size: .8rem; }
  .photo-viewer[open] { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; }
  .photo-viewer .viewer-bar { align-items: flex-start; gap: .5rem; padding: .6rem; }
  .photo-viewer .viewer-actions { gap: .3rem; }
  .photo-viewer .viewer-actions button { font-size: .75rem; }
  .photo-viewer .viewer-stage { display: block; padding: .4rem; }
  .photo-viewer .viewer-stage button { position: absolute; z-index: 2; bottom: .75rem; }
  .photo-viewer [data-viewer-previous] { left: .75rem; }
  .photo-viewer [data-viewer-next] { right: .75rem; }
}
.gallery-page .gallery-intro { min-height: 0; padding-block: 2rem 1rem; gap: 2rem; }
.gallery-page .gallery-intro h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.gallery-page .gallery-status { min-height: 0; padding-block: 1rem; }
.photography-collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 2rem; padding-block: 2rem 5rem; }
.photography-collection { min-width: 0; }
.photography-collection > a { display: block; text-decoration: none; }
.photography-collection img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: var(--bg-deep); }
.photography-collection h3 { margin: 1rem 0; }
.photography-collection p { color: var(--paper-soft); max-width: 60ch; }
.japan-photography-feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; padding-bottom: 5rem; }
.japan-feature-image img { width: 100%; height: auto; max-height: 650px; object-fit: contain; }
.japan-photography-feature .text-link { display: block; margin-top: 1.2rem; }
@media(max-width: 680px) {
  .photography-collections, .japan-photography-feature { grid-template-columns: 1fr; gap: 2rem; }
  .archive-page > .page-intro { padding-block: 2rem; }
  .japan-photography-feature { padding-bottom: 3rem; }
}
.gallery-frame .photo-frame { display: block; min-width: 0; max-width: 100%; text-decoration: none; color: inherit; cursor: zoom-in; }
.gallery-location-picker { margin: 1rem 0; font-size: .9rem; }
.gallery-location-picker summary { cursor: pointer; }
.gallery-page .breadcrumb { padding-block: 1rem; }
.gallery-page .gallery-intro { gap: 1rem; padding-block: 1.5rem 1rem; }
.gallery-page .gallery-intro > p { margin: 0; }
.gallery-page .gallery-status { flex-direction: row; align-items: baseline; }
.gallery-page .photo-grid { row-gap: 1.5rem; }
.photo-grid > .album-location:first-child { margin-top: 0; }
.archive-page > .page-intro { min-height: 0; padding-block: 2.5rem 2rem; }
.archive-page > .page-intro h1 { font-size: clamp(2.4rem, 4.8vw, 4.5rem); max-width: 19ch; }
.archive-page > .page-intro .eyebrow { margin-bottom: 1.5rem; }
.viewer-image-wrap { touch-action: pan-y pinch-zoom; }
.viewer-image-wrap.is-zoomed { touch-action: pan-x pan-y pinch-zoom; }
