.registration-code-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-bottom: 14px;
}
.registration-code-row > .button {
  align-self: start;
  justify-self: start;
  margin: 0;
}
.otp-field { min-width: 0; }
.otp-paste-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.otp-paste-actions small { color: var(--muted); font-size: 11px; }
.otp-field:has([data-otp-input]:disabled) .otp-paste-actions { display: none; }
.otp-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.otp-entry {
  --otp-shell: #26272b;
  --otp-inset: #18191c;
  --otp-edge: #494b53;
  --otp-ink: #edf0f6;
  --otp-focus: #b7d3ff;
  --otp-selection: #5474a555;
  --otp-error: #562633;
  --otp-error-ink: #ffb8c4;
  --otp-target: 202px;
  --otp-height: clamp(51px, 16vw, 74px);
  --otp-pad: clamp(4px, 1.5vw, 7px);
  --otp-gap: clamp(3px, 1.1vw, 7px);
  --otp-count: 6;
  --otp-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  box-sizing: border-box;
  width: min(100%, var(--otp-target));
  height: var(--otp-height);
  padding: var(--otp-pad);
  border: 1px solid var(--otp-edge);
  border-radius: 37px;
  background: var(--otp-shell);
  color: var(--otp-ink);
  box-shadow: 0 4px 14px #0002, inset 0 1px #ffffff0e;
  transition: width .42s cubic-bezier(.24,.72,.32,1), background .24s, border-color .24s, color .24s;
}
:root[data-theme=light] .otp-entry {
  --otp-shell: #fff;
  --otp-inset: #ecebe4;
  --otp-edge: #e0ded7;
  --otp-ink: #22221d;
  --otp-focus: #22221d;
  --otp-selection: #71839950;
  --otp-error: #fae3e4;
  --otp-error-ink: #a91c39;
  box-shadow: 0 4px 14px #302d2114;
}
.otp-entry[data-otp-length="8"] { --otp-count: 8; }
.otp-entry:is([data-otp-state=editing], [data-otp-state=error]) {
  --otp-target: 374px;
  transition-timing-function: cubic-bezier(.25,.8,.27,1.08), ease, ease, ease;
  transition-duration: .58s,.24s,.24s,.24s;
}
.otp-entry[data-otp-length="8"]:is([data-otp-state=editing], [data-otp-state=error]) { --otp-target: 440px; }
.otp-entry[data-otp-state=error] { color: var(--otp-error-ink); animation: otp-shake .3s ease; }
.otp-entry[data-otp-state=success] {
  --otp-target: 174px;
  background: #17773b;
  border-color: #36b868;
  color: #fff;
}
.otp-face, .otp-slots { grid-area: 1 / 1; min-width: 0; opacity: 0; pointer-events: none; }
.otp-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
.otp-face svg { width: 20px; height: 20px; flex: 0 0 auto; }
.otp-face, .otp-slots { transition: opacity .18s ease, filter .18s ease; filter: blur(3px); }
.otp-entry[data-otp-state=idle] .otp-prompt,
.otp-entry[data-otp-state=verifying] .otp-wait,
.otp-entry[data-otp-state=success] .otp-success,
.otp-entry:is([data-otp-state=editing], [data-otp-state=error]) .otp-slots { opacity: 1; filter: none; }
.otp-slots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--otp-count), minmax(0, 1fr));
  gap: var(--otp-gap);
  align-items: stretch;
  border-radius: 31px;
  background: var(--otp-inset);
  overflow: clip;
  transition-property: opacity, filter, background;
}
.otp-entry[data-otp-state=error] .otp-slots { background: var(--otp-error); }
.otp-digit {
  display: grid;
  place-items: center;
  border-radius: 30px;
  font-size: clamp(16px, 4.9vw, 26px);
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.otp-entry[data-otp-state=editing]:focus-within .otp-digit[data-otp-selected] { background: var(--otp-selection); }
.otp-slots::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block: 1px;
  box-sizing: border-box;
  --otp-slot-width: calc((100% - (var(--otp-count) - 1) * var(--otp-gap)) / var(--otp-count));
  left: calc(var(--otp-index) * (var(--otp-slot-width) + var(--otp-gap)) + 1px);
  width: calc(var(--otp-slot-width) - 2px);
  border: 2px solid var(--otp-focus);
  border-radius: 30px;
  opacity: 0;
  transition: left .2s ease, opacity .15s ease;
}
.otp-entry[data-otp-state=editing]:focus-within .otp-slots::after { opacity: 1; }
.otp-entry [data-otp-input] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: inherit;
  opacity: 0;
  font-size: 16px;
  cursor: text;
}
.otp-entry[data-otp-state=idle] [data-otp-input] { cursor: pointer; }
.otp-entry:has(input:disabled) { opacity: .58; }
.otp-entry:has(input:disabled) [data-otp-input] { cursor: default; }
.otp-entry:focus-within:is([data-otp-state=idle], [data-otp-state=success]) { outline: 2px solid var(--otp-focus); outline-offset: 3px; }
.otp-wait i { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.otp-entry[data-otp-state=verifying] .otp-wait i { animation: otp-spin .8s linear infinite; }
.otp-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes otp-spin { to { transform: rotate(360deg); } }
@keyframes otp-shake {
  18%, 62% { transform: translateX(-4px); }
  39%, 80% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .otp-entry, .otp-entry .otp-face, .otp-entry .otp-slots, .otp-entry .otp-slots::after { transition: none; }
  .otp-entry[data-otp-state=error], .otp-entry[data-otp-state=verifying] .otp-wait i { animation: none; }
}
