Charlize Theron shines in this bitter comedy from the "Juno" team of screenwriter Diablo Cody and director Jason Reitman.

Every time you’re ready to write off Hollywood comedies, along comes a picture like Young Adult to keep hope alive. How did this unapologetically sour movie make its way through the studio system and land a coveted December release date? A lot of people are going to be baffled by Charlize Theron’s performance as Mavis Gary, an author of novels for teenagers who returns to her home town of Mercury, Minnesota, to derail the marriage of her former high school flame Buddy (Patrick Wilson). Buddy loves his wife and just became a father, but Mavis assumes he is profoundly unhappy and will be powerless to resist her come-ons. He couldn’t possibly be satisfied by his grotesquely domestic life. Right?

Young Adult was written by Diablo Cody, whose two previous films (Juno and Jennifer’s Body) centered on teenagers. In a way, this one, too, is about adolescence: Mavis is 37, but she still views the world as if she were 17, when she always got her way, when her beauty made everyone fawn over her, when she was queen of her small world and she won Best Hair. Mavis is a repellent human being — an adult version of the imperious cool kids from school — and the unlikeliest of rom-com heroines. But Theron plays her straight, without compromise or ironic distancing, and the character is so misguided and discomfiting that you often don’t know whether to laugh or pity her. “Oh, how embarrassing,” the would-be homewrecker says with disdain when she finds out Buddy’s wife (Elizabeth Reaser) moonlights as a drummer for an indie band. “Love conquers all,” Mavis remarks while plotting to steal Buddy away. “Have you not seen The Graduate? Or, like, anything?”

Director Jason Reitman (Juno, Up in the Air) takes a cue from Theron’s upfront approach and doesn’t trick up the movie with artificial stylings. Young Adult is just as blunt and direct as Mavis, and the honesty adds a layer of squirmy discomfort to moments such as Mavis’ first rendezvous with Buddy at a local hangout, or her conversations with another former classmate, Matt (Patton Oswalt). The comedian is terrific as a man who has resigned himself to the life of a geeky loner: Like Mavis, he never outgrew his high school persona, and he uses the crippling injuries he suffered at the hands of bullies as an excuse to keep the rest of the world at bay. Not surprisingly, Matt turns out to be one of the few people with whom Mavis can form a connection. She can relax around him, because he doesn’t judge her alcoholism, and he says things like “Guys like me are born loving women like you.” With Mavis, flattery will get you everywhere.

A fat streak of melancholy courses throughout Young Adult — who would have guessed the sight of a Kentaco Hut, one of those one-stop conglomerations of Kentucky Fried Chicken, Taco Bell and Pizza Hut, could be this depressing? — and even the alt-rock songs on the soundtrack (4 Non Blondes, Veruca Salt and especially Teenage Fanclub’s The Concept) carry a tinge of sadness. They’re bits of nostalgia blown up to fill empty lives; they’re rueful oldies.

This may all make Young Adult sound somewhat gloomy, but it’s really not. The humor in the film just happens to be uncomfortable, because Mavis is too arrogant and oblivious to learn the Important Lessons this sort of comedy always imparts. But you can’t really bring yourself to dismiss this irreparable woman outright. “It’s like the rest of us changed, and you got lucky,” Buddy says when he sees that Mavis looks pretty much the same way she did 20 years earlier. He means that as a compliment. But Young Adult eloquently implies that can be a condemnation, too.