Rollicking, winking and acceptably randy, Casanova is one of those smart pictures that transcends genres, a costume romance inspired by Restoration comedy, French farce and vaudevillian slapstick. Set in Venice, our hero's hometown, the screenplay is literate and the direction bright, with cinematography as stunning as a Lido sunset, production design as gay as Carnevale, and music as spirited as a Vivaldi concerto. The splendid cast turns in droll performances, with Heath Ledger clearly enjoying himself in the title role.

Helmer Lasse Hallström opens the film soberly as young Casanova is fobbed off on his grandmother by his actress mother, apparently too hot-blooded to raise a child properly, but this somber scene quickly cuts to more colorful action. Now in his late 20s, history's most famous lover is hard at it, seducing a trembling novice (you get the joke) in a nunnery full of women equally eager to embrace damnation for a tryst with his lordship.

The Inquisition interrupts the proceedings to initiate a rooftop chase, the first of many romps through the picturesque city, which leads to Casanova's capture. He is about to be tried for crimes of fornication and heresy when the city's tolerant Doge (Tim McInnerny) intercedes, granting Casanova a reprieve if he promises to reform...that is to say, marry.

Consulting with his endearingly foppish servant, Lupo (Omid Djalili), Casanova decides to woo the lovely Victoria (Natalie Dormer), one of Venice's most public virgins, who has the advantage of a wealthy father. The courtship doesn't go smoothly, however, for Victoria's secret admirer, Giovanni (Charlie Cox), a callow but ardent youth, attempts to defend her honor by challenging his rival to a duel. In a misadventure characteristic of the script's ingenious twists, Giovanni manages to insult Lupo instead, requiring the two men to match rapiers despite that neither has skill with the sword.

Casanova pretends to be Lupo-delightfully absurd, since the two could not be more different-but finds himself engaged with an unexpectedly vigorous opponent. Giovanni has also pulled a switch, substituting his headstrong older sister, Francesca (Sienna Miller), in his place. It's love at first thrust...but only the beginning of a Byzantine plot with more feints, parries and reprises than a sale d'arms. For Francesca not only is an accomplished fencer, she is a philosopher and pamphleteer who strenuously advocates women's rights under a nom de plume that also has the attention of the Inquisition.

To further complicate matters, Francesca's mother (Lena Olin) has arranged the betrothal of her daughter to the porcine Papprizzio (Oliver Platt), a rich merchant who traffics in lard. Papprizzio has arrived to meet his prospective bride and market his product (the filmmakers go whole-hog with the pig humor), only to be intercepted by Casanova, who persuades Papprizzio to trade places so that he can tutor him in the art of love.

Enter Bishop Pucci (Jeremy Irons), the Pope's henchman, come to Venice to settle scores with the enemies of morality and decency. The narrative conveniently culminates at the height of Carnevale, with a masked ball, a hot-air balloon ride above the Grand Canal and myriad pairings, or parsings, really, since couples switch partners with the ease of a Baroque dance.

It's all quite clever, at times self-conscious, occasionally bawdy, always amusing. Hallström manages to balance broad humor with sentiment, and writers Kimberly Simi and Jeffrey Hatcher have an instinct for farce. Platt is hilarious as the supercilious pork-monger, but his performance evokes enough empathy for his portly character to make us cheer for him. Irons, delightfully outrageous, almost acts in drag as the sententious Pucci, with his purple gowns and pursed lips, an old maid who frowns on fun of any sort. Miller and Olin are well-paired, both actresses blending beautifully into the splendor of 17th-century palazzos.

-Rex Roberts