Fixing 縦書き text in EPUBs on Kindle for iOS

I was uploading a Japanese book in .epub format via Send to Kindle, but ran into a weird issue: the book would not display as right-to-left vertical text (縦書き), instead displaying as horizontal, left-to-right text, on the Kindle app for iOS and Mac, while still looking fine on my Kindle e-reader.