https://imgur.com/a/S1xyXJi
This is the CSS I used and the resulting PDF.
The image shows that with the default settings and the CSS
body { background-color: black; color: white; }
The PDF contains large margins of the wrong color. I checked EPUB file to make sure it did not specify its own colors.
I removed any lines containing "border: currentColor","color:", and "background-color:" from the stylesheet.