Replace JavaScript alerts with toasts, dialogs, and divs.