By the 14th century, Zen was a dominant force in Japanese cities and the countryside. It influenced a number of art forms and disciplines, from swordplay to gardening, and it also assimilated the deities and demons of popular religion and folklore. Closely allied with military rulers, it also became involved in the construction of the code of honor called bushido.
Many of the Rinzai Zen monasteries were organized into the Gozan, or Five Mountains system, which encompassed hundreds of monasteries and was protected by the military. Its structure was modeled after a similar organizational system in Song dynasty China, but one that was never so tightly organized there. Within this system, each monastery was ranked, and monks were able to move freely among them.
The traditional Chinese rules of discipline were followed in these monasteries until the 15th century, when scholarly and artistic pursuits began to capture the attention of many Chan monks. Gozan monks gradually became more interested in the arts and culture than in maintaining discipline. Gozan Zen was famous for its poetry, wood block prints, and other artistic forms.
With the support of powerful samurai nobility, the Gozan temples became wealthy and famous. They held considerable amounts of land, engaged in trade and commerce, and also were involved in money-lending for profit. Among the monks were experienced and competent managers, diplomats, and traders who served the secular authorities. Gozan Zen became a powerful institution, influential in religion, politics, and economics.
When the political power of their patrons fell, so too did the Gozan temples. In the late 15th and 16th centuries, many temples were burned or lost significant amounts of land. Some of these temples still exist today, however, among them famous Zen training centers such as Nanzenji, Shokokuji, and Tenruyji in Kyoto, and Engakuji in Kamakura.
Another organization of Zen monasteries included both Rinzai and Soto monasteries, and called itself Rinka, or "forest" Zen, in reference to its outsider status in comparison to Gozan. Despite the name, some of the monasteries were prominent in the capital and had influential patrons among the nobility. Rinka was particularly renowned for its curriculum of koan studies.
Soto Zen, during the same time period, was spreading throughout the countryside under the impetus of the fourth successor of Dogen, Keizan (1264-1325), and his disciple, Gasan (1275-1365). They took over many abandoned Tendai and Shingon Buddhist temples, and also engaged in construction projects, building bridges, dams, and canals in these new areas.
Because Soto Zen incorporated many elements of local religious customs, many prominent Soto temples are now connected to folk and esoteric traditions. A notable example is the Toyokawa temple in Aichi prefecture, which, in addition to being a Zen training center, is one of the two headquarters of the Shinto Inari tradition. Priests at Toyokawa participate in Inari ritual events, donning papier-mâché fox heads over their Zen robes to march in festival parades. Most lay visitors come to the temple to worship Inari, unaware of its status as a Zen monastery.
A famous reformer of Rinzai Buddhism during the late Tokugawa era was Hakuin (1686-1769). He entered Buddhism when he was very young, and became something of a prodigy in the study of both secular and religious texts. For eight years after receiving dharma transmission at the age of 24, he traveled and studied at Zen monasteries across Japan. Hakuin taught a strict regimen of koan study, and was the creator of the famous koan, "We know the sound of two hands clapping. What is the sound of one hand?" He was highly critical of sitting meditation, instead urging attention to maintaining a meditative state in the course of all daily activities. He also emphasized mystical experience, and wrote about what he called the Great Doubt, which results when all conventional categories and perceptions are eliminated. Rather than regarding this mental emptiness as a kind of nihilistic state, he believed that it cleared the way for dramatic and sudden moments of insight.
Hakuin was also noted for his painting and calligraphy. He had a unique, humorous painting style, drawing caricatures of monks and notable Zen teachers, as well as writing poems, Zen sayings, and single characters in his bold calligraphic style.