.game-gallery { padding-block: clamp(28px, 5vw, 64px) 24px; }
.gallery-stage { position: relative; aspect-ratio: 2.32; margin-top: -12px; isolation: isolate; overflow: hidden; touch-action: pan-y; }
.gallery-slide { position: absolute; top: 50%; left: 50%; width: 70%; padding: 4px; border: 1px solid #ba9659; background: #211b16; box-shadow: 0 12px 36px #0009, inset 0 0 0 1px #e8c58045; transform: translate(-50%, -50%) scale(.75); opacity: 0; pointer-events: none; transition: transform .45s ease, opacity .45s ease, filter .45s ease; }
.gallery-slide img { display: block; width: 100%; height: auto; aspect-ratio: 1590 / 890; object-fit: contain; background: #151410; }
.gallery-slide.is-current { opacity: 1; z-index: 3; transform: translate(-50%, -50%); pointer-events: auto; cursor: zoom-in; }
.gallery-slide.is-previous, .gallery-slide.is-next { opacity: 1; z-index: 1; filter: brightness(.46); pointer-events: auto; cursor: pointer; }
.gallery-slide.is-previous { transform: translate(-94%, -50%) scale(.84); }
.gallery-slide.is-next { transform: translate(-6%, -50%) scale(.84); }
.gallery-slide:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gallery-arrow { position: absolute; z-index: 4; top: 50%; width: 44px; height: 44px; padding: 0; transform: translateY(-50%) rotate(45deg); border: 1px solid #e8c580aa; color: #fff5de; background: #20180ddd; cursor: pointer; box-shadow: 0 2px 12px #0006; }
.gallery-arrow span { display: block; transform: rotate(-45deg); font: 44px/.8 Georgia, serif; }
.gallery-previous { left: 5%; }
.gallery-next { right: 5%; }
.gallery-arrow:hover { background: #775328; border-color: #ffe4ae; }
.gallery-arrow:focus-visible, .gallery-pagination button:focus-visible, .viewer-close:focus-visible { outline: 2px solid #fff5de; outline-offset: 4px; }
.gallery-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.gallery-pagination button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.gallery-pagination button::before { content: ""; width: 7px; height: 7px; border: 1px solid #c6a065; transform: rotate(45deg); background: #30261c; }
.gallery-pagination button[aria-pressed="true"]::before { background: #edcb89; box-shadow: 0 0 8px #e8c58055; }
#screenshot-viewer { width: min(1500px, 96vw); max-width: 96vw; max-height: 96dvh; padding: 42px 12px 16px; border: 1px solid #ba9659; background: #151410; color: var(--muted); }
#screenshot-viewer::backdrop { background: #08070aeb; }
#screenshot-viewer img { display: block; width: 100%; height: auto; max-height: calc(94dvh - 100px); object-fit: contain; }
#screenshot-viewer .gallery-previous { left: 24px; }
#screenshot-viewer .gallery-next { right: 24px; }
.viewer-close { position: absolute; top: 4px; right: 10px; width: 36px; height: 36px; padding: 0; border: 0; color: #f5eddb; background: transparent; font: 30px/1 sans-serif; cursor: pointer; }
@media (max-width: 600px) {
  .gallery-stage { aspect-ratio: 1.6; }
  .gallery-slide { width: 88%; padding: 2px; }
  .gallery-arrow { width: 32px; height: 32px; }
  .gallery-arrow span { font-size: 34px; }
  .gallery-previous { left: 2%; }
  .gallery-next { right: 2%; }
  .gallery-pagination { gap: 0; }
  #screenshot-viewer .gallery-previous { left: 12px; }
  #screenshot-viewer .gallery-next { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-slide { transition: none; } }

.gallery-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(680px, 100%);
  min-height: 116px;
  margin: 0 auto;
  padding: 36px 145px 25px;
  background: url("../images/gallery-title.svg?v=2") center / 100% 100% no-repeat;
  color: #fff1d1;
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .025em;
  text-shadow: 0 2px 8px #08060dcc;
}
html[lang="zh-CN"] .gallery-heading { font-size: 2.15rem; letter-spacing: .2em; }
@media (max-width: 600px) {
  .gallery-heading { min-height: 94px; padding: 30px 58px 22px; font-size: clamp(1.1rem, 4.5vw, 1.5rem); }
  html[lang="zh-CN"] .gallery-heading { font-size: clamp(1.4rem, 6vw, 1.9rem); letter-spacing: .12em; }
}
