/* A quiet photo album, using the same paper and ink as the main site. */
.gallery-page .site-header { position: relative; top: auto; left: auto; right: auto; margin: 28px var(--gutter) 0; }
.gallery-page .site-header a { text-shadow: none; }
.gallery-page .site-header__logo { gap: 14px; }
.gallery-page .site-header__logo img { width: 36px; min-width: 36px; mix-blend-mode: multiply; }
.gallery-page .header-nav { gap: clamp(12px, 2vw, 32px); }
.gallery-main { width: min(1440px, 100%); margin: 0 auto; padding: 0 var(--gutter) 60px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; padding: clamp(64px, 8vw, 120px) 0 52px; }
.gallery-heading h1 { font-size: clamp(40px, 5vw, 66px); font-weight: 500; line-height: 1.2; letter-spacing: .14em; }
.gallery-heading h1 span { display: block; margin-top: 18px; font-size: 13px; color: var(--sumi-soft); letter-spacing: .18em; }
.gallery-heading > p { max-width: 24em; font-size: 15px; line-height: 2; }
.gallery-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 58px; }
.gallery-filter { position: relative; display: block; width: min(460px, 100%); }
.gallery-filter label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--sumi-soft); }
.gallery-filter select { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 50px; min-height: 50px; padding: 10px 40px 10px 15px; border: 1px solid #8a867a; border-radius: 0; background: var(--kinari); color: var(--sumi); font: inherit; font-size: 16px; line-height: 1.4; text-overflow: ellipsis; }
.gallery-filter::after { content: ''; position: absolute; right: 18px; bottom: 23px; width: 8px; height: 8px; border-right: 1px solid var(--sumi); border-bottom: 1px solid var(--sumi); transform: rotate(45deg); pointer-events: none; }
.gallery-count { flex-shrink: 0; font-family: var(--font-en); font-size: 16px; color: var(--sumi-soft); white-space: nowrap; }
.gallery-section + .gallery-section { margin-top: 76px; }
.gallery-section h2 { font-size: clamp(21px, 2.3vw, 30px); font-weight: 500; line-height: 1.6; letter-spacing: .08em; margin-bottom: 30px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); align-items: start; }
.gallery-photo { display: block; min-width: 0; color: var(--sumi); cursor: zoom-in; }
.gallery-photo:nth-child(3n + 2) { margin-top: 36px; }
.gallery-photo figure { margin: 0; }
.gallery-photo img { display: block; width: 100%; height: auto; background: var(--kinari-2); }
.gallery-photo figcaption { margin-top: 13px; font-size: 13px; line-height: 1.8; }
.gallery-photo:focus-visible { outline-offset: 8px; }
.gallery-photo:hover img { opacity: .92; }
.gallery-pagination { text-align: center; margin-top: 62px; }
.gallery-more, .gallery-retry { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 40px; border: 1px solid #8a867a; border-radius: 0; background: transparent; color: var(--sumi); font: inherit; font-size: 15px; }
.gallery-more:hover, .gallery-retry:hover { background: var(--kinari-2); }
.gallery-status { font-size: 14px; color: var(--sumi-soft); line-height: 1.9; margin-bottom: 28px; }
.gallery-status .gallery-retry { display: block; margin-top: 18px; }
.gallery-fallback-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.gallery-fallback-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.gallery-noscript { font-size: 14px; margin-bottom: 28px; }
.gallery-return { text-align: center; margin-top: 70px; }
.gallery-page [hidden] { display: none !important; }

.photo-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: #211e19; color: #f4efe6; }
.photo-viewer::backdrop { background: #211e19; }
.photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; }
.photo-viewer__top, .photo-viewer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.photo-viewer button, .photo-viewer__original { min-height: 44px; border: 0; padding: 9px 12px; background: transparent; color: #f4efe6; font: inherit; font-size: 14px; }
.photo-viewer button:disabled { color: #aaa294; cursor: default; }
.photo-viewer :focus-visible { outline: 2px solid #e9d1ad; outline-offset: 2px; }
.photo-viewer__position { font-family: var(--font-en); font-size: 16px; }
.photo-viewer__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; touch-action: pan-y pinch-zoom; }
.photo-viewer__image { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.photo-viewer__loading { position: absolute; padding: 10px 18px; background: #211e19; color: #f4efe6; text-align: center; font-size: 14px; line-height: 1.8; }
.photo-viewer__caption { text-align: center; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.photo-viewer__bottom > button { flex-shrink: 0; min-width: 68px; }
.photo-viewer__original { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 5px; font-size: 12px; }
.gallery-page:lang(en) .gallery-main, .gallery-page:lang(en) .photo-viewer { font-family: var(--font-en); letter-spacing: .01em; }
.gallery-page:lang(en) .gallery-heading h1, .gallery-page:lang(en) .gallery-section h2 { letter-spacing: .025em; }
.gallery-page:lang(en) .gallery-heading > p { font-size: 19px; line-height: 1.65; }
.gallery-page:lang(en) .gallery-filter select { font-size: 18px; }
@media (max-width: 819px) {
  .gallery-page .site-header { margin-top: 18px; gap: 12px; }
  .gallery-page .site-header__logo { gap: 10px; }
  .gallery-page .site-header__logo img { width: 30px; min-width: 30px; }
  .gallery-page .edoya-brand { font-size: 19px; }
  .gallery-page .header-nav { gap: 8px; font-size: 12px; }
  .gallery-page .header-nav a { display: inline-flex; }
  .gallery-page .header-nav .gallery-header-reserve { display: none; }
  .gallery-heading { display: block; padding: 65px 0 36px; }
  .gallery-heading > p { margin-top: 26px; font-size: 14px; }
  .gallery-toolbar { display: block; margin-bottom: 38px; }
  .gallery-count { margin-top: 15px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .gallery-photo:nth-child(3n + 2) { margin-top: 0; }
  .gallery-photo:nth-child(even) { margin-top: 26px; }
  .gallery-section + .gallery-section { margin-top: 52px; }
  .gallery-section h2 { margin-bottom: 24px; }
  .photo-viewer[open] { gap: 8px; }
  .photo-viewer__top, .photo-viewer__bottom { gap: 8px; }
  .photo-viewer__caption { font-size: 12px; }
  .photo-viewer__bottom > button { min-width: 48px; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-page { scroll-behavior: auto; }
  .gallery-page *, .gallery-page *::before, .gallery-page *::after { transition: none !important; animation: none !important; }
}
