“Take notes,” Nora Ephron’s mother advised her as a child. “Everything is copy.”

Her mother, a Broadway playwright and Hollywood screenwriter, imbued Ephron with a razor-sharp self-awareness and the ambition to transform workaday absurdities, cultural idiosyncracies, romantic foibles and even marital calamity into essays, novels and films brimming with invitingly mordant wit. She credited her mother with bestowing “this kind of terrific ability, not to avoid pain but to turn it over and recycle it as soon as possible.”

Nora Ephron, who gained a devoted following for her perceptive, deeply personal essays and parlayed that renown into a screenwriting career of wistful romantic comedies “When Harry Met Sally” and “You’ve Got Mail,” the marital expos”Heartburn” and the whistleblower drama “Silkwood,” died June 26 at a hospital in New York. She was 71.

The death was confirmed by her friend Richard Cohen, the Washington Post columnist. She died of complications from the blood disorder myelodysplasia, with which she was diagnosed six years ago.

Story continues below advertisement.

As a young woman, Ephron modeled her self-deprecating and deadpan writing style on Dorothy Parker, part of the Algonquin Round Table of sophisticated New York writers and humorists that also included Robert Benchley and S.J. Perelman. Of the philandering husband in her 1983 novel “Heartburn” — modeled on her marriage to former Washington Post journalist Carl Bernstein — Ephron wrote he was “capable of having sex with a Venetian blind.”

In time, Ephron became a social confederate of New York playwrights, filmmakers and wits, including Mike Nichols, Woody Allen and Calvin Trillin; Washington journalists including former Post executive editor Benjamin Bradlee and his journalist wife, Sally Quinn; and a Hollywood coterie that included Rob Reiner, Tom Hanks, Steve Martin and Steven Spielberg.

As a woman in the male-dominated movie business, Ephron was a rare “triple-hyphenate” as writer, director and producer. But making movies for and about women was a battle, at times. She observed how, to male studio moguls, “a movie about a woman’s cure for cancer is less interesting than a movie about a man with a hangnail.”

From her early years as a journalist for Esquire and New York magazines, Ephron was regarded as a keen cultural barometer. She repeatedly channeled her interest in the zeitgeist to the screen. Her last film, “Julie & Julia” (2009), starring Meryl Streep as the French-cooking apostle Julia Child and Amy Adams as a modern disciple, explored the trendy fascination with blogging and gourmet cooking.

In “Silkwood” (1983), a biographical drama directed by Nichols and starring Streep as a plutonium plant employee and union activist, Ephron tapped into the era’s fear of nuclear meltdowns and corporate cover-ups. Her novel and 1986 screenplay for “Heartburn” — which starred Streep and Jack Nicholson — reflected what countless other women were experiencing through their disappointing marriages and efforts to balance career ambitions with homemaking obligations.

The tension between the sexes also played a central role in her sparkling screenplay for “When Harry Met Sally” (1989), which Reiner directed and which starred Billy Crystal and Meg Ryan as yuppies who forego sex with each other for decades to maintain their friendship. As a writer and director, Ephron was among the first to chronicle the addictive thrill of romance by email in “You’ve Got Mail” (1998), starring Hanks and Ryan.

Ephron received three Oscar nominations for her writing, for “Silkwood” (shared with Alice Arlen), “You’ve Got Mail” (with David Ward and Jeff Arch) and “When Harry Met Sally.”

The most unforgettable — and oft-quoted — sequences from “When Harry Met Sally” showed Ryan faking a loud orgasm in front of Crystal over lunch at a delicatessen. After Ryan’s intense moment, a woman at a nearby booth tells the waiter, “I’ll have what she’s having.”

Ephron said it was Ryan’s idea to film the scene in the deli, and it was Crystal who came up with the one-liner. But the core idea came from talks between Ephron and Reiner.

“One day, we were sitting around and Rob said to me, ‘You know, we’ve told you all this stuff that you didn’t know about men, now you tell us something we don’t know about women,’ ” Ephron told an audience at a book reading in 2006. “It was almost like, ‘I dare you.’ And I said, ‘Well, women fake orgasms.’ And he said, ‘Not with me.’ ”

“And I said, ‘Yes, we do,’ ” she added. “Maybe not all the time, but sometimes. He still didn’t believe me. So we went thundering into the bullpen at Castle Rock Pictures where all the women work, and he asked them, ‘Is it true that women fake orgasms?’ And all these women nodded yes. What a shock that scene was for men.”

“That’s my career, right there,” Ephron quipped.

Nora Louise Ephron was born May 19, 1941, in Manhattan and raised in Beverly Hills, Calif., where she once joked of “loving the smell of mink, the smell of the pavement after it rained and the smell of dollar bills.”

Her parents were prosperous but heavy-drinking Broadway playwrights, Henry Ephron and the former Phoebe Wolkind, and Nora was the first of their four daughters. Two younger Ephron siblings, Amy and Delia, also became writers.

From their earliest years, the Ephron children were trained to come to the dinner table prepared to tell stories. Nora Ephron said that many of the tales — how a younger sister got her head caught in the bannister and the fire department came to the rescue — became plot devices in their parents’ films.

Years later, Nora Ephron’s letters home from Wellesley College were the source of her parents’ Broadway comedy “Take Her, She’s Mine” (1961), which became a film starring James Stewart and Sandra Dee.

After graduating in 1962 from Wellesley, Ephron spent five years as a general assignment reporter at the New York Post before leaving daily journalism in 1968 to freelance for large-circulation magazines such as Good Housekeeping. Many of the pieces, on cultural trends, were published in her first book-length collection, “Wallflower at the Orgy” (1970).

As the women’s movement gained traction in the decade that followed, Ephron was often invited to discuss it on television and in articles for Esquire and New York magazines. She brought a strikingly light-hearted touch to her deeply felt belief in women’s rights.

“I have always thought it was a terrible shame that the women’s movement didn’t realize how much easier it was to reach people by making them laugh than by shaking a fist and saying don’t you see how oppressed you are,” she told Newsday in 1976.

Her 1975 collection “Crazy Salad: Some Things about Women” included essays on vaginal deodorants, a Pillsbury bake-off, her Wellesley reunion and, one of her most reprinted articles, “A Few Words About Breasts.” She reminisced about how her flat chest made her feel like an outlier in a world that fetishized large breasts. But the trauma began at home.

“My mother was really hateful about bras,” she wrote, “and by the time my third sister had gotten to the point where she was ready to want one, my mother had worked the whole business into a comedy routine. ‘Why not use a Band-Aid instead?’ she would say.”

Her next collection, “Scribble, Scribble: Notes on the Media” (1978), was based on her tenure as a media columnist for Esquire in the mid-1970s. At the time, she was married to Bernstein, whose collaboration at The Post with Bob Woodward helped uncover the Watergate scandal that led to President Richard Nixon’s resignation.

Her first marriage, to Dan Greenburg, author of books including “How to Be a Jewish Mother,” ended in divorce. She had married Bernstein in 1976 and was seven months pregnant with her second child when she discovered her husband was having an affair with Margaret Jay, the wife of the British ambassador. She delivered the child prematurely, and the marriage smashed apart in an ugly and public way, garnering coverage in People magazine and other publications.

Ephron later said that it was impossible to resist writing about her marriage, telling The Post that “although it was the most awful thing I’ve ever been through . . . it was by far the most interesting.”

The result was “Heartburn,” a roman a clef about her marriage to Bernstein with the characters changed to a cookbook author married to a randy syndicated columnist; the book also included recipes, including writer Lillian Hellman’s for pot roast. Reviews were mixed but the notoriety surrounding its publication — one of the nation’s most prominent writers wreaking revenge on another — propelled “Heartburn” to the best-seller lists.

“Obviously, I wish Nora hadn’t written the book,” Bernstein, then working at ABC News, told The Post at the time. “But I’ve always known she writes about her life. Nora goes to the supermarket and she uses it for material.”

In 1987, she married Nicholas Pileggi, a journalist, author and screenwriter of such films as the mobster dramas “GoodFellas” (1990) and “Casino” (1995). Besides her three sisters, survivors include two sons from her second marriage, Jacob Bernstein of New York and Max Bernstein of Los Angeles.

As a filmmaker, Ephron could be derivative. “You’ve Got Mail” was partly inspired by the pen-pal romance classic “The Shop Around the Corner” (1940). Ephron also borrowed heavily from the Cary Grant-Deborah Kerr romantic drama “An Affair to Remember” (itself a remake of an earlier film) for her 1993 star-crossed romance “Sleepless in Seattle” with Hanks and Ryan.

If her career also had its share of movie duds — among them, the witness-protection comedy “My Blue Heaven” (1990) and the sitcom remake “Bewitched” (2005) — Ephron remained widely admired for a productive career in a field that often marginalized women who didn’t produce blockbusters or Oscar champs.

“Nora Ephron has quietly been one of the most significant women in film history,” said movie scholar and historian Jeanine Basinger.

Ephron remained a prolific essayist for publications including the New York Times and O magazine. One of her last collections, “I Feel Bad About My Neck: And Other Thoughts on Being a Woman” (2006), was triggered by what she once called “the menopause that some of us remember so unfondly.”

In keeping with her mother’s admonition, she was candid in sharing her intimate fears of aging. She explored the loss of physical and mental acuity (“I spend time getting into shape; then something breaks”). She expressed astonishment that one of her contemporaries, former White House intern Mimi Fahnestock, had kept silent about her affair with President John F. Kennedy for more than 40 years.

Ephron wrote of being a White House press aide at the same time and lamented that she was “probably the only young woman who ever worked in the Kennedy White House whom the president did not make a pass at. Perhaps it was my permanent wave, which was a truly unfortunate mistake. Perhaps it was my wardrobe, which mostly consisted of multicolored dynel dresses that looked like distilled Velveeta cheese.”

“Perhaps it’s because I’m Jewish,” she added. “Don’t laugh, think about it, think about that long, long list of women J.F.K. slept with. Were any Jewish? I don’t think so.

“On the other hand, perhaps it’s simply because J.F.K. somehow sensed that discretion was not my middle name. I mean, I assure you if anything had gone on between the two of us, you would not have had to wait this long to find it out.”