It's proving difficult to find a resilient piece of foam, so I'm looking into using a spring-loaded piece of metal for the dam.
I figure to use a pin to hold the metal in place and use a mouse-trap spring so it can be moved aside by the lid and pop back into place when the lid is raised.
Something like that.
Modding is an iterative process that usually begins with
a brain-fart and ends with a trip to the emergency room!