.story-chapter__gallery-link {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  text-align: center;
}

.lan-gallery-page .article__header {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.lan-gallery-page .article__content {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.lan-gallery-page__back {
  margin-top: 1.25rem;
}

.lan-gallery-day {
  margin-top: clamp(2.5rem, 7vw, 5rem);
}

.lan-gallery-day__header {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.lan-gallery-day__header h2 {
  margin-bottom: 0.5rem;
}

.lan-gallery-day__header p {
  margin: 0;
  color: var(--color-text-muted, #766d7e);
}

.lan-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(0.9rem, 2.5vw, 1.35rem);
}

.lan-gallery-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(102, 51, 153, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(51, 30, 72, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.lan-gallery-card:hover,
.lan-gallery-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(126, 69, 191, 0.48);
  box-shadow: 0 18px 38px rgba(51, 30, 72, 0.16);
}

.lan-gallery-card:focus-visible {
  outline: 3px solid rgba(126, 69, 191, 0.3);
  outline-offset: 3px;
}

.lan-gallery-card figure {
  margin: 0;
}

.lan-gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #17101f;
}

.lan-gallery-card figcaption {
  padding: 0.8rem 1rem 0.9rem;
  color: var(--color-text-muted, #766d7e);
  font-size: 0.88rem;
  line-height: 1.35;
  text-align: center;
}

body.lan-gallery-lightbox-open {
  overflow: hidden;
}

.lan-gallery-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border: 0;
  background: transparent;
  color: #fff;
}

.lan-gallery-lightbox::backdrop {
  background: rgba(18, 10, 25, 0.92);
  backdrop-filter: blur(8px);
}

.lan-gallery-lightbox__panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(100%, 1400px);
  height: 100%;
  margin: 0 auto;
  gap: clamp(0.4rem, 2vw, 1.25rem);
}

.lan-gallery-lightbox figure {
  display: flex;
  min-width: 0;
  height: 100%;
  margin: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.lan-gallery-lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 6rem);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.lan-gallery-lightbox figcaption {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

.lan-gallery-lightbox__close,
.lan-gallery-lightbox__nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(25, 14, 35, 0.78);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

.lan-gallery-lightbox__close:hover,
.lan-gallery-lightbox__close:focus-visible,
.lan-gallery-lightbox__nav:hover,
.lan-gallery-lightbox__nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(126, 69, 191, 0.94);
}

.lan-gallery-lightbox__close:focus-visible,
.lan-gallery-lightbox__nav:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.76);
  outline-offset: 3px;
}

.lan-gallery-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.lan-gallery-lightbox__nav {
  width: clamp(42px, 5vw, 58px);
  height: clamp(54px, 8vw, 78px);
  border-radius: 16px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.lan-gallery-page__footer {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(102, 51, 153, 0.16);
  text-align: center;
}

@media (max-width: 560px) {
  .lan-gallery-grid {
    grid-template-columns: 1fr;
  }

  .lan-gallery-card img {
    aspect-ratio: auto;
    max-height: none;
    object-fit: contain;
  }

  .lan-gallery-lightbox {
    padding: 0.75rem;
  }

  .lan-gallery-lightbox__panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .lan-gallery-lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lan-gallery-lightbox img {
    max-height: calc(100dvh - 8rem);
  }

  .lan-gallery-lightbox__nav {
    width: 100%;
    height: 48px;
  }

  .lan-gallery-lightbox__nav--previous {
    grid-column: 1;
    grid-row: 2;
  }

  .lan-gallery-lightbox__nav--next {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lan-gallery-card {
    transition: none;
  }

  .lan-gallery-lightbox::backdrop {
    backdrop-filter: none;
  }
}
