Score one for Lego, right? Not so fast. Preschoolers may be the self-appointed chiefs of the gender police, eager to enforce and embrace the most rigid views. Yet, according Lise Eliot, a neuroscientist and the author of “Pink Brain, Blue Brain,” that’s also the age when their brains are most malleable, most open to influence on the abilities and roles that traditionally go with their sex.

Every experience, every interaction, every activity — when they laugh, cry, learn, play — strengthens some neural circuits at the expense of others, and the younger the child the greater the effect. Consider: boys from more egalitarian homes are more nurturing toward babies. Meanwhile, in a study of more than 5,000 3-year-olds, girls with older brothers had stronger spatial skills than both girls and boys with older sisters.

At issue, then, is not nature or nurture but how nurture becomes nature: the environment in which children play and grow can encourage a range of aptitudes or foreclose them. So blithely indulging — let alone exploiting — stereotypically gendered play patterns may have a more negative long-term impact on kids’ potential than parents imagine. And promoting, without forcing, cross-sex friendships as well as a breadth of play styles may be more beneficial. There is even evidence that children who have opposite-sex friendships during their early years have healthier romantic relationships as teenagers.

Traditionally, toys were intended to communicate parental values and expectations, to train children for their future adult roles. Today’s boys and girls will eventually be one another’s professional peers, employers, employees, romantic partners, co-parents. How can they develop skills for such collaborations from toys that increasingly emphasize, reinforce, or even create, gender differences? What do girls learn about who they should be from Lego kits with beauty parlors or the flood of “girl friendly” science kits that run the gamut from “beauty spa lab” to “perfume factory”?

The rebellion against such gender apartheid may have begun. Consider the latest cute-kid video to go viral on YouTube: “Riley on Marketing” shows a little girl in front of a wall of pink packaging, asking, “Why do all the girls have to buy pink stuff and all the boys have to buy different-color stuff?” It has been viewed more than 2.4 million times.

Perhaps, then, Hamleys is on to something, though it will doubtless meet with resistance — even rejection — from both its pint-size customers and multinational vendors. As for me, I’m trying to track down a poster of a 1981 ad for a Lego “universal” building set to give to my daughter. In it, a freckle-faced girl with copper-colored braids, baggy jeans, a T-shirt and sneakers proudly holds out a jumbly, multi-hued Lego creation. Beneath it, a tag line reads, “What it is is beautiful.”