Cards win, earn NL wild card when Braves lose