There's no reason the main mask can't receive the event. Fire the event on the main mask from the other pieces -- or simply add the same event listener to all elements with a 'mask' class. It's not a good reason to avoid my approach.
(The CSS isn't so special, either. I was talking about the ~ combinator more than anything else. I used it just for (theoretical) performance + conciseness. You could use the usual CSS all-child-elements combinator instead, supported everywhere.) -- S.
