Extract anonymous touch event handlers into named functions and add proper cleanup for all event listeners (message, touchstart, touchmove, touchend, visibilitychange) in the onMount return function. Previously only the resize listener was being cleaned up, causing memory leaks during navigation and hot-reloads.