.modal.modal-lightbox{--lightbox-h-space:calc(max(8px, env(safe-area-inset-left)) + max(8px, env(safe-area-inset-right)));--lightbox-v-space:calc(max(10px, env(safe-area-inset-top)) + max(10px, env(safe-area-inset-bottom)));width:min(1280px,96vw);height:min(960px,94dvh);max-width:calc(100vw - var(--lightbox-h-space));max-height:calc(100dvh - var(--lightbox-v-space));border:1px solid var(--line);color:var(--ink);background:#fff;border-radius:16px;margin:auto;padding:0}.modal-lightbox::backdrop{background:#10251e9e}.modal-lightbox .modal-shell{height:100%;max-height:100%}.modal-lightbox .modal-head{border-bottom:1px solid var(--line);gap:12px;min-height:58px;padding:8px 16px}.modal-lightbox .modal-head h2{color:var(--ink);font-size:18px;line-height:1.4}.modal-lightbox .icon-button{width:44px;height:44px;color:var(--forest);border:1px solid var(--line);background:#f4f7f0}.modal-lightbox .icon-button:hover{background:#e7eedf}.modal-lightbox button:focus-visible{outline:2px solid var(--forest);outline-offset:-3px}.modal-lightbox .modal-content{scrollbar-gutter:auto;flex:1;min-height:0;padding:0;overflow:hidden}.viewer{grid-template-rows:minmax(0,1fr) auto;height:100%;display:grid}.viewer-stage{touch-action:pan-y pinch-zoom;min-height:0;margin:10px 12px 0;position:relative}.viewer-canvas{overscroll-behavior:contain;scrollbar-width:thin;position:absolute;inset:0;overflow:auto}.viewer-picture{cursor:zoom-in;background:0 0;border:0;border-radius:0;width:100%;height:100%;padding:0;display:block;position:relative}.viewer-picture img{object-fit:contain}.viewer-canvas.is-enlarged .viewer-picture{cursor:zoom-out;width:250%;height:250%}.viewer-stage[data-enlarged]{touch-action:pan-x pan-y pinch-zoom}.viewer-stage .gallery-error{color:var(--ink);background:#f4f7f0}.viewer-nav{z-index:3;top:calc(50% - 22px)}.viewer-footer{grid-template-columns:60px minmax(0,1fr) 60px;align-items:center;gap:16px;padding:8px 16px;display:grid}.viewer-counter{color:var(--forest);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:13px}.viewer-thumbs{width:fit-content;max-width:100%;margin:0 auto;padding:4px}.viewer-thumbs button{opacity:.65;background:#f4f7f0;width:64px;height:64px}.viewer-thumbs button.selected{border-color:var(--forest);opacity:1}.viewer-zoom{grid-column:-2;justify-self:end}@media (max-width:767px){.modal-lightbox .modal-head{min-height:54px;padding-inline:10px}.modal-lightbox .modal-head h2{font-size:16px}.viewer-stage{margin:8px 8px 0}.viewer-footer{grid-template-columns:42px minmax(0,1fr) 44px;gap:8px;padding-inline:12px}.viewer-thumbs button{width:48px;height:48px}.viewer-stage .gallery-prev{left:8px}.viewer-stage .gallery-next{right:8px}}@media (max-height:480px){.modal-lightbox .modal-head{min-height:52px;padding-block:4px}.viewer-footer{padding-block:4px}.viewer-thumbs button{width:40px;height:40px}}
