Billund, Denmark

FROM the outside, there is nothing playful about the drab, two-story Lego Idea House here, where designers gather in whitewashed rooms to dream up new toys. But upstairs, behind a series of locked doors accessible only to employees with special passes, is a chamber that might as well be toy heaven for kids  and more than a few adults.

Multicolored Lego creations in every imaginable size and shape spill from the shelves, from Indiana Jones’s biplane to Darth Vader’s fighter. Boxes stamped “confidential” hold potential future blockbusters, like Buzz Lightyear, the hero of the “Toy Story” animated films, as well as a police station bustling with miniature cops and robbers.

“It’s our way of looking at the world,” says Soren Holm, the head of Lego’s Concept Lab. “We have happy criminals; even they are smiling. The sun is shining every day.”

While that may be true of Lego’s toys, until recently it was hardly the case for Lego’s bottom line. But five years after a near-death experience, Lego has emerged as an unlikely winner in an industry threatened by the likes of video games, iPods, the Internet and other digital diversions.