Religion and the Decline of Magic