Glad you mentioned it. The riddle is indeed inspired by Professor Layton's game series.
Because Layton was dead for years, I added his style of puzzles as an easter egg fan to dig it out. And, I want people who never tried the game before to play the amazing puzzle professor Layton offered more than a decade ago.
(Then they announce it's revived this year)