.gallery-open{display:block;position:relative;width:100%;padding:0;border:0;background:#242424;cursor:zoom-in;text-align:inherit}
.gallery-open .gallery-main{touch-action:pan-y pinch-zoom}
.gallery-enlarge{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;min-height:44px;padding:8px 13px;border:1px solid #fff6;border-radius:9px;background:#171717e8;color:#fff;font:700 15px Arial,Helvetica,sans-serif;pointer-events:none}
.gallery-open:focus-visible{outline:3px solid var(--red);outline-offset:-3px}
.photo-viewer{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#111;color:#fff;overscroll-behavior:contain}
.photo-viewer::backdrop{background:#111}
.photo-viewer-content{display:flex;flex-direction:column;height:100%;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.photo-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;background:#1c1c1c;flex:none}
.photo-header h2{font-size:19px;line-height:1.25;margin:0}
.photo-header p{font-size:15px;color:#ddd;margin:3px 0 0}
.photo-control{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 16px;border:1px solid #6a6a6a;border-radius:9px;background:#303030;color:#fff;font:700 16px Arial,Helvetica,sans-serif;cursor:pointer;touch-action:manipulation;white-space:nowrap}
.photo-control:hover{background:#454545}
.photo-control:focus-visible{outline:3px solid #fff;outline-offset:3px}
.photo-control:disabled{opacity:.4;cursor:default}
.photo-close{border-color:var(--red);background:var(--red)}
.photo-close:hover{background:var(--red-dark)}
.photo-close span{font-size:26px;line-height:1}
.photo-stage{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;cursor:zoom-in}
.photo-stage.is-zoomed{cursor:grab}
.photo-stage.is-dragging{cursor:grabbing}
.photo-stage img{width:100%;height:100%;max-width:none;object-fit:contain;transform-origin:center;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;pointer-events:none}
.photo-footer{flex:none;padding:12px 20px;background:#1c1c1c}
.photo-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.photo-nav,.photo-zoom{display:flex;align-items:center;justify-content:center;gap:8px}
.photo-step{width:48px;padding:8px;font-size:25px}
#photo-scale{min-width:54px;text-align:center;font-size:16px;font-variant-numeric:tabular-nums}
#photo-help{font-size:14px;line-height:1.4;margin:10px 0 0;color:#ddd;text-align:center}
@media(max-width:600px){.photo-header{padding:10px 12px;gap:10px}.photo-header h2{font-size:16px}.photo-header p{font-size:14px}.photo-close{padding:10px 12px}.photo-footer{padding:10px 12px}.photo-toolbar{justify-content:center;gap:10px}.photo-nav{width:100%}.photo-nav .photo-control{flex:1}.photo-zoom{width:100%}.photo-zoom #photo-reset{margin-left:auto}#photo-help{font-size:13px;margin-top:8px}}
@media(max-height:460px) and (min-width:601px){.photo-header{padding-block:6px}.photo-footer{padding-block:6px}#photo-help{margin-top:5px;font-size:12px}}
