.otp-form {
  display: grid;
  gap: 16px;
}
.otp-form p { margin: 0; }
#otp-destination { font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.otp-entry {
  position: relative;
  width: min(100%, 20rem);
  margin: 4px auto 0;
}
.otp-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(4px, 1.5vw, 8px);
  transition: gap .32s cubic-bezier(.22, 1, .36, 1);
}
.otp-cell {
  display: grid;
  place-items: center;
  height: clamp(44px, 13vw, 56px);
  overflow: hidden;
  border-radius: 13px;
  background: #eef0f6;
  box-shadow: inset 0 0 0 1px transparent;
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background .22s ease, box-shadow .22s ease, border-radius .32s ease;
}
.otp-cell span, .otp-cell::after { grid-area: 1 / 1; }
.otp-entry:focus-within .otp-cell.is-current {
  background: #e8edff;
  box-shadow: inset 0 0 0 2px #6268f3;
}
.otp-entry:focus-within .otp-cell.is-current.is-empty::after {
  content: '';
  width: 2px;
  height: 1.2em;
  border-radius: 2px;
  background: #5058e9;
}
.otp-entry:has(input[aria-invalid]) .otp-cell {
  box-shadow: inset 0 0 0 1px #d2615b;
}
.otp-entry input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: .01;
  font-size: 16px;
  cursor: text;
}
.otp-message {
  min-height: 1.4em;
  color: #316448;
  font-size: .8125rem;
  line-height: 1.4;
}
.otp-message.is-error { color: #af353d; }
.otp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
}
.otp-form .otp-actions button {
  min-height: 44px;
  padding: 0 2px;
  text-align: start;
}
.otp-form .otp-actions button:disabled { color: #69758a; opacity: 1; }
.otp-form [type="submit"] { width: 100%; }
.otp-verified {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  place-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  color: white;
  font-weight: 700;
  transform: translateY(5px);
  transition: opacity .23s ease .21s, transform .23s ease .21s;
}
.otp-verified svg { width: 19px; height: 19px; }
.otp-form.is-verified .otp-entry { pointer-events: none; }
.otp-form.is-verified .otp-cells { gap: 0; }
.otp-form.is-verified .otp-entry .otp-cell {
  background: #168153;
  border-radius: 0;
  box-shadow: none;
  transition-delay: .09s, 0s, 0s;
}
.otp-form.is-verified .otp-entry .otp-cell:first-child { border-radius: 13px 0 0 13px; }
.otp-form.is-verified .otp-entry .otp-cell:last-child { border-radius: 0 13px 13px 0; }
.otp-form.is-verified .otp-cell span { opacity: 0; transition: opacity .14s ease; }
.otp-form.is-verified .otp-cell::after { content: none; }
.otp-form.is-verified .otp-verified { opacity: 1; transform: none; }
.otp-form.is-verified [type="submit"], .otp-form.is-verified .otp-actions { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .otp-cells, .otp-cell, .otp-verified, .otp-form.is-verified .otp-cell span { transition: none; }
}
