LOS ANGELES – The first thing you notice on the set of "The Crazy Ones" isn't the vintage pinball machine, the toy guitar or the life-size Rock 'Em Sock 'Em Robot. It's a caricature above the fake elevator doors, featuring the face of the show's megastar.

"It's like being on drugs again," said Robin Williams as he stared at the painting last month during a break from shooting. "The first day I walked in and saw that I went, 'Oh, OK. No pressure.' "

The expectations were indeed high when CBS announced Williams' return to prime-time TV, where he emerged as a major talent 35 years ago on "Mork & Mindy." That sitcom once ranked as high as No. 3 in viewership, but viewers eventually got exhausted by Williams' manic persona — the court jester who's headed to the guillotine if he doesn't keep the king roaring with laughter. It was canceled after four seasons.

So there was every reason to believe that "The Crazy Ones" would come across as "Crazy Robin," with Williams sucking up all the oxygen from anyone who dared to share a scene with him.

When a TV series is built around a gifted comic, there's always a danger that it may wind up more like an audition reel than a relatable sitcom. Just ask the writers at "The Michael J. Fox Show," who took the show's title too literally and failed to give Fox's co-stars much to do. Melissa McCarthy's series "Mike & Molly" is doing a slow fade as "Mike" starts to bear more and more of a resemblance to "Mindy."

But "The Crazy Ones" has avoided that trap and developed into a warm, well-balanced workplace comedy, one that is the second-most-popular new show of the season, just behind its Thursday-night companion, "The Millers."

No one has benefited more than former "Buffy" star Sarah Michelle Gellar, who brings an engaging mix of frigidness and vulnerability to her role as Williams' TV daughter and business partner in a Chicago ad agency.

"I think we always knew we were just lucky to be in his presence and to get to play off him," Gellar said. "But I think automatically it sort of gelled that we were a team."

Not that Williams is always on his best behavior. He still has a tendency to slip into cartoon voices and borrow liberally from the Ministry of Silly Walks. The bloopers reel at the end of every episode confirms he can't help trying to crack up his castmates.

"It's not a contest, but it is a joy," he said. "You get a laugh, you go, 'Yeah, I'm OK now.' Sometimes it works and other times, no. Then it becomes very sad for a moment. The desperate comic boy comes out."

Creator David E. Kelley said it was daunting to imagine writing for one of the quickest minds in entertainment, but he also knew he was hiring a Juilliard-trained actor who won an Academy Award for "Good Will Hunting" without leaning on a single impersonation.

"The idea of me trying to supply the architecture for comedy is like handing me the keys to a NASCAR race car and saying, 'Go compete.' I felt totally ill-equipped," said Kelley, whose previous credits include "Ally McBeal" and "Chicago Hope." "But I responded to the dramatic actor as well as the comedic one. My sense of the series, at least conceptually, was that the nucleus was the father-daughter relationship, which was not always going to rely on comedy. There were going to be more tender moments, and for that I needed true actors."

Rounding out the cast are Hamish Linklater ("Old Christine"), James Wolk ("Mad Men") and Amanda Setton ("The Mindy Project"), veteran performers on an equal footing with Williams. Wolk, who plays the office Lothario, said he knew it was going to be a legitimate ensemble from the very first episode, when he and Williams joined guest star Kelly Clarkson in a recording studio for a raunchy jingle.

"Good actors always bring the people around them up," he said. "He just makes it easy. I can fall and he'll catch me."

It isn't just generosity that keeps Williams from stealing the show. He turns 63 in July and has a history of heart problems. Reviving Mork just isn't an option.

"The pressure's off, thank God," he said. "This isn't a Robin Williams vehicle. It's a bus, and there are other people on the bus."

Neal.Justin@startribune.com • 612-673-7431