.automation-demo {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 390px, max(302px, calc((100svh - 140px) * .4611)));
  margin-inline: auto;
}
.demo-device { position: relative; aspect-ratio: 680 / 1360; }
.demo-device::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--img-iphone-bezel) center / 100% 100% no-repeat;
}
.demo-display {
  position: absolute; left: 9.41%; top: 4.85%; width: 81.18%; height: 90.37%;
  overflow: hidden; border-radius: 16.3% / 7.32%; background: #141414;
  isolation: isolate;
}
.demo-caption { margin: 6px auto 0; max-width: 34ch; text-align: center; font: 500 14px/1.45 var(--f); }
.demo-retry:not([hidden]) {
  position: absolute; z-index: 1; inset: 0; margin: auto;
  width: fit-content; height: fit-content; padding: 12px 18px;
  background: #141414; color: white; border: 0; border-radius: 999px;
  font: 600 14px/1.3 var(--f); cursor: pointer;
}
.demo-display > iframe {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 390px;
  max-width: none;
  height: var(--demo-screen-height, 845px);
  border: 0;
  transform: scale(var(--demo-screen-scale, 1));
  transform-origin: top left;
  background: #f4f4f2;
}
