Brittany is the worst.

At the theater where she works behind the scenes, she uses the patrons as material for a running comedic monologue as they enter.

When a guy she’s been hooking up with actually wants a relationship, she cuts him to the core and says that will never happen.

She parties all the time with her shallow, wannabe influencer of a roommate, and seems to spend most of her days and nights either hung over or getting smashed again.

Brittany Runs a Marathon: 3 out of 4 CST_ CST_ CST_ CST_ CST_ CST_ CST_ CST_ Amazon Studios presents a film written and directed by Paul Downs Colaizzo. Rated R (for language throughout, sexuality and some drug material). Running time: 103 minutes. Opens Thursday at local theaters.

She’s a slob, she’s a mess, she’s selfish — and she can be cruel and cold when dealing with people whose only offense is genuinely caring about her.

And yet with all that baggage (and more), we like Brittany and we care about her and we’re rooting for her.

Thanks to an ambitiously layered script from Paul Downs Colaizzo (who also directs with a steady grasp of comedic pacing and a nice visual eye), and a resonant and rich performance by the terrific Jillian Bell in the title role, “Brittany Runs a Marathon” has some refreshingly sharp edges and occasionally charts a relatively unorthodox course for such a comfort food-type movie.

Which makes it all that much more satisfying when we reach the finish line we had in our sights from the get-go.

Bell’s Brittany is a Philly-born 28-year-old who arrived in New York City years ago with dreams of becoming a successful commercial jingle writer, but has slumped into a BarcaLounger of an existence, exerting minimal physical — and emotional and intellectual and spiritual — effort on a daily basis, from her nowhere job to her sedentary lifestyle to her fallback mechanisms of trusting no one and using sarcasm as a defense weapon.

When Brittany visits an inexpensive doctor with a high Yelp rating and tries to con him into prescribing Adderall, he turns out to be a solid doc and a good guy who tells her she’s not getting any pills, but he’s seriously concerned about her health given she’s entered morbidly obese territory and she needs to lose at least 50 lbs. and drastically change her eating habits.

In typically flippant fashion, Brittany laughs off the doctor’s advice with a joke about how he’s asking her to shed the equivalent of a good-sized dog from her frame — but his words are a wake-up call, and Brittany decides to take up running, just like her snooty and judgmental neighbor “Money Bags Marge” (the brilliant Michaela Watkins) who’s always in jogging clothes and forever scolding Brittany and her roommate Gretchen (Alice Lee) about them not following the rules of the building.

Turns out “Money Bags Marge” is actually named Catherine, and while she might seem to have the perfect life to the casual observer, Brittany eventually comes to learn some stunning truths about Catherine, including the fact she’s a loving and warm person.

Brittany joins Catherine’s running club, where they meet Seth (Micah Stock), who has vowed to get into shape because he and his husband are thinking of having a second child and he doesn’t want to be the parent who can’t keep up with the in-shape spouse and the kids with their boundless energy.

As Brittany sets her sights on not only shedding those pounds but actually running in the New York City Marathon, she receives Facetime encouragement from her brother-in-law Demetrius (Lil Rel Howery), who was like a father to Brittany after Brittany’s dad abandoned the family, and she strikes up a funny, buddy-comedy friendship/romance with Jern (Utkarsh Ambudkar), a fellow dog-sitter and aimless millennial.

All the supporting players in this story, with the exception of the superficial Gretchen, are so NICE. (And even Gretchen, despite the occasional harsh crack, is more of a dilly dope than a Mean Girls villain.)

The only real obstacle to Brittany turning her life around is, of course, Brittany herself, whose self-destructive bent results in some truly horrible behavior. (In one overly sour scene, Brittany is so awful, certain witnesses to the episode could be forgiven if they never talked to her again. But as I said: Everyone is so NICE.)

We know it’s never been just about Brittany shedding the weight. We know it’s also about Brittany losing all those emotional barricades she has constructed over the years. We know her toughest battle will be seeing all the warmth and wonderfulness others see in her.

Yes, Brittany can be the worst.

But when she’s at her best, she’s kinda great.