.chapter-scroll {
  align-items: flex-start;
  min-height: auto;
  padding-top: 5.5rem;
  padding-bottom: 4rem;
}

.album-chapter {
  width: min(100%, 760px);
  text-align: left;
}

.album-chapter .chapter-kicker,
.album-chapter .chapter-heading,
.album-chapter .btn-continue {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.album-chapter .btn-continue {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.5rem;
}

.album-chapter .chapter-heading {
  margin-bottom: 2.25rem;
}

.memory-block {
  margin-bottom: 3rem;
  padding: 1.75rem 1.35rem;
  background: rgba(26, 10, 16, 0.42);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.memory-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-style: italic;
  color: var(--rose-bright);
  margin-bottom: 1.1rem;
  text-align: center;
}

.memory-text p {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.6vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}

.memory-text p:last-child {
  margin-bottom: 0;
}

.memory-lead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

.game-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.game-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(245, 198, 208, 0.18);
  background: rgba(20, 8, 12, 0.55);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-photo:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 198, 208, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.game-photo img,
.game-photo video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(90, 30, 48, 0.45), rgba(30, 10, 18, 0.7));
  pointer-events: none;
}

.game-video .video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26, 10, 16, 0.72);
  border: 1px solid rgba(245, 198, 208, 0.45);
  color: var(--ink);
  font-size: 1rem;
  pointer-events: none;
}

.game-photo-name {
  display: block;
  padding: 0.7rem 0.8rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--gold);
}

/* Лайтбокс — прямой потомок body, центр viewport */
.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 1.5rem;
  box-sizing: border-box;
  margin: 0;
  background: rgba(8, 2, 6, 0.94);
  overscroll-behavior: none;
}

.photo-lightbox[hidden] {
  display: none !important;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(100%, 920px);
  max-height: min(72vh, 780px);
  flex: 0 1 auto;
}

.photo-lightbox img,
.photo-lightbox video {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 780px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(245, 198, 208, 0.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #0a0406;
}

.lightbox-caption {
  flex-shrink: 0;
  margin-top: 1rem;
  max-width: 32rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.5;
}

.lightbox-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 101;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 198, 208, 0.28);
  background: rgba(26, 10, 16, 0.7);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(196, 59, 90, 0.4);
}

body.lightbox-open {
  overflow: hidden;
}

@keyframes album-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .game-photos {
    grid-template-columns: 1fr;
  }

  .memory-block {
    padding: 1.35rem 1rem;
  }
}
