YEKATERINBURG, Russia — After nearly 27 hours and 900 miles on a train from Moscow, Hans Josefsson’s pedicure remained immaculate.

Before leaving Sweden 10 days earlier for the World Cup, he had his toenails painted blue and gold, the colors of the national soccer team.

“A professional did it; I knew I would do a lot of walking in these sandals,” Mr. Josefsson said before arriving here Tuesday afternoon in the easternmost Russian city in which matches are being played.

A fellow passenger on the daylong trip, Luis Aragones, 24, an architect, had watched in Mexico City as Mexico stunned Germany, the defending champion, in its opening game. He had joined a delirious celebration whose mass jumping may have caused the equivalent of a minor earthquake.