Ceilidhe Wynn was sure she was having a boy. Call it maternal intuition, but she just knew: she pictured herself cradling him, and she imagined her husband playing with his son. It all felt so certain that it wasn’t until moments before her 20-week ultrasound, as the technician squirted gel on Wynn’s bulging belly, that a sudden thought popped into her head: what if it wasn’t a boy?

“And then she said, ‘It’s a girl!’ and I was like, ‘holy s---,’ ” Wynn says. “It was just a feeling of shock.”

Her astonishment was quickly eclipsed by disappointment and fear. She didn’t know how to raise a girl, she thought. She couldn’t make a French braid or put on makeup, and what if her daughter didn’t get along with her? It didn’t help, Wynn says, that friends and strangers alike responded to the news with a flurry of unhelpful sentiments — everything from “I’m sorry,” to a cynical “Good luck!” or “Oh, girls hate their moms.”

Wynn, a Canadian writer, eventually penned an essay about what it was like to experience “gender disappointment,” a term that has become more widespread in recent years as more parents choose to share their reactions — in gender reveal videos, personal testimonials and online support groups — when they learn whether they’re expecting a boy or a girl.

“People say ‘just as long as it’s healthy!’ because that’s what they’re supposed to say,” says Joyce Venis, a psychiatric nurse in Princeton, N.J. who specializes in perinatal mood disorders and has treated parents who experience gender disappointment. “But most people do have a preference, they do have particular dreams. Over the last 10 years or so, I’ve seen more people open up about how they really feel instead of subscribing to expectations.”

Wynn’s desire for a son might make her something of an outlier: A survey published last month by Finnish and American researchers found that women generally prefer — and invest more time and resources in — daughters, and men typically feel the same way toward sons, but to a lesser degree. Over 30 years of treating patients, Venis has noticed a similar pattern, she says: “Not all women want the girls — but when women want the girls, they want the girls with a vengeance.”

It all makes for a rather striking dichotomy: Modern babies are born into the most openly gender-nonconforming generation in history, in an era when gender-neutral pronouns have crossed into the mainstream and many prominent activists and celebrities are challenging the gender dichotomy and traditional gender roles. Plenty of parents make a point to avoid clothing, toys or decor that play into stereotypes — no blue trucks, no pink flowers.

Still, social media feeds are increasingly flooded with photos and videos from “gender reveal parties,” which transform the announcement of an unborn baby’s sex into a full-blown event — complete with cupcakes filled with pink or blue icing, or a box filled with pink or blue balloons, or fireworks, or confetti cannons. One Louisiana family unveiled their son’s sex with the help of a live alligator named Sally (she chomped into a watermelon filled with blue Jell-O). A Border Patrol agent in Arizona recently made headlines when his gender reveal explosion ignited a massive wildfire.

Gender reveal videos began to emerge as a growing trend on YouTube in 2011, and the company saw a 60 percent surge in the number of views for that topic between 2016 and 2017, according to a YouTube representative. Some of the videos end somewhat less than happily; consider the father who woefully collapsed into the backyard pool after learning that he was going to have a fifth daughter.

Leena Nahata, a pediatric endocrinologist with Nationwide Children’s Hospital in Columbus, Ohio, questions the innocence of these sorts of gender reveal celebrations — which, she noted, conflate a baby’s sex (the biological reproductive organs) with gender (a sense of self that is shaped by biological, environmental and cultural influences).

“ ‘The gender reveal’ has become increasingly elaborate,” she wrote in a 2017 article in the journal Pediatrics. “By celebrating this single ‘fact’ several months before an infant’s birth, are we risking committing ourselves and others to a particular vision and a set of stereotypes that are actually potentially harmful?”

For most parents, the moment of truth doesn’t play out so theatrically or publicly. It often happens in the privacy of a doctor’s office, and the emotional aftermath is processed with partners, therapists or in online support forums, where messages reveal the shame that accompanies admissions of disappointment.

Some people know they have strong opinions before an ultrasound technician shares the news. Others, like college English professor Natalie Ricci, are surprised by their own sudden, visceral response.

“It was immediate disappointment,” she says, of the moment she learned her second child was a boy. “And then I walked out of the office and cried.”

Ricci had grown up with an especially close bond to her mother and sisters, she says, and she realized that she would not be able to re-create many of her own favorite childhood bonding moments — shopping for a prom dress, for instance — in a house with two boys.

She kept her reaction largely to herself: “I was uneasy about it,” she says. “It’s such a taboo thing. You’re not supposed to feel any disappointment about having a baby.”

Wynn contends that this expectation is itself rooted in troublesome gender roles.

“Mothers are supposed to be incandescent in their glowing love for their children, loving their children no matter what, sacrificing everything for their children,” she says. “Being a mother is just as nuanced as being anybody else. I can love the idea of having a baby but still be disappointed, or scared, that I’m having a boy instead of a girl, or a girl instead of a boy.”

After Wynn talked through her feelings with close friends at a rape crisis center where she volunteered, she realized her own concerns were mostly tied to her fears about how to guide and protect her daughter.

“I realized, I don’t think I’m scared of raising a girl, I think I’m scared of how to prepare her for this,” she says. “When do I start talking to my child about the dangers of violence and sexual violence that women experience over male peers? How do you impart navigating this world to a little innocent child?”

Fathers can have conflicting feelings, too. Brad Grayson, a father of two young daughters in Minnesota, says he was caught off guard by his disappointment when he learned that his second child was another girl. Before becoming a parent, he says, he’d always envisioned a future son, and — since he and his wife planned on having just two children — he realized he wouldn’t be able to share the same sorts of bonding moments he’d experienced with his dad. But his sorrow was short-lived.

“Those feelings and any concerns I had went away quickly,” he says. “Father-daughter moments are equally if not more wonderful.”

Faced with the life-altering prospect of bringing a child into the world, seizing on the idea of a baby's sex is perhaps a way to feel a sense of control, or project some familiarity onto the unknown, Venis says. But by whittling the options down to two polar opposites, parents forget a vast spectrum of possibilities: a daughter who hates wearing dresses, a son who wants to be a ballet dancer, a child who is transgender or intersex or non-binary.

“We’re gender-socialized from the minute we’re born,” Venis says. When she counsels a patient, she thinks, “I want to know where this person’s head is — what they grew up with, why they feel the way they do.”

But not everyone can let go of the family they’ve envisioned. A few of her patients have chosen to work with fertility specialists who could help them select a sex-specific embryo — an approach also modeled by celebrity couple Chrissy Teigen and John Legend, who made headlines after Teigen revealed that they chose their daughter Luna’s sex through in vitro fertilization. (“Just the thought of seeing John with a little girl,” Teigen said at the time, explaining her decision: “I think he deserves that bond.”)

Other parents turn to adoption to build the family they want, according to a paper published last month in the Journal of Marriage and Family. Researchers found that parents were more likely to adopt children of a different sex than their existing kids. For example, an adopted girl was likely to have been preceded by biological sons.

That was the case in Katherine Asbery’s family. The author of a self-help book titled “Altered Dreams . . .: Living with Gender Disappointment” followed every instruction she could find about how to naturally conceive a girl, but wound up with three biological sons.

“I always wanted to have a daughter,” she says. “I had a lot of people say, ‘Well, what if she doesn’t like tea parties or doesn’t like bows?’ And I was like, I don’t really care. I was a tomboy. I just want that experience, I want that relationship.”

For a time, she says, she and her husband considered their family complete with their boys. But Asbery’s feelings about having a daughter never subsided, and they eventually adopted a baby girl in 2012.

“I would not give up any of my sons in exchange for a daughter. I just wanted a daughter in addition to my boys,” Asbery says. “Seeing her with my husband is everything I wanted it to be, and seeing her with my boys, seeing how they’re gentle with her, how they play Barbies with her. She is very girly, very girly, which I love.”

But most parents don’t go to such lengths to fulfill a particular family dynamic. For Ricci, who welcomed a second son in July, becoming a parent to her boys gave her a chance to reflect on her feelings and accept a process that was ultimately beyond her control.

“I made this internal commitment to just enjoy all the surprises, because this is all new to me, and to not put any of my own expectations on them,” she says. “So it’s a blessing, because I may have unconsciously done that had either of them been a girl.”

As for Wynn’s daughter, who is now 3 years old — when recently asked what she wanted for Christmas, her answer was her favorite color: pink. She is obsessed with Star Wars. She loves to dress up in princess gowns, and refers to herself as a “king.”

“She is,” Wynn says, “very much herself.”