// nyashelf-modals.jsx // Modal/sheet primitive + ToastProvider + a few task-specific modals // (NotesModal, ExportCsvModal, ConfirmDialog). // ───────────────────────────────────────────────────────────────────────────── // Modal — bottom-sheet style modal on top of the phone area. position: fixed // anchors to .nya-stage (transformed ancestor) so it fills the phone exactly. // ───────────────────────────────────────────────────────────────────────────── function Modal({ open, onClose, title, children, footer, maxHeight = 600 }) { React.useEffect(() => { if (!open) return; const onKey = (e) => { if (e.key === 'Escape') onClose?.(); }; window.addEventListener('keydown', onKey); return () => window.removeEventListener('keydown', onKey); }, [open, onClose]); if (!open) return null; return (