.otp-control {
  display: block;
  position: relative;
  width: min(100%, 356px);
  min-height: 54px;
  margin-block: 4px;
  direction: ltr;
}

.otp-boxes {
  display: grid;
  min-height: 54px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.otp-box {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 54px;
  border: 1.5px solid #d9c8b7;
  border-radius: 13px;
  background: #fffdfa;
  color: #3e2317;
  font: 700 1.35rem/1 'Vazirmatn', system-ui, sans-serif;
  box-shadow: 0 3px 10px rgba(62, 35, 23, .06);
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}

.otp-box.filled { border-color: #c99a5b; background: #fff8ef; }
.otp-control:focus-within .otp-box {
  border-color: #e2683f;
  box-shadow: 0 0 0 3px rgba(226, 104, 63, .14);
  transform: translateY(-1px);
}
.otp-control input.otp-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: transparent !important;
  font: 1rem 'Vazirmatn', system-ui, sans-serif;
  outline: 0;
}
.otp-control input.otp-input:focus { border: 0 !important; box-shadow: none !important; outline: 0; }
.otp-input:disabled + .otp-boxes { opacity: .55; }

@media (max-width: 380px) {
  .otp-boxes { gap: 5px; }
  .otp-box { height: 48px; border-radius: 10px; }
}
