@kuma For starters, this story is a historical one. So, it is neither modern nor a fantasy, but rather old and realistic. To answer the former, I cannot say as this story takes place in Imperial China and not in Japan. As to whether or not cacao beans existed Imperial China during the 17th century, the answer is: yes. Many trade routes were open at the time which gave many opportunities for cacao beans to enter China.
Furthermore, in a letter written by Buenaventura Ibañez, a prominent Franciscan (A Christian Group in China at the time), on March 5, 1678, requested a cargo of cacao to be sent from New Spain with all the accoutrements necessary to make chocolate as a present for the “King of Canton”. This suggests that access to chocolate may have been restricted to only the upper echelons of society, as demonstrated in this very chapter.