kugyō

person attached to the court of the Emperor of Japan in pre-Meiji eras