.pg-trigger { cursor: zoom-in; }
.pg-trigger:focus-visible { outline: 2px solid #eed064; outline-offset: 4px; }
dialog.post-gallery {
  position: fixed; inset: 0; box-sizing: border-box;
  width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  margin: 0; padding: 60px 80px; border: 0;
  background: rgba(0,0,0,.93); color: #eee;
}
.post-gallery::backdrop { background: transparent; }
.post-gallery[open] { display: flex; align-items: center; justify-content: center; }
.post-gallery figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.post-gallery .pg-stage { position: relative; max-width: 100%; }
.post-gallery .pg-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; touch-action: pan-y pinch-zoom; }
.post-gallery figcaption { max-width: 900px; max-height: 60px; overflow: auto; text-align: center; font-size: 15px; line-height: 1.5; color: #ddd; }
.post-gallery button { position: absolute; padding: 0; border: 1px solid #ffffff30; border-radius: 50%; background: #2229; color: #fff; cursor: pointer; font-family: sans-serif; line-height: 1; width: 48px; height: 48px; }
.post-gallery button:hover { background: #444; color: #eed064; }
.post-gallery button:focus-visible { outline: 2px solid #eed064; outline-offset: 4px; }
.post-gallery button[hidden] { display: none; }
.post-gallery .pg-prev, .post-gallery .pg-next {
  position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 72px;
  display: grid; place-items: center; border: 0; border-radius: 0;
  background: transparent; color: #fff; box-shadow: none;
}
.post-gallery .pg-prev:hover, .post-gallery .pg-next:hover { background: transparent; color: #fff; }
.post-gallery .pg-prev svg, .post-gallery .pg-next svg { width: 26px; height: 47px; fill: currentColor; }
.post-gallery .pg-prev svg { transform: rotate(180deg); }
.post-gallery .pg-prev { left: 24px; right: auto; }
.post-gallery .pg-next { right: 24px; left: auto; }
.post-gallery .pg-close { top: 12px; right: 16px; font-size: 30px; }
.post-gallery .pg-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 14px; color: #bbb; }
@media (max-width: 600px) {
  dialog.post-gallery { padding: 64px 48px 100px; }
  .post-gallery .pg-prev, .post-gallery .pg-next { width: 40px; height: 60px; }
  .post-gallery .pg-prev { left: 4px; right: auto; }
  .post-gallery .pg-next { right: 4px; left: auto; }
  .post-gallery .pg-prev svg, .post-gallery .pg-next svg { width: 20px; height: 36px; }
}
