.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(16, 22, 10, 0.94); padding: 56px 72px; opacity: 0; transition: opacity 0.18s ease; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox-img { display: block; max-width: min(1100px, calc(100vw - 144px)); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5); background: #fff; touch-action: pan-y pinch-zoom; }
.lightbox-count { margin-top: 14px; color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.lightbox button { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background 0.15s ease; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, 0.3); }
.lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox-close { top: 12px; right: 12px; font-size: 1.6rem; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-prev[hidden], .lightbox-next[hidden] { display: none; }
@media (max-width: 640px) {
  .lightbox { padding: 60px 8px 76px; }
  .lightbox-img { max-width: calc(100vw - 16px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; transform: none; }
  .lightbox-prev { left: calc(50% - 96px); }
  .lightbox-next { right: calc(50% - 96px); }
  .lightbox-count { position: absolute; bottom: 26px; left: 0; right: 0; margin: 0; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } }
