“Welcome to Applebee’s.”

That’s the first thing I hear. The words ring out, even before the large glass door closes behind me. A young hostess in a black shirt, with an earpiece on, eagerly flashes me a smile.

I approach.

And, as I would soon learn, that small, initial interaction is what this Applebee’s hopes will keep it alive.

I’d just entered the world’s largest Applebee’s, located in the heart of Manhattan’s theater district. The towering restaurant, complete with a large glowing apple and three-stories of exterior yellow window dressings sits surrounded by flashy theaters and glowing billboards. It’s definitely not your typical Applebee’s, based on location alone. But, then again, almost nothing is typical about Applebee’s these days.

It’s no secret that casual dining chains are, to put it lightly, struggling. While the bright lights of chains like Appleebee’s, Chili’s and TGI Fridays once dotted suburban landscapes, state highways and city corners — things have changed. Today, chains are shuttering locations left and right. Ruby Tuesday was recently sold to a private equity firm. Buffalo Wild Wings plans to close 60 restaurants this year. Applebee’s will shut 135 locations.

“The decline of these restaurants coincides with polarizing incomes in the United States,” said writer Elizabeth Dunn. “So, the higher wage earners earning more and more, the middle class getting smaller, and a lot of America feeling really squeezed.”

Dunn investigated the decline of the suburban sitdown chain, and what it says about the middle class, for Eater.

She found that as income disparities grew, the people who used to go to sit-down chains changed their habits. Richer Americans would flock to smaller independent restaurants in newly revitalized urban centers, while lower-income Americans could no longer afford meals at sit-down chain restaurants.

And, on top of that, new technologies began proliferating a decade ago. That’s the same time that traffic at casual dining restaurants turned negative for the long-term.

“In 2007, the iPhone was invented and Netflix also launched its streaming service,” Dunn said. “And now people are spending a whole lot more time wanting to retreat in their homes, watch the latest Netflix binge, text and go on Facebook. That has certainly challenged restaurants which have the proposition of coming in and eating in-house.”

Inside this Applebee’s location, things seem to be running smoothly. I head up to the third floor of this massive Applebee’s to meet Zane Tankel, the chairman and CEO of Apple-Metro, Inc., the franchise that operates 34 Applebee’s locations in and around the New York City metro area. Pop music floats softly through the mostly empty second- and third-floor dining rooms.

It’s about 4 p.m. on a Tuesday. Not a typical meal hour. So, are these empty tables a reflection of the time of day, I wonder, or is it a sign of the times?

“What exacerbated the Applebee’s demise, is that it made a wrong decision to try and capture the millennial,” Tankel said.

He points out a recent marketing campaign as the nail in the coffin for Applebee’s, which was already on the decline. In 2016, Applebee’s unveiled new wood-fired grills in each of its 2,000 eateries nationwide. That move, they announced, would “decisively take back America’s neighborhoods.” The marketing proposition, Tankel said, was that millennials would flock to Applebee’s for hand-cut meats prepared on wood-fired grills.

“We looked like anything but what we really were,” Tankel said.

And it didn’t work, he tells me. I’m not surprised. Applebee’s “wood fired” list featured items like an eight-ounce steak for $20.99. In fact, of all the chain sit-down restaurants — an industry where the average meal costs about $14 — Applebee’s has traditionally had one of the cheapest menus.

“They abandoned the traditional Applebee’s customer,” Tankel said.

Sixty days after that program began, the franchise’s guest counts began dwindling — and sales started tanking.

“Two percent a month, 3 percent a month,” Tankel said. “The second year they started to deteriorate 7 percent, 8 percent, 12 percent a month. It just continued to deteriorate no matter what we did.”

And it’s not an isolated incident. Casual dining chains are now the worst-performing segment of the entire restaurant industry. The number of people eating at them has fallen every single month for the past two years, according to data from MillerPulse.

So, how does a restaurant like Applebee’s hope to survive?

“What we are doing is going back to what sold the best,” Tankel said. “Shifting from a survival mode to a back-to-basics mode.”

And that’s meant shedding the wood-fired grill idea — and the expensive grills themselves. Focusing on take-out. And putting effort into the overall experience of the in-store customer. Tankel takes me into the back kitchen. Cooks bustle to and fro preparing steaks and salmon, frying onion rings and applying garnishes.

“An order is taken in the restaurant and it comes up on a screen here,” Tankel said. “We have a metric that we want to have the food back on the table 14 minutes from when it’s ordered.”

Tankel tells me to survive as a chain restaurant franchise today, and keep customers coming in the door, it needs to be “all about the experience.”

“What do we do that’s special? Eye contact, big smiles, big greeting when you walk in the door,” Tankel said. “Big greeting when you walk out the door.”

I wondered to myself if that really is the answer to surviving in this day and age. Tankel is convinced that’s so. I ask if he expects to still be here in the future.

“Well, I’ve got a 20 year lease on this spot,” Tankel said, with a laugh. “So, I sure hope so.”

On my way out, I poke my head into the bar. There are a few more parties in there than when I arrived. Some munching on appetizers and chatting. Others drinking beer, staring at the TVs as the New York Yankees take on the Houston Astros.

I pass the same hostess in the black shirt from earlier on my way out and follow another party out of the door.

“Bye, bye guys,” she said, enthusiastically. “Thank you for coming.”