.photo-viewer{width:max-content;max-width:92vw;max-height:88dvh;margin:auto;padding:0;border:0;background:transparent;overflow:visible;color:#fff}
.photo-viewer::backdrop{background:rgba(0,0,0,.88);backdrop-filter:blur(4px)}
.photo-viewer-stage{position:relative;display:flex;align-items:center;justify-content:center}
.photo-viewer-image{display:block;width:auto;height:auto;max-width:92vw;max-height:88dvh;object-fit:contain;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}
/* SVG plans may have only a viewBox: give them a definite width so the
   max-content dialog and flex stage cannot collapse their intrinsic size. */
.photo-viewer-image.is-plan{width:92vw;background:#fff}
.photo-viewer-stage button{position:absolute;bottom:12px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font:32px/1 Arial,sans-serif;cursor:pointer}
.photo-viewer-stage [data-prev]{left:12px}
.photo-viewer-stage [data-next]{right:12px}
.photo-viewer-stage button:hover{background:rgba(0,0,0,.75)}
.photo-viewer-stage button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.photo-viewer-help{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.photo-viewer-open{overflow:hidden}
