/* Photo viewer: self-contained overrides of the original lightbox. */
.photo-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;overflow:hidden;border:0;border-radius:0;background:rgba(13,16,17,.94);color:#f6f6f6;box-shadow:none;isolation:isolate;overscroll-behavior:contain}
.photo-viewer::backdrop{background:rgba(0,0,0,.55);backdrop-filter:blur(5px)}
.viewer-surface{position:absolute;inset:0;overflow:hidden;background:transparent}.viewer-surface:fullscreen{position:fixed;inset:0;width:100vw;height:100dvh;background:#111515}
.viewer-stage{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;touch-action:none;user-select:none;cursor:default;outline:none}
.viewer-stage.is-zoomed{cursor:grab}.viewer-stage.is-dragging{cursor:grabbing}
.photo-viewer #lightbox-image{display:block;width:auto;height:auto;max-width:none;max-height:none;object-fit:contain;transform-origin:center;user-select:none;-webkit-user-drag:none;will-change:transform;pointer-events:none;opacity:1}
.photo-viewer.is-loading #lightbox-image,.photo-viewer.has-image-error #lightbox-image{opacity:0}
.viewer-glass{background:linear-gradient(145deg,rgba(255,255,255,.19),rgba(255,255,255,.055));border:1px solid rgba(255,255,255,.4);box-shadow:inset 1px 1px 0 rgba(255,255,255,.2),inset -1px -1px 0 rgba(0,0,0,.22),0 8px 28px rgba(0,0,0,.18);backdrop-filter:blur(22px) saturate(1.15);-webkit-backdrop-filter:blur(22px) saturate(1.15);color:inherit}
.viewer-icon{position:static;display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;padding:0;line-height:1;border-radius:50%;transition:background .16s,border-color .16s,opacity .16s;z-index:auto}
.photo-viewer button:hover:not(:disabled){background-color:rgba(255,255,255,.14);border-color:rgba(255,255,255,.7);color:white}
.photo-viewer button:disabled{opacity:.3;cursor:default}.photo-viewer button:focus-visible{outline:2px solid white;outline-offset:4px}
.photo-viewer svg,.photo-viewer .lightbox-close svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.viewer-top-actions{position:absolute;right:max(18px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));display:flex;gap:10px;z-index:5}
.photo-viewer .lightbox-close{position:static;width:42px;height:42px;font-size:inherit}
.viewer-top-actions .viewer-icon{width:44px;height:44px}.viewer-top-actions .lightbox-close svg{width:21px;height:21px}
.photo-viewer .fullscreen-exit{display:none}#viewer-fullscreen[aria-pressed=true] .fullscreen-enter{display:none}#viewer-fullscreen[aria-pressed=true] .fullscreen-exit{display:block}
.viewer-sidebar{position:absolute;top:max(18px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));max-height:calc(100dvh - 36px);display:flex;flex-direction:column;align-items:flex-start;gap:11px;z-index:4;pointer-events:none;max-width:calc(100vw - 28px)}
.viewer-sidebar>*{pointer-events:auto}.viewer-counter{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border-radius:32px;padding:10px 17px;max-width:260px;min-width:88px;line-height:1.45;font-size:14px;font-variant-numeric:tabular-nums}
#lightbox-filename{font-size:12px;color:#e1e1e1;max-width:220px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.viewer-info-toggle{display:flex;align-items:center;gap:5px;padding:7px 13px;border-radius:24px;line-height:1.5;font-size:12px}.viewer-info-toggle svg{width:13px;height:13px;transition:transform .16s}.viewer-info-toggle[aria-expanded=false] svg{transform:rotate(180deg)}
.viewer-info-panel{width:250px;max-width:calc(100vw - 28px);border-radius:22px;padding:15px 15px 17px;overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#ffffff50 transparent;overscroll-behavior:contain}
.viewer-info-heading{display:flex;align-items:center;gap:9px;margin-bottom:15px}.viewer-info-heading h2{font-size:11px;letter-spacing:1.3px;font-weight:500;color:#b7b9b9}.viewer-info-heading .viewer-icon{width:26px;height:26px}.viewer-info-heading svg{width:14px;height:14px;stroke-width:1.5}
.viewer-info-rows{margin:0;font-size:12px;line-height:1.75}.viewer-info-rows>div{display:flex;flex-wrap:wrap;gap:0 6px;margin-top:8px;overflow-wrap:anywhere}.viewer-info-rows>div:first-child{margin-top:0}.viewer-info-rows dt{color:#b7baba;font-weight:400}.viewer-info-rows dt:after{content:':'}.viewer-info-rows dd{margin:0;color:#f1f2f2;font-weight:450}.viewer-info-status{font-size:10px;line-height:1.8;color:#b0b5b5;margin-top:12px}.viewer-info-status:empty{display:none}
.viewer-bottom{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:13px;z-index:5;max-width:calc(100vw - 24px)}
.viewer-size{border-radius:28px;padding:8px 17px;line-height:1.5;font-size:12px;white-space:nowrap;min-width:140px;text-align:center}
.viewer-toolbar{display:flex;align-items:center;gap:10px}.viewer-zoom-tools{display:flex;align-items:center;gap:9px;border-radius:42px;padding:8px 11px}.viewer-zoom-tools .viewer-icon{width:40px;height:40px}.viewer-zoom-tools svg{width:21px;height:21px}
.viewer-loading,.viewer-retry{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;font-size:13px;letter-spacing:.5px;color:#d5dada}.viewer-loading{pointer-events:none}.viewer-retry{padding:14px 22px;border-radius:24px}
.viewer-message{position:absolute;bottom:150px;left:50%;transform:translateX(-50%);z-index:6;padding:9px 16px;border-radius:20px;font-size:12px;max-width:calc(100vw - 30px);width:max-content;text-align:center;pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1800px){.viewer-info-panel{width:280px;padding:18px}.viewer-info-rows{font-size:13px}.viewer-counter{font-size:15px}.viewer-info-toggle{font-size:13px}}
@media(max-width:760px){.viewer-sidebar{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));gap:8px;max-height:calc(100dvh - 150px)}.viewer-counter{padding:7px 12px;font-size:12px;max-width:calc(100vw - 132px);border-radius:24px;min-width:80px}#lightbox-filename{max-width:100%;font-size:10px}.viewer-top-actions{top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));gap:8px}.viewer-top-actions .viewer-icon,.photo-viewer .lightbox-close{width:36px;height:36px}.photo-viewer svg{width:18px;height:18px}.viewer-info-toggle{font-size:11px;padding:6px 11px}.viewer-info-panel{width:255px;padding:14px;border-radius:19px;max-height:calc(100dvh - 240px);background:linear-gradient(140deg,rgba(37,42,43,.9),rgba(22,27,28,.85))}.viewer-info-rows{font-size:11px}.viewer-bottom{bottom:max(14px,env(safe-area-inset-bottom));gap:10px}.viewer-toolbar{gap:9px}.viewer-icon{width:36px;height:36px}.viewer-zoom-tools{gap:8px;padding:7px 9px}.viewer-zoom-tools .viewer-icon{width:36px;height:36px}.viewer-size{font-size:11px;padding:7px 14px}.viewer-zoom-tools svg{width:19px;height:19px}}
@media(max-height:500px){.viewer-sidebar{max-height:calc(100dvh - 24px)}.viewer-info-panel{max-height:calc(100dvh - 150px)}.viewer-bottom{bottom:10px;gap:7px}.viewer-size{padding:4px 12px}.viewer-zoom-tools{padding:5px 8px}.viewer-icon,.viewer-zoom-tools .viewer-icon{width:32px;height:32px}}
@media(prefers-reduced-motion:reduce){.photo-viewer *{transition:none!important}}
