Torrential rains battered Okinawa’s islands on Wednesday as a weakened but still dangerous typhoon, leaving two dead and threatening widespread flooding as it headed for the nation’s main islands.