.gallery {
  max-width:1180px;
  margin:0 auto;
  background:#fff;
  border:2px solid #333;
  color:#333;
}
.gallery-stage {
  position:relative;
  min-height:clamp(300px,62vw,720px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e5e2dc;
  overflow:hidden;
}
.gallery-stage img {
  display:block;
  width:100%;
  height:clamp(300px,62vw,720px);
  object-fit:contain;
  user-select:none;
}
.gallery-control {
  position:absolute;
  top:50%;
  z-index:2;
  width:52px;
  height:52px;
  transform:translateY(-50%);
  border:2px solid #333;
  background:#fff;
  color:#333;
  font:400 30px/1 'VT323', monospace;
  cursor:pointer;
}
.gallery-control:hover,.gallery-control:focus-visible { background:#333; color:#fff; outline:0; }
.gallery-prev { left:16px; }
.gallery-next { right:16px; }
.gallery-meta {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:11px 15px 10px;
  border-top:2px solid #333;
  font:400 16px/1.2 'VT323', monospace;
  letter-spacing:.5px;
  text-transform:uppercase;
}
.gallery-caption { text-align:right; }
.gallery-thumbnails {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:12px;
  border-top:2px solid #333;
  scrollbar-color:#333 #e5e2dc;
}
.gallery-thumb {
  position:relative;
  flex:0 0 80px;
  height:60px;
  padding:0;
  border:2px solid #333;
  background:#e5e2dc;
  cursor:pointer;
}
.gallery-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.gallery-thumb[aria-current="true"] { outline:3px solid #333; outline-offset:2px; }
.gallery-thumb:focus-visible { outline:3px solid #333; outline-offset:2px; }
@media (max-width:850px) {
  .gallery { margin:0 18px; }
}
@media (max-width:768px) {
  .gallery { margin:0; border:0; background:transparent; }
  .gallery-stage { min-height:0; background:transparent; touch-action:pan-y; }
  .gallery-stage img { min-height:0; height:auto; max-height:75vh; }
  .gallery-control { width:43px; height:43px; font-size:30px; border:0; background:transparent; color:#fff; text-shadow:0 1px 4px #000, 0 0 3px #000; }
  .gallery-control:hover,.gallery-control:focus-visible { background:transparent; color:#fff; outline:1px dotted currentColor; }
  .gallery-prev { left:8px; } .gallery-next { right:8px; }
  .gallery-meta { border:0; justify-content:center; padding:8px 0; }
  .gallery-thumbnails { display:none; }
}