The typical fantasy setting is just Earth with "magic" tacked on to let the wizards cheat nature. There is absolutely no attempt to integrate magic with nature. Trees, lightning, birds and so forth run on real science, but magic is its own self-contained thing that never really interacts with nature except to make possible things considered impossible in reality.
I recommend the article "Breaking out of Scientific Magic Systems" for an excellent breakdown of this problem. The article is specific to RPGs but the basic gist is applicable to fantasy genre as whole (especially that inspired by RPGs). While a great article, I have been unable to find any more detailed guides for building a rational magical/natural physics system since the assumption that "fantasy settings run on real physics with magic tacked on" is so pervasive.
What can I do to adjudicate a rational set of physical rules that treats magic as part of nature? What pitfalls should I look out for? Are there helpful examples I can look at? Etc.
Examples specific to RPGs
RPGs like D&D are massive offenders. Magic is not simply excessively systematized for practical usage by players, but treated fundamentally separate from nature even though that is not remotely necessary for play.
- There are effects like "detect magic" and "anti-magic" which only affect things considered magic without affecting anything non-magic.
- Any animals which do not exist on Earth are considered magical and unnatural, even though that makes no sense since Earth doesn't exist in the fantasy world. For example, a giant ant that spits acid is considered a "magical beast" or "monstrosity" despite having nothing paranormal about it if it was seen in reality.
- Magic is considered transient and even simple effects like "speak with animals" are given very precise time limits.
- Crafting magical swords involves a wizard adding a property of magic-ness to a normal sword and the aforementioned anti-magic would turn render said sword non-magical without otherwise reducing its effectiveness.
Example: Classical elements versus periodic elements
For another example, a typical fantasy setting has elemental beings composed of the four classical elements, yet this is only relevant to elemental beings since the rest of the universe is composed of the elements on the periodic table. This despite the fact that alchemical traditions that gave rise to the concept of elemental beings were based on the assumption that the universe really was composed of the four classical elements.
For a specific example in fiction, the anime No Game No Life at one point has a character win a game by taking advantage of the fact that an opponent with encyclopedic knowledge of magic is completely ignorant of atomic theory.
Why this sticks out and how pre-modern fantasy was different
This makes absolutely no sense to me. Whether the universe is the result of order spontaneously arising from chaos or intelligent design, if magic has always existed then it should be just as fundamental to existence as any other fundamental force. It should not be possible to say something is magical or non-magical any more than you can say something does or does not contain electrons, or to have two completely different sets of classical and periodic elements that only apply to magic or non-magic matter respectively.
It feels to me like writers who grew up in modern times are projecting their knowledge of the modern world onto fantasy concepts without understanding the originating pre-modern context. You see the unification of magic and nature all the time in mythology, fairy tales and folklore. Magic is omnipresent in these stories even for non-wizards. Perfectly ordinary people who are not designated as wizards are able to perform feats we would consider magic, like talk to trees or place curses with their dying breath or come back from the dead. Much of the time this happens without their conscious consent or knowledge. (Cross-reference magical thinking in anthropology studies.) You could even say that nature is depicted as running on magical rules. Meanwhile, most modern writing seems to treat magic solely as a means for wizards to cheat physics and do cool stuff rather than a basic part of nature.
What are the ramifications of fantasy physics?
Using this conceit in world building requires thinking about magic in a completely different way. Rather than the purview of reality-warping wizards, magic becomes something that makes the fantasy world fundamentally different from reality. The fantasy reality is reactive, alive and sentient in some way. The physics of the fantasy world are different and allow things impossible in reality. Conversely, this means that things possible in reality may not be possible in the fantasy world because the supporting physics do not exist.
In reality we can build electronics because our physics allow that, but do the physics of the fantasy world even have atoms? If the classical elements of earth and fire and air and water and quintessence are real physical constants, then clearly atomic theory is wrong on that world. Are diseases caused by viruses and bacteria, or by evil spirits and imbalances of the humors? Is gravity a physical manifestation of the emotion love? These sorts of questions and their answers have huge ramifications on how the fantasy world works.