#kislovodsk-secret-dacha figcaption a {
  color: inherit;
  text-decoration: none;
}

#kislovodsk-secret-dacha figcaption a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.g-readable #kislovodsk-secret-dacha figcaption a {
  text-decoration: underline;
}

#kislovodsk-secret-dacha .story-g__hero-front {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
  object-position: 50% 50%;
}

#kislovodsk-secret-dacha .story-g__hero-background {
  object-position: 45% 42%;
  filter: brightness(.7) saturate(.9) blur(2px);
  clip-path: inset(0);
}

/* Keep the rotated photograph free at the top and sides, but below the torn edge. */
#kislovodsk-secret-dacha .story-g__hero-art {
  clip-path: inset(-100% -100% 0);
}

/* Marina's article-specific request: compact the space below this carousel. */
#kislovodsk-secret-dacha #park-gallery {
  padding-bottom: 24px;
}

#kislovodsk-secret-dacha :is(.dacha-postcard, .dacha-carving) > img:first-child {
  aspect-ratio: auto;
}

#kislovodsk-secret-dacha .dacha-present-facade > img:first-child {
  aspect-ratio: auto 3 / 4;
  height: auto;
}

/* Existing full-frame role used by the Pyatigorsk museum and magistrates-house.
   Keep the shared photo track, with rounded edges on the photograph itself. */
#kislovodsk-secret-dacha .story-g__slide:has(> img[data-fit="contain"]):not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--article-gallery-photo-height) auto;
}

#kislovodsk-secret-dacha .story-g__slide > img[data-fit="contain"] {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  place-self: center;
  object-fit: contain;
  background: transparent;
}

#kislovodsk-secret-dacha .dacha-tower-decoration {
  top: auto;
  right: auto;
  bottom: -113px;
  left: 14px;
  width: 51px;
  z-index: 2;
}

#kislovodsk-secret-dacha .dacha-tower-decoration img {
  display: block;
  height: auto;
  max-height: none;
}

#kislovodsk-secret-dacha .dacha-ballerina-decoration {
  top: -100px;
  right: 54px;
  left: auto;
  width: 76px;
  z-index: 2;
}

#kislovodsk-secret-dacha .dacha-ballerina-decoration img {
  display: block;
  height: auto;
  max-height: none;
}

#kislovodsk-secret-dacha .dacha-memoir {
  margin: .35em 0 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-style: italic;
}

#kislovodsk-secret-dacha .dacha-ending {
  text-align: center;
}

@media (min-width: 640px) {
  #kislovodsk-secret-dacha .dacha-tower-decoration {
    bottom: -138px;
    width: 62px;
  }

  #kislovodsk-secret-dacha .dacha-ballerina-decoration {
    top: -40px;
    right: -64px;
    width: 110px;
  }
}

@media (min-width: 1024px) {
  #kislovodsk-secret-dacha .dacha-tower-decoration {
    bottom: -153px;
    width: 68px;
  }

  #kislovodsk-secret-dacha .dacha-ballerina-decoration {
    top: -40px;
    right: -72px;
    width: 120px;
  }
}

/* Compact memoir: paragraph spacing follows the Tolstoy paper quotation. */
#kislovodsk-secret-dacha .dacha-memoir p {
  line-height: var(--article-note-leading);
}

#kislovodsk-secret-dacha .dacha-memoir p + p {
  margin-top: .35em;
}

#kislovodsk-secret-dacha .dacha-present-facade {
  width: 85%;
  justify-self: center;
  margin-inline: auto;
}

#kislovodsk-secret-dacha .dacha-carving > img:first-child {
  aspect-ratio: auto 1080 / 690;
}

@media (min-width: 1024px) {
  #kislovodsk-secret-dacha .dacha-carving-layout {
    align-items: center;
  }

  #kislovodsk-secret-dacha .dacha-carving {
    position: relative;
    align-self: center;
  }

  #kislovodsk-secret-dacha .dacha-carving figcaption {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }
}

/* Full-height paper decoration on wide screens; the paper itself stays unchanged. */
#kislovodsk-secret-dacha .dacha-drafting-decoration {
  top: auto;
  right: 38px;
  bottom: -76px;
  left: auto;
  width: 110px;
  z-index: 2;
}
#kislovodsk-secret-dacha .dacha-drafting-decoration img {
  display: block;
  height: auto;
  max-height: none;
}
@media (min-width: 640px) and (max-width: 1023px) {
  #kislovodsk-secret-dacha .dacha-drafting-decoration {width: 148px; right: 16px; bottom: -76px;}
  #kislovodsk-secret-dacha .dacha-ballerina-decoration {width: 104px; right: -12px; top: -48px;}
}
@media (min-width: 1024px) {
  #kislovodsk-secret-dacha .dacha-ballerina-decoration {
    height: 80%;
    width: auto;
    aspect-ratio: 378 / 700;
    top: 80px;
    left: calc(100% - 100px);
    right: auto;
  }
  #kislovodsk-secret-dacha .dacha-ballerina-decoration img {
    height: 100%;
    width: 100%;
  }
  #kislovodsk-secret-dacha .dacha-drafting-decoration {
    width: 270px;
    right: auto;
    left: calc(100% - 100px);
    bottom: -116px;
  }
}

@media (min-width: 1440px) {
  #kislovodsk-secret-dacha .dacha-drafting-decoration {
    left: calc(100% - 124px);
  }
  #kislovodsk-secret-dacha .dacha-ballerina-decoration {
    left: calc(100% - 104px);
    top: -12px;
  }
}
