.media-gallery-page { padding: clamp(8rem, 14vw, 13rem) 0 clamp(4rem, 8vw, 8rem); min-height: 65svh; }
.media-gallery-page h1 { font-size: clamp(2.5rem, 6vw, 6rem); line-height: 1.1; margin: 0 0 2rem; }
.media-gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.media-gallery-filters button { background: transparent; border: 1px solid #aaa; border-radius: 30px; padding: .7rem 1.4rem; min-height: 44px; color: #141414; }
.media-gallery-filters button[aria-pressed="true"] { background: #d83f64; border-color: #d83f64; color: white; }
.media-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1rem; }
.media-gallery-card { margin: 0; min-width: 0; }
.media-gallery-card[hidden] { display: none; }
.media-gallery-open { display: block; width: 100%; aspect-ratio: 4/3; padding: 0; border: 0; position: relative; overflow: hidden; background: #eee; border-radius: 6px; }
.media-gallery-open img { display: block; height: 100%; width: 100%; object-fit: cover; }
.media-gallery-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: #111c; color: #fff; width: 56px; height: 56px; display: grid; place-items: center; }
.media-gallery-card figcaption { padding: .75rem 0; }
.media-gallery-card figcaption a { font-weight: 600; color: inherit; }
.media-gallery-card figcaption p { margin: .3rem 0 0; color: #666; overflow-wrap: anywhere; }
#media-gallery-viewer { width: min(1100px, 94vw); max-height: 94svh; margin: auto; padding: 48px 20px 20px; border: 0; border-radius: 12px; background: #111; color: white; }
#media-gallery-viewer::backdrop { background: #000c; }
#media-gallery-viewer [data-viewer-close] { position: absolute; top: 0; right: 4px; min-width: 44px; min-height: 44px; background: transparent; border: 0; font-size: 32px; color: #fff; }
#media-gallery-viewer img, #media-gallery-viewer video { display: block; max-width: 100%; max-height: 70svh; width: auto; margin: auto; }
#media-gallery-viewer a { color: #ff8ba8; text-decoration: underline; }
#media-gallery-viewer p { margin: 1rem 0; overflow-wrap: anywhere; }
@media (max-width: 991px) { .media-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .media-gallery-grid { grid-template-columns: 1fr; } }
.gallery figure video { width: 100%; max-height: 85svh; background: #111; border-radius: 6px; }
body:has(#media-gallery-viewer[open]) { overflow: hidden; }
