TOKYO -- At his favorite neighborhood cafe, Shunsuke Yamagata, a college student who proudly calls himself a nerd, smiled shyly behind his horn-rimmed glasses at waitresses hurrying about in black Minnie Mouse shoes and lacy, racy minidresses inspired by Japanese comics.
The place is a dream come true for Yamagata, whose passion is collecting comics and cartoons. He giggled when his servers addressed him in the squeaky character voices they use to delight their fantasy-loving clientele.
It was just another night out with the pocket-protector crowd in Tokyo's neon-splashed Akihabara district, where ''costume cafes" are the latest of hundreds of new businesses catering to Japan's otaku, or nerds. A subculture of social misfits obsessed with electronic role-playing games, manga comics, and Japanese animation, they began gathering here in the late 1990s, lured by the district's proliferation of electronics retailers.
Maligned by mainstream society, here they stayed, their tastes and habits transforming the area also known as Electric Town into what sociologists are calling an urban first: a ghetto of geeks.
On streets once packed with housewives or couples shopping for refrigerators and microwave ovens, hundreds of thousands of nerds -- mostly men ages 18 to 45 -- now wander through multi-story comics warehouses and elaborate game arcades. Eyeglass adjustment kiosks compete for space with shops selling nondescript dress shirts and thick leather shoes.
With some analysts estimating the Japanese geek market to be worth as much as $19 billion a year, companies are jostling to cash in. One antique electronics boutique displays an intact 1985 NEC computer, gingerly housed behind glass, with a $2,500 price tag.
''We have been discriminated against for being different, but now we have come together and turned this neighborhood into a place of our own," said Yamagata, 20, at Cos-Cha, one of a dozen ''maid cafes" in the neighborhood. Here, the waitresses' uniforms are inspired by the French-maid-meets-Pokemon outfits of adult manga. At other cafes, waitresses greet patrons with a curtsy and the words ''Welcome home, master."
''In Akihabara, we don't need to be ashamed of who we are and what we like," Yamagata said. ''We can feel comfortable because here, we outnumber everyone else."
Sociologists and urban planners compare the phenomenon to ethnic and social enclaves such as New York's Chinatown or San Francisco's gay Castro district, born of a blend of discrimination and shared cultural cues. Japanese geeks are outcasts in a society with rigid social norms. But their culture has gone mainstream.
Tokyo's subways and trains are filled with teenagers and grandfathers alike unabashedly reading thick, often adult-themed manga. Japan's biannual Comic Market lured more visitors this year than the annual Tokyo Motor Show.
Contemporary artist Takashi Murakami was in New York recently to present exhibitions filled with some of the darker symbols of Japan's nerd subculture, which include a mix of doe-eyed anime characters, fetish sexuality, and fantasy games. Designer Kaichiro Morikawa generated a buzz at the 2004 Venice Biennale by re-creating parts of Akihabara's landmark Radio Hall, a building where nerds rent transparent, locker-size cubicles in part to sell, but mostly to show off, collections reflecting their distinctive tastes. Prized items range from air guns and model battleships to anime characters in sexual poses and miniature Godzillas.
''We have a long way to go before the otaku themselves are considered cool," Morikawa said. ''But the motifs of otaku culture have permeated Japanese society and beyond. Just look around you. They are everywhere."
They include not only people obsessed with cartoons and computer games, but also pop idols such as Morning Daughter, a music group marketed to children that has become so popular among otaku that men sometimes attend its concerts wearing kimonos covered in glossy pictures of young band members.
That, along with the child pornography aspect of some adult manga, has led to allegations that some nerds are pedophiles.
Tetsu Ishihara, 34, a computer programmer whose three-room apartment is filled from floor to ceiling with comic books, does not want to be associated with such charges. Ishihara maintains a growing collection of 130 life-size pillows of female anime characters, both purchased and self-designed.
''There are some people who do lose their grip on reality, but that is not me -- or most of us," said Ishihara, who this year started dating a woman, an anime artist, steadily for the first time. ''For me, the pillows have been my source of unconditional love, a reminder of when I used to be hugged by my parents. There is nothing strange about it."
But some sociologists critical of the nerd culture here have linked it to the high incidence of severe behavioral problems among men under 40. Immersed in role-playing games and comic fantasy worlds, many have found real-life personal conflicts difficult to cope with -- one cause, some specialists say, for a massive increase in the social problem of hikikomori, or shut-ins. Now numbering as many as 1 million nationwide, the shut-ins -- mostly men in their 20s or 30s -- typically live in their parents' homes, rarely leaving their rooms.
Otaku behavior is also being blamed, along with social disillusionment following Japan's protracted recession, for the increasing numbers of Japanese young people with no clear career ambitions. Instead, many work part time -- or not at all -- so that they can spend most of their time pursuing their hobbies.
''The Japanese have never been good at verbal communication, but the problem with otaku is that they are so engrossed in their own favorite world and don't have the ability, interest, or confidence to interact with other human beings," said Hiroko Mizushima, a legislator and psychiatrist who has studied the subject. ''The impact on society is enormous."
Nowhere is that more obvious than in Akihabara, where nerds use their own slang and share a general aversion to being seen.
''Most people think we're weird," Yamagata said. ''That's why we come here."