.gallery-grid figure[role="button"] {
  position: relative;
  cursor: zoom-in;
  outline: none;
}

.gallery-grid figure[role="button"]:focus-visible {
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--olive);
}

.zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  background: rgba(24,31,23,.78);
  color: white;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(8px);
  backdrop-filter: blur(10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.gallery-grid figure:hover .zoom-hint,
.gallery-grid figure:focus-visible .zoom-hint {
  opacity: 1;
  transform: none;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

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

.lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) 64px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 34px;
}

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  justify-items: center;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
}

.lightbox figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 90px rgba(0,0,0,.5);
}

.lightbox figcaption {
  min-height: 24px;
  padding-top: 12px;
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  text-align: center;
}

.lightbox button {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.11);
  color: white;
  font: 300 2rem/1 var(--sans);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background .2s ease, transform .2s ease;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  background: var(--olive);
  transform: scale(1.06);
  outline: 2px solid white;
  outline-offset: 3px;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
}

@media (max-width: 600px) {
  .zoom-hint { opacity: 1; transform: none; }
  .lightbox-shell { grid-template-columns: 46px minmax(0,1fr) 46px; padding: 70px 6px 24px; }
  .lightbox button { width: 40px; height: 40px; }
  .lightbox-close { top: 16px; right: 16px; }
  .lightbox figure img { max-height: calc(100vh - 130px); border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .zoom-hint,
  .lightbox button { transition: none; }
}
