#sul-viewer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:12px;box-sizing:border-box;border:0;background:#111;color:white;z-index:2147483647}#sul-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px}#sul-viewer::backdrop{background:#111}#sul-viewer .sul-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}#sul-viewer button,#sul-viewer a{background:#292929;color:white;border:1px solid #777;border-radius:4px;padding:8px 12px;font:16px Arial;cursor:pointer;text-decoration:none}#sul-viewer button:focus-visible,#sul-viewer a:focus-visible{outline:2px solid #fdc300}#sul-viewer .sul-stage{display:grid;place-items:center;overflow:hidden;touch-action:none;min-height:0;min-width:0}#sul-viewer img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;user-select:none;transform-origin:center;touch-action:none}#sul-viewer .sul-caption{text-align:center;max-height:18vh;overflow:auto;color:white;font:15px Arial}#sul-viewer [hidden]{display:none!important}

/* Explicit viewport layout: prevent theme image sizing and intrinsic grid overflow. */
#sul-viewer{width:100vw!important;height:100vh!important;height:100dvh!important;overflow:hidden!important;max-width:none!important;max-height:none!important;padding:12px 58px!important}
#sul-viewer[open]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto!important}
#sul-viewer .sul-stage{position:relative;display:flex!important;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:hidden!important}
#sul-viewer .sul-stage img{position:absolute!important;flex:none;max-width:100%!important;max-height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;object-fit:contain!important;box-sizing:border-box!important}
#sul-viewer .sul-close{position:absolute;top:12px;right:12px;z-index:2;font-size:24px;line-height:1}
#sul-viewer [data-nav]{position:absolute;top:50%;transform:translateY(-50%);z-index:2;font-size:30px;line-height:1;padding:10px}
#sul-viewer [data-nav="-1"]{left:8px}#sul-viewer [data-nav="1"]{right:8px}
#sul-viewer .sul-bar{gap:6px;min-width:0}#sul-viewer .sul-caption{margin:0;min-height:0;overflow:auto}
@media(max-width:600px){#sul-viewer{padding:10px 36px!important}#sul-viewer [data-nav]{padding:5px;font-size:24px}#sul-viewer [data-nav="-1"]{left:2px}#sul-viewer [data-nav="1"]{right:2px}#sul-viewer .sul-close{right:4px;top:4px;padding:5px}#sul-viewer .sul-bar button,#sul-viewer .sul-bar a{font-size:13px;padding:6px}}
