.ah-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.ah-gallery a{display:grid;aspect-ratio:4/3;background:#10141a;border-radius:8px;overflow:hidden}
.ah-gallery img{width:100%;height:100%;object-fit:contain;min-height:0}
@media(max-width:640px){.ah-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}
.ah-view{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;opacity:0;transition:opacity .18s ease}
.ah-view[open]{display:grid;place-items:center}
.ah-view::backdrop{background:rgba(6,9,14,.74);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);opacity:0;transition:opacity .18s ease}
.ah-view.visible,.ah-view.visible::backdrop{opacity:1}
.ah-view img{max-width:96%;max-height:88vh;max-height:88dvh;object-fit:contain}
.ah-view button{position:absolute;width:46px;height:46px;border:1px solid #ffffff40;border-radius:50%;background:#10141ace;color:white;font:30px/1 sans-serif;cursor:pointer}
.ah-view .exit{right:12px;top:max(12px,env(safe-area-inset-top))}
.ah-view .prev,.ah-view .next{top:50%;transform:translateY(-50%)}
.ah-view .prev{left:8px}.ah-view .next{right:8px}
html:has(.ah-view[open]){overflow:hidden}
@media(prefers-reduced-motion:reduce){.ah-view,.ah-view::backdrop{transition:none}}

.ah-view button{display:grid;place-items:center;padding:0;box-sizing:border-box;font-size:0}
.ah-view button::before{content:"";width:12px;height:12px;border:solid currentColor;border-width:2px 2px 0 0;box-sizing:border-box}
.ah-view .prev::before{transform:translateX(2px) rotate(-135deg)}
.ah-view .next::before{transform:translateX(-2px) rotate(45deg)}
.ah-view .exit::before,.ah-view .exit::after{content:"";grid-area:1/1;width:18px;height:2px;background:currentColor;border:0;transform:rotate(45deg)}
.ah-view .exit::after{transform:rotate(-45deg)}
