This is something that sorta bugs me, especially when Im in the trainer, choosing which card to upgrade, or when I want to just redo my deck. I agree you should not be able to have less than 30 cards at a time to battle, but I think it would be good to look at different things with less than 30 cards.
Ideas to make sure that people dont get stuck by accidently selling and having less than 30 cards.
1)[less preferred, but probably simpler to do] Make it so that you cant sell cards with your cards in deck+out of deck =<30
2)[preferred, but probably harder to do] If you end up with less than 30 cards, when you start a battle, have null cards added to your deck to = 30. A null card would just be a simple card, no quantum cost, and a spell (that way it cant be used to do damage, or to get an extra heal by feral bond). It would also be immaterial that way you cant use animate weapon on it (and end up getting an extra health boost by feral bond)
Just a suggestion. Idea 1 would still work good, because as you sell your cards, you can just buy the ones you need to make up for it.