:root {
  --percy-safe-top: env(safe-area-inset-top, 0px);
  --percy-safe-right: env(safe-area-inset-right, 0px);
  --percy-safe-bottom: env(safe-area-inset-bottom, 0px);
  --percy-safe-left: env(safe-area-inset-left, 0px);
}

html.percy-layout-enabled,
html.percy-layout-enabled body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

html.percy-layout-enabled body {
  box-sizing: border-box;
  min-height: 100vh;
  height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  padding: var(--percy-safe-top) var(--percy-safe-right) var(--percy-safe-bottom) var(--percy-safe-left);
}

html.percy-layout-enabled canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  flex: 0 0 auto;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

#percy-orientation-notice {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: var(--percy-safe-top) var(--percy-safe-right) var(--percy-safe-bottom) var(--percy-safe-left);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.65rem;
  padding: 2rem;
  background: #0b1020;
  color: #e7ecff;
  text-align: center;
  font: 600 clamp(18px, 5vw, 30px) / 1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#percy-orientation-notice span {
  color: #9edbd8;
  font-size: 0.62em;
  font-weight: 500;
}

html[data-percy-layout-mode="portrait-blocked"] #percy-orientation-notice {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  #percy-orientation-notice {
    scroll-behavior: auto;
  }
}
