.photo-viewer{box-sizing:border-box;position:fixed;inset:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#111;color:#f5f5f5;font:16px/1.5 sans-serif;overflow:hidden}
.photo-viewer[open]{display:flex;flex-direction:column}
.photo-viewer::backdrop{background:rgba(0,0,0,.94)}
.photo-viewer .photo-toolbar{display:flex;align-items:center;gap:12px;padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));flex-shrink:0}
.photo-count{margin-right:auto;font-variant-numeric:tabular-nums}
.photo-viewer button{min-width:44px;min-height:44px;padding:8px 14px;border:1px solid #666;border-radius:5px;background:#262626;color:#fff;font:inherit;cursor:pointer}
.photo-viewer button:hover{background:#444}
.photo-viewer button:disabled{opacity:.45;cursor:default}
.photo-viewer button:focus-visible,.photo-viewer a:focus-visible{outline:3px solid #ffd75e;outline-offset:2px}
.photo-stage{display:flex;align-items:center;gap:8px;flex:1;min-height:0;padding:0 12px}
.photo-viewport{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;height:100%;overflow:auto;overscroll-behavior:contain}
.photo-viewer .photo-viewport img{display:block;flex-shrink:0;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;margin:0}
.photo-viewer .photo-viewport.is-zoomed{display:block}
.photo-viewer .photo-viewport.is-zoomed img{max-width:none;max-height:none;margin:auto}
.photo-viewer .photo-prev,.photo-viewer .photo-next{flex-shrink:0;padding:0;font-size:36px;line-height:1}
.photo-viewer [hidden]{display:none!important}
.photo-footer{flex-shrink:0;text-align:center;padding:12px 16px max(16px,env(safe-area-inset-bottom));max-height:26%;overflow:auto}
.photo-viewer .photo-caption,.photo-viewer .photo-status{margin:0 0 6px;color:#eee;font-size:14px;overflow-wrap:anywhere}
.photo-viewer .photo-original{color:#ddd;font-size:13px;text-decoration:underline;box-shadow:none}
@media(max-width:600px){.photo-stage{gap:4px;padding:0 4px}.photo-viewer .photo-prev,.photo-viewer .photo-next{min-width:36px;padding:0}.photo-viewer .photo-toolbar{gap:8px;padding-top:max(8px,env(safe-area-inset-top))}.photo-footer{padding-top:8px}}
