Do they need to dance while doing that? Can't spells be cast with the power of thought? Of course, logically, one can't think while frozen, but that's okay, everything here isn't quite real.
using Amethyst
Intrigued by the lack of news from the group for so long, Roger left his post and went inside. After assessing the situation, he connected the amethyst to the opening.
First, the sound of mechanisms working was heard in another part of the dungeon, then the blades in the opening of the first slot of the right door freed Agnet's hand, but since her body was currently frozen, only frozen fragments remained of her wrist, scattering throughout the room. Then the Emerald, Ruby, and Diamond fell out of the openings. The left door closed.
Added 6 minutes later
...
More time passed.
...
Following Roger, Azure descended. After examining the room, she figured out the correct solution and inserted the emerald and ruby as required. Seeing her frozen comrades, she went upstairs to the others. After a brief explanation, it turned out that Varus, although ill, actually possesses a strong level of healing magic. He entered the room and, with the help of a dispel spell, freed eight people before his magical energy ran out. Agnet and Aurelius remained frozen.