The ritual was born in a random moment, some inning of some game that nobody can quite remember. At least, not without a little work.

This is how it often works in baseball. The season is long, and the grind is exhausting, and players find ways to cope and survive. Sometimes it’s an inside joke that lasts for months. Sometimes it’s a superstition. Sometimes it’s a group of grown men forming their hands into a heart shape and flashing the gesture back to the dugout after hits.

“Melky’s behind that,” Royals shortstop Alcides Escobar said, smiling. “He likes it.”

It was Tuesday afternoon in Oakland, and Escobar was talking about teammate Melky Cabrera, part outfielder, part professional hitter, part clubhouse connector who returned to the Royals before the trade deadline. But Escobar was also talking about something more specific. As he relaxed at his locker in the hours before a game against the A’s, he sought to explain the Royals’ latest sign of solidarity.

The story, inasmuch as there is an actual story, either dates back two weeks or four years, depending on how deep you want to dive into the rabbit hole. But perhaps it’s best to start here: Years ago, the Royals adopted a team-wide ritual of sending signals back to the dugout after hits. Each player came up with their own. Eric Hosmer pretended to pull his shirt apart like Superman. Jarrod Dyson did the “vroom-vroom” motion like the rapper Yung Joc. Lorenzo Cain once flashed a sign that appeared eerily reminiscent of the NWO’s “Wolfpack” symbol, if you cared to watch wrestling in the 1990s. And then there was Escobar, who would form his hands into a heart and look back toward the dugout.

Escobar says the symbol was chosen as a message to his wife and son, Massimiliano, as much as it was for his teammates. But a few weeks ago, Escobar reached base and flashed a heart, and Cabrera flashed the sign back.

“He did it in the dugout,” Hosmer said. “And everybody thought it was funny, so we just kept rolling with it.”

On Sunday in Chicago, second baseman Whit Merrifield smashed a two-run triple in a 14-6 victory over the White Sox and formed a heart at third base. One day later, rookie catcher Cam Gallagher hit a grand slam in the sixth inning of a 6-2 victory. He was met by a collection of hand hearts at home plate.

“I’m not 100 percent sure what it actually means,” Gallagher said. “But I got my walk earlier in the game, and they were yelling for me to do it.”

Inside the clubhouse, the Royals offer the usual signs of a close-knit team that does not take itself too seriously. This is a team of Salvy Splashes, of pouring barbecue sauce on each other after walk-off wins, of T-shirts about espresso drinks and conversations over postgame meals that can stretch for 30 to 45 minutes.

What the Royals do is not all that uncommon in today’s game. Yet in the often stodgy, old-school world of baseball, they prefer to live on a default setting of fun.

“It’s just something,” Hosmer said, “a little spark to try and get the guys going.”

The story of the hand signals actually begins with former major-league infielder Miguel Tejada, who spent the 2013 season with the Royals. Tejada’s time as an All-Star and MVP shortstop were long over by then. But as a 39-year-old veteran, he wanted to make an imprint on a young clubhouse. So he forced the young players to show ‘love’ to the dugout when they got on base.

“He talked to us as a team and said: ‘We have to be together out there, especially on the road,’” Hosmer said. “When you go into hostile environments, you got to find little things to get you going. And I think he was really the one that kind of opened our eyes … not just doing the stuff on the field, but being together.”

In some ways, the on-field gestures represent the growing Latino influence in the game. Rookie Jorge Bonifacio said the Royals’ signs can be subtle and tempered compared to what you might see in a winter ball game in the Dominican Republic, his home country. In his first season, Bonifacio will sometimes quickly place two fingers by his right eye, a gesture similar to what his older brother Emilio once did. But the sentiment is all the same: Play the game with joy.

 And inside the clubhouse, few Royals players can match the joy of Cabrera, a 33-year-old veteran who endears himself to teammates with his jovial personality.

Cabrera is the type of player who will offer hugs on the field, create nicknames for teammates and flash his palms to the sky in mock bewilderment when a deep fly ball does not leave the yard. His teammates love him for it.

In 17 games since being acquired from the Chicago White Sox, Cabrera is batting .299 with a .351 on-base percentage and three homers, buoying an offense that has been without injured catcher Salvador Perez. Cabrera has helped the Royals (61-59) remain on the cusp of an American League wild card spot entering a pivotal series with first-place Cleveland on Friday.

He has also slipped back into a familiar role in the clubhouse. Six years ago, in the summer of 2011, Cabrera spent a season in Kansas City, a 26-year-old outfielder who taught his young teammates how to stay loose, Hosmer said. That hasn’t changed.

He is an endless source of energy — of laughter, joy and antics that entertain. So if Cabrera is going to adopt the heart symbol and encourage his teammates to do the same, why not?

“A lot of us like to have fun out there and show our emotions on the field,” Hosmer said. “It’s something we try to do to bring the young guys in or bring the guys that don’t like to show emotion out of their shell a little bit.

“Have some fun with it.”