/* Photos tab lightbox — closer view (self-contained; Eden-inspired) */

html.photos-lightbox-open,
html.photos-lightbox-open body {
  overflow: hidden !important;
  touch-action: none;
}

.photos-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  padding:
    max(0.35rem, env(safe-area-inset-top))
    max(0.5rem, env(safe-area-inset-right))
    max(0.5rem, env(safe-area-inset-bottom))
    max(0.5rem, env(safe-area-inset-left));
  background: rgba(8, 6, 5, 0.96);
  -webkit-tap-highlight-color: transparent;
}

.photos-lightbox[hidden] {
  display: none !important;
}

.photos-lightbox-top,
.photos-lightbox-bottom {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  pointer-events: auto;
}

.photos-lightbox-top {
  justify-content: flex-end;
  min-height: 52px;
}

.photos-lightbox-bottom {
  justify-content: space-between;
  min-height: 56px;
  padding-top: 0.35rem;
}

.photos-lightbox-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.photos-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
  pointer-events: none;
  -webkit-user-drag: none;
}

.photos-lightbox-caption {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  margin: 0.35rem 0.25rem 0.15rem;
  max-height: 4.5rem;
  overflow: auto;
  text-align: center;
  color: #f3ebe4;
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: auto;
}

.photos-lightbox-caption[hidden] {
  display: none !important;
}

.photos-lightbox-close,
.photos-lightbox-nav {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 6;
  min-height: 48px;
  min-width: 48px;
  padding: 0.7rem 1.15rem;
  border: 1.5px solid rgba(255, 250, 246, 0.35);
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.18);
  color: #fffaf6;
  font: 700 1rem/1 "Source Sans 3", system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.photos-lightbox-close {
  min-height: 52px;
  min-width: 5.5rem;
  padding: 0.85rem 1.35rem;
  font-size: 1.05rem;
}

.photos-lightbox-close:active,
.photos-lightbox-nav:active {
  background: rgba(255, 250, 246, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  .photos-lightbox-close,
  .photos-lightbox-nav {
    transition: none;
  }
}
