.viewer{padding:0;border:0;max-width:100vw;width:100vw;height:100dvh;max-height:100dvh;background:#101512f5;color:white;overflow:hidden}
.viewer::backdrop{background:#101512}
.viewer-shell{display:grid;grid-template-columns:100px 1fr;height:100%;padding:22px;gap:20px}
.viewer-close{position:absolute;right:20px;top:12px;border:0;background:#222b25;color:white;border-radius:50%;height:36px;width:36px;font-size:25px;z-index:5}
.viewer-rail{overflow-y:auto;padding-top:38px}
.viewer-group{border-bottom:1px solid #48504a;padding:10px 0;display:grid;gap:7px}
.viewer-rail button{position:relative;border:1px solid transparent;padding:0;background:none;aspect-ratio:1;cursor:pointer;color:white}
.viewer-rail button.active{border-color:white}
.viewer-rail img{width:100%;height:100%;object-fit:contain}
.viewer-rail .rail-more{font-size:20px;background:#2f3832;aspect-ratio:2}
.viewer-stage{position:relative;display:flex;align-items:center;justify-content:center;min-width:0}
.viewer-stage img{max-width:100%;max-height:calc(100dvh - 44px);object-fit:contain}
.viewer-shell{padding:12px;grid-template-columns:60px 1fr;gap:12px}
.viewer-stage img{max-height:calc(100dvh - 24px)}
.viewer-loading{position:absolute;bottom:12px;right:12px;width:20px;height:20px;border:2px solid #728077;border-top-color:white;border-radius:50%;animation:viewer-spin .7s linear infinite}
.viewer-loading.image-error{width:auto;height:auto;border:0;border-radius:0;animation:none;color:white;background:#17271f;padding:6px 10px;font-size:12px}
.viewer-loading{animation:none}
.viewer-shell{padding:22px;grid-template-columns:100px 1fr;gap:20px}.viewer-rail{overflow-x:hidden}.viewer-rail>button{width:100%;display:block}
@keyframes viewer-spin{to{transform:rotate(360deg)}}
@media(max-width:760px){.viewer-shell{padding:12px;grid-template-columns:60px 1fr;gap:12px}}