Maybe it’s the fault of “The Fault in Our Stars” that we assume, in the flourishing modern era of the young-adult genre, that one of the story’s romantic leads has to die in order to advance the dramatic stakes. Fortunately, that’s not the case with director Julia Hart’s “Stargirl.” Adapted by Hart, Kristin Hahn and Jordan Horowitz from Jerry Spinelli’s novel of the same name, this tale of two teens falling in love and struggling to find balance in their polar opposite identities may prove difficult viewing for cynics or those with a low tolerance for the overtly saccharine. While it suffers from a rocky beginning with burdensome amounts of kook and quirk, the unfolding spell it subtly casts holds profundity and wisdom.

Sixteen-year-old Leo Borlock (Graham Verchere) is about to realize there are no perks of being a wallflower. Since the death of his father and a traumatic bullying incident, he’s felt that the key to surviving adolescence is fitting in without disrupting the norm. That means no standing out by showing his true self — a person who loves dinosaurs, sports, kooky porcupine-themed ties, and the music of the Cars. Instead, he keeps his head down, gets decent grades, plays in the marching band and hides on the A/V squad with a few pals. His quiet adoptive hometown of Mica, Ariz., mirrors this philosophy, barely noticed by the world at large. The metaphorical connotation of their high school mascot — a mud frog, a creature who lies in wait until awoken by a drastic change — also reflects both Leo and the town’s journey once the titular character descends on the first day of school.

With her irrepressible personality, eccentric clothing and love of the ukulele, former home-schooler Stargirl Caraway (Grace VanderWaal) stands out in a sea of sameness. She makes this instantly known on her first day of class with her hippie-inspired name and colorful, ’90s-influenced garb, but also during lunch when she singles Leo out in the cafeteria to sing him “Happy Birthday.” Later, she crashes the football game to augment the cheerleading squad’s efforts with her acoustic cover of the Beach Boys’ “Be True To Your School.” While all these acts sound like social suicide — and might be seen as such in any other film — the pendulum swings in the opposite direction, garnering respect and popularity from classmates and townsfolk, as well as further attention from Leo, who’s seriously crushing on her.

Hart and her collaborators adeptly utilize the textural language of cinema to heighten and underline thematic ties. Composer Rob Simonsen assigns instrumental representations to the two leads in his score: an acoustic guitar for Stargirl and warm synth for Leo. As Stargirl and Leo awkwardly converse, the score mirrors their interplay with a call and response-style arrangement. When the pair begin their romantic relationship, and her musical performances integrate with the band and cheer squad’s, those instruments conjoin in a symphony.

Gae Buckley’s production design, Natalie O’Brien’s costume design and Bryce Fortner’s cinematography all widen their scope as the student body accepts Stargirl as their good luck charm. Likewise, the dull, drab color palette of their clothing transforms into vibrant, saturated tones. Editors Tracey Wadmore-Smith and Shayar Bhansali craft montages with a buoyant sense of energy and romantic verve, especially valuable in sequences where Leo and Stargirl are falling in love (set to Big Star’s masterful ode to teenage romance, “Thirteen”).

In the pantheon of Disney’s teen movies, Hart and company’s adaptation earns strong marks for its realistic portrayal of their caste society — or, at least, a sanitized version of it. Though there are delineations between the popular kids and those who aren’t, traditional archetypes like the brain, athlete, princess, rebel, and outcast have either evolved or been excised to reflect a more modern sensibility. There is blessedly no troupe of mean girls or jocks mocking, ridiculing, or conspiring against Stargirl. And the outcasts aren’t exactly the rebellious cads or pocket-protector nerds of their juvenile societal order. This dynamic ecosystem suggests the payoff for what John Hughes fought to shatter in “The Breakfast Club.”

Greater yet, one of the best things about this adaptation is its deconstruction of the Manic Pixie Dream Girl trope. The film isn’t so much concerned about subverting it, instead examining its facets and offering a healthy alternative. The narrative’s centralized conflict isn’t solely about the inevitable loss of Stargirl’s newfound popularity, though there is some understated commentary there. That element provides the catalyst for introspection, both impacting her personal growth and helping Leo embrace his own idiosyncrasies. She experiments with finding a better balance between flamboyance and normalcy, which is the film’s prevailing sentiment. Plus, it blessedly avoids calling upon a dude to come to the rescue and return the shine to Stargirl’s tarnished name. They give her the ability to exercise her own agency.

VanderWaal, a singer-songwriter making her film debut, shows audacious promise with her work. She ropes us into the mystery of her character reveal with heaping amounts of magnetism and grounded authenticity. It’s no surprise that the music-driven scenes really showcase her power, like the Taylor Swift-inspired musical vignettes or mini-music videos à la “Rocky IV” that will ingeniously push soundtrack purchases. She and Verchere, who’s a genuinely sweet cross between Jessie Eisenberg and Michael Cera sharing the physicality and vocal tonalities of each, are a remarkable pairing.

The end credits coda brings Hart’s stirring vision into sharp focus. VanderWaal’s original song “Today and Tomorrow” shifts from a produced studio version over the credits to a scene with her singing live outdoors at sundown, serenading Verchere. It’s a tender moment, increased by the intimacy of the pair and the simplicity of the staging, leaving us with a gentle feeling of grace.