html.gallery-open { overflow: hidden; }
main article .pic_container figure img,
main article .pic_container figure img:hover { transform: none; transition: none; cursor: zoom-in; }
#mainpic[role="button"] { cursor: zoom-in; }
[role="button"]:focus-visible, .gallery-dialog button:focus-visible { outline: 3px solid #ea913a; outline-offset: 4px; }
.gallery-dialog {
    box-sizing: border-box; width: min(96vw, 1200px); max-width: 96vw;
    max-height: 94dvh; padding: 3.5rem 1rem 1rem; border: 1px solid #555;
    border-radius: 1rem; background: #17191c; color: #fff;
    box-shadow: 0 1rem 4rem #0008;
}
.gallery-dialog::backdrop { background: #000c; }
.gallery-stage { display: flex; align-items: center; justify-content: center; gap: .75rem; }
.gallery-image, .gallery-player { display: block; min-width: 0; max-width: calc(100% - 7rem); max-height: 70dvh; object-fit: contain; border-radius: .25rem; }
.gallery-dialog.gallery-single :is(.gallery-image, .gallery-player) { max-width: 100%; }
.gallery-dialog .gallery-play { display: block; width: auto; height: auto; border-radius: .5rem; margin: .75rem auto 0; padding: .5rem 1rem; font-size: 1rem; }
main article .pic_container button.gallery-video-preview { position: relative; height: auto; padding: 0; font-size: 1rem; max-width: 100%; transform: none; }
.gallery-video-preview video { display: block; max-width: 100%; max-height: 15rem; border-radius: .25rem; }
.gallery-video-preview span { position: absolute; inset: auto 0 0; padding: .75rem; background: #000b; color: white; }
#mainvideo { display: block; position: relative; max-width: 100%; padding: 0; border: 0; margin: 0 auto; background: #17191c; cursor: pointer; }
#mainvideo video { max-height: 40rem; }
#mainvideo.left, #mainvideo.right { max-width: 25%; margin: .5rem; }
#mainvideo.left { float: left; }
#mainvideo.right { float: right; }
.gallery-dialog button { flex-shrink: 0; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid #666; border-radius: 50%; background: #30343b; color: white; font: 2rem/1 sans-serif; cursor: pointer; }
.gallery-dialog button:hover { background: #50565e; }
.gallery-close { position: absolute; top: .5rem; right: .75rem; }
.gallery-caption { margin: 1rem 0 0; text-align: center; font: 1rem/1.5 sans-serif; overflow-wrap: anywhere; }
.gallery-dialog [hidden], main button[hidden], main article[hidden] { display: none; }
main .request-status:empty { display: none; }
main .linkItem a.content-link { display: block; color: inherit; text-decoration: none; }
main #searchTags button { background: transparent; color: inherit; border: 0; padding: .25rem; font: inherit; cursor: pointer; }
@media (max-width: 600px) {
    .gallery-dialog { padding-inline: .5rem; }
    .gallery-stage { gap: .25rem; }
    .gallery-image, .gallery-player { max-width: calc(100% - 6rem); }
}
