Thanks for the suggestion. Makes a lot of sense! It was on my list, but I decided to give the player 3 hearts instead. It's not really a replayable game, so I thought it would be more interesting to challenge the player to complete it in the first run. Maybe I should have added a message at the start to motivate the player that they only have one shot at completing the game.
If I would make more than 5 puzzles, I think I would get rid of the hearts and work with a checkpoint per level instead.