.gallery-image[data-viewer-ready]{cursor:zoom-in}
.photo-viewer{width:min(1000px,calc(100% - 24px));max-width:none;height:min(880px,calc(100vh - 32px));height:min(880px,calc(100dvh - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #d1bea6;border-radius:16px;background:var(--paper);color:var(--ink);box-shadow:0 20px 80px #38242d55;overflow:hidden}
.photo-viewer::backdrop{background:#24171ecc}
.photo-viewer:not([open]){display:none}
.photo-viewer-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0}
.photo-viewer-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px}
.photo-viewer-heading h2{min-width:0;overflow-wrap:anywhere;font-size:1.5rem;line-height:1.2;letter-spacing:-.025em;margin:0}
.photo-viewer-close{flex:0 0 auto;min-width:64px;min-height:44px;border:1px solid #977b80;border-radius:8px;padding:8px 12px;background:#fcf4e7;color:var(--ink);font:700 .9375rem var(--font);cursor:pointer}
.photo-viewer-close:hover{background:#ecddb9}
.photo-viewer-stage{min-height:0;display:grid;place-items:center;overflow:hidden;background:#eadfc9}
.photo-viewer-stage img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.photo-viewer-footer{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:14px 18px}
.photo-viewer-status{margin:0;flex:1;font-size:.875rem;line-height:1.4;color:var(--muted)}
.photo-viewer-status[hidden]{display:none}
.photo-viewer-footer .button{flex-shrink:0;background:var(--gold);border-color:var(--ink);color:var(--ink)}
.photo-viewer-footer .button:hover{background:var(--gold-hover)}
@media(max-width:600px){.photo-viewer{width:calc(100% - 16px);height:calc(100vh - 24px);height:calc(100dvh - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}.photo-viewer-heading{gap:10px;padding:10px 12px}.photo-viewer-heading h2{font-size:1.25rem}.photo-viewer-footer{padding:12px;flex-direction:column;gap:8px}.photo-viewer-footer .button{width:100%}.photo-viewer-status{align-self:flex-start}}
