/* Narrow-gallery geometry paired with wexley-gallery-mobile-v4.js.
 * Keep the source aspect before/after decode; desktop layout is untouched.
 */
@media only screen and (max-width: 800px) {
  body.collection-type-gallery #page #galleryWrapper,
  body.collection-type-gallery #page #slideshowWrapper,
  body.collection-type-gallery #page #slideshow {
    height: auto !important;
  }

  body.collection-type-gallery #page #slideshow > .slide {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: auto !important;
  }

  body.collection-type-gallery #page #slideshow > .slide > img {
    display: inline-block !important;
    aspect-ratio: var(--kfai-source-aspect, auto) !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  body.collection-type-gallery #backToThumbs,
  body.collection-type-gallery #imageInfoToggle,
  body.collection-type-gallery #simpleControls,
  body.collection-type-gallery #numberControls,
  body.collection-type-gallery #dotControls,
  body.collection-type-gallery #tinyThumbControls {
    display: none !important;
  }
}
