.modal {
  width: min(400px, 100% - 28px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 60px rgb(6 24 18 / .35);
  overflow-y: auto;
}

.modal[open] { animation: modal-in .35s var(--ease-out); }

@keyframes modal-in {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
}

.modal::backdrop { background: var(--band); }
.modal-delete::backdrop { background: rgb(14 30 24 / .6); }

.modal form { padding: 28px; }

.modal h2 {
  margin-bottom: 8px;
  font-size: 1.375rem;
  font-stretch: 88%;
  letter-spacing: -.01em;
}

.modal form > p:not(.form-error) {
  margin-bottom: 22px;
  color: var(--muted);
}

.modal form > p strong { color: var(--ink); }

.modal label {
  display: block;
  margin-bottom: 6px;
  font-size: .8125rem;
  font-stretch: 80%;
  font-weight: 600;
}

.otp-input {
  width: 100%;
  height: 52px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-align: center;
}

.otp-input:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

.form-error {
  min-height: 1.45em;
  margin: 6px 0 10px;
  color: var(--bad);
  font-size: .875rem;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions .button { min-height: 44px; }

@media (max-width: 460px) {
  .modal form { padding: 22px 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}
