Rising seas could menace millions beyond shorelines, study finds