Cynics beware: The teen-oriented romantic drama “Everything, Everything” (Warner Bros.) bears more than a little resemblance to one of those fairy tales involving a princess locked up in a castle who needs a handsome prince to rescue her.

Anachronistic thinking aside, director Stella Meghie’s adaptation of Nicola Yoon’s young adult novel — which features the genre’s familiar theme of embracing love even at the risk of death — is gentle, tasteful and faithful to the book. A bedroom scene shared by its barely-of-age main couple, however, makes it doubtful fare even for mature adolescents.

Amandla Stenberg is Maddy, a very bright and literate teen who has been told since her earliest years that she has severe combined immunodeficiency, or SCID. She’s just like the famous bubble boy, except with the run of an entire hermetically sealed house.

This structure was specially designed for her by her mother, Pauline (Anika Noni Rose). Visiting nurse Carla (Ana de la Reguera) rounds out the isolated household.

One step into the outside world, and any virus or bacteria could prove fatal. Maddy lives the most solitary of lives, but insists to her mom that being alone isn’t the same as being lonely.

Her one melancholy wish is to see the Pacific Ocean, which is just three miles away. Occasionally Pauline still mourns for Maddy’s father and brother, who died in a traffic mishap.

Then handsome, sensitive Olly (Nick Robinson) moves in — right next door! He, of course, turns out to be Maddy’s instant soul mate.

Olly has troubles of his own, though. He sometimes has to protect his mother and sister from his abusive drunken father, who has difficulty holding down a job.

Conveniently, the windows in Maddy and Olly’s rooms are directly across from each other. So, soon enough, they’re not only texting but communicating through placards held up to the panes.

Maddy starts dreaming about the big wide world, having long soulful conversations, and anticipating that all-important first kiss. “I’d rather talk to him than sleep,” she announces.

Gee. What could possibly happen now? Will Pauline’s protectiveness turn out to have been excessive? Will true love triumph?

You betcha it will. Aware of the target audience, screenwriter J. Mills Goodloe sustains the romantic fantasy without letting any harsh real-life consequences intrude. In fact, his script displays all the gritty realism of a Gidget movie. Still, to borrow a line from the late Roger Ebert, this is a picture with which only an old grumpypants could find fault.

The film contains brief sensuality as part of a mostly off-screen nonmarital encounter and a single instance of rough language. The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is PG-13 — parents strongly cautioned. Some material may be inappropriate for children under 13.