the court and the shogunate existed at the same time until the end of the edo period