html.photo-viewer-open{overflow:hidden}
#viewer{box-sizing:border-box;width:min(1080px,96vw);max-width:96vw;max-height:96vh;max-height:96dvh;padding:12px;background:#101012;border:1px solid #ffffff30;border-radius:16px;overflow:auto;overscroll-behavior:contain}
#viewer .viewer-bar{display:grid;grid-template-columns:48px 1fr auto 48px;align-items:center;gap:10px;padding:0 0 10px}
#viewer .viewer-bar button,#viewer .viewer-actions a{display:inline-flex;justify-content:center;align-items:center;min-height:44px;border:1px solid #ffffff60;border-radius:24px;padding:10px 16px;background:#242227;color:#fff;font:inherit;cursor:pointer;text-decoration:none}
#viewer #counter{text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
#viewer #viewer-stage{display:flex;align-items:center;justify-content:center;min-height:120px;touch-action:pan-y pinch-zoom}
#viewer #full-photo{display:block;max-width:100%;max-height:calc(96vh - 190px);max-height:calc(96dvh - 190px);width:auto;height:auto;object-fit:contain;touch-action:pan-y pinch-zoom}
#viewer .viewer-actions{display:flex;justify-content:center;padding-top:12px}
#viewer .viewer-actions a{background:var(--accent);color:#171019;border-color:transparent;font-weight:700;gap:8px}
#viewer .viewer-help{font-size:12px;line-height:1.5;text-align:center;color:#ccc6d0;margin:10px auto 0;max-width:600px}
#viewer a:focus-visible,#viewer button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:600px){#viewer{padding:10px;width:96vw;border-radius:12px}#viewer .viewer-bar{gap:6px;grid-template-columns:44px 1fr auto 44px}#viewer .viewer-bar button{padding:10px 12px}#viewer .viewer-actions a{width:100%}#viewer .viewer-help{font-size:11px}}
@media(max-height:450px) and (orientation:landscape){#viewer #full-photo{max-height:calc(96dvh - 155px)}#viewer .viewer-help{display:none}}
