/* Full viewport gallery. Specific selectors override the former dialog layout. */
#viewer{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#fff;color:#242424;overflow:hidden;outline:none}
#viewer[open]{display:grid;grid-template-rows:minmax(0,1fr) auto;animation:gallery-open 1.4s cubic-bezier(.4,0,.2,1) both}
#viewer::backdrop{background:transparent}
#viewer.is-closing{animation:gallery-close 1.3s .65s cubic-bezier(.4,0,.2,1) both;pointer-events:none}
#viewer[open]:not(.is-closing) .close,#viewer[open]:not(.is-closing) .expand,#viewer[open]:not(.is-closing) .gallery-controls,#viewer[open]:not(.is-closing) .viewer-caption{animation:gallery-controls-in .7s 1.2s ease both}
#viewer.is-closing .close,#viewer.is-closing .expand,#viewer.is-closing .gallery-controls,#viewer.is-closing .viewer-caption{opacity:0;transition:opacity .2s}
#viewer .render-stage{position:relative;min-width:0;min-height:0;margin:64px 82px 0;display:flex;justify-content:center;align-items:center;overflow:hidden;touch-action:pan-y pinch-zoom}
#viewer .render-stage>img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;opacity:0;margin:auto}
#viewer .render-stage.is-ready>img{opacity:1}
#viewer .render-stage.failed>img{display:none}
#viewer .render-status{display:none;background:transparent;color:#666;bottom:14px;letter-spacing:.02em;font-size:12px;white-space:normal;text-align:center;width:90%}
#viewer .render-stage[aria-busy="true"]:not(.is-ready) .render-status,#viewer .render-stage.failed .render-status{display:block}
#viewer .close,#viewer .expand,#viewer .gallery-controls button{position:absolute;display:grid;place-items:center;width:48px;height:48px;border:0;background:transparent;color:#242424;padding:12px;z-index:2;transition:opacity .2s,background .2s;border-radius:50%}
#viewer button:hover{background:#f0f0ed}
#viewer button:focus-visible{outline:2px solid #555;outline-offset:2px}
#viewer button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
#viewer .close{top:14px;right:16px}
#viewer .expand{top:14px;left:16px}
#viewer .gallery-controls{display:contents}
#viewer #gallery-prev{left:8px;top:calc(50% - 24px)}
#viewer #gallery-next{right:8px;top:calc(50% - 24px)}
#viewer #gallery-count{position:absolute;bottom:26px;right:30px;font-size:11px;color:#777;letter-spacing:.12em;font-variant-numeric:tabular-nums}
#viewer .viewer-caption{display:flex;align-items:center;justify-content:center;gap:12px;margin:0;padding:20px 90px 25px;min-height:64px;font-size:11px}
#viewer .viewer-caption h2{font:400 12px 'DM Sans',Arial,sans-serif;letter-spacing:0;margin:0}
#viewer .viewer-caption p{font-size:11px;color:#777;margin:0}
#viewer .viewer-caption a{display:none}
#viewer.is-expanded .render-stage{margin:58px 58px 8px}
#viewer.is-expanded .viewer-caption{display:none}
#viewer.is-expanded #gallery-count{bottom:12px}
@keyframes gallery-open{from{clip-path:inset(100% 0 0 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes gallery-close{from{clip-path:inset(0 0 0 0)}to{clip-path:inset(100% 0 0 0)}}
@keyframes gallery-controls-in{from{opacity:0}to{opacity:1}}
@media(max-width:760px){#viewer .render-stage{margin:calc(62px + env(safe-area-inset-top)) 18px 40px}#viewer .close,#viewer .expand{top:calc(8px + env(safe-area-inset-top))}#viewer .close{right:8px}#viewer .expand{left:8px}#viewer #gallery-prev,#viewer #gallery-next{top:auto;bottom:calc(60px + env(safe-area-inset-bottom));background:#ffffffdf}#viewer #gallery-count{bottom:calc(78px + env(safe-area-inset-bottom));right:50%;transform:translateX(50%)}#viewer .viewer-caption{padding:12px 20px calc(22px + env(safe-area-inset-bottom));gap:10px}#viewer.is-expanded .render-stage{margin:calc(60px + env(safe-area-inset-top)) 4px calc(112px + env(safe-area-inset-bottom))}#viewer.is-expanded #gallery-count{bottom:calc(78px + env(safe-area-inset-bottom))}}
