:root {
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-check: #3d6b3a;
}

.motion-page {
  animation: motion-rise 420ms var(--motion-ease) both;
}

.otp-scene {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.5rem;
  margin: 0 0 1.25rem;
}

.otp-scene__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 3.4rem;
}

.otp-scene__copy {
  min-width: 0;
}

.otp-scene__copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.otp-scene__copy span {
  display: block;
  margin-top: 0.15rem;
  color: var(--p-muted, #8a8d93);
  font-size: 0.84rem;
}

.otp-mail,
.otp-watch,
.otp-check,
.otp-loader {
  display: block;
}

.otp-mail {
  width: 2.15rem;
  height: 2.15rem;
  color: var(--p-soft, #5c5f66);
  animation: otp-mail-bob 2.4s var(--motion-ease) infinite;
}

.otp-watch {
  position: absolute;
  right: -0.15rem;
  bottom: -0.05rem;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--p-text, #1c1d20);
}

.otp-watch__hand {
  transform-origin: 12px 13.2px;
  animation: otp-watch-spin 8s linear infinite;
}

.otp-check {
  width: 2.6rem;
  height: 2.6rem;
}

.otp-check__ring {
  fill: none;
  stroke: #d4e0d0;
  stroke-width: 1.6;
}

.otp-check__mark {
  fill: none;
  stroke: var(--motion-check);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.otp-scene.is-checking .otp-check__ring {
  stroke: #c5d4c0;
}

.otp-scene.is-checking .otp-check__mark {
  animation: otp-check-draw 420ms var(--motion-ease) forwards;
}

.otp-loader {
  width: 2.15rem;
  height: 2.15rem;
  border: 2px solid #d4e0d0;
  border-top-color: var(--motion-check);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.86);
}

.otp-scene.is-loading .otp-check {
  display: none;
}

.otp-scene.is-loading .otp-loader {
  opacity: 1;
  transform: none;
  animation: otp-spin 700ms linear infinite;
}

.otp-scene[hidden] {
  display: none;
}

@keyframes motion-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes otp-mail-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes otp-watch-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes otp-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes otp-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-page,
  .otp-mail,
  .otp-watch__hand,
  .otp-check__mark,
  .otp-loader {
    animation: none !important;
  }

  .otp-scene.is-checking .otp-check__mark {
    stroke-dashoffset: 0;
  }

  .otp-scene.is-loading .otp-loader {
    opacity: 1;
  }
}
