Kyle Gibson was unhittable for 12 batters Tuesday night.

Then, for 12 pitches, he couldn’t record an out.

With the punchless Phillies desperate for quality starts, especially from their top three pitchers, Gibson turned in a quintessentially uneven performance in a record-evening, 6-3 loss to the Chicago Cubs, another team that’s playing out the string after strip-mining its roster at the trade deadline.

The Phillies fell for the sixth time in seven games and backslid to .500, at 72-72, for the 25th time this season. Somehow they’re still in the postseason race, even if playoff fever isn’t gripping the fan base. The announced crowd of 16,170 was the smallest at home since June 10 and seventh-smallest in 47 games since Citizens Bank Park reopened to full capacity on June 4.

“We’re trying to figure this out,” manager Joe Girardi said. “We’re trying to get guys right, and it’s frustrating right now. But we still have an opportunity here. We just need to play better.”

Gibson plowed through the Cubs’ batting order for four innings, a stretch that he said might have been the best he has thrown since being acquired July 30 in a deadline trade.

But he gave up a single and back-to-back home runs to begin the fifth. Patrick Wisdom’s go-ahead two-run shot, which preceded Alfonso Rivas’ solo number, came on a 2-2 pitch and was the 70th allowed by the Phillies in a two-strike count, sixth-most in baseball. Both homers came on fastballs.

“I felt like we stuck to the plan that we had,” said Gibson, who has a 4.85 ERA in nine games with the Phillies. “The frustrating part is, if you execute pitches that you feel like is the right pitch and you throw it with conviction and they hit it, you probably picked the wrong pitch.”

The Phillies gave Gibson a 1-0 lead but couldn’t add on. They were held to six hits, and save for a sixth-inning spurt, didn’t muster much offense against five Cubs pitchers. Back-to-back doubles by Jean Segura and Bryce Harper and an RBI single by Didi Gregorius led to two runs and cut the deficit to 4-3.

But the Cubs scored twice in the seventh inning against reliever Sam Coonrod to stretch the lead back to 6-3 and effectively put the game away.

The Phillies remained 4½ games behind the division-leading Atlanta Braves in the National League East. But they were in danger of sliding to three games behind the St. Louis Cardinals in a wild-card race that also includes the San Diego Padres, Cincinnati Reds, and New York Mets.

With 18 games left, the Phillies also are trying to secure their first winning season since 2011, a more modest goal than snapping a nine-year playoff drought but perhaps a more realistic one.

“The focus is the playoffs. That’s the focus,” Girardi said. “It’s one game that you have to win. We have to come out, play a crisp game, and do things right and find a way to win.”

» READ MORE: Phillies expect J.T. Realmuto (shoulder) back Wednesday

Double trouble

The Phillies got runners on base in six consecutive innings against Cubs starter Adrian Sampson. But they hit into four double plays -- Ronald Torreyes in the second inning, Odúbel Herrera in the third, Brad Miller in the fourth, and Freddy Galvis in the sixth -- to halt rallies or kill them entirely.

With J.T. Realmuto sitting out after an anti-inflammatory injection in his right shoulder, Andrew McCutchen batted in the cleanup spot despite his struggles against right-handed pitching and went 0-for-4.

Go to the videotape

Girardi questioned whether Cubs shortstop Sergio Alcántara actually caught McCutchen’s low line drive in the sixth inning. But he was reminded by crew chief Brian Gorman that the play wasn’t reviewable.

“I just didn’t like Brian’s reaction,” Girardi said, raising his arms and shrugging his shoulders. “I didn’t appreciate that. Because I don’t think he caught it. But what are you going to do? They basically said if they had something different they would’ve called it.”

» READ MORE: Carson Wentz is gone, Ben Simmons wants out, and Mickey Moniak is finding his way with the Phillies

A perfect 10

Harper lined an RBI double off the right-field scoreboard to extend his hitting streak to 10 games. It marks his longest streak since a 10-gamer on Sept. 17-25, 2019.

Harper disagreed with a called third strike that appeared to clip the inside corner with a runner on first base in the first inning. He drew a walk to lead off the fourth but was erased with Miller’s double play.

In the eighth inning, Harper struck out on an elevated fastball.

Leading men

Herrera drove Sampson’s second pitch of the game to the concourse in right-center field for the Phillies’ 10th leadoff home run, a single-season club record.

Unlike the previous mark, set in 2007 when Jimmy Rollins bashed nine leadoff homers, four Phillies players have hit at least one. Herrera, McCutchen, and Segura have three apiece, while Freddy Galvis has one.