/* Progressive enhancement: original figures remain readable without JavaScript. */
.reference-local-film {width:100%;height:clamp(280px,62vh,740px);background:#111619}
.reference-local-film video {display:block;width:100%;height:100%;object-fit:contain}
.reference-local-film-caption {font-size:.8rem;line-height:1.5;color:#a7b4ae;margin:.75rem 0 0}
[data-reference-gallery]:not(.thumbnail-gallery) > figure {margin:0 0 1.5rem}
[data-reference-gallery]:not(.thumbnail-gallery) > figure > img {display:block;max-width:100%;height:auto}
[data-reference-gallery].thumbnail-gallery {--gallery-height:clamp(300px,62vh,720px);display:block;width:100%;min-width:0;margin:0 auto 2rem}
.reference-preview .project-page__gallery.thumbnail-gallery {display:block}
.thumbnail-gallery__stage {position:relative;min-width:0;touch-action:pan-y pinch-zoom}
.thumbnail-gallery .thumbnail-gallery__stage > figure {width:100%;max-width:none;min-width:0;margin:0}
.thumbnail-gallery .thumbnail-gallery__stage > figure[hidden] {display:none!important}
.thumbnail-gallery .thumbnail-gallery__stage > figure > img {display:block;width:100%;height:var(--gallery-height);max-height:none;aspect-ratio:auto;object-fit:contain;background:#111619}
.thumbnail-gallery .thumbnail-gallery__stage figcaption {margin:.75rem 3.5rem 0;min-height:3em;max-width:none;padding-top:0;color:#bbc4c2;font-size:.9rem;line-height:1.5;text-align:center}
.thumbnail-gallery .thumbnail-gallery__arrow {position:absolute;top:calc(var(--gallery-height) / 2);transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #7b8984;border-radius:50%;background:#171b1fe8;color:#fff;font:36px/1 sans-serif;cursor:pointer;z-index:1}
.thumbnail-gallery__arrow--previous {left:12px}.thumbnail-gallery__arrow--next {right:12px}
.thumbnail-gallery .thumbnail-gallery__status {margin:.25rem 0 .75rem;text-align:center;color:#bbc4c2;font-size:.8rem;line-height:1.5}
.thumbnail-gallery__strip {display:flex;justify-content:safe center;gap:10px;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 3px 12px;scrollbar-width:thin;scrollbar-color:#66716f transparent}
.thumbnail-gallery .thumbnail-gallery__thumb {display:block;flex:0 0 86px;width:86px;height:104px;padding:4px;margin:0;border:2px solid #43504c;border-radius:4px;background:#20272b;cursor:pointer;opacity:.65;box-sizing:border-box}
.thumbnail-gallery .thumbnail-gallery__thumb img {display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:contain}
.thumbnail-gallery .thumbnail-gallery__thumb[aria-pressed=true] {border-color:#0bdf8a;opacity:1;background:#263b32}
.thumbnail-gallery--spreads {container-type:inline-size}
[data-reference-gallery].thumbnail-gallery--spreads {--gallery-height:min(62vh,67.4cqw)}
.thumbnail-gallery__pages {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:var(--gallery-height);background:#111619}
.thumbnail-gallery .thumbnail-gallery__pages > img {display:block;width:100%;height:100%;min-width:0;min-height:0;max-height:none;aspect-ratio:auto;object-fit:contain}
.thumbnail-gallery .thumbnail-gallery__pages > img:first-child {object-position:right center}
.thumbnail-gallery .thumbnail-gallery__pages > img:last-child {object-position:left center}
.thumbnail-gallery--spreads .thumbnail-gallery__thumb {flex-basis:132px;width:132px;height:96px}
.thumbnail-gallery .thumbnail-gallery__thumb--paired {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1px}
.thumbnail-gallery .thumbnail-gallery__thumb--paired img:first-child {object-position:right center}
.thumbnail-gallery .thumbnail-gallery__thumb--paired img:last-child {object-position:left center}
.thumbnail-gallery .thumbnail-gallery__thumb:hover {opacity:1}.thumbnail-gallery .thumbnail-gallery__arrow:hover {border-color:#0bdf8a;background:#263b32}
.thumbnail-gallery button:focus-visible {outline:3px solid #0bdf8a;outline-offset:3px}
@media(max-width:767px){
  [data-reference-gallery].thumbnail-gallery {--gallery-height:clamp(300px,55vh,560px)}
  [data-reference-gallery].thumbnail-gallery--spreads {--gallery-height:min(55vh,67.4cqw)}
  .thumbnail-gallery .thumbnail-gallery__thumb {flex-basis:64px;width:64px;height:80px}
  .thumbnail-gallery--spreads .thumbnail-gallery__thumb {flex-basis:96px;width:96px;height:70px}
  .thumbnail-gallery__strip {gap:8px}
  .thumbnail-gallery .thumbnail-gallery__stage figcaption {margin-inline:16px;font-size:.85rem}
  .thumbnail-gallery__arrow--previous {left:8px}.thumbnail-gallery__arrow--next {right:8px}
}
