.fm-viewer-open{overflow:hidden}
.fm-photo-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border:0;background:#090a0b;color:#f5f0e8;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;z-index:9999}
.fm-photo-viewer::backdrop{background:#090a0b}
.fm-viewer-shell{box-sizing:border-box;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));gap:12px}
.fm-photo-viewer header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.fm-photo-viewer p,.fm-photo-viewer form{margin:0}
.fm-photo-viewer button{min-width:48px;min-height:48px;border:1px solid #b5b3ae;border-radius:3px;padding:10px 16px;background:#161718;color:inherit;font:inherit;cursor:pointer;touch-action:manipulation}
.fm-photo-viewer button:disabled{opacity:.35;cursor:default}
.fm-photo-viewer :focus-visible{outline:3px solid #ebc88d;outline-offset:3px}
.fm-viewer-stage{min-height:0;position:relative;display:flex;align-items:center;justify-content:center;touch-action:pan-y pinch-zoom;user-select:none}
.fm-viewer-stage img{display:block;width:100%;height:100%;object-fit:contain;max-height:100%;-webkit-user-drag:none}
.fm-viewer-error{position:absolute;padding:16px;background:#090a0bee}
.fm-photo-viewer footer{display:flex;justify-content:space-between;align-items:center;gap:16px}
.fm-photo-viewer footer>div{text-align:center;min-width:0}
.fm-viewer-original{display:inline-block;color:inherit;text-decoration:underline;padding:8px;font-size:13px}
.fm-viewer-hint{font-size:12px;color:#b5b3ae}
.fm-viewer-position{font-variant-numeric:tabular-nums}
@media(max-width:600px){.fm-viewer-shell{gap:8px;padding-top:max(10px,env(safe-area-inset-top))}.fm-photo-viewer footer{flex-wrap:wrap;gap:8px}.fm-photo-viewer footer>div{flex:0 0 100%;order:3}.fm-viewer-caption{font-size:14px}.fm-viewer-hint{font-size:11px}.fm-photo-viewer button{font-size:14px;padding:10px 12px}.fm-viewer-next{margin-left:auto}}
.gallery-grid a:has(img){cursor:zoom-in}
