By Ty Burr
Updated November 15, 1996 at 05:00 AM EST

It takes a while before the piquant new Twelfth Night finds the right tone. Shakespeare’s 23rd play is a many-leveled work that, to paraphrase one of its characters, ”smiles at grief.” By resetting the play in the mid-19th century, director Trevor Nunn (the man behind bloated stage circuses like Les Misérables and Sunset Boulevard) initially seems to be aiming at a Gilbert and Sullivan pastiche. Then a cloud of somberness gathers as Viola (Imogen Stubbs) is separated from her twin brother (Stephen Mackintosh) in a shipwreck and makes her way in the intrigue-ridden country of Illyria by disguising herself as a male courtier. At this point, you’re still not sure where the movie’s headed: Stubbs has a refined air of longing, but with her wispy mustache she looks disconcertingly like Ellen DeGeneres in slapstick drag.

Thankfully, the sun breaks through as soon as Helena Bonham Carter — gorgeous, ethereal, and flying high — shows up as Olivia, a noblewoman who falls for the disguised Viola even as our hero, er, heroine, is wooing her on behalf of Duke Orsino (Toby Stephens), with whom he, I mean she, is in love. (Look, you figured out Mission: Impossible, you can figure out this.) Once the algebra of who loves whom is set up, the film turns into something quite fetching: a Merchant Ivory-style soiree with a spiked punch bowl.

Done on a tight budget and using few sets, this Twelfth Night doesn’t have the grandeur one expects from filmed Shakespeare. It’s an epic, all right, but of the heart. Nunn never gets a handle on the low-comedy high jinks of Sir Toby Belch (Mel Smith), Sir Andrew Aguecheek (Richard E. Grant), and the pretentious manservant Malvolio (Nigel Hawthorne) — their scenes feel stuck in the conventions of Elizabethan knockabout — but Stubbs, Carter, Stephens, and Mackintosh make their woolly-headed passions both charming and melancholy. Twelfth Night has the ramshackle fizz of a garden-party production — and, to top it off, there’s a Jove-like Ben Kingsley as Feste, the troubadour atop the garden wall — but under the masque of comic diversion, it’s an exquisitely moving inquisition into gender and belonging. B