.rw-gallery {
    position: fixed; inset: 0; margin: auto;
    box-sizing: border-box;
    width: min(96vw,1700px); height: min(94dvh,1180px);
    max-width: 100vw; max-height: 100dvh;
    border: 1px solid #66685f; padding: 0;
    background: #151614; color: #f3f3ec;
    font: 16px/1.35 Inter,Arial,sans-serif;
}
.rw-gallery[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.rw-gallery::backdrop { background: rgb(7 8 7 / 91%); }
.rw-gallery-head,.rw-gallery-controls {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px 14px; padding: 8px clamp(10px,1.35vw,25px);
}
.rw-gallery-head { justify-content: space-between; border-bottom: 1px solid #55584e; }
.rw-gallery-head p { flex: 1; min-width: 0; margin: 0; font: 650 clamp(15px,1.15vw,21px)/1.2 Inter,Arial,sans-serif; }
.rw-gallery-picks { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.rw-gallery-picks[hidden] { display: none; }
.rw-gallery-controls { border-top: 1px solid #55584e; }
.rw-gallery :is(button,a) {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; border: 1px solid #72756c; border-radius: 0; padding: 6px 12px;
    font: 680 15px/1.2 Inter,Arial,sans-serif; color: #f5f5ef; background: transparent;
    cursor: pointer; text-decoration: none;
}
.rw-gallery :is(button,a):focus-visible,.rw-gallery-stage:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.rw-gallery button[aria-pressed="true"] { color: #121310; background: #f3f3ec; }
.rw-gallery button[aria-pressed="true"]:focus-visible { outline-color: #171815; }
.rw-gallery-stage { display: flex; min-height: 0; min-width: 0; overflow: auto; background: #0f100e; }
.rw-gallery-stage img { display: block; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.rw-gallery-stage.rw-actual-size img { flex: none; max-height: none; max-width: none; }
@media (max-width:600px) {
    .rw-gallery { width: 100%; height: 100dvh; }
    .rw-gallery-controls { gap: 5px; }
    .rw-gallery-controls :is(a,button) { font-size: 14px; }
}