.nd-gallery { background: #fff; }
.nd-gallery-grid { column-count: 4; column-gap: 20px; margin: 0; padding: 0 var(--ep-pad) 72px; list-style: none; }
.nd-gallery-grid li { break-inside: avoid; padding: 0 0 20px; }
.nd-gallery-grid button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #efede9; cursor: zoom-in; }
.nd-gallery-grid :is(img, video) { display: block; width: 100%; height: auto; }
.nd-gallery-video { position: absolute; bottom: 10px; left: 10px; background: #fff; padding: 3px 8px; font-size: 11px; }
.nd-gallery-open { overflow: hidden; }
.nd-gallery-detail { position: fixed; inset: 0; box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 66px var(--ep-pad) 36px; overflow: auto; border: 0; background: white; color: var(--ep-ink); }
.nd-gallery-detail::backdrop { background: white; }
.nd-gallery-close { position: fixed; z-index: 1; top: 15px; right: var(--ep-pad); width: 44px; height: 44px; border: 1px solid #ddd9d3; background: white; color: inherit; font: 28px/1 var(--sans); }
.nd-gallery-detail figure { margin: 0 auto; max-width: 1120px; }
.nd-gallery-media :is(img, video) { display: block; width: auto; height: auto; max-width: 100%; max-height: 70dvh; margin: 0 auto; object-fit: contain; }
.nd-gallery-detail figcaption { max-width: 730px; margin: 24px auto 0; }
.nd-gallery-detail figcaption h2 { font-size: clamp(28px, 3vw, 44px); }
.nd-gallery-detail figcaption p { margin: 8px 0 0; }
.nd-gallery-models a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) { .nd-gallery-grid { column-count: 3; } }
@media (max-width: 640px) { .nd-gallery-grid { column-count: 2; column-gap: 10px; } .nd-gallery-grid li { padding-bottom: 10px; } }

.nd-gallery-detail figcaption h2 { line-height: 1.15; }
