Robinson Crusoe

What if a deck of cards runs out?

It depends.
In general, when cards are discarded they're removed from the game, so when a deck runs out, it's gone. Mystery cards are an exception: resolved Mystery cards go into a discard pile which you can reshuffle if the deck runs out, while unresolved ones are shuffled straight back into the draw pile. Another exception is the Carpenter's 'A new idea' ability: Invention cards you don't choose when using this ability form a discard pile which gets reshuffled if the deck runs out.
Related Rule(s)