/* Stable lightbox controls for portrait, landscape and rotated photographs. */
.photo-dialog,.home-page .photo-dialog{width:min(1200px,95vw);max-width:95vw;max-height:95svh;padding:56px 22px 20px;border-radius:16px;overflow:auto;background:#171919;color:#fff;box-shadow:0 24px 80px #0005}
.photo-dialog .dialog-counter{position:absolute;top:19px;left:26px;color:#d4d9d7;font-size:14px;font-weight:600;letter-spacing:.08em;line-height:24px;font-variant-numeric:tabular-nums}
.photo-dialog #dialog-close{position:absolute;top:9px;right:12px;width:44px;height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:#fff}
.photo-dialog #dialog-close:hover{background:#ffffff18}
.photo-dialog .photo-viewer-stage{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:18px;align-items:center}
.photo-dialog .photo-navigation{position:static;display:grid;place-items:center;width:48px;height:48px;padding:0;border:1px solid #ffffff52;border-radius:50%;background:#ffffff12;color:#fff;cursor:pointer;transition:background .18s,border-color .18s}
.photo-dialog .photo-navigation:hover{background:#ed5100;border-color:#ed5100}
.photo-dialog .photo-navigation:disabled{opacity:.25;cursor:default;background:transparent}
.photo-dialog .photo-navigation .icon{width:24px;height:24px;stroke-width:1.8}
.photo-navigation-previous .icon{transform:rotate(180deg)}
.photo-dialog .photo-navigation:focus-visible,.photo-dialog #dialog-close:focus-visible{outline:2px solid #ff762f;outline-offset:3px}
.photo-dialog .dialog-image-frame,.photo-dialog.photo-dialog-turned .dialog-image-frame{position:relative;display:block;width:100%;height:min(68svh,720px);aspect-ratio:auto;overflow:hidden;container-type:size}
.photo-dialog .dialog-image-frame img{position:static;inset:auto;display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;margin:0;transform:none}
.photo-dialog.photo-dialog-turned .dialog-image-frame img{position:absolute;left:50%;top:50%;width:100cqh;height:100cqw;transform:translate(-50%,-50%) rotate(-90deg);object-fit:contain;max-width:none;max-height:none}
.photo-dialog figcaption,.home-page .photo-dialog figcaption{max-width:1000px;margin:0 auto;padding:16px 12px 0;color:#fff;font-size:14px;line-height:1.5;text-align:center}
@media(max-width:600px){
 .photo-dialog,.home-page .photo-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:54px 8px 18px;max-height:94svh}
 .photo-dialog .photo-viewer-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:5px}
 .photo-dialog .photo-navigation{width:44px;height:44px}
 .photo-dialog .dialog-image-frame,.photo-dialog.photo-dialog-turned .dialog-image-frame{height:56svh}
 .photo-dialog .dialog-counter{left:18px}
 .photo-dialog figcaption,.home-page .photo-dialog figcaption{font-size:13px;padding:14px 8px 0}
}
@media(prefers-reduced-motion:reduce){.photo-dialog .photo-navigation{transition:none}}
