Mr. Moon, by contrast, hosted Ms. Kim for a lavish luncheon at the presidential Blue House, and she surprised him with a letter from her brother. She told Mr. Moon that her brother wanted to convene a summit meeting at an early date. The two spent nearly three hours together, with Mr. Moon doing most of the talking.

He said that he really wanted to meet Mr. Kim and improve ties, but that there was a limit to how far he could go without progress in dismantling the North’s nuclear program. He urged North Korea to talk to the Americans and said they needed to hurry so as not to lose the rare momentum from the spirit of the Olympics visits.

A Family Envoy

After the unfortunate optics from Mr. Pence’s visit and what some viewed as a missed opportunity, Mr. Trump sent his daughter, Ivanka Trump, to the closing ceremony of the Games. She had dinner with Mr. Moon at the Blue House and briefed him on new sanctions her father would impose on North Korea, then made a public statement to reporters reaffirming the American strategy of “maximum pressure.”

She then headed to Pyeongchang for the last two days of competition. Briefed by Mr. Pence’s staff, Ms. Trump and her team were “incredibly forceful,” as one official put it, in going over the seating plan for the box and the timing and sequencing of arrivals to avoid any surprises.

Ms. Trump proffered a smiling, more open image that went over better in South Korea. She stood for the South Korean athletes, who this time entered the stadium separately from their compatriots from the North, and posed for photographs with famous Korean pop stars. But she too made a point of sending a message; for her guest in the box, she brought Gen. Vincent K. Brooks, commander of American forces in South Korea.

When she attended a curling event, Ms. Trump’s team received word that the North Koreans were on their way in what the Americans thought was an effort to make a scene or prompt her to leave in an embarrassing spectacle. Ms. Trump decided to stay, and the North Koreans in the end did not come.

All Smiles in the North

With the Olympics over, it was time for Mr. Moon to make his move. Last week, he sent two trusted aides on a two-day trip to Pyongyang: Mr. Chung, his national security adviser, and Suh Hoon, his National Intelligence Service director. Flying north, they knew that they were meeting Mr. Kim but not when.