Hardens and improves all storage handling.
Storage
- Write JSON files atomically using Android AtomicFile so interrupted writes do not leave half-written JSON behind.
- Keep rolling JSON backups (.bak1-.bak3) before overwriting valid storage files.
- Preserve unreadable/corrupt originals as .corrupt instead of immediately replacing them.
- Restore from the newest valid backup when the primary JSON file is missing or corrupt.
- Add safe fallback defaults for non-notes storage files so a corrupted file does not lock users out of the app.
- Make backup imports tolerate older/missing JSON files
Notes
- Add stable note IDs and use ID-based matching for restore/edit flows.
- Fix cases where closing the app while editing could restore the wrong note, duplicate a note, or lose an unsaved edit.
Shopping lists
- Normalize unknown/legacy shopping category tags into the default category instead of crashing.
SleepReminder
- Repair partial or malformed sleep reminder maps by recreating missing/invalid weekdays.
- Fix sleep notification rescheduling by converting stored weekday strings back to DayOfWeek.