Manic Pixie Dream Girl gets taken to its literal terminus in Ruby Sparks, a sometimes twee, interesting entry in the catalog of hipster culture navel gazing from the directors of Little Miss Sunshine, Jonathan Dayton and Valerie Faris. A less obvious Zoe(y) stars as the titular Dream Girl; Zoe Kazan takes a screenwriting credit as well.

Calvin (Paul Dano), a former literary wunderkind turned nebbish in therapy, suffers from a crippling writer’s block that his therapist (Elliot Gould) suggests he overcome by writing something bad. Calvin takes the assignment to heart and then a nap where he dreams a girl destined to live in the pages of his next best-seller. She’s also destined to live in his house, because as soon as she’s committed to the page, Ruby Sparks (Zoe Kazan) shuffles out of the kitchen and into the real world.

Equal parts Stranger than Fiction and Eternal Sunshine of the Spotless Mind, Ruby Sparks tries to match the magical realism that so effortlessly informed and elevated those movies, and it almost succeeds. Kazan seems a disciple of the Charlie Kaufman school of metaphysical weirdness, but can’t quite break free from the punishing influence of the other Zoe(y): Deschanel, she of the doe eyes and quirky wardrobe.

A story about the magic of finding someone to love, and the blacker magic of keeping them, Ruby Sparks starts off with the premise that Ruby is Calvin’s creation and his to love in the way that he wants. But when he takes control of the situation in an effort to literally control Ruby and keep her in love with him, the consequences are swift and harsh. Whatever her origin, Ruby is real now and Calvin’s actions have equal and opposite reactions.

Ruby Sparks is at its best when its characters are allowed to act natural. Calvin’s a real life Sad Charlie Brown before he meets (makes) Ruby, and his initial reaction – that he might have to be committed – is grounded in reality and actually really funny. Dano is a gifted actor with an interesting face that reads like a book, something that became apparent in his almost silent role in Little Miss Sunshine and his strong performance in There Will Be Blood. What’s even more apparent here is his incredible command of his body, he’s a pretty great physical comedian. It’s something that services the sort of surrealist script well.

The film struggles more in the details that at this point have become maddening pop culture tropes: the dream girl with her rainbow tights and vintage shoes, her quirky behavior and infantilized sex appeal (Ruby sings in a breathy, absentminded way the “Skinnimarink” song while cooking). Calvin’s brother (Chris Messina) plays Greek chorus here, all his skepticism poured into the declaration that “messy women whose problems make them interesting are not real.” It’s nice that the sentiment’s expressed, it’s just that Ruby’s problems are still romanticized movie-versions of actual problems. Sure, she’s messy and absentminded, probably incapable of emailing people back in a timely manner, maybe she prefers CD walkmans to an iPod because she’s perpetually behind the times, and she’s always late. These things don’t make her a truly flawed human being, nor does declaring “I’m a mess!” The story suffers because Ruby’s more caricature than real person.

Perhaps the most enjoyable moments are when the characters explore the boundaries of this new world, one in which magic exists because Calvin can manifest a girl with his mind. He brings her out in public where he learns other people can see her, including a devoted fangirl named Mabel (Alia Shawkat) who finds what she thinks is a date awkwardly interrupted. He learns the rules of the game: whatever he writes about Ruby becomes fact. He uses the trick in a benign way at first to test the waters, and then in a far more manipulative way in the film’s darker final act. The introduction of Ruby initially is charming and interesting in and of itself: lady things begin to show up around the apartment before the lady herself. The film might have benefited from even more exploration of the implications of Ruby being the product of Calvin’s imagination. Her existence is tied directly to his mind and, more tangibly, the manuscript he keeps locked in a drawer. What would have happened to her if that had been tampered with?

The supporting cast, including Annette Bening and Antonio Banderas as Calvin’s new age Big Sur mom and her boyfriend, is charming. Steve Coogan as Calvin’s agent is simultaneously hilarious and creepy. Dano and Kazan, a couple in real life, have an on screen chemistry that is instantly comfortable and familiar. If only a story ostensibly about magic had had a little more, well, magic.