Karahafu (唐破風) is a type of curved gable found in Japanese architecture. It is used on Japanese castles, Buddhist temples, and Shinto shrines. Roofing materials such as tile and bark may be used as coverings. The face beneath the gable may be flush with the wall below, or it may terminate on a lower roof.
Although kara (唐) can be translated as meaning "China" or "Tang", this type of roof with undulating bargeboards is an invention of Japanese carpenters in the late Heian period. It was named thus because the word kara could also mean "noble" or "elegant", and was often added to names of objects considered grand or intricate regardless of origin. The karahafu developed during the Heian period and is shown in picture scrolls to decorate gates, corridors, and palanquins. The first known depiction of a karahafu appears on a miniature shrine (zushi) in Shōryoin shrine at Hōryū-ji in Nara.
The karahafu and its building style (karahafu-zukuri) became increasingly popular during the Kamakura and Muromachi period, when Japan witnessed a new wave of influences from the Asian continent. During the Kamakura period, Zen Buddhism spread to Japan and the karahafu was employed in many Zen temples.
Initially, the karahafu was used only in temples and aristocratic gateways, but starting from the beginning of the Azuchi–Momoyama period, it became an important architectural element in the construction of a daimyō's mansions and castles. The daimyō's gateway with a karahafu roof was reserved for the shōgun during his onari visits to the retainer, or for the reception of the emperor at shogunate establishments. A structure associated with these social connections naturally imparted special meaning.
Gates with a karahafu roof, the karamon (mon meaning "gate"), became a means to proclaim the prestige of a building and functioned as a symbol of both religious and secular architecture. In the Tokugawa shogunate, the karamon gates were a powerful symbol of authority reflected in architecture.