.capture-trigger { cursor: zoom-in; transition: filter 140ms ease; }
.capture-trigger:hover { filter: brightness(.98); }
.capture-trigger:focus-visible { outline: 3px solid #7c3684; outline-offset: 5px; }

.capture-gallery {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 64px clamp(64px, 4vw, 72px) 56px;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
    opacity: 1;
    transition: opacity 120ms ease;
}
.capture-gallery[open] { display: flex; animation: capture-gallery-in 140ms ease; }
.capture-gallery:not([open]) { display: none; }
.capture-gallery::backdrop { background: rgba(25, 18, 29, .78); animation: capture-gallery-in 140ms ease; transition: opacity 120ms ease; }
.capture-gallery.is-closing, .capture-gallery.is-closing::backdrop { opacity: 0; }
.capture-gallery__stage { display: flex; width: 100%; height: 100%; min-width: 0; align-items: center; justify-content: center; }
.capture-gallery__image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; touch-action: pan-y pinch-zoom; }
.capture-gallery button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 6px;
    background: #39243e;
    color: #fff;
    cursor: pointer;
    font: 2rem/1 system-ui, sans-serif;
}
.capture-gallery button[hidden], .capture-gallery__counter[hidden] { display: none; }
.capture-gallery button:hover { background: #58255e; }
.capture-gallery button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.capture-gallery__close { top: 12px; right: max(16px, env(safe-area-inset-right)); }
.capture-gallery__previous { left: 12px; top: calc(50% - 22px); }
.capture-gallery__next { right: 12px; top: calc(50% - 22px); }
.capture-gallery__counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 10px; color: #fff; background: #39243e; border-radius: 4px; font: .875rem/1.6 system-ui, sans-serif; }
@keyframes capture-gallery-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
    .capture-gallery { padding-inline: 12px; padding-bottom: 72px; }
    .capture-gallery__previous, .capture-gallery__next { top: auto; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .capture-trigger, .capture-gallery, .capture-gallery::backdrop { animation: none !important; transition: none !important; }
}
