When Sayaka Osakabe returned to work after a second miscarriage, one of the first questions her boss asked was whether she was having sex again.
Despite laws guaranteeing equal opportunity and a near parity of sexes attending university, Japanese women have yet to gain an equal footing in the workplace.
Prime Minister Shinzo Abe has talked up the role of women in his push to revive a weak economy, pledging they would occupy 30 percent of all leadership positions by 2020, but Osakabe and others say the reality for regular female workers is bleak.
"Rather than focusing on a small portion of elite women who are top managers, I'd like them to start by dealing with problems affecting women like us at the bottom," the 37-year-old Osakabe said.
With an aging population and low birth rate, lawmakers and economists say Japan must encourage more women to both work and have children.
After winning a settlement through a labor tribunal in June, Osakabe has been speaking up on behalf of pregnant women and young mothers who are harassed at work. Their plight has spawned a new term: "matahara," a shortened form of "maternity harassment".
Osakabe's case has pushed bullying over pregnancy at work into the media spotlight, and coincides with the first-ever hearing on maternity harassment in the country's Supreme Court.
The court case involves a woman demoted during pregnancy. The plaintiff, who is seeking anonymity for fear of a backlash and trouble at her new job, is suing for about 1.7 million ($15,661) in compensation plus costs. A verdict is due on Oct. 23.
Women under pressure
Both moves come as more Japanese women are continuing to work after having children, as a downtrend in wages since the late 1990s has made life harder for single-income families. As of 2010, 46 percent of working women stayed in their jobs after having their first child, up from 32 percent in 2001, according to the labor ministry.
At the same time, complaints about harassment and discrimination related to pregnancy and childbirth have risen. In the year to March, the government received 2,085 such complaints from female workers, up 18 percent from six years ago.
Japan's laws guarantee women the right to seek less physically demanding roles during pregnancy. They also guarantee 14 weeks of maternity leave surrounding childbirth and allow for childcare leave, which can be used by either parent until their child's first birthday and can be extended in some cases.
Yet many women find it difficult to take advantage of those policies in the face of traditional expectations for them to focus on housework and child-rearing, as well as their relatively insecure positions in the workforce.
Read MoreBetting on social change in Japan
Lawyers say contract workers often fear their employment will not be renewed if they take maternity or childcare leave. Last year, around 56 percent of women were hired under part-time or temporary contracts, compared with 21 percent of men working under such arrangements.
Osakabe was one of those contractors, editing a quarterly newsletter. After a first miscarriage, she asked her boss for help to cut back her work load. She said he told her "to put off pregnancy for 2-3 years and focus on work".
While she was taking bed rest during her second pregnancy, her boss visited her at home and encouraged her to resign, saying her absence "caused trouble". Determined to stay, she returned to work, only to suffer another miscarriage.
In her version of events told to Reuters, she said it was after her second recovery that the boss asked whether she and her husband were having sex. "My boss told me to come over, and asked if I was menstruating again and if we re-started 'baby-making'," she said.
She later resigned and took her case to a labor tribunal.
As part of an agreed settlement, she cannot disclose the name of the company or individuals.
An articulate speaker, Osakabe has formed a support group called "Matahara net" and called for legislation outlining more support for working women in an extraordinary parliament session starting next week.
The plaintiff in the Supreme Court is a physical therapist who was demoted after asking for a less physically demanding role when she was pregnant with her second child.
Her employer, a medical cooperative called Hiroshima Chuo Hoken Seikatsu Kyodo Kumiai, withdrew her management title when it moved her to a job in a hospital from a previous role which required house calls.
The cooperative has said the removal of the title was unrelated to the plaintiff's pregnancy. Masaki Ohno, a cooperative official, said there was already someone in a similar managerial role in the team the plaintiff joined.
Two earlier trials in Hiroshima, western Japan, found in favor of the cooperative. But the plaintiff's attorney said a reversal in the country's highest court could set a precedent, empowering women to shift their roles while pregnant without the fear of being demoted.
Christine Lagarde, the head of the International Monetary Fund, said on a visit to Japan earlier this month that without giving women more power, the country's rapid ageing would diminish economic vitality and living standards.
"There is one obvious option for rescuing Japan from this harsh economic fate - empowering women," she said.