.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 12, 12, .94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

/* stage — takes up most of the screen */
.lightbox-stage {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 5.5rem 1rem;
  min-height: 0;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  transition: opacity .18s ease;
  user-select: none;
}
.lightbox-img.is-loading { opacity: 0; }

/* close button */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease;
  z-index: 10;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* prev / next */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease, transform .18s ease;
  z-index: 10;
  user-select: none;
}
.lightbox-prev { left: .9rem; }
.lightbox-next { right: .9rem; }
.lightbox-prev:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { background: rgba(255,255,255,.2); transform: translateY(-50%) translateX(2px); }
.lightbox-prev:disabled,
.lightbox-next:disabled { opacity: .3; cursor: default; }

/* bottom bar */
.lightbox-bar {
  flex: 0 0 auto;
  width: 100%;
  padding: .9rem 1.5rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  text-align: center;
}
.lightbox-title {
  color: rgba(255,255,255,.95);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
}
.lightbox-counter {
  color: rgba(255,255,255,.45);
  font-size: .85rem;
  font-weight: 600;
}

/* strip of thumbnail dots */
.lightbox-dots {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1rem .3rem;
  max-width: 600px;
  margin: 0 auto;
}
.lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, transform .15s ease;
}
.lightbox-dot.is-active {
  background: #fff;
  transform: scale(1.35);
}

/* cards that trigger lightbox */
[data-lightbox] {
  cursor: pointer;
}
[data-lightbox]:focus-visible {
  outline: 2px solid var(--green, #3f7d58);
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .lightbox-stage { padding: 3.5rem 3rem .6rem; }
  .lightbox-prev { left: .35rem; }
  .lightbox-next { right: .35rem; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox-bar { padding: .7rem 1rem 1rem; flex-direction: column; gap: .4rem; }
}
