A costly campaign to legalize recreational marijuana in Florida failed Tuesday as voters in dozens of states weighed more than 140 measures appearing on the ballot alongside races for president and top state offices.