.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;columns:auto}
.gallery figure{margin:0;min-width:0}
.gallery-open{display:block;width:100%;padding:0;border:0;background:transparent;cursor:zoom-in;border-radius:inherit;overflow:hidden;color:inherit}
.gallery-open:focus-visible{outline:4px solid var(--red);outline-offset:-4px}
.gallery-open img{width:100%;height:auto;aspect-ratio:3/4;object-fit:cover}
.gallery.is-empty{grid-template-columns:1fr}
@media(max-width:900px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.gallery{grid-template-columns:1fr}}
.gallery-empty{display:grid;gap:8px;place-items:center;min-height:240px;padding:40px 24px;border:1px dashed #d8d8d8;border-radius:16px;background:#fafafa;color:#656565;text-align:center}
.gallery-empty strong{color:#242424;font-size:clamp(1.1rem,2vw,1.35rem)}
.gallery-empty span{max-width:42rem}
.gallery-lightbox{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:clamp(14px,3vw,36px);border:0;background:transparent;color:#fff;overflow:hidden}
.gallery-lightbox[open]{display:grid;place-items:center;animation:lightboxIn .24s ease-out}
.gallery-lightbox::backdrop{background:rgba(8,8,10,.94);backdrop-filter:blur(5px)}
.lightbox-shell{position:relative;width:min(1400px,100%);height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;justify-items:center;gap:12px}
.lightbox-image{max-width:100%;max-height:calc(100dvh - 110px);width:auto;height:auto;object-fit:contain;border-radius:14px;box-shadow:0 24px 70px #0009}
.lightbox-caption{max-width:min(760px,90vw);margin:0;text-align:center;color:#fff;font-size:clamp(13px,2vw,16px);font-weight:700}
.lightbox-close-form{position:absolute;z-index:2;right:0;top:0}
.lightbox-close{width:48px;height:48px;border:1px solid #ffffff55;border-radius:50%;background:#111214dd;color:#fff;font-size:32px;line-height:1;display:grid;place-items:center;cursor:pointer;transition:transform .2s ease,background .2s ease}
.lightbox-close:hover{background:var(--red);transform:scale(1.06)}
.lightbox-close:focus-visible{outline:3px solid #fff;outline-offset:3px}
@keyframes lightboxIn{from{opacity:0}to{opacity:1}}
@media(max-width:600px){.gallery-lightbox{padding:10px}.lightbox-shell{gap:8px}.lightbox-image{max-height:calc(100dvh - 82px);border-radius:9px}.lightbox-close-form{right:4px;top:4px}.lightbox-close{width:44px;height:44px;background:#111214ee}}
@media(prefers-reduced-motion:reduce){.gallery-lightbox[open]{animation:none}.lightbox-close{transition:none}}
