/* Keep store artwork readable before opening the enlarged preview. */
@media screen {
  .pcard-gallery.is-portrait .pcard-shot-item {
    height: 440px;
  }

  .pcard-gallery.is-portrait .pcard-shot-item img {
    object-fit: contain;
  }

  .pcard-gallery.is-landscape .pcard-shot-item {
    width: min(100%, 560px);
    height: auto;
    aspect-ratio: auto;
  }

  .pcard-gallery.is-landscape .pcard-shot-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .store-gallery,
  .store-screens,
  .screen-list {
    min-width: 0;
    max-width: 100%;
  }

  .store-gallery .device-shot img,
  .store-screens img {
    height: 560px;
    width: auto;
    max-width: none;
  }

  .has-store-screens .landing-visual .device-shot {
    width: min(310px, 100%);
  }

  .screen-list {
    --screen-height: 560px;
  }

  .screen-list .screenshot-pair {
    width: calc(var(--screen-height) * var(--screen-ratio));
  }

  .gallery-track > .screenshot {
    width: 280px;
    flex-basis: 280px;
  }
}

@media screen and (max-width: 768px) {
  .catalog .pcard-gallery-wrapper {
    padding: 10px;
  }

  .pcard-gallery {
    gap: 12px;
  }

  .pcard-gallery.is-portrait .pcard-shot-item,
  .store-gallery .device-shot img,
  .store-screens img {
    height: clamp(400px, 135vw, 600px);
  }

  .screen-list {
    --screen-height: clamp(400px, 135vw, 600px);
  }

  .gallery-track > .screenshot {
    width: min(80vw, 310px);
    flex-basis: min(80vw, 310px);
  }
}
