After a long day on the set of “A Haunting in Venice,” the latest Kenneth Branagh murder-mystery based on Agatha Christie’s Hercule Poirot stories, the hair and makeup designer Wakana Yoshihara would leave the crew, find a quiet space and sit down with the detective’s prodigious mustache, a sweeping half-moon of lush gray hair and attendant soul patch.

“It was my ritual every night after the shoot,” Yoshihara said recently in a video interview. “Me and the mustache sit together. Sometimes I have a conversation with the mustache. It was very therapeutic, when you get into that space. The mustache became like a friend.”

Yoshihara takes facial hair very seriously. The hair and makeup designer for “Death on the Nile” (2022) and “A Haunting in Venice,” opening Friday, she is responsible for creating, styling and maintaining Poirot’s whiskers — a painstaking work of craftsmanship that is perhaps the most important detail in these period films. “This mustache is serious business,” the director and star Branagh said when he took on the famous role for the 2017 “Murder on the Orient Express.” Yoshihara has made that business her own, and she does not take it lightly.

The first iteration of Branagh’s Poirot mustache was created for “Orient Express” by the designer Carol Hemming, with whom Yoshihara worked closely as the head of the hair and makeup departments. The colossal gray swath of hair was meant to pay tribute to Poirot’s military background and the vogue after World War I.

But while the mustache looked suitably grand, it was heavy and ungainly, and presented many practical difficulties for Branagh as a performer. The star (who also directed but couldn’t be interviewed because of the current actors’ strike) was unable to open his mouth wide or laugh heartily without the hairpiece drooping or falling out of place. “You couldn’t make jokes around him on set,” Yoshihara said.

When Yoshihara took over for Hemming on the sequel, “Death on the Nile,” the first thing she discussed with Branagh was what they were to do about the mustache this time. “We talked about downsizing,” she said. “It can be smaller but still big enough for him to have the signature of being Poirot. We took some off both sides and kind of narrowed it down so it doesn’t quite cover his mouth.”

For “Venice,” Branagh initially wanted to grow his own mustache to Poirot length to obviate the need for the prosthetic. While the length was adequate, Yoshihara ran into problems with the styling. To get the look right, she said, “I would have to use a perm, and I can’t really use a hot stick so close to his face, because I might burn him.” In the end, she opted to have him shave what he’d grown, and the two went back to the usual method — albeit with more refinements.

Yoshihara and Branagh revised the false mustache even further for “Venice,” making it slightly smaller again and blonder. (The hue was meant to give Branagh a “more youthful” appearance that would stave off the impression Poirot was getting older and older between films.) She explained that Poirot was on vacation in the desert in “Nile,” which gave the mustache a windswept, natural character, but in “Venice,” Poirot is retired with more freedom to attend to his grooming. “We made it look like he had lots of time on his hands,” she said. “It’s more sculpted. It’s neater. It’s like Poirot has finally found his best style.”

The false mustache itself is a combination of human and yak hair. The human kind “is a bit too silky” and soft, she said, but the yak addition results in a bushier, more bristly look appropriate for a mustache. The strands are meticulously woven into a thin strip of silk. When she receives that woven strip from the wigmaker, Yoshihara said, “it looks like a cave man’s hair, very long, so you have to cut it and style it.” Yoshihara works from a plaster model of Branagh’s head to get the mustache exactly symmetrical. Then, when it’s time to film, she applies it directly to Branagh’s face with a special adhesive similar to super glue.

Despite the effort involved in creating and applying the prosthetic, the result should still “look natural and not made up,” as if the hair were really growing on his face. Striking the right balance between naturalistic and theatrical meant dozens of screen tests with sample mustaches, each of a slightly different length, shape and shade. “You need that trial and error to know what looks wrong and what looks right,” she said. On “Death on the Nile,” she said, they went through so many options that they didn’t ultimately decide on one until the first day of the shoot.

Branagh kept his false mustache on during the long days of shooting “Orient Express,” but found it challenging to eat. “Egg yolk is the killer. Or any noodles,” Yoshihara said, adding, “It took so much time to eat that on this film we decided it would be faster to just remove the mustache at lunch and reapply it after lunch. I had to hover around Ken during meals.”

The prosthetic was removed by gently applying isopropyl alcohol to the adhesive. “You can get drunk just sniffing it,” she said, “so you have to be very careful.”

One of the biggest challenges on “Venice” was the introduction of a new enemy, one of the biggest nemeses of any hairpiece: water. At one point, Poirot is plunged underwater and thrashes about for his life. It caused Yoshihara a great deal of stress on set. She remembers the first assistant director, Martin Curry, teasing her relentlessly as they were preparing to shoot the sequence. “He was laughing at me, like, ‘Wakana, the mustache will get wet! What are you going to do?’” Because the hair and the adhesive could only withstand so much wetness and still keep its shape, the crew had to minimize the number of underwater takes. “You could only shoot that two or three times, no more,” she said.

Yoshihara did have backup mustaches in case her favorite suffered too much wear and tear during the shoot. But she said it was impossible to make each one exactly alike. “We used that one until we killed it,” she said. “It got so floppy that we couldn’t use it anymore.” Of course, having developed such a close bond with the mustache, she said, watching it deteriorate wasn’t easy.

“I would feel so sad when the mustache was dying,” she said. “Because the mustache had a life — and he’d had enough.”