/* Native modal top layer: above mobile navigation, theme header and admin toolbar. */
html body dialog.sca-viewer {position:fixed;inset:0;box-sizing:border-box;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#101b22;color:#fff;overflow:hidden;overscroll-behavior:contain;}
html body dialog.sca-viewer:not([open]){display:none!important}
html body dialog.sca-viewer[open]{display:flex;flex-direction:column}
.sca-viewer::backdrop{background:#101b22}
.sca-viewer .sca-viewer-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px max(12px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top));}
.sca-viewer .sca-viewer-count{font:500 15px/1.4 system-ui,sans-serif;color:#fff}
.sca-viewer .sca-viewer-stage{position:relative;display:grid;place-items:center;flex:1;min-height:0;min-width:0;padding:0 0 max(12px,env(safe-area-inset-bottom));overflow:hidden;touch-action:pan-y pinch-zoom}
.sca-viewer .sca-viewer-stage img{width:100%;height:100%;min-height:0;max-width:100%;max-height:100%;object-fit:contain;grid-area:1/1;display:block;margin:0;border-radius:0;user-select:none;-webkit-user-drag:none}
.sca-viewer button{display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid #ffffff40;border-radius:50%;background:#172a35e8;color:#fff;cursor:pointer;line-height:1;box-shadow:none;margin:0}
.sca-viewer button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.sca-viewer button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.sca-viewer button:disabled{opacity:.35;cursor:default}
.sca-viewer button[hidden],.sca-viewer-error[hidden]{display:none!important}
.sca-viewer .sca-viewer-prev,.sca-viewer .sca-viewer-next{position:absolute;top:50%;transform:translateY(-50%);z-index:1}
.sca-viewer .sca-viewer-prev{left:max(8px,env(safe-area-inset-left))}.sca-viewer .sca-viewer-next{right:max(8px,env(safe-area-inset-right))}
.sca-viewer-error{grid-area:1/1;align-self:center;justify-self:center;background:#101b22;color:#fff;padding:12px;font:14px system-ui,sans-serif}
