/// Central message type dispatched by the event loop to drive app state transitions.
///
/// Every user keystroke and timer tick is translated into one of these variants
/// before being handed to the update function, keeping input handling decoupled
/// from business logic.