.ev-profile-gallery .ev-gallery-track {
    display: flex;
    gap: 0;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
}

.ev-profile-gallery .ev-gallery-slide {
    position: relative;
    display: block;
    flex: 0 0 100%;
    min-width: 0;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
    cursor: zoom-in;
}

.ev-profile-gallery .ev-gallery-slide:focus-visible {
    outline-offset: -3px;
}

.ev-profile-gallery .ev-gallery-slide img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
}

html.ev-gallery-open {
    overflow: hidden;
}

.ev-gallery-dialog:not([open]) {
    display: none;
}

.ev-gallery-dialog[open] {
    position: fixed;
    inset: 0;
    width: fit-content;
    height: fit-content;
    max-width: calc(100% - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #101010;
    color: #fff;
}

.ev-gallery-dialog::backdrop {
    background: rgb(0 0 0 / 85%);
}

.ev-gallery-dialog img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(calc(100vw - 32px), 1100px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    object-fit: contain;
}

.ev-gallery-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #fff8;
    border-radius: 50%;
    background: #000d;
    color: #fff;
    font: 28px/1 system-ui, sans-serif;
    cursor: pointer;
}

.ev-gallery-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
