.photo-viewer { box-sizing:border-box;position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px 32px;border:0;border-radius:0;background:#f7f5ef;color:#282b27; }
.photo-viewer[open] { display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:18px; }
.photo-viewer::backdrop { background:#242723cc; }
.photo-viewer button,.photo-viewer a { color:inherit;font:inherit;letter-spacing:normal; }
.photo-viewer button { min-width:44px;min-height:44px;cursor:pointer;border:1px solid #b6b7ae;background:transparent;padding:8px 15px;border-radius:2px; }
.photo-viewer button:hover { background:#e9e7df; }
.photo-viewer button:focus-visible,.photo-viewer a:focus-visible { outline:2px solid #384b40;outline-offset:4px; }
.photo-viewer-toolbar,.photo-viewer-bottom { display:flex;align-items:center;gap:20px;justify-content:space-between; }
.photo-viewer-toolbar { font-size:14px; }
.photo-viewer-toolbar span { font-variant-numeric:tabular-nums; }
.photo-viewer-surface { min-height:0;display:grid;place-items:center;position:relative;touch-action:pan-y; }
.photo-viewer-surface img { display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain; }
.photo-viewer-surface img[hidden] { display:none; }
.photo-viewer-surface p { position:absolute;max-width:40ch;text-align:center;font-size:14px; }
.photo-viewer-bottom { font-size:14px;text-align:center; }
.photo-viewer-bottom p { margin:0 0 5px; }
.photo-viewer-bottom a { font-size:12px;text-decoration:underline;text-underline-offset:3px; }
@media(max-width:600px) { .photo-viewer { padding:14px;gap:12px; }.photo-viewer-bottom { gap:12px;font-size:12px; }.photo-viewer-bottom button { padding:8px; } }

.photo-viewer-images { display:flex;align-items:center;justify-content:center;background:#fff; }
.photo-viewer-images img { flex:none;object-fit:contain; }
[data-viewer-originals] { display:flex;flex-wrap:wrap;gap:8px 18px;justify-content:center; }

.photo-viewer-panel { position:relative;flex:none; }
.photo-viewer-panel img { position:absolute;inset:0; }
.photo-viewer-panel [data-viewer-image] { opacity:0;transition:opacity .3s ease; }
.photo-viewer-panel [data-viewer-image].detail-ready { opacity:1; }
.photo-viewer-surface [data-viewer-status] { bottom:0;margin:0;padding:5px 10px;background:#f7f5efe8;pointer-events:none; }
.photo-viewer-surface [data-viewer-status]:empty { display:none; }
@media(prefers-reduced-motion:reduce) { .photo-viewer-panel [data-viewer-image] { transition:none; } }
