It is possible to cast guidance (and presumably mark too) with zero mana. The validation only checks whether you are in an encounter when enabling the button.
Is it more surprising that nobody has seen this bug before or that I actually managed to run out of mana?