We've had devices like this forever.
A: add a gasket.
B: glueseal everything except for the battery, connected via exposed gold pads.