/* 画像ライトボックス（CSPでinline style禁止のため静的CSS）。 */
html.lightbox-open { overflow: hidden; }
[data-gallery] a[data-gallery-item] { display: block; cursor: zoom-in; }
.lightbox {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(0 0 0 / 0.92); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.92); }
.lightbox-stage {
  flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 3.5rem 0.5rem; touch-action: pan-y; box-sizing: border-box;
}
.lightbox-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox-counter { position: absolute; top: 0.9rem; left: 1rem; margin: 0; font-size: 0.9rem; font-weight: 700; }
.lightbox-caption {
  margin: 0; padding: 0.25rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)); max-width: 100%;
  font-size: 0.75rem; line-height: 1.5; text-align: center; color: #d6dbe0; box-sizing: border-box;
}
.lightbox-btn {
  position: absolute; display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
  border: 0; border-radius: 9999px; background: rgb(255 255 255 / 0.16); color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.lightbox-btn:hover { background: rgb(255 255 255 / 0.28); }
.lightbox-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox-close { top: 0.5rem; right: 0.5rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 639.98px) {
  .lightbox-stage { padding: 3.5rem 0 0.5rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 4rem; transform: none; width: 2.75rem; height: 2.75rem; }
}
