.listing {
  color: #fff;
  font-family: "Open Sans", Arial, sans-serif;
  padding: 34px 18px 44px;
}

.listing-title,
.listing-address {
  font: 400 18px/28px "Open Sans", Arial, sans-serif;
  margin: 0;
  text-align: center;
}

.listing-gallery {
  display: grid;
  gap: clamp(6px, 2vw, 10px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px auto 0;
  max-width: 470px;
}

.listing-gallery a {
  aspect-ratio: 1;
  display: block;
  min-width: 0;
}

.listing-gallery a:focus-visible,
.listing-copy a:focus-visible,
.listing-photo-controls button:focus-visible {
  outline: 2px solid #9ecfff;
  outline-offset: 3px;
}

.listing-gallery img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.listing-copy {
  font-size: 14px;
  line-height: 1.65;
  margin: 32px auto 0;
  max-width: 986px;
  overflow-wrap: anywhere;
}

.listing-description {
  color: #e6e6fa;
  font-style: italic;
}

.listing-description p {
  margin: 8px 0 0;
}

.listing-copy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.listing-broker {
  margin: 10px 0 0;
  text-align: center;
}

.listing-viewer {
  background: #fff;
  border: 0;
  color: #171717;
  margin: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 10px;
  width: max-content;
}

.listing-viewer::backdrop {
  background: rgb(0 0 0 / 88%);
}

.listing-photo {
  margin: 0;
}

.listing-photo img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: calc(100dvh - 100px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.listing-photo-controls {
  align-items: center;
  display: flex;
  font-size: 13px;
  gap: 4px;
  justify-content: center;
  margin: 4px 0 0;
  white-space: nowrap;
}

.listing-photo-controls form {
  margin: 0;
}

.listing-photo-controls button {
  background: #fff;
  border: 0;
  border-radius: 0;
  color: #171717;
  cursor: pointer;
  font: 400 28px/1 Arial, sans-serif;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.listing-photo-controls button:hover {
  background: #eee;
}

@media (min-width: 1120px) {
  .listing {
    padding: 51px 0 0;
  }

  .listing-title {
    margin-left: 345px;
    text-align: left;
  }

  .listing-gallery {
    margin: 30px 0 0 301px;
  }

  .listing-copy {
    font-size: 12px;
    line-height: 27.67px;
    margin: 47px 0 0 90px;
    width: min(986px, calc(50vw + 394px));
  }

  .listing-description p,
  .listing-broker {
    margin: 0;
  }
}
