Fifteen years after Kyle and Mandy Shanahan were bonded by her worst personal tragedy, they recently shared his lowest professional moment in a Houston hotel room.

Mandy was with Kyle and his parents, Mike and Peggy, after the Falcons squandered a 25-point lead in an overtime loss to the Patriots in Super Bowl LI. The meltdown immediately inspired national criticism of Kyle’s decisions as offensive coordinator and, nearly two weeks after the game, Mandy spoke haltingly as she relived the fallout.

What is there to say when exultation is kicked aside for agony? Mandy tried to explain.

“Sorry, this is the hard part,” she said, pausing a few moments. “We just sat in a dark room for an hour. You’re speechless. (Kyle) was broken.”

She continued. Kyle flew back to Atlanta with the team the next day and a similar scene played out when he greeted his children: Stella, 9, Carter, 7, and Lexi, 4.

“It was the first time that our kids have seen their dad crumble when he walked through the door,” Mandy said. “That’s hard to watch.”

As those post-Super Bowl stories illustrate, Mandy has seen 49ers rookie head coach Kyle Shanahan through a different lens during his 13-year NFL career. To the public, Shanahan, 37, the NFL’s second-youngest head coach, is known for precociousness and confidence, not vulnerability and sensitivity. Mandy knows better. Kyle was there for her long before they were married, when the results of a routine hospital visit would turn her family’s world upside down.

At 28, Shanahan became the youngest offensive coordinator in NFL history in 2008. It began a run in which his offenses have ranked among the league’s top 10 in six of his nine seasons. Last year, the Falcons scored the eighth-most points (540) in NFL history, and he was named the league’s Assistant Coach of the Year.

Shanahan has a beautiful football mind. But there have been questions about whether his personality is suited for his new job, which requires more interpersonal skills than he needed as a game-planning guru.

Before he became the 49ers’ general manager, John Lynch, in his final game as a Fox Sports analyst in January, said Shanahan could come across as “arrogant,” although he went on to say it was a quality he wanted in a head coach: “I’d be hiring that guy in a second,” he said. Falcons owner Arthur Blank said Shanahan focused on being a “better listener” in 2016, after his second season in Atlanta produced a stronger relationship with quarterback Matt Ryan, the NFL’s MVP.

Asked about her husband’s people skills, Mandy chuckles at the idea she’s spent the past 11 years married to an X’s-and-O’s robot who has been programmed with extra swagger.

“You hear that he’s hard to reach, or he’s arrogant,” she said. “Kyle’s been one of the most sensitive people I’ve ever been around, in a good way. He’s so in tune with people’s emotions and how people feel. And that’s what makes him such a gifted father and supporting husband.”

Shanahan thinks he’s been misread. He acknowledges he’s exacting — and his demands of quarterbacks help explain his tensions with Donovan McNabb and Robert Griffin III in Washington. He’s also direct in his appraisal of players, a few of whom have been offended by his candor. Finally, he believes his focus has been mistaken for ego.

“When I come into an office, I’m pretty locked in on my job,” Shanahan said. “I don’t just hang out there just to hang out. I do my work, and I get home to my family. I think that comes off to people that don’t know me like, ‘Man, that guy just walked by me and didn’t say, ‘Hi.’ Well, I promise I didn’t know that person just walked by me.”

For those surprised to learn of Shanahan’s sensitivity, Mandy can relate.

They went to Cherry Creek High in suburban Denver — Kyle was a year ahead in school — and they dated the summer after Mandy graduated. Their relationship didn’t last, partly because they attended different colleges, but they remained close friends.

However, they were drawn back together when Mandy was a junior at the University of Colorado and Kyle was at the University of Texas. Mandy’s mom, Nancy O’Donnell, a healthy and vibrant eighth-grade teacher, went in for an outpatient procedure to remove gall stones and left with a death sentence: Doctors found she had Stage 4 gall-bladder cancer.

Mandy thought she might careen out of control, but Kyle unexpectedly steadied her. After the diagnosis, Kyle wrote Mandy’s mom letters and often flew home on weekends for visits during which he took her for walks. He also became Mandy’s closest confidant. Nancy died at 57 on Jan. 31, 2002, less than three months after her diagnosis.

“He completely stunned me,” Mandy said. “Kyle, hands down, got me through that. After going through that with him, I couldn’t imagine being with anyone else. What was so alarming to me, being that young and going through something that devastating, I realized it’s not going to be the last sad thing that I go through.”

Shanahan wanted to support Mandy, her mom and her family. And, during the process, he was awed by her courage, strength and determination to save her mom in the face of impossible odds.

“There are very few times in life you get to see someone for who they genuinely are,” Shanahan said. “Mandy going through that — it was as bad as anything you could go through — it showed me who she was. There was no B.S. to her. I saw who she was. And that was the person I fell in love with.”

The experience altered Kyle’s career road map. He’d discovered another love besides football.

“I never planned on getting married at a young age,” Shanahan said. “But then I understood ‘OK, you don’t necessarily get to pick when you get married. You get married when you find the right person.’ And I found her. So I changed my plans.”

Shanahan has also embraced fatherhood. During the NFL season, Kyle and Mandy, who married in 2005, have forfeited their date night because Kyle has established a weekly, four-hour “driveway party” that begins each Friday afternoon. It’s the only extended block of time he has with his family during the season, and it’s spent riding bikes and shooting hoops with personalized music in the background. Kyle created 400-song playlists to mark the birth of each child, in addition to nieces and nephews who have termed him “Uncle Cool.”

“There’s really two things that are important to me,” Shanahan said. “And that’s my family, and that’s football. And that’s really all the things I think about.”

Shanahan has established the driveway bash, but he’s failed to start other traditions that would allow him to see his children more during the season.

“He will get home and he’ll be upset with me that I put the kids to bed,” Mandy said. “I’ll tell him, ‘Kyle, it’s 11 o’clock. She’s 4.’ And he’s like, ‘But I asked you to keep her up.’ I’ll explain: ‘I know. And it’s 11 o’clock. She’s 4.’”

Shanahan is flaky away from the office — he’s adept at losing his wallet — but his gift for problem-solving can follow him home.

Lexi was recently upset when told her dad’s new job meant they had to leave Georgia for California, her fourth state in her four years. But after Kyle beckoned her upstairs, Mandy found Lexi dumping some of the contents of her bedroom into a suitcase. Why? Kyle told her she could have a purple room, with a purple bed, in their California house.

“So Lexi’s room is full of bags and suitcases now,” Mandy said, laughing. “She’s ready to roll.”

Mandy terms Kyle a “goofball” at home. But Shanahan doesn’t joke about football. Chris Simms, a quarterback at Texas, said teammates used to term Shanahan “Stressball,” a nod to his desire to maximize his modest ability.

After two seasons at Duke, Shanahan, a wide receiver, transferred to Texas, and was a walk-on his first year. He had 14 catches for 127 yards in two seasons, while seeking training tips from the Longhorns’ track-and-field coaches to improve his so-so speed.

“Kyle was always stressed about something,” Simms said. “It was, ‘I’ve got to get my workout in. I haven’t done this wide receiver drill.’ ... He was obsessive, just like he is now. That’s the greatness of Kyle.”

Simms and Shanahan bonded because of their similar backgrounds. Simms, the son of former NFL quarterback Phil Simms, and Shanahan majored in football long before college.

Kyle’s professor was his father, Mike, who has the 13th-most wins (170) in NFL history and is one of six head coaches to win back-to-back Super Bowls. Shanahan was the offensive coordinator of the 1994 49ers, the last team in franchise history to win a Super Bowl. He left the Bay Area in 1995 to begin a 14-season run as the Broncos’ head coach.

Kyle, who worked under his dad in Washington from 2010-13, grew up as the ball boy for the 49ers and Broncos. As a junior employee, of sorts, he learned from coaches and players on elite teams. He attended coaches’ and draft meetings, caught passes from John Elway and learned route running from Pro Bowl wideouts such as John Taylor and Ed McCaffrey.

“Not meaning to toot our own horn,” Simms said, “but I think compared to the normal college kid, we had a better idea of the bigger picture of football.”

Shanahan’s background helps explain his confidence. And his upbringing gave then-Texans head coach Gary Kubiak the confidence to hire him as a 26-year-old wide receivers coach in 2006. Two years later, Kubiak made Shanahan his offensive coordinator at a historically young age, even as Texans owner Bob McNair expressed concerns about his youth.

“From a football-knowledge standpoint,” Kubiak said, “he was way ahead.”

Kubiak had spent 15 seasons with Mike Shanahan as a quarterback and coach. During that time, Kyle babysat Kubiak’s three sons — once hanging one from the doorknob by his underwear — and impressed Kubiak with his intellect and passion. Kubiak also liked that he wasn’t a mini-Mike: He had ideas that veered from those of his father.

“He’s always been his own person and had his own mind-set as far as, ‘OK, I want to do this this way.’ He was always strong in his beliefs,” said Kubiak, who won a Super Bowl with the Broncos in 2015. “He’s just very confident. And his dad was the same way. Show me a good football coach and they’ve got a swagger about them.”

Shanahan might share a swagger with others, but what he does before games suggests he’s uniquely obsessive.

It takes Mandy, clearly amused, several minutes to detail her husband’s pre-kickoff routine, which always begins exactly four hours before kickoff and never deviates.

The process starts with a self-deprecating text to his wife. A typical message: “Things are about to get weird.”

First, Shanahan must find a solitary place to examine his game plan, which can be challenging on the road. Shanahan has studied X’s-and-O’s in janitors’ closets and shower stalls, while using a bench, box or Gatorade cooler as a desk. During his quiet time, he must have four red pens and just-the-right temperature coffee. Then, before he goes onto the field, he holds a good-luck charm his son, Carter, gives him during the week and looks at a picture of his three children. His grand finale? The yoga advocate stands on his head for 45 seconds in the locker room to clear his mind and reduce stress.

No wonder Mandy brightened during a recent tour of Levi’s Stadium when she saw there was an office for the head coach.

“I was thinking, ‘This is perfect,’” Mandy said. “No more janitor’s closets. He really needs his space. And no one will have to see him stand on his head.”

Before the Super Bowl, Shanahan gripped a plastic tiger Carter gave him, but the toy provided good luck for only about 2½ quarters. The rest of the game, which left her husband shattered, is still difficult to discuss for Mandy.

“Ultimately, that loss is going to make Kyle an even better coach,” she said. “But it’s still too new to try to pull anything out of it other than just heartbreak.”

Indeed, she knows from experience that pain can, eventually, reveal its purpose.

Once, in the midst of enduring a far greater loss, she found a partner to experience happiness, and sad things, together.

Eric Branch is a San Francisco Chronicle staff writer. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch