/* A separate top-layer dialog leaves the underlying record and all inputs intact. */
dialog.photo-viewer{position:fixed;inset:0;margin:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;padding:0;background:#111820;color:#fff;box-shadow:none;overflow:hidden}
dialog.photo-viewer[open]{display:flex;flex-direction:column}
.photo-viewer::backdrop{background:#111820}
.photo-viewer-toolbar,.photo-viewer-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:10px;padding:12px 16px;background:#19232e}
.photo-viewer-toolbar{padding-top:max(12px,env(safe-area-inset-top));border-bottom:1px solid #ffffff24}
.photo-viewer-toolbar span{font-size:14px;color:#dce6ef}
.photo-viewer button{background:#293c50;color:#fff;border:1px solid #6f8295;border-radius:5px;min-height:44px;padding:8px 14px;font-size:14px}
.photo-viewer button:focus-visible{outline:3px solid #9acbff;outline-offset:2px}
.photo-viewer button:disabled{opacity:.35;cursor:default}
.photo-viewer-stage{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;align-items:center;justify-content:center;touch-action:pan-x pan-y pinch-zoom}
.photo-viewer-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.photo-viewer-stage img[hidden],.photo-viewer-error[hidden]{display:none}
.photo-viewer-zoomed .photo-viewer-stage{display:block}
.photo-viewer-zoomed img{max-width:none;max-height:none;width:auto;height:auto;margin:auto}
.photo-viewer-footer{padding-bottom:max(12px,env(safe-area-inset-bottom));border-top:1px solid #ffffff24}
.photo-viewer-footer span{font-size:12px;color:#becddd;text-align:center}
.photo-viewer-error{padding:24px;text-align:center;line-height:1.8;color:#dce6ef}
.photo-viewer-error button{margin-top:16px}
