.gallery-intro { width: min(calc(100% - 3rem), 1280px); margin: auto; padding: 4.2rem 0 2rem; border-bottom: 1px solid var(--line); }
.gallery-intro .eyebrow { margin-bottom: .75rem; }
.gallery-intro h1 { font-size: clamp(3.1rem, 6.5vw, 5.5rem); }
.gallery-intro h1 em { color: var(--olive); font-weight: 400; }
.gallery-intro > p:last-child { margin: .8rem 0 0; color: var(--muted); }
.gallery-shell { width: min(calc(100% - 3rem), 1280px); margin: auto; padding: 1.75rem 0 5rem; }
.gallery-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .9rem; padding: 1rem; background: #eeeadf; }
.gallery-filters label { min-width: min(240px, 100%); display: grid; gap: .3rem; color: var(--olive-dark); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.gallery-filters select { min-height: 46px; padding: .65rem 2rem .65rem .7rem; border: 1px solid var(--line); border-radius: 0; background: #fffdf9; color: var(--ink); font: 400 .86rem var(--sans); text-transform: none; }
.gallery-filters :focus-visible, .gallery-filter-button:focus-visible, .gallery-clear:focus-visible, .gallery-card__open:focus-visible, .gallery-pagination a:focus-visible, .memory-lightbox :focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.gallery-filter-button { min-height: 46px; padding: .7rem 1rem; border: 1px solid var(--olive); background: var(--olive); color: white; cursor: pointer; font: 600 .68rem var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.gallery-filter-button:hover { background: var(--olive-dark); }
.gallery-clear { padding: .75rem .25rem; color: var(--olive-dark); font-size: .78rem; text-underline-offset: 4px; }
.gallery-count { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gallery-count p { margin: 0; color: var(--muted); font-size: .78rem; }
.gallery-count .eyebrow { color: var(--rose); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: clamp(.75rem, 1.5vw, 1.4rem); }
.gallery-card { min-width: 0; }
.gallery-card__open { position: relative; width: 100%; min-height: 180px; padding: 0; display: block; overflow: hidden; border: 0; background: #e8e2d7; color: var(--ink); cursor: zoom-in; text-align: left; }
.gallery-card__open--video { min-height: 0; aspect-ratio: 2 / 3; }
.gallery-card__image--photo { width: 100%; height: auto; min-height: 180px; max-height: 590px; display: block; object-fit: contain; transition: transform .35s ease; }
.gallery-card[data-image-error='true'] .gallery-card__image--photo { visibility: hidden; }
.gallery-card__image--video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; object-fit: cover; background: #e8e2d7; }
.gallery-card__image--video:not([poster]):not([data-preview-ready]) { opacity: 0; }
.gallery-card__image--video[data-preview-error] { display: none; }
.gallery-card__open:hover .gallery-card__image { transform: scale(1.025); }
.gallery-film, .gallery-film__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; }
.gallery-film { z-index: 0; background: linear-gradient(150deg, #ddd8ca, #eae3d7 54%, #d8c8b9); color: var(--olive-dark); font: italic 1rem var(--serif); }
.gallery-film__overlay { z-index: 2; background: linear-gradient(180deg, transparent 48%, rgb(37 41 34 / 48%)); color: white; font: italic 1rem var(--serif); text-shadow: 0 1px 4px rgb(0 0 0 / 55%); pointer-events: none; }
.gallery-film__mark { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--olive); border-radius: 50%; font: 1rem var(--sans); }
.gallery-film__overlay .gallery-film__mark { border-color: rgb(255 255 255 / 85%); }
.gallery-card__kind { position: absolute; z-index: 3; right: .55rem; bottom: .55rem; padding: .25rem .48rem; background: rgb(245 241 233 / 92%); color: var(--olive-dark); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.gallery-card__caption { padding: .6rem .1rem .9rem; }
.gallery-card__caption p { margin: 0; font: italic .97rem/1.4 var(--serif); }
.gallery-card__caption span { display: inline-block; margin-top: .28rem; color: var(--muted); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.gallery-empty { grid-column: 1 / -1; padding: clamp(2.5rem, 8vw, 6rem) 1rem; background: #eeeadf; text-align: center; }
.gallery-empty .eyebrow { margin-bottom: .55rem; }
.gallery-empty h2 { max-width: 640px; margin: auto; }
.gallery-empty p:last-of-type { color: var(--muted); }
.gallery-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.gallery-pagination a { color: var(--olive-dark); text-decoration-color: var(--line); text-underline-offset: 5px; }
.gallery-pagination a:last-child { justify-self: end; }
.memory-lightbox { width: min(100vw, 1440px); max-width: none; height: min(100dvh, 1000px); max-height: none; margin: auto; padding: 1.1rem clamp(1rem, 3vw, 2.8rem); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 0; background: #252922; color: #f5f1e9; }
.memory-lightbox::backdrop { background: rgb(24 27 23 / 94%); }
.memory-lightbox :focus-visible { outline-color: #f0d8cc; }
.lightbox-bar, .lightbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lightbox-bar { min-height: 52px; }
.lightbox-bar h2 { font-size: 1.15rem; }
.lightbox-close, .lightbox-step { min-width: 48px; min-height: 48px; border: 1px solid rgb(245 241 233 / 35%); background: transparent; color: inherit; cursor: pointer; font: 600 .7rem var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.lightbox-close span { margin-left: .35rem; font-size: 1.3rem; vertical-align: -.08em; }
.lightbox-stage { min-height: 0; flex: 1 1 auto; display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center; gap: clamp(.5rem, 2vw, 1.5rem); }
.lightbox-step { width: 52px; height: 52px; border-radius: 50%; font-size: 1.35rem; }
.lightbox-step:disabled { opacity: .35; cursor: default; }
.lightbox-media { width: 100%; height: 100%; min-width: 0; min-height: 0; max-height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox-media img, .lightbox-media video { width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; object-fit: contain; object-position: center; }
.lightbox-footer { min-height: 62px; }
.lightbox-footer p { max-width: 75%; margin: 0; color: #d7d5ca; font: italic 1rem var(--serif); }
.lightbox-download { padding: .65rem 0; color: #f0d8cc; font-size: .7rem; letter-spacing: .08em; text-decoration-color: rgb(240 216 204 / 50%); text-transform: uppercase; text-underline-offset: 5px; }
.memory-lightbox[open] { display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
@media (min-width: 1200px) { .gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .gallery-intro, .gallery-shell { width: calc(100% - 2rem); }
  .gallery-intro { padding: 2.8rem 0 1.5rem; }
  .gallery-filters { display: grid; grid-template-columns: 1fr; }
  .gallery-filters label { min-width: 0; }
  .gallery-filter-button { width: 100%; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .gallery-card__open { min-height: 145px; }
  .gallery-card__image--photo { min-height: 145px; }
  .gallery-card__caption p { font-size: .85rem; }
  .memory-lightbox { padding: .55rem .7rem; }
  .lightbox-bar h2 { font-size: .95rem; }
  .lightbox-stage { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: .3rem; height: calc(100% - 115px); }
  .lightbox-step { width: 38px; min-width: 38px; height: 44px; min-height: 44px; border-radius: 0; }
  .lightbox-close { min-width: 44px; min-height: 44px; font-size: .62rem; }
  .lightbox-footer { align-items: flex-start; }
  .lightbox-footer p { font-size: .82rem; }
  .lightbox-download { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) { .gallery-card__image { transition: none; } }
