.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.88);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--focus-duration) var(--focus-ease);
  z-index: 9999;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-panel {
  position: relative;
  width: min(96vw, 1500px);
  max-height: 94vh;
  display: grid;
  gap: 1rem;
  justify-items: center;
}
.lightbox-media {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 40vh;
}
.lightbox-preview,
.lightbox-full {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}
.lightbox-preview { opacity: 1; }
.lightbox-full {
  opacity: 0;
  transition: opacity 260ms var(--focus-ease), transform 260ms var(--focus-ease), filter 260ms var(--focus-ease);
  transform: scale(.996);
  filter: blur(6px);
}
.lightbox-full.is-ready {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}
.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-110%);
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: white;
  padding: .7rem 1rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.lightbox-exif {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}
.lightbox.is-opening .lightbox-panel,
.lightbox.is-closing .lightbox-panel {
  transition: transform var(--focus-duration) var(--focus-ease), opacity var(--focus-duration) var(--focus-ease), filter var(--focus-duration) var(--focus-ease);
}
.lightbox.is-opening .lightbox-panel {
  transform: scale(.992);
  filter: blur(4px);
}
.lightbox.is-open:not(.is-opening) .lightbox-panel {
  transform: scale(1);
  filter: blur(0);
}
@media (max-width: 760px) {
  .lightbox-close { position: fixed; top: 1rem; right: 1rem; transform: none; }
}
