It was a normal development in a dating sim game for female audiences, where the crown prince fell in love with the heroine instead of his fianceé and broke up his childhood engagement with the villainess.
However, somehow, things went awry.
"I will take responsibility."
Feeling responsible towards the villainess's ending, the heroine took a sharp turn that everyone never thought of. She turned down the crown prince, became the Imperial Magician dedicated to prosper the country, and three years later, faced the villainess once again, with a diamond ring on 'his' hands.
"Lady Charlene, please marry me."
... The heroine invented a gender-changing potion and changed into a man.
[note: currently focusing on 'Children of the Demon King's Castle'; will continue after it completed or at least arc i ended.]