You can actually still buy it OTC in Japan, too. You just can't bring it in or out.
Hope you will never need to do so, but if you do, avoid the product called "BRON" unless you really like to suffer. It's a hellish all-in-one concoction of caffeine, codeine & ephedrine. A running joke is "I took BRON and it destroyed my life in the following ways..."
It's perfectly legal because it is manufactured & distributed in Japan, and is therefore free of that nasty foreign influence that causes Sudafed to be very dangerous