I've just written the dramatic climax, which includes lots of derring-do and the Doctor being heroic. (Finally.) All that's left to write is a short epilogue. It's going to clock in around 55,000 words.
It was inspired by the simplest of exchanges in a Big Finish Doctor Who audio, 1001 Nights:
Nyssa: You’re quite sure this outfit isn’t a little too showy? Oh.
Doctor: Nothing’s too showy for the Grand Coronation of the High Hierophant of the Five Revealed Truths. Oh.
N: We’re not at the Celestial Basilica, are we?
D: Apparently not.
N: Then where are we?
D: I’m not sure. Remote outpost, maybe? Or some kind of fortress? Not exactly bustling with life.
N: It’s a prison, isn’t it.
D: I admit the fifty-foot-high wall does tend to give that impression.
N: I had enough of prisons on Folly. Can we go?
<Cries for help>
D: Did you hear that?
N: Doctor. The Coronation of the High Hierophant, remember? Perfumed rain, falling from clouds sewn with powdered diamonds… you wouldn’t want to miss that.
D: I’ve had the invitation for the past 300 years, Nyssa. I can wait a little longer… come on!
That question bounced around in my head for a long time. The "Celestial Basilica" suggested to me a castle in the sky, and "The High Hierophant of the Five Revealed Truths" reminded me of the Five Platonic Solids, tarot cards, and a lot of esoteric, overblown western European symbolism. But apart from the vague notion that the palace was made of antigravity fields and there would be dancing, I didn't have much for a while.
Then, thanks to another Big Finish audio, The Church and the Crown, I got interested in a historical figure, Queen Anne of Austria, who figures in that adventure. (Peri is her doppleganger). Anne's son was Louis XIV, for who she served as Regent. I started reading up on that period, when there was a lot of dynastic conflict, conspiracies, and attempts to usurp the boy king before he came of age. That was also when the ballet craze hit the royal court of France. To my astonishment, I learned that Anne used ballet as a propaganda tool to secure popular support for the young prince against the nobles scheming against him. As so often, the commoners weren't too fond of their masters, and they looked to the king to check the nobles' power. So Anne created the mystique of the Sun King who banishes the forces of darkness and chaos with the light of reason, music and geometry. She dressed teenaged Louis as Apollo, and herself as Minerva. A consummate dancer, he wowed the people of Paris in outdoor ballet performances, as a sort of rock star. Various other Greek mythological figures appeared in these symbolic pageants, represented in their Roman aspects. Neoplatonism, geometry, mathematics and dance were bandied among the intelligentsia as a new philosophy of harmony and reason.
That gave me an idea for the culture of the Celestial Basilica.
Then I needed a plot. I also had in the back of my head that the Doctor left Susan behind when he thought she was going to get married, and he almost did the same to Nyssa in Circular Time. Nyssa would never stay behind for love: she's too committed to finding some selfless cause or purpose to dedicate her life to. But what if the Doctor misunderstood? What if he believed he was in one of those serials that ends with the companion staying behind for love, whereas she thinks she's just doing what they always do, intervening in some local problem on the planet where they've landed, fully intending to leave once the crisis is resolved? That leaves her behind, and then she has no choice but to fill in for the Doctor as troubleshooter until he comes back.
The final thread was the Cinderella story. I wanted to give Nyssa a Prince Charming, but I did not, actually, want a love triangle, because love triangles are annoying (poly is always an option). So it had to be something the Doctor would interpret as a love triangle, when it wasn't. Why? Well, obviously, the Prince is gay. And...?