.screen-gallery { margin: 48px 0; min-width: 0; }
.screen-gallery__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.screen-gallery__heading h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.screen-gallery__heading > div { display: flex; gap: 8px; }
.screen-gallery__heading button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #4a3b30; border-radius: 50%; background: #25201c; color: #f7e9db; font-size: 20px; cursor: pointer; }
.screen-gallery__heading button:hover { border-color: #f5a04f; color: #f5a04f; }
.screen-gallery__viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #79593e transparent; padding: 0 0 12px; }
.screen-gallery .xfieldimagegallery { display: flex; gap: 12px; width: max-content; list-style: none; margin: 0; padding: 0; }
.screen-gallery .xfieldimagegallery li { flex: 0 0 clamp(240px, 32vw, 360px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; scroll-snap-align: start; background: #29231f; }
.screen-gallery .xfieldimagegallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen-gallery :focus-visible { outline: 2px solid #f5a04f; outline-offset: 3px; }
@media (max-width: 600px) { .screen-gallery { margin: 32px 0; } .screen-gallery .xfieldimagegallery li { flex-basis: min(78vw, 360px); } }
.gallery-frame { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gallery-frame img { transition: transform .35s ease; }
.gallery-frame:hover img { transform: scale(1.035); }
.gallery-lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; padding: 60px 80px; background: #100d0beb; color: #fff; }
.gallery-lightbox::backdrop { background: #000c; }
.gallery-lightbox[open] { display: grid; place-items: center; }
.gallery-lightbox img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gallery-lightbox button { position: absolute; width: 46px; height: 46px; border: 1px solid #ffffff50; border-radius: 50%; background: #211a16; color: #fff; font-size: 22px; cursor: pointer; }
.gallery-lightbox__close { right: 22px; top: 18px; }
.gallery-lightbox__prev { left: 18px; top: calc(50% - 23px); }
.gallery-lightbox__next { right: 18px; top: calc(50% - 23px); }
.gallery-lightbox__count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #e7d5c4; }
@media(max-width:600px) { .gallery-lightbox { padding: 65px 12px; } .gallery-lightbox__prev,.gallery-lightbox__next { top: auto; bottom: 16px; } }
@media(prefers-reduced-motion:reduce) { .gallery-frame img { transition: none; } }
