dialog.afaj-photo-viewer {
    box-sizing: border-box; position: fixed; inset: 0; margin: auto; padding: 0;
    width: max-content; max-width: min(95vw, 90rem); min-width: min(92vw, 22rem);
    height: max-content; max-height: 96vh; max-height: 96dvh;
    overflow: auto; overscroll-behavior: contain;
    background: #17232d; color: #fff; border: 1px solid #52616c; border-radius: 14px;
    box-shadow: 0 16px 70px #08111e4d; font: 500 15px/1.4 system-ui, sans-serif;
}
dialog.afaj-photo-viewer:not([open]), .afaj-photo-viewer [hidden] {display: none !important}
dialog.afaj-photo-viewer::backdrop {background: rgba(8,14,20,.86)}
.afaj-photo-viewer .afaj-pv-top, .afaj-photo-viewer .afaj-pv-bottom {
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    padding: 8px 14px; box-sizing: border-box;
}
.afaj-photo-viewer .afaj-pv-stage {
    display: grid; place-items: center; min-width: 0; background: #0d151c;
}
.afaj-photo-viewer img.afaj-pv-picture {
    display: block; margin: 0; width: auto; height: auto; min-width: 0; min-height: 0;
    max-width: min(94vw, 89rem); max-height: max(6rem, calc(95vh - 9rem)); max-height: max(6rem, calc(95dvh - 9rem));
    object-fit: contain; border: none; border-radius: 0;
}
.afaj-photo-viewer .afaj-pv-counter {color: #d9e1e6; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums}
.afaj-photo-viewer p.afaj-pv-credit {margin: 0; padding: 3px 0; color: #f0f4f7; font: inherit; font-size: 13px}
.afaj-photo-viewer .afaj-pv-navigation {display: flex; flex-shrink: 0; gap: 6px}
.afaj-photo-viewer button {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
    margin: 0; padding: 0 12px; border: 1px solid #74838e; border-radius: 8px; background: transparent;
    color: #fff; cursor: pointer; font: 600 14px/1.1 system-ui,sans-serif; letter-spacing: normal; text-transform: none;
}
.afaj-photo-viewer .afaj-pv-close span {margin-left: 8px; font-size: 20px}
.afaj-photo-viewer .afaj-pv-navigation button {font-size: 20px}
.afaj-photo-viewer button:hover {background: #344551}
.afaj-photo-viewer :focus-visible {outline: 2px solid #e8d4a4; outline-offset: 2px}
.afaj-photo-viewer .afaj-pv-error {padding: 16px; color:#f0f4f7}
.afaj-photo-viewer .afaj-pv-error a {color: #fff; text-decoration: underline}
