I think, a better and cleaner way would be to add the mode into a class, like
<body class="mode_<?php print $ACT ?>">
(or somewhere else to a div further down).
Then you can add this to your styles:
.mode_edit .header {
display: none;
}
That way you have more freedom: It's easier to do the same thing for other modes or change to background-color for all admin modes or something similar.