The outside-click handler guarded `event.target` against non-elements
and then called `.closest` on it unguarded a line later, so the guard
bought nothing. Take the guarded reference through both uses.
While here, close every popover except the clicked one: the handler left
open popovers alone whenever the click landed on any trigger, so opening
a second account signal left the first one hanging open over the
timeline.
Co-Authored-By: Claude Opus 5 <[email protected]>