Introduction
Naturally, by taking inspiration from Japanese religion and mythology, Touhou will touch upon various strands of Buddhism and their ideas. The two main surviving schools from the Heian era, Shingon and Tendai, have both esoteric lineages dating back to Tang China, with the first school being fully dedicated to the esoteric. This is why it could be interesting to look at how Japanese Esoteric Buddhism (密教 Mikkyō) might have influenced Touhou's story and imagery, and what it could overall mean.
Since we will look into how Myouren-ji is tied to Shingon, I will proceed to explain it.
What is Shingon Buddhism?
Shingon-shū (真言宗 True Word School or Mantra School) is a Japanese school of Buddhism founded by Kōbō Daishi (弘法大師, also known as Kūkai 空海) in the Heian period. It is considered Vajrayana (Diamond/Thunderbolt Vehicle), meaning it's a school that uses Tantra and other esoteric methods to reach enlightenment. Its own brand of esoteric Buddhism, Tōmitsu (東密), originates from the transmission Kōbō Daishi recieved from Huigou (惠果) during his visit to China. It consisted mainly of a two-fold transmission of the Womb Realm (胎蔵界 Taizōkai) mandala and Diamond Realm (金剛界 Kongōkai) mandala (More info 1 More Info 2). The main Shingon idea is of attaining Buddhahood in this very body (即身成仏 Sokushin Jōbutsu), with the practice of the Three Mysteries (三密 San Mitsu) of body (Mudras), speech (Mantras) and mind (Mandalas). These enable the practitioner to interpenetrate with the dharmakaya, personified as Mahavairocana (大日如来 Dainichi Nyorai), and to realize the non-dual and innate nature of enlightenment. Ultimately, all phenomena are the language of the teachings of Mahavairocana. (More Info 1 More Info 2 More Info 3 More Info 4 More Info 5).
This may sound like a lot, because it is. It is very difficult to condense these ideas in a short and understandable manner because of the subject in itself and its esotericism. If it was that easy to describe how one would reach Buddhahood in this body, everyone would have done it! Very vague ideas of these concepts are more than enough for what comes next, but I implore you to research more on your own if anything sounds interesting...
Myouren
The real priest Myouren has many stories around him, but we will focus on the Shigisan Engi Emaki (信貴山縁起絵巻), with each relevant portion to Touhou being examined when it comes up. We will start with his temple of residence.
Bishamonten
Chōgosonshi-ji
Myouren resided in the Chōgosonshi-ji (朝護孫子寺) temple, a Shingon temple dedicated to Vaishravana (毘沙門天 Bishamonten) in Ikoma, Nara Prefecture. This is the obvious inspiration for Shou Toramaru's role and existence in Touhou 12. Byakuren has been described to worship Bishamonten and no other deity in particular, therefore, it is implied in UFO that he is the honzon (本尊), or main deity of worship, of Myouren-ji, mirroring the real life Chōgosonshi-ji. But who is Bishamonten exactly? Bishamonten is the guardian of the north. He is mainly a protector deity who protects Buddhism and subdues demons, which is represented often by him trampling on Jyaki (邪鬼, also know as Amanojaku 天邪鬼) in statues and other representations. This is why the Youkai are described as being very afraid of him in Shou's profile: "Byakuren realized that the youkai near the temple had been afraid. It seemed that they feared Bishamonten. Perhaps they thought they would be exterminated.". His role as Buddhism's protector could have also been referenced in the way that Shou defended Myouren-ji for hundreds of years. Bishamonten is also worshipped as a god of wealth, and is part of the Seven Lucky Gods (七福神 Shichifukujin). This part is shown with the ability of the pagoda to create jewels, perhaps mimicking a Cintamani Jewel (wish-fulfilling jewel).
In terms of appearance, Shou holds the pagoda in her right hand and the spear in her left. This could imply that she is specifically the avatar of the Tamonten (多聞天) form of Bishamonten, which is the name of Bishamonten when not worshipped indepedently and instead as part of the Four Heavenly Kings (四天王 Shitennō). Usually, Bishamonten holds his pagoda on his left hand and his weapon on the right hand, and the reverse iconography is Tamonten. But the iconograhy is not that set in stone either. In addition, he is referred to as Bishamonten in official Touhou material, and with the complete absence of the other Shitennō, it is probable to say that the reference was not intentional or wasn't meant to mean anything in particular. It is important to note that in Buddhist art, minor details are important for the identification of a deity.
Another visual element found in Bishamonten representation, especially in Tibet, is the jewel spitting mongoose. There's not much to say besides that Nazrin is also a small mammal that serves Bishamonten and finds you treasure. It is her likely inspiration. We do also find links from Bishamonten to the Year of the Rat in Chinese astrology, which also represents the north.
Bishamonten's siddham root sanskrit syllable VAI
Bishamonten is a pretty popular deity for esoteric practice, with his own related expressions of the Three Mysteries. He is part of the 12 Deva Guardians (十二天 Jūniten), who guard the 12 direction in Esoteric Buddhism. He has a spot in the Womb Realm mandala, and appears in his own Besson mandalas (mandalas for individual deities), as well as having multiple mantras. This is interesting in the way that we can imagine the way Myouren-ji could have worshipped Bishamonten, if we assume they represent the Shingon sect. For example, here's a goma fire ritual dedicated to him.When it comes to the implications for the player, the representaton of Bishamonten in Touhou is rather exoteric at the surface level. However, the existence of Shou in herself is a representation of the deity, and inviting him into our mind as a patterned sign (more on that later). Visual information touches on one of the Three Mysteries, the mystery of the mind, and is subsequently an expression of the dharmakaya's enlightenement. In any case, from personal experience, I have formed a relationship with Bishamonten that greatly helped me in life through Shou Toramaru.
Myouren pt. 2
Tōdai-ji's Daibutsu
Returning to Myouren, here is a summary of his Touhou relevant tale. Myouren's older sister, a nun, looks for her brother who has been missing for 20 years. She goes through various locations, until she reaches Tōdai-ji, a Kegon (Huayan) temple. There is a giant statue of Vairocana called the daibutsu (大仏). She prays in front of it for what seems like days, until she dreams of Vairocana who indicates the location of her brother, and the scroll ends with them happily meeting again after she follows a purple cloud (part of the likely inspiration for Unzan).
Mahavairocana
This tie to Mahavairocana through the Daibutsu is exemplified in some of Byakuren's spell cards. To explain this figure, Mahavairocana, also called Vairocana or Dainichi Nyorai (大日如来 Great Sun Buddha), is the Buddha that represents and personifies the dharmakaya. The dharmakaya is the eternal and universal dharma, embodied by the entire universe, and is completely empty (sunyata). It is impossible to describe in words as it represents the unfathomable truth of enlightenement. In Shingon, Mahavairocana is said to be the teacher of esoteric doctrine by expressing the truth through every phenomena in the universe, in contrast to how the historical Buddha Shakyamuni manifested in the form of a nirmanakaya, and taught humans according to their abilities (most of the time). It is important not to confuse this figure with a capital G God, as Mahavairocana is not a literal being, but is, fundamentally, an expression of our own enlightened nature.
Other references to Esoteric Buddhism through Spell Cards
The Vajra
Kūkai holding a vajra
The vajra is referenced through multiple spell cards, like Shou's Buddha's Light "Vajra of Perfect Buddhism", or Byakuren's Light Sign "Indra's Vajra", among others. Vajra, meaning at the same time Diamond and Thunderbolt, is "a "symbol" of the indestructible and irresistible truth, hence applicable as an epithet to all things symbolizing this truth." (Shingon Buddhism: Theory and practice, Minoru Kiyota). It is also used as an esoteric ritual instrument when it is a physical object. Shou's spell card seems to reference specifically the double vajra.
Ryōbu Shintō
About Byakuren's Syncretism "Manifestation of Mahavairocana", Aya remarks: "Huh. This is that 'manifestation theory', isn't it? So this is why I saw that cosplay with Amaterasu dressed up as Mahavairocana?". This is in reference to a syncretic sect of Shingon Buddhism and Shintō, Ryōbu Shintō, who saw Amaterasu Ōmikami as an emanation of Mahavairocana, basing the outer and inner shrines of Ise on the two mandalas. "Manifestation theory" is Honji Suijaku (本地垂迹), a theory that states that Kami are emanations (権現 Gongen) of Buddhas and Bodhisattvas as skillful means to guide the Japanese people.
The Six Elements
Another spell card, is Byakuren's Heaven Sign "Five-Element Mountain of Shakyamuni". The five material elements are earth, water, fire, air and space. However, in Shingon, a sixth element is added, representing the mental, consciousness. It is said all phenomena are born from the interpentration of these elements. Meaning, that we are not different in composition from Mahavairocana, and are essentially already Buddhas by our one innate enlightenment (本覺 Hongaku). We can realize Mahavairocana's enlightenment here and now, in this very body.
There are many other references to Buddhism in spell cards, but I felt these where the most relevant to Esoteric Buddhism.
Conclusion
Reality as our teacher, consequently, Touhou as our teacher
Womb Realm Mandala
In Kūkai's theory of language, sound, sign and reality are manifestations of the Three Mysteries as expressed by the dharmakaya (also personified and known as Mahavairocana), meaning, that by observing "patterned signs" (anything we can name), we can glean through ultimate reality as it is being constantly expressed by the dharmakaya through our experience. We can learn to read those patterns through wisdom and observation. For example, if we observe simply a single patterned sign, like a leaf, seeing it be born, wither and die, returning to the earth, and getting born and dying again, isn't that a teaching? A teaching about the cyclical nature of reality, and more ultimately, how the leaf has no inherent independent self and is also ultimately unborn? This is how the dharmakaya teaches us using patterned signs.
Similarly, when playing Touhou, it can unlock enlightenment inside of us, even if it not designed to do so. This is probably Touhou at its most esoteric. Think, what does Touhou teaches you about reality when you truly observe it? The concentration and trial and error required to achieve a 1CC often brings the player in a "flow" state, where they observe patterns over and over (that are strikingly similar to mandalas...) until they come to a realization and clear the spell card. Isn't this teaching you how to meditate and reach deep concentration when observing patterned signs, until you solve it? Some have reported developing new outlooks at a situation just from playing Touhou, and I don't think it's a coincidence... this is not a call to enlighten yourself by playing a video game, it is probably very limiting to narrow your experience of reality and its teachings to a single thing. But it is a call to be more observant in life, in general, and you will grow much wiser.
- Tendai-anon