.main-image {
  cursor: zoom-in;
}

.main-image:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: rgba(12, 16, 13, .55);
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(12, 16, 13, .18);
  backdrop-filter: blur(2px);
}

.lightbox-panel {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  grid-template-rows: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
}

.lightbox-image {
  grid-column: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-arrow,
.lightbox-thumbnail {
  border: 0;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 2.4rem;
}

.lightbox-next {
  grid-column: 1;
}

.lightbox-previous {
  grid-column: 3;
}

.lightbox-thumbnails {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  padding: 8px;
}

.lightbox-thumbnail {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  padding: 3px;
  background: transparent;
  border: 2px solid transparent;
  opacity: .65;
}

.lightbox-thumbnail.active {
  border-color: #fff;
  opacity: 1;
}

.lightbox-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 650px) {
  .lightbox {
    padding: 12px;
  }

  .lightbox-panel {
    grid-template-columns: 45px minmax(0, 1fr) 45px;
    grid-template-rows: minmax(0, 1fr) 90px;
    gap: 6px;
  }

  .lightbox-arrow {
    width: 42px;
    height: 42px;
  }

  .lightbox-thumbnail {
    width: 70px;
    height: 70px;
  }
}
