.gallery-viewer{box-sizing:border-box;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:rgba(15,23,20,.98);color:#fff;overflow:auto}
.gallery-viewer::backdrop{background:rgba(0,0,0,.85)}
.gallery-viewer[open]{display:flex;flex-direction:column}
.gallery-viewer__top{display:flex;justify-content:space-between;align-items:center;padding:12px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));flex:none}
.gallery-viewer__count{font:16px system-ui,sans-serif;color:#fff}
.gallery-viewer button{display:grid;place-items:center;flex:none;width:48px;height:48px;padding:0;border:1px solid rgba(255,255,255,.5);border-radius:50%;background:rgba(20,30,25,.8);color:#fff;cursor:pointer;font:32px/1 system-ui,sans-serif;min-width:0}
.gallery-viewer button:hover{background:#b74f27;color:#fff}
.gallery-viewer button:focus-visible{outline:3px solid #f8d794;outline-offset:4px}
.gallery-viewer__stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:160px;padding:0 76px;touch-action:pan-y pinch-zoom}
.gallery-viewer__image{display:block;max-width:100%;width:auto;max-height:calc(100vh - 210px);max-height:calc(100dvh - 210px);height:auto;object-fit:contain;margin:auto;user-select:none}
.gallery-viewer__prev,.gallery-viewer__next{position:absolute;top:50%;transform:translateY(-50%);z-index:1}
.gallery-viewer__prev{left:max(16px,env(safe-area-inset-left))}.gallery-viewer__next{right:max(16px,env(safe-area-inset-right))}
.gallery-viewer__caption{text-align:center;flex:none;max-width:1000px;margin:0 auto;padding:16px 24px max(24px,env(safe-area-inset-bottom));line-height:1.5}
.gallery-viewer__caption strong{display:block;font-size:19px;color:#fff}.gallery-viewer__caption p{margin:4px 0;color:#f1eee6}.gallery-viewer__credit{font-size:12px;color:#ddd}.gallery-viewer__credit a{color:#f4d5a8;text-decoration:underline}
@media(max-width:600px){.gallery-viewer__stage{padding:0 8px}.gallery-viewer__image{max-height:calc(100dvh - 220px)}.gallery-viewer__prev{left:10px}.gallery-viewer__next{right:10px}.gallery-viewer button{width:44px;height:44px}.gallery-viewer__caption{padding:14px 18px max(24px,env(safe-area-inset-bottom))}.gallery-viewer__caption strong{font-size:17px}}

.gallery-viewer button{box-sizing:border-box;align-items:center;justify-items:center;line-height:0}
.gallery-viewer button svg{display:block;width:24px;height:24px;margin:0;padding:0;flex:none;pointer-events:none}

.gallery-viewer__category{margin:0 0 6px;color:#e7c49b;font-size:13px;font-weight:500;letter-spacing:.09em;text-transform:uppercase}
