.rc-welcome {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  box-sizing: border-box;
  height: 100%;
  padding: 20px;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #fff;
  contain: layout paint;
}

.rc-welcome[hidden] {
  display: none;
}

.rc-welcome img {
  display: block;
  width: min(640px, calc(100vw - 40px), calc(100vh - 40px));
  width: min(640px, calc(100vw - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right))), calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom))));
  height: auto;
  max-width: 100%;
  max-height: 100%;
  justify-self: center;
  object-fit: contain;
}

html.rc-welcome-active,
html.rc-welcome-active body {
  overflow: hidden;
}

.rc-welcome.is-showing {
  animation: rc-welcome-fade 2s linear both;
}

@keyframes rc-welcome-fade {
  0%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-welcome.is-showing { animation: none; }
}
