/* Gestures belong to the image surface, not the whole page. */
.lightbox{height:100vh;max-height:100vh;height:100dvh;max-height:100dvh;overscroll-behavior:none}
.lightbox .viewer-stage{position:relative;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.lightbox .viewer-stage img{flex:none;width:auto;height:auto;max-width:none;max-height:none;object-fit:contain;transform-origin:center;transition:transform .18s ease;will-change:transform;pointer-events:none}
.lightbox .viewer-stage.is-dragging{cursor:grabbing}
.lightbox .viewer-stage.is-dragging img{transition:none}
.viewer-feedback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;pointer-events:none;color:#c5c7c2;font-size:13px}
.viewer-feedback button{pointer-events:auto;background:transparent;color:inherit;border:1px solid #677063;border-radius:24px;min-height:44px;padding:8px 20px}
.lightbox .viewer-bar>div{flex-wrap:wrap;justify-content:flex-end}
.lightbox .viewer-counter{flex-shrink:0;font-variant-numeric:tabular-nums}
.lightbox .viewer-nav button{touch-action:manipulation}
.lightbox .viewer-caption{line-height:1.5}
@media(max-width:700px){.lightbox .viewer-nav{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.viewer-hint{font-size:10px}.lightbox .viewer-bar button{min-height:44px}}
@media(max-height:480px){.lightbox .viewer-bar,.lightbox .viewer-nav{min-height:48px;padding-block:4px}.viewer-treatment,.viewer-hint{display:none}.lightbox .viewer-caption{max-height:40px}.lightbox .viewer-stage{padding:8px}}
@media(prefers-reduced-motion:reduce){.lightbox .viewer-stage img{transition:none}}
