The justices have allowed the administration to stop issuing passports with gender identity markings selected by applicants.