#image-viewer{position:fixed;inset:var(--viewer-top,0px) 0 auto;margin:0;width:100%;max-width:100%;height:var(--viewer-height,100dvh);max-height:var(--viewer-height,100dvh);border:0;border-radius:0;padding:0;background:#111827;color:#fff;overflow:hidden;box-sizing:border-box}#image-viewer[open]{display:flex;flex-direction:column}#image-viewer::backdrop{background:#111827ed}body:has(#image-viewer[open]){overflow:hidden}.image-viewer-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:16px;padding:14px max(20px,env(safe-area-inset-right)) 14px max(20px,env(safe-area-inset-left));border-bottom:1px solid #ffffff20}.image-viewer-header>div{min-width:0}.image-viewer-header h2{font-size:17px;line-height:1.4;margin:0;color:inherit}.image-viewer-header p{font-size:13px;line-height:1.5;color:#cbd5e1;margin:4px 0 0;max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#image-viewer button{font-family:inherit;min-width:44px;min-height:44px;border:1px solid #ffffff30;border-radius:10px;background:#ffffff10;color:white;font-size:16px;line-height:1.4;padding:8px 12px;cursor:pointer}#image-viewer [data-viewer-close]{font-size:28px;padding:0;width:44px;height:44px;flex:0 0 44px}#image-viewer button:disabled{opacity:.35;cursor:default}#image-viewer button:focus-visible{outline:2px solid #7bb0ff;outline-offset:3px}.image-viewer-stage{position:relative;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}.image-viewer-canvas{width:100%;height:100%;box-sizing:border-box;padding:16px;display:grid;place-items:center}.image-viewer-canvas img{display:block;width:100%;height:100%;min-height:0;min-width:0;max-width:100%;max-height:100%;object-fit:contain;object-position:center}.image-viewer-status{position:absolute;left:16px;right:16px;top:16px;text-align:center;font-size:14px;line-height:1.6;color:#cbd5e1;pointer-events:none;margin:0}.image-viewer-status:empty{display:none}.image-viewer-controls{display:flex;flex:0 0 auto;align-items:center;justify-content:center;gap:12px;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid #ffffff20}.image-viewer-controls>span{min-width:48px;text-align:center;font-size:14px}.image-viewer-controls [data-viewer-zoom]{font-size:14px;margin-left:12px}#image-viewer.is-zoomed .image-viewer-canvas{width:200%;height:200%}#image-viewer.is-zoomed .image-viewer-stage{cursor:move}.gallery-large{cursor:zoom-in}.review-gallery>#review-photo-link{padding:0;border:0;background:transparent;width:100%;cursor:zoom-in}
@media(max-width:760px){.image-viewer-header{padding:12px 16px;min-height:68px}.image-viewer-header h2{font-size:16px}.image-viewer-header p{font-size:12px;max-width:calc(100vw - 92px)}.image-viewer-canvas{padding:8px}.image-viewer-controls{gap:8px;padding-left:12px;padding-right:12px}.image-viewer-controls [data-viewer-zoom]{margin-left:4px;font-size:12px;padding:8px;min-width:0}.image-viewer-controls>span{min-width:40px;font-size:13px}}
.image-viewer-header,.image-viewer-controls{background:#111827;color:#fff}

.gallery-large{position:relative}.gallery-zoom{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:32px;height:32px;border:1px solid #dce5f4;border-radius:9px;background:#ffffffed;color:#244b85;pointer-events:none}.gallery-zoom svg{width:18px;height:18px}

/* Zoom the photo itself; controls stay fixed while fingers pan or pinch. */
#image-viewer .image-viewer-stage{overflow:hidden;touch-action:none;user-select:none}
#image-viewer .image-viewer-canvas,#image-viewer.is-zoomed .image-viewer-canvas{width:100%;height:100%;overflow:hidden}
#image-viewer .image-viewer-canvas img{transform-origin:center;will-change:transform;pointer-events:none;-webkit-user-drag:none;user-select:none}
#image-viewer .image-viewer-stage{cursor:zoom-in}
#image-viewer.is-zoomed .image-viewer-stage{cursor:grab}
#image-viewer.is-zoomed .image-viewer-stage:active{cursor:grabbing}
.gallery-large{touch-action:pan-y pinch-zoom}.gallery-large img{-webkit-user-drag:none;user-select:none}
@media(prefers-reduced-motion:no-preference){.gallery-large img{animation:photo-appear .16s ease-out}@keyframes photo-appear{from{opacity:.8}to{opacity:1}}}

.viewer-zoom-tools{display:flex;align-items:center;gap:6px;margin-left:16px;padding-left:16px;border-left:1px solid #ffffff30}
.viewer-zoom-tools output{width:50px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums;color:#e2e8f0}
#image-viewer .viewer-zoom-tools button{width:42px;min-width:42px;height:42px;padding:8px;font-size:23px;display:grid;place-items:center}
#image-viewer .viewer-zoom-tools [data-viewer-zoom]{margin:0;font-size:16px}
.viewer-zoom-tools svg{width:19px;height:19px}
@media(max-width:760px){.image-viewer-controls{gap:5px}.viewer-zoom-tools{margin-left:5px;padding-left:9px;gap:3px}#image-viewer .viewer-zoom-tools button{width:36px;min-width:36px;min-height:44px}.viewer-zoom-tools output{width:42px;font-size:12px}#image-viewer .image-viewer-controls>[data-viewer-step]{width:40px;min-width:40px;padding:6px}}
