#facilityImageTopLayer {
  position: fixed;
  inset: 0;
  width: min(94vw, 960px);
  max-width: none;
  height: min(90vh, 820px);
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

#facilityImageTopLayer[open] {
  display: grid;
  place-items: center;
}

#facilityImageTopLayer::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

.facility-image-top-layer__frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.facility-image-top-layer__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  background: #111;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
}

.facility-image-top-layer__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font: 400 34px/1 Arial, sans-serif;
  cursor: pointer;
}

@media (max-width: 600px) {
  #facilityImageTopLayer {
    width: 100vw;
    height: 100dvh;
  }

  .facility-image-top-layer__image {
    max-width: 100vw;
    max-height: 88dvh;
  }

  .facility-image-top-layer__close {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
  }
}
