Shorter than a bad blind date and as sour as a vinegar Popsicle, “Young Adult” shrouds its brilliant, brave and breathtakingly cynical heart in the superficial blandness of commercial comedy. More radically than “J. Edgar” or even “Greenberg,” this movie, written by Diablo Cody and directed by Jason Reitman, challenges the dreary conventional wisdom that a movie protagonist must be likable. Along the way, it systematically demolishes a china shop full of shopworn sentimental touchstones about — for starters — high school, small-town life, heterosexuality, Minnesota and the capacity of human beings to change, learn and grow. When we first encounter her, Mavis Gary (Charlize Theron) seems to have grown, though perhaps not in the most constructive ways. Crossing the treacherous, unmarked boundary between her mid- and late-30s, Mavis has acquired some of the trappings and habits of adulthood. She lives in a spacious, slightly sterile high-rise apartment in Minneapolis (a Midwestern variant on the den of Manhattan anomie that Michael Fassbender’s sex-addled character inhabits in “Shame”) and has, for company, a fuzzy little dog and a big, flat-screen television permanently tuned to some Kardashian or another.Eventually we hear about a divorce, though not much about the marriage that preceded it. Mavis supports herself by writing installments in a popular series of “Gossip Girl”-like novels for teenagers, and though her name does not appear on the cover, she derives some creative and professional satisfaction from the job. She drinks a lot, pulls at her hair and seems generally unconcerned with other people. She is pretty, poised and imperious in the way that can come naturally to tall, beautiful, blond women, but also weary and blue — a platinum princess suffering from metal fatigue. Looking for a way to break out of her rut and return some luster to her life, Mavis decides to go back to her hometown, Mercury, Minn., and reconnect with her high school boyfriend, Buddy (Patrick Wilson). Just how spectacularly bad this idea is — how packed with vanity, magical thinking and plain, stupid meanness — emerges over the course of a few days, but the warning signs are there from the start.Buddy, who is married, has just become a father for the first time. To Mavis, this can mean only that he is trapped in a domestic prison from which she must rescue him. And so she arrives in Mercury intent on breaking up his marriage, a plan she justifies to herself in the romantic language of destiny, soul mates and following your heart. That is the native idiom of romantic fiction, both the kind Mavis writes and the genre she appears, at first glance, to inhabit. With sly understatement, Ms. Cody and Mr. Reitman (who previously collaborated on “Juno”) allow a set of comfortable expectations to emerge. We all know — from bad movies like “Cars,” say — that a big-city big shot on a visit to a small town will be constructively humbled by the simple, honest folks who live there. (Or else, as in “Straw Dogs,” terrorized by them). We are also conditioned to believe all kinds of contradictory claptrap about adolescence, which we are supposed to leave behind but also hold onto for (if I may show my own age by paraphrasing John Mellencamp) as long as we can.One of the incidental pleasures of “Young Adult” is its specific sense of generational identity. The logos of bands like Black Flag, the Breeders and — of course, this being Minnesota — the Replacements serve as tokens of belonging and signifiers of nostalgia. On the road from Minneapolis to Mercury, Mavis plays an old mixtape (an actual cassette, by the way) from Buddy, fixating on “The Concept” by Teenage Fanclub, which serves as the film’s ambiguous anthem. It evokes warm and affectionate memories, but also, in her case, the pathological inability to let go of the past. We assume that a romantic comedy will turn on the redirection of desire from the wrong person to the right one. In one sense — I don’t want to say too much about the details of the plot — this expectation and all the others are met. Mavis does get something of a city mouse’s comeuppance; she does come to difficult terms with her vanished youth; and she does find her attention divided between two guys, the hunk who is her heart’s desire and the nerd who serves as a sympathetic ear and shoulder to cry on. But at the same time, the established codes of modern movie comedy are scrambled and subverted in ways that are puzzling, amusing, horrifying and ultimately astonishing. The heroine in “Juno” was briefly dazzled by Jason Bateman’s cool, not-nice guy, but she eventually found her way back to the sweet loser played by Michael Cera. That was impeccable young adult logic, but “Young Adult” itself is a little more complicated, and much harsher.Buddy is perfectly nice and not especially cool. The other guy, Matt (Patton Oswalt), is kind of prickly and cool in a geeky way. He makes his own action figures, distills his own bourbon (something Mavis especially appreciates) and has an awesome collection of ’90s indie-rock T-shirts. He is also a reminder of the brutal underside of high school, which Mavis chooses to remember as a time of power and glory. Back when she was prom queen, he was in the hospital, having survived a horrific beating that left permanent physical damage.And yet Mavis can look at him and complain, without irony, about how much she has suffered in her life. Her cruelty and self-pity are downright shocking. If Ms. Theron hadn’t already appeared in a film called “Monster” (for which she won an Oscar), that title might suit “Young Adult” just as well. But even as this movie revels in the punitive spectacle of Mavis’s humiliation, it also extends her a measure of sympathy. Not by justifying her appalling behavior, but rather by treating her honestly.Popular culture weaves a tapestry of beautiful lies. “I didn’t want to hurt you,” the Teenage Fanclub vocalist swears, over and over, in the chorus of “The Concept.” The book Mavis is working on (we hear snippets in voice-over) is full of paeans to its heroine’s pluck, luck and intelligence. Big-studio comedies lull us with smiles and fairy tales. The truth, in these circumstances, can be a painful shock, even when it makes you laugh.“Young Adult” is rated R (Under 17 requires accompanying parent or adult guardian). Harsh language, bad sex, unpleasant situations — grown-up stuff, in other words.