.mg-gallery{width:100%;max-width:100%;margin:0 auto 1rem;box-sizing:border-box;color:#222;font:inherit}
.mg-gallery *{box-sizing:border-box}
.mg-gallery [hidden]{display:none!important}
.mg-gallery .mg-stage{position:relative;aspect-ratio:100/65;background:#f2f2f2;overflow:hidden}
.mg-gallery .mg-slide{position:absolute;inset:0;display:block;cursor:zoom-in}
.mg-gallery .mg-slide img{display:block;width:100%;height:100%;object-fit:contain;margin:0;border:0;max-width:100%}
.mg-gallery button{font:inherit;cursor:pointer;border:0;border-radius:3px;padding:9px 13px;background:#333;color:white;text-transform:none;line-height:1.3}
.mg-gallery .mg-prev,.mg-gallery .mg-next{position:absolute;z-index:2;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.55)}
.mg-gallery .mg-prev{left:8px}.mg-gallery .mg-next{right:8px}
.mg-gallery .mg-thumbs{display:flex;gap:5px;overflow-x:auto;padding:6px;background:#eee;scrollbar-width:thin}
.mg-gallery .mg-thumb{display:block;flex:0 0 100px;border:2px solid transparent;text-decoration:none;opacity:.65}
.mg-gallery .mg-thumb[aria-current=true]{border-color:#333;opacity:1}
.mg-gallery .mg-thumb:hover{opacity:1}
.mg-gallery .mg-thumb img{display:block;width:100%;height:75px;object-fit:cover;margin:0;border:0}
.mg-gallery .mg-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:6px}
.mg-gallery .mg-count{font-size:.9em}
.mg-gallery button:focus-visible,.mg-gallery a:focus-visible{outline:3px solid #e9a700;outline-offset:2px}
.mg-gallery .mg-dialog{width:96vw;max-width:1400px;max-height:95vh;border:0;padding:14px;background:#151515;color:white;overflow:auto}
.mg-gallery .mg-dialog::backdrop{background:rgba(0,0,0,.85)}
.mg-gallery .mg-dialog-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.mg-gallery .mg-dialog-tools button{background:#eee;color:#111}
.mg-gallery .mg-large-image{display:block;width:auto;height:auto;max-width:100%;max-height:78vh;object-fit:contain;margin:auto;border:0}
@media(max-width:480px){.mg-gallery .mg-thumb{flex-basis:80px}.mg-gallery .mg-thumb img{height:60px}.mg-gallery .mg-stage{aspect-ratio:4/3}}
