DENVER — Standing in line used to be an American pastime, whether it was lining up for Broadway shows, camping outside movie theaters before a Star Wars premiere or shivering outside big-box stores to be the first inside on Black Friday.

The coronavirus has changed all that. Now, millions of people across the country are risking their health to wait in tense, sometimes desperate, new lines for basic needs as the economic toll of the virus grips the country.

In cars and on foot, they are snapping on masks and waiting for hours to stock up on groceries, file for unemployment assistance, cast their ballots and pick up boxes of donated food. The lines stretch around blocks and clog two-lane highways.

In western Pennsylvania, cars stacked up for miles on Monday as hundreds of people waited to collect a week’s worth of groceries from the Pittsburgh Community Food Bank.