input, textarea, select { font-size: 16px; line-height: 1.4; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.modal-backdrop {
  position: fixed; inset: 0; display: flex;
  align-items: center; justify-content: center;
  /* блокируем фон, но см. #5 */
}
.modal {
  max-height: 90dvh; /* см. п.4 */
  overflow: auto; border-radius: 12px;
}
:root { --vh: 1dvh; }          /* современные Safari поддерживают dvh */
.modal, .modal-backdrop { min-height: 100dvh; }
.modal { padding-bottom: env(safe-area-inset-bottom); }
html.modal-open { scroll-behavior: auto; }  /* вместо smooth */
.modal { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
button, input, select, textarea { min-height: 44px; }
