Grade: B+

Devotees of Japanese animator Hayao Miyazaki’s earlier films–especially the ones like “Princess Mononoke” (1997) and “Spirited Away” (2001) that got a wide American release–may be disappointed that his new effort is based on the work of someone else, specifically novelist Diana Wynne Jones, rather than his own imaginings. But though this may be deemed heresy by some, “Howl’s Moving Castle” is better than those other pictures–more affecting, whimsical and (until a final act that, as in so many films nowadays, goes rather haywire) coherent. For most of its running-time this is a beautifully wrought, intoxicatingly dreamlike parable of personal and social maturation. And lest that description sound too highfalutin and sophisticated, rest assured that the movie also has plenty of straightforward humor and charm.

“Castle” is set in a nineteenth-century environment that just happens to be inhabited by wizards in addition to Victorian-era human beings. The heroine is Sophie (voiced by Emily Mortimer), a hard-working seamstress in the family hat shop, who’s rescued from a couple of intrusive soldiers by a mysterious stranger who turns out to be the great–and handsome–wizard Howl (Christian Bale). Unfortunately, her involvement with Howl earns Sophie the enmity of the wicked Witch of the Waste (Lauren Bacall), who casts a spell that turns her into a little ninety-year old lady (Jean Simmons). To seek a cure from her affliction, she searches out Howl’s titular abode–a huge mechanical contraption that lumbers across the landscape on amusingly skinny metal legs. With the aid of a hip-hopping scarecrow she calls–with accuracy–Turnip Head, she locates the magical “castle” and quickly imposes herself as cleaning lady upon Howl’s young apprentice Markl (Josh Hutcherson) and the nattering flame-demon Calcifer (Billy Crystal) who powers the place. She’s also easily accepted by Howl, who occasionally transforms himself into a winged creature to try to lessen the destructiveness of a terrible and foolish war being waged between two rival nations. Unfortunately, he and the other wizards are being drafted into the conflict by Madame Suliman (Blythe Danner), his mentor and fomenter of the discord, who, as it turns out, has other motives behind her actions. As the tale reaches its climax, the Witch of the Waste has joined Sophie’s little family along with Suliman’s barkless dog Heen, and Howl’s efforts to halt the carnage make him progressively less human–a circumstance that, as it turns out, can be healed only by Sophie’s love, as her premature aging can only be by his.

This scenario is obviously rather complicated–especially since, as in “Spirited Away,” there are third-act switches of motive and attitude that aren’t exactly prepared for. But for the greater part of its length it’s reasonably clear, partially because Miyazaki takes his time telling it. It’s refreshing to see a scene such as the one in which the elderly Sophie, carrying Heen, and the Witch of the West must together climb the imposing staircase of the royal palace to meet Suliman; drawn out in the way it is, it has the innocent charm of silent-screen comedy. (And Heen, it must be added, proves to be one of the few cinematic canines who doesn’t overstay its welcome.) The animation, moreover, is splendidly imaginative, with Turnip Head, who might have been an annoyance, coming across as a winning Tim Burtonesque oddity and the clanking castle given an amusingly anthropomorphic appearance. The near-pastel coloring gives the town streets and fields of flowers a luscious look, too. The visuals are matched by expert voice work, particularly by the veterans Simmons, who endows the aged Sophie with touches of both gravity and good humor, and Bacall, who refrains from overdoing things as the witch reduced to a burbling senility, and by Crystal, who applies his usual brand of manic intensity to the voluble fire-spirit. Bale also does well, bringing quiet authority to the wizard who suffers from major mood swings. That variability of character, though, is one of the elements that occasionally threatens to derail the movie. It stays pretty securely on track, however, until the last reel, when the narrative takes on mystical overtones (especially in the flashbacks to Howl’s youth) that become progressively obscure and the ravages of the war grow too insistent. (Indeed, one of the aspects of the story that keep gnawing away at one’s pleasure are the shots of huge flying ships raining flaming destruction on the towns below. The sequences look far too much like the fire-bombings of World War II to be merely lovely images.)

“Howl’s Moving Castle” nonetheless survives the late-inning missteps (as well as the clumsy title) to take its place as one of the summer’s tastiest treats, an enchanted fable that gives Miyazaki’s visionary talents ample rein without getting overly didactic about its messages (as some of his previous efforts have done).