The last customers of the evening, soap and towels in hand, are slipping into the Komanoyu bathhouse as a freshly scrubbed Yoshihisa Kawamoto, 66, stops by the door to talk of his daily trip to the communal tub.

"This is the happiest part of my day," says the retired transportation company director. "My pleasure in life is coming here with my merchant friends and shooting the breeze. Sometimes, I joke that this is my time at the office."

Kawamoto has a tub at home. But it stays dry most of the time. Steaming water and good company are only a five-minute walk away at the Komanoyu sento, located in this pleasant town on Japan's Hokkaido Island.

People like Kawamoto are a vanishing breed in Japan. The more typical Japanese today bathes at home in steamy seclusion, helping to end an institution that old-timers feel is part of what sets Japanese culture apart from others.

The number of sento in Japan peaked at around 22,000 in 1968. Today, there are around 13,000 left, but they are closing at the rate of about one per day.

Communal bathing and its etiquette were once second nature for the Japanese. Their culture, in fact, has been credited with inventing the hot bath. The first known public house operated as a business opened in Edo, as old Tokyo was known, in 1591.

In some Southeast Asian communities, in fact, occupation troops that Japan sent during World War II are remembered not for cruelty or arrogance, but for creating a sensation by stripping off their clothes at canals and rivers.

Today, complains Yoshimi Shibata, secretary general of the National Public Bath Association, "it's reached the point that children only visit baths on school outings. Some children have never been naked except at home. They're so timid about it that they wear bathing suits and treat it like a swimming pool."

Higher costs for heating fuel and land have squeezed bathhouse profits and forced them to raise prices. In 1962, entry to an Asahikawa bath cost the equivalent of about 5 cents for an adult. Now, it is slightly more than a dollar.

Baths were a luxury too costly for most houses and apartments built in Japan after the war. Home plumbing, however, has caught up to the point that about 100 million of Japan's 120 million people do not need the sento to keep clean.

Older Japanese see the trend as another case of their country trading the spiritual for material affluence. Sento are a great place for fostering the culture's vaunted group identity, it is said. "The bath instructs one in how to behave in a group," says Shibata. "It teaches one how to conduct the most fundamental of tasks."

Though bathhouses in the United States and other countries often are fronts for sexual businesses, the sento has nothing like that to offer. Mixed bathing in sento, in fact, has been illegal since after the war. (A few onsen, or hot spring baths, do allow it, however.)

Inside, men and women step into different dressing rooms. They are watched over by a single manager, who sits in a raised wooden box in a niche between the two rooms (and, seeing everyone's secrets, is the target of some questions and jokes).

In the bathing room itself, people first sit on plastic stools at taps along the walls and scrub themselves. Then, after rinsing off all soap, they ease into a large, communal tub for a longish soak. Traditionally, a wall offers a picture for contemplation. Usually it is Mt. Fuji; at the Komanoyu, it is a mosaic depicting a lighthouse and gulls.

All the while, in the ideal bathhouse, at least, there is rapid-fire banter about neighborhood goings-on. But, like others, Komanoyu is falling victim to the times. It has customers like Yasuyuki Morinaga, a 15-year-old high school student who stops in every other day, but only to get clean. "I have no bath at home," he explains.

Fifteen years ago, Komanoyu had close to 200 regular customers. Today, one of 90 bathhouses limping along in Asahikawa, it makes do with about half that number. Its hard times show. Its concrete facade is grimy. Inside, paint is peeling and dust piles up on the windows.

The industry in general, however, is putting up a fight. Many sento owners have installed coin-operated washing machines, color television sets and vending machines. Some sento in Tokyo have gone in for full-scale community rooms, with table tennis and special areas for singing and dancing.

Modern bath equipment is also exerting a pull. In the old days, you had to come by midafternoon if you wanted really clean water in the main tub. Many houses now have costly filtering systems that keep it clean all day long.

A few houses are offering promotional gimmicks too. Persons over 60 are admitted free on certain days. On May 5, celebrated throughout Japan as Children's Day, younger customers often get in for nothing and find special flowers in the water.

The government is doing its bit, too, as the baths are considered to be a public utility. Rates are closely regulated but, in return, operators can get financial aid. Government grants will cover up to two-thirds of the cost for replacing basic facilities such as the boiler, for instance.

Few people are optimistic, however, about the future of the communal baths. In April, 75-year-old Kazuei Harada closed down a bath he and his wife had kept going in Tokyo's Mitaka area for years. "There was nobody who wanted to succeed me," he said. "I have a son, but he wasn't interested . . . . We have a lot of houses and apartments going up in Mitaka. They all have home baths."

"Young men, when they come, just clean themselves and leave. They don't talk. It's no social club here."