/* The gesture surface clips only the photograph; navigation stays outside it. */
.chat-lightbox{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;min-height:0;background:#111c26;color:#eef4f8;overflow:hidden}
.chat-lightbox .chat-photo-header{display:block;flex-shrink:0;padding:8px 10px;background:#1c2a35}
.chat-photo-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.chat-lightbox .chat-photo-actions button{min-height:44px;min-width:44px;padding:9px 12px;border:1px solid #455664;border-radius:12px;background:#2b3b48;color:#f3f6f9;font-size:13px;white-space:nowrap;touch-action:manipulation}
.chat-lightbox .chat-photo-actions [data-photo-save]{color:#f1d66e;border-color:#6d663e;background:#363d31}
.chat-lightbox .chat-photo-header>.chat-photo-name{display:block;margin-top:8px;font-size:11px;line-height:1.4;color:#bacbd6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-photo-controls{display:flex;flex-shrink:0;align-items:center;justify-content:center;gap:12px;padding:4px 10px;border-bottom:1px solid #2b3d4a;background:#172631}
.chat-photo-controls button{min-height:40px;min-width:44px;border:0;border-radius:8px;background:#ffffff0c;color:#e7f0f6;font-size:22px;padding:4px 9px;touch-action:manipulation}
.chat-photo-controls [data-photo-reset]{min-width:75px;font-size:12px}.chat-lightbox button:disabled{opacity:.45}
.chat-lightbox .chat-photo-status{flex-shrink:0;max-height:75px;overflow:auto;margin:0;padding:8px 12px;font-size:12px;line-height:1.45;color:#f1d780;background:#253529}
.chat-photo-status[hidden]{display:none}
.chat-photo-stage{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab;outline-offset:-3px}
.chat-photo-stage:active{cursor:grabbing}
.chat-photo-stage img{position:absolute;left:50%;top:50%;max-width:none;max-height:none;object-fit:contain;transform-origin:center;pointer-events:none;user-select:none;-webkit-user-select:none;will-change:transform;padding:0}
.chat-lightbox .chat-photo-hint{flex-shrink:0;margin:0;padding:7px 12px max(7px,env(safe-area-inset-bottom));font-size:10px;line-height:1.45;text-align:center;color:#aabfcd;background:#172631}
@media(max-height:480px){.chat-lightbox .chat-photo-header{padding:4px 8px}.chat-photo-header>.chat-photo-name,.chat-lightbox .chat-photo-hint{display:none!important}.chat-photo-controls{padding:0}.chat-photo-controls button{min-height:32px}.chat-lightbox .chat-photo-status{max-height:46px;font-size:11px;padding:4px 8px}}
