Keep screen on now listens for each lock's release event: when the browser lets the lock go while the switch is on, the lock is asked for again at once if the page is visible (or on the next visibilitychange if hidden), so the switch never claims a lock that is not held. When a pending request is granted, the hook checks visibility and the lock again, so a hide-and-show during the request is no longer lost. Fixes review findings F-01 and F-02 on PR #151. Maestro task c7da10dc-7f27-4dd0-8548-28d6587bdabf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>