#media-dialog:has(.gallery-viewer-image){max-height:calc(100dvh - 24px);overflow:auto}
#media-dialog:has(.gallery-viewer-image) #modal-content{display:grid;place-items:center}
#media-dialog .gallery-viewer-stage{position:relative;display:grid;place-items:center;max-width:100%;width:fit-content;margin:0 auto;touch-action:pan-y}
#media-dialog .gallery-viewer-image{display:block;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 120px);object-fit:contain;margin:0 auto}
#media-dialog .gallery-viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:48px;height:48px;padding:12px;border:0;border-radius:50%;background:#fff;color:#68253b;box-shadow:0 2px 12px #0003;cursor:pointer;z-index:2}
#media-dialog .gallery-viewer-previous{left:14px}
#media-dialog .gallery-viewer-next{right:14px}
#media-dialog .gallery-viewer-arrow svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#media-dialog .gallery-viewer-arrow:hover{background:#fcf6ed}
#media-dialog .gallery-viewer-arrow:focus-visible{outline:3px solid #edc7bb;outline-offset:3px}
#media-dialog .gallery-viewer-arrow:disabled{display:none}
#media-dialog .gallery-viewer-count{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){#media-dialog .gallery-viewer-arrow{width:44px;height:44px;padding:11px}#media-dialog .gallery-viewer-previous{left:8px}#media-dialog .gallery-viewer-next{right:8px}#media-dialog .gallery-viewer-arrow svg{width:22px;height:22px}}