This, in turn, came to mean the imperial palace of an abdicated emperor (retired emperor or cloistered emperor), it was then also used as a synonym for a retired or cloistered emperor.
そこから転じて退位した天皇（上皇・法皇）の御所をいい、さらに転じて上皇・法皇の異称としても使われた。