The Pillow Book
The movie's plot is partially based on research on Sei Shōnagon's "The Pillow Book".