I'll admit up front that A Little Night Music may be my favorite Sondheim score. It may not have the pop-music bounce of Company or the sweeping sentimentality of Into the Woods, but for what it lacks in hummable Broadway hit-makers it more than makes up for in sophistication, humor, and melodic beauty. And the latest production at A.C.T., closing out the mainstage season at the Geary Theater, is an elegantly designed, marvelously directed take on this essential piece of American musical theater.

The show is based loosely on Ingmar Bergman's film Smiles of a Summer Night, which takes place on a Swedish country estate in mid-summer, when the sun barely ever sets. Composer Stephen Sondheim admitted in his annotated book of lyrics Finishing the Hat that he was initially disappointed with the book for A Little Night Music, written by English-born librettist Hugh Wheeler (also famous for Candide and Sweeney Todd). Sondheim writes that his first response to Wheeler's text was that it was too "boring and literal" and was a "graceful but fluffily light comedy version of Bergman's movie." He came around though, after more than three decades of seeing this show produced, saying, "I've come to the conclusion that it is one of the half dozen best books ever written for a musical."

Indeed, you'll probably agree if you've never seen it before. The new production by director Mark Lamos takes the surreal magic of an endless, Scandinavian summer night, and adds both pathos and spare, contemporary staging to what's already a marvelous play. He says he was inspired by Sondheim's score — the entire show is written in the time signature of the waltz, 3/4 — to make the movement of the actors feel both diaphanous and erotic. "The play must be fleet of foot and swirl in front of an audience," he says, just like a waltz.

I don't want to divulge a ton about the plot, but despite taking place in early 20th Century Sweden and having been written in the early 1970s, it remains as sharp and modern as ever. The story centers on two families — a middle-aged lawyer named Frederik (the stately and talented Patrick Cassidy), his new, much younger wife Anne (Laurie Veldheer), and his pious son Henrik (Justin Scott Brown); and a well known actress named Desiree Armfeldt (the brilliant Karen Ziemba), her young daughter Fredrika (Brigid O'Brien), and her aging mother Madame Leonora Armfeldt (played with perfect, dry comic timing by Dana Ivey). Also in the mix are Anne and Frederik's bawdy maid Petra (Marissa McGowan, who's reprising this role after playing it in the recent Broadway revival alongside Catherine Zeta-Jones and Angela Lansbury), and the Malcolms, Charlotte (played by the hilarious Emily Skinner) and Carl-Magnus (Paolo Monatalban). Newly married Frederik resurrects an affair with Desiree when he finds her back in town, only to run afoul of her current beau, the married Carl-Magnus, and the two scorned wives Charlotte and Anne then plot to get their revenge on Desiree and reclaim their husbands via a weekend at the Armfeldt family manse.

The play is rife with witty jokes, many delivered by Charlotte and Desiree's even more jaded mother — and Ivey does a terrific job with the old woman's nostalgic, halting song-trip down memory lane, "Liaisons."

As the critic Clive Barnes wrote of the original production, Sondheim's songs amount to "an orgy of plaintively memorable waltzes, all talking of past loves and lost worlds," and that plaintive longing and sense of loss runs throughout what is an otherwise upbeat bedroom farce. The most famous song from the show, "Send In the Clowns," has never worked for me as a stand-alone ballad outside this context of longing, and Desiree's fatalistic views on the process of getting older — and Ziemba's performance of it far eclipses Zeta-Jones' recent take. But woven throughout the show are a haunting, echoing series of melodies and lyric tropes sung by a chorus of five, whom Lamos and costumer Candice Donnelly have dressed as libertine carousers in undershirts, corsets, and petticoats, with mussed hair and occasional masks. Their most frequent chorus of, "Remember?" creates a musical thread that turns every scene change, in fact, into a new moment of romantic yearning for the past.

And busting through near the end of Act 2 comes the musical theater nerds' favorite, surprise show-stopper, Petra's song "The Miller's Son," that is, in McGowan's hands, the kind of thrilling, masterful number that nearly gets people off their feet a full five minutes before curtain call.

The picturesque set by Riccardo Hernandez is gauzy, romantic, and beautifully executed, making smart use of the Geary's wide stage with the help of five grand crystal chandeliers that raise and lower throughout the action.

Lamos and the company deserve mountains of praise for creating a production that feels more assured, streamlined, and "fleet of foot" than even the star-studded recent Broadway revival. It is a definitive triumph. And, obviously, everyone with even a passing interest in musical theater should get tickets immediately.

A Little Night Music plays through June 21. Find tickets here.