.gallery-page-body { background: var(--bg-primary); }
.gallery-page-hero { padding-top: clamp(9rem, 15vw, 12rem); padding-bottom: 3rem; }
.gallery-hero-title { max-width: 1000px; margin-inline: auto; }
.gallery-filter-bar { flex-wrap: wrap; }
.gallery-status { margin: 1.3rem 0 0; color: var(--text-muted); font-size: .72rem; letter-spacing: .08em; }
.gallery-main-section { padding-top: 0; }
.samae-category-block { margin-bottom: clamp(4rem, 10vw, 8rem); }
.samae-header { margin-bottom: 2.4rem; }
.samae-title { font-size: clamp(2.6rem, 5vw, 4rem); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.65rem, 1.6vw, 1.4rem); max-width: 1120px; margin: 0 auto; }
.portfolio-grid .samae-photo-cell { display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; background: #171715; padding: 0; color: var(--text-main); font: inherit; cursor: zoom-in; border-radius: 0; }
.portfolio-grid .samae-photo-wrapper { display: block; width: 100%; height: 100%; }
.portfolio-grid .samae-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .5s ease; }
.portfolio-grid .samae-photo-cell:hover .samae-img { transform: scale(1.045); }
.portfolio-grid .samae-photo-cell:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 5px; }
.portfolio-grid .samae-photo-cell:focus-visible .samae-cell-hover, .portfolio-grid .image-unavailable .samae-cell-hover { opacity: 1; }
.portfolio-caption { display: block; position: absolute; bottom: 1.25rem; left: 1rem; right: 1rem; font-size: .8rem; text-align: left; line-height: 1.6; }
.portfolio-grid .hover-icon { font-size: 2rem; font-family: sans-serif; font-weight: 200; }
.lightbox-modal { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; color: var(--text-main); }
.lightbox-modal:not([open]) { display: none !important; }
.lightbox-modal::backdrop { background: #080808; }
.lightbox-modal .lightbox-content { max-height: 93dvh; width: min(1100px, 82vw); }
.lightbox-modal .lightbox-img-wrapper { max-height: 69dvh; box-shadow: none; }
.lightbox-modal .lightbox-img { max-height: 69dvh; max-width: 82vw; width: auto; height: auto; touch-action: pan-y; transition: opacity .2s ease; }
.lightbox-modal .lightbox-img.is-loading { opacity: .35; }
.lightbox-status { color: var(--text-muted); font-size: .8rem; text-align: center; max-width: 35rem; }
.lightbox-status:empty { display: none; }
.lightbox-modal .lightbox-info { max-width: 680px; }
.lightbox-modal .lightbox-desc { line-height: 1.5; }
.lightbox-close { right: 1.5rem; top: 1.5rem; font-size: 2.1rem; }
.lightbox-modal .lightbox-nav { font-family: sans-serif; font-size: 1.7rem; min-width: 44px; min-height: 44px; }
.lightbox-modal :is(button, a):focus-visible, .gallery-filter-btn:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 4px; }
.gallery-page-body .footer-content { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 2.5rem; }
.gallery-page-body .footer-col a { overflow-wrap: anywhere; }
.gallery-noscript { max-width: 700px; margin: 2rem auto; padding: 1.5rem; border: 1px solid var(--border-gold); line-height: 1.8; }
.gallery-noscript a { color: var(--accent-gold); text-decoration: underline; }
@media (max-width: 900px) { .gallery-page-body .footer-content { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-filter-bar { gap: .55rem; }
  .gallery-filter-btn { font-size: .67rem; padding: .65rem .8rem; }
  .lightbox-modal { padding: 4rem .65rem 5rem; }
  .lightbox-modal .lightbox-content { width: 94vw; }
  .lightbox-modal .lightbox-img { max-width: 94vw; max-height: 61dvh; }
  .lightbox-modal .lightbox-nav { top: auto; bottom: 1.3rem; transform: none; }
  .lightbox-modal .lightbox-prev { left: calc(50% - 65px); }
  .lightbox-modal .lightbox-next { right: calc(50% - 65px); }
  .lightbox-modal .lightbox-title { font-size: 1.15rem; }
  .lightbox-modal .lightbox-desc { font-size: .74rem; }
  .lightbox-close { top: .7rem; right: .8rem; }
  .portfolio-caption { font-size: .68rem; }
  .gallery-page-body .footer-content { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { .portfolio-grid .samae-img, .lightbox-modal .lightbox-img { transition: none; } }
