The game is set in the medieval city of Kyoto around the year 1000, during the Heian period of Japanese history.
Many of the characters in the game are based on real-life characters from the city and their appearances in the game are often loosely based on tales from the Konjaku Monogatarishū.