Amazing idea and execution! It's all very readable and intuitive. Other than the glitches, I'd also suggest having the spell be "spelled out" (lol) when you get the book, avoiding having to open the spell list right away. I was also a little confused at times due to how spells won't give any feedback if there's not a target, i.e. if I use the door one with no door, or the attack one with no enemies on screen, nothing happens. I'd prefer to still have some visual confirmation that indeed I did a spell correctly, even if it didn't land anywhere. But I did like how you can prepare the spell before hand and only trigger when needed, made combat feel more strategic.
You should totally expand upon this. Maybe even as a quick-typing game? Great job