/* The public photo carousel only; administrator editing controls stay in their grid. */
#photo-gallery .photo-gallery-arc{position:relative;padding:18px 0 24px;background:#fff;overflow:hidden}
#photo-gallery .gallery-arc-stage{position:relative;height:340px;overflow:hidden;perspective:1100px;perspective-origin:50% 42%;isolation:isolate}
#photo-gallery .gallery-arc-stage::before,#photo-gallery .gallery-arc-stage::after{content:'';position:absolute;top:0;bottom:0;width:38px;z-index:100;pointer-events:none}
#photo-gallery .gallery-arc-stage::before{left:0;background:linear-gradient(90deg,#fff,transparent)}
#photo-gallery .gallery-arc-stage::after{right:0;background:linear-gradient(270deg,#fff,transparent)}
#photo-gallery .gallery-arc-photo{position:absolute;left:50%;top:28px;display:block;padding:0;margin:0;border:0;border-radius:15px;background:#fff;box-shadow:0 10px 25px #30483b15;overflow:hidden;backface-visibility:hidden;transform-origin:center;outline-offset:5px;min-height:0}
#photo-gallery .gallery-arc-photo img{display:block;width:100%;height:100%;object-fit:cover;transition:filter .5s;pointer-events:none}
#photo-gallery .gallery-arc-photo:hover img{filter:brightness(1.04)}
#photo-gallery .gallery-arc-ground{position:absolute;bottom:27px;left:15%;right:15%;height:38px;background:radial-gradient(ellipse,#30483b13,transparent 68%);filter:blur(9px);pointer-events:none}
#photo-gallery[data-gallery-admin] .photo-gallery-grid{margin-top:22px}
#photo-gallery .photo-gallery-editor{margin:12px 0 0;font:400 12px/1.5 Arial,sans-serif;color:#526879}#photo-gallery .photo-gallery-editor>summary{width:fit-content;padding:8px 0;cursor:pointer}#photo-gallery .photo-gallery-editor .photo-gallery-grid{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-top:12px}#photo-gallery .photo-gallery-editor .photo-gallery-item{display:flex;align-items:center;gap:16px;flex:0 0 auto;width:100%;padding:8px 0;border-bottom:1px solid #eee9df}#photo-gallery .photo-gallery-editor .photo-gallery-picture{width:72px;flex:0 0 72px;aspect-ratio:4/3;border-radius:6px}#photo-gallery .photo-gallery-editor .photo-gallery-actions{justify-content:flex-start;margin:0}#photo-gallery .photo-gallery-editor .photo-gallery-empty{width:auto;min-height:40px;aspect-ratio:auto;padding:8px 12px}

/* Photo viewer: equal padding and contain the complete image in the visible viewport. */
html:has(dialog.photo-gallery-dialog[open]){overflow:hidden}
#photo-gallery dialog.photo-gallery-dialog{position:fixed;inset:0;margin:auto;width:fit-content;height:fit-content;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:16px;border:0;border-radius:16px;overflow:hidden;background:#fff;overscroll-behavior:contain;line-height:0}
#photo-gallery .photo-gallery-dialog>img{display:block;width:auto;height:auto;max-width:min(1000px,calc(100vw - 64px));max-height:calc(100dvh - 64px);object-fit:contain;margin:0;border-radius:4px}
#photo-gallery .photo-gallery-dialog-heading{position:absolute;inset:0;display:block;background:transparent;padding:0;pointer-events:none}
#photo-gallery .photo-gallery-dialog [data-gallery-close]{position:absolute;top:22px;right:22px;display:flex;align-items:center;justify-content:center;width:38px;height:38px;min-height:38px;margin:0;padding:0;border:0;border-radius:50%;background:#f3f3f1;color:#3b433f;font:400 26px/1 Arial,sans-serif;box-shadow:none;pointer-events:auto}
#photo-gallery .photo-gallery-dialog [data-gallery-close]:hover{background:#e9ebe7}

@media(max-width:550px){#photo-gallery .photo-gallery-arc{padding-top:12px}#photo-gallery .gallery-arc-stage{height:265px}#photo-gallery .gallery-arc-photo{top:25px;border-radius:12px}#photo-gallery .gallery-arc-stage::before,#photo-gallery .gallery-arc-stage::after{width:18px}#photo-gallery .gallery-arc-ground{bottom:14px;left:8%;right:8%}}
@media(prefers-reduced-motion:reduce){#photo-gallery .gallery-arc-photo img{transition:none}}
