The Democrats had a script for 2016. Backed by big-money donors, party insiders, liberal institutions, universal name recognition, the media and terror on the part of all other serious potential candidates, Hillary Clinton would glide to the nomination, her path marked by rose petals.

Gentlemen would doff their caps as smiling troubadours gently strummed their lutes by the side of the path to the nomination.

Somehow a coronation turned into “Mad Max: Fury Road.” Every time Hillary looked in the rearview mirror, there he was: a nutty old socialist chained to the grille of a monster truck and screaming imprecations into the wind.

How could Bernie Sanders still be whooping and braying and rousing his troops on her back fender as late as the California primary? (Which he’ll probably win — she’s up two points in the latest polls but there’s been a Golden State surge in voter registrations, always a sure sign that the power of Bernie is growing.)

Sensing that a loss in the country’s most populated state would be a devastating last-minute rebuke to a campaign that should have been over months ago, Hillary (who originally planned to be closer to home in New Jersey, which also holds a primary on Tuesday) is barnstorming California along with her husband: The Bill and Hill show is doing 30 campaign events in five days.

Sanders supporters are apoplectic because they know if Clinton can’t win fairly, she’ll cheat: By using superdelegates, a k a party hacks, a k a the folks who, as a Huffington Post writer named Seth Abramson recently put it, “exist for only one purpose: to overturn, if necessary, the popular-vote and delegate-count results.”

Democratic pollster Doug Schoen pointed out in the Wall Street Journal this week that Sanders could even still prevail at the convention by demanding a rule change that would push superdelegates to vote for the candidate who won their state.

Hillary has gotten three million more votes than Sanders, but Bernie lovers are not going to be pacified by that. They see Hillary as a lethally reactionary force that will stall out or maybe even throw into reverse their progressive dreams.

She’s awful enough in herself, but she’s also so much the cause of awfulness in others that she might actually deliver us a President Trump.

The Democratic brand as the party of the people looks like fraudulence: Elites rule.

Sanders? He’s up by more than 10 points in the Real Clear Politics polling average.

Sanders has Berned the Donald in 23 consecutive polls going back to February. By contrast, Clinton has a 1.5-point lead over Trump in the RCP average, and he has beaten her in three of the last seven polls.

All spring, it looked like the Republican convention was going to be a mud-wrestling match without the bikinis. Now Republicans are grimly unified behind Trump and it’s the Democrats who have to plan for chaos. Sandersistas are young, organized and angry.

Sure, they may be losing by more delegates than Clinton lost to Obama in 2008, but even though their candidate is old enough to remember when Clint Eastwood was just a TV star, they don’t have the same temperament as the comfortable-shoe brigade of Hillary supporters.

Cue up those 1968 images and imagine the Bernie Bros finally occupying a stage as large as their ambitions. They’ll be playing dirty tricks, causing riots and being trucked away in plastic handcuffs. The Democratic convention is supposed to be an infomercial, but not for the Republicans.

This is all sweet justice for the Democratic party. Throw grievance bombs in every direction and you may find yourself getting cut by shrapnel.

Moreover, the Democratic brand as the party of the people looks like fraudulence: Elites rule. The supposed referee of the unexpectedly brutal Clinton-Sanders bout, DNC Chair Debbie Wasserman Schultz, has (as Sanders supporters rightly point out) been in Clinton’s corner the whole time. She scheduled debates on Saturday nights in the hopes that no one would watch and no one but Hillary would gain a following.

The Clinton candidacy had everything going for it except the candidate herself.

A damning illustration of that is in last week’s cover story for New York magazine, which must have been conceived as a puff piece by the progressive feminist writer Rebecca Traister, who was granted unusually close access to the candidate, no doubt because Traister is a committed Rodhamite. Yet even Traister points out that Clinton’s program “does not sound good at a rally,” that her team is caught in a “paranoiac cycle — Clinton and her team think that everyone is after her,” that Clinton’s need for privacy is “pathological” and her message “muddled.”

“There is something about the candidate that is getting lost in translation,” Traister delicately says, sounding the note we heard so often in the the final days of the Kerry and Dukakis campaigns.

Actually, after 24 years of being in the national eye, Hillary Clinton, and everything she stands for, are coming through loud and clear. That’s the problem.