Many of the pieces she wrote for these magazines — stylish, opinionated, with a kind of take-no-prisoners fearlessness rooted in both the women's movement and the equally complex terrain of her own emotions — were collected in three books of essays, "Wallflower at the Orgy" (1970), "Crazy Salad: Some Things About Women" (1975) and "Scribble, Scribble: Notes on the Media" (1979).
"The women's movement," she once noted, "may manage to clean up the mess in society, but I don't know whether it can ever clean up the mess in our minds."
Ephron's first marriage, to writer Dan Greenburg, ended in divorce. In 1976, she married her second husband, Washington Post journalist Bernstein, and moved to Washington. Three years later, while she was pregnant with their second child, she discovered that Bernstein was having an affair.
Stunned and embarrassed — "I think the feeling I like least in the whole world," she would later tell Vanity Fair, "is feeling dumb" — she left Bernstein and returned to New York, where she wrote her first novel, "Heartburn."
At the behest of Bernstein, Ephron had helped rewrite William Goldman's script for the 1976 big-screen adaptation of "All the President's Men." Though that version wasn't used, Ephron's work earned her first paid screenwriting job on a TV movie called "Perfect Gentlemen." Her next script, for "Silkwood," a 1983 drama about a female whistle-blower at a nuclear power plant, earned an Oscar nomination.
After "Silkwood," Ephron's film career veered more toward the personal and comedic, beginning with the 1986 adaptation of "Heartburn," which starred Jack Nicholson and Meryl Streep. "I highly recommend having Meryl Streep play you," Ephron said. "If your husband is cheating on you with a carhop, get Meryl to play you. You will feel much better."
In 1987, she married her third husband, the writer Nicholas Pileggi.
It was in 1989, with the release of "When Harry Met Sally," that Ephron firmly established herself as Hollywood's mother of the modern romantic comedy, carrying the escapist, fast-paced style of 1930s screwball comedies into the 20th century by tackling subjects like divorce and email. She said that all romantic comedies were essentially mash-ups of Shakespeare's "The Taming of the Shrew" and Austen's "Pride and Prejudice," but Ephron injected the formula with a populist, somewhat sentimental flavor.
"There's a thing I wrote in 'Heartburn' that I can't remember exactly, but it says that no one is more romantic than a cynic, or something like that," Ephron said in an interview with The Times several years ago. "I do think that you don't become cynical or 'unsentimental' unless there's a core of romanticism or sentiment that's had a few chips nicked into it. Is every cynic a romantic at the core, or are some cynics cynics at the core? I don't know. Probably there are."
Through the early 1990s, with Ryan and Hanks as her amorous muses, she enjoyed her biggest box office successes with "Sleepless in Seattle" and "You've Got Mail." Critics, however, often regarded Ephron's films lightly — of "Sleepless," the New York Times' Vincent Canby wrote: it's "a movie you may hate yourself in the morning for having loved the night before."
For all of her passions, few exceeded her love of cooking. She collected and distributed to her closest friends a collection of recipes, one of which was for the chili from Chasen's, a now-shuttered show business haunt in West Hollywood. "There is almost nothing I ever do that won't stop dead if someone needs a recipe for something," Ephron once said.
Ephron's survivors include Pileggi; her sons from her second marriage, Jacob and Max Bernstein; and her three sisters.
[For the Record, 9:39 p.m., June 26: Earlier, it was stated that Nora Ephron was working on the play "Lucky Guy" about crime reporter David McAlary. The crime reporter is named Mike McAlary.]
PHOTOS: Nora Ephron | 1941-2012
PHOTOS: Notable deaths of 2012
Times staff writer David Ulin contributed to this report.