Move the macOS/Android data and config directory code out of main.cpp into src/app/platform. Handle background/foreground: save config and interface status, pause audio, cancel touch input and skip rendering while keeping the network pumped. Map the window safe area through the letterboxed presentation into TouchLayout and expose touch.GetSafeArea() so the mobile HUD stays clear of notches and gesture bars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>