/* ============================================================
   LIGHTBOX — the project gallery's large view (07.10.2026)
   Owner of .lightbox*. A native <dialog> (static/js/lightbox.js): the photo whole
   (object-fit: contain) on a dark ground, ‹ › and × as round controls a thumb can
   hit (44px), the count under it. Loaded only on a project page.
   ============================================================ */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: none; background: rgba(20, 17, 14, .97); color: #fff;
}
.lightbox::backdrop { background: rgba(20, 17, 14, .97); }
.lightbox__frame {
  margin: 0; width: 100%; height: 100%; display: grid; place-items: center;
  padding: 56px 12px 48px; box-sizing: border-box;
}
/* the height is the dialog's minus the frame's padding (56 + 48): `max-height: 100%` of a grid item has no height to measure against, so a wide photo ran taller than the screen (layout review, 24.11.2026: 137 px lost at 1280x700, 157 at a phone held sideways) */
.lightbox__img { max-width: 100%; max-height: calc(100vh - 104px); max-height: calc(100dvh - 104px); object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__btn {
  position: absolute; width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .lightbox__btn:hover { background: rgba(255,255,255,.28); } }
.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox--single .lightbox__prev, .lightbox--single .lightbox__next { display: none; }
.lightbox__count {
  position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center;
  font-family: var(--font-sans); font-size: 14px; color: rgba(255,255,255,.8);
}
