.gallery img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: max(72px, env(safe-area-inset-top)) 8px max(22px, env(safe-area-inset-bottom));
  background: rgba(7, 10, 9, 0.97);
  color: #fff;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  grid-template-rows: 1fr auto;
  align-items: center;
}

.lightbox-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-column: 1 / 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-arrow {
  z-index: 2;
  width: 44px;
  height: 54px;
  border: 0;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-prev { grid-column: 1; grid-row: 1; }
.lightbox-next { grid-column: 3; grid-row: 1; }

.lightbox-footer {
  grid-column: 1 / 4;
  grid-row: 2;
  padding-top: 16px;
  text-align: center;
}

.lightbox-footer strong {
  display: block;
  font: 700 15px Georgia, serif;
}

.lightbox-footer > span {
  display: block;
  margin-top: 6px;
  color: #c8ccca;
  font-size: 12px;
}

.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
}

.lightbox-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.lightbox-dots i.active {
  width: 18px;
  background: #fff;
}

@media (max-width: 699px) {
  .lightbox { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .lightbox-arrow {
    width: 38px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 32px;
  }
}
