The simplest answer is that you don't combine the two. When things are dark, keep it firmly in a serious tone and don't try to lighten the mood with gags. They probably won't go over as well as you think (look at YIIK's golden alpaca scene for an infamous example). On the other hand, when...