WASHINGTON — In a pair of exceptionally hard-fought arguments on Tuesday, the Supreme Court considered a host of flash points in the culture wars — including sports, dress codes, religious objections to same-sex couples and, especially, bathrooms — in weighing whether a landmark 1964 civil rights law bars employment discrimination based on sexual orientation and transgender status.
Job discrimination against gay and transgender workers is legal in much of the nation, and the wide-ranging arguments underscored the significance of resolving whether the law, Title VII of the Civil Rights Act, protects such workers.
It was the court’s first case on L.G.B.T. rights since the retirement last year of Justice Anthony M. Kennedy, who wrote the majority opinions in all four of the court’s major gay rights decisions. And without Justice Kennedy, who joined four liberals in the 5-to-4 ruling in the marriage case, the workers who sued their employers in the three cases before he court may face an uphill fight.
For the most part, the justices seemed divided along predictable ideological lines on Tuesday. But there was one possible exception: Justice Neil M. Gorsuch, a member of the court’s conservative majority, who asked questions suggesting that his vote might be in play.
Justice Gorsuch is an avowed believer in textualism, meaning that he considers the words Congress enacted rather than evidence drawn from other sources. And he repeatedly suggested that the words of Title VII may well bar employment discrimination based on sexual orientation and transgender status.
The question was, he said, “really close, really close.”
But he added that he was worried about “the massive social upheaval” that would follow from a Supreme Court ruling saying so. Such a significant change, he mused, might be more appropriate coming from Congress rather than the courts.
The court considered the cases in two hourlong arguments. The first concerned a pair of lawsuits from gay men who say they were fired because of their sexual orientation. The second was about a suit from a transgender woman, Aimee Stephens, who said her employer fired her when she announced that she would embrace her gender identity at work.
Some legal experts said the transgender case was the easier one for the plaintiffs, since discrimination against transgender people certainly sounds like discrimination based on sex. At the same time, they said, a ruling protecting transgender people would open a new front in the culture wars.
Justice Sonia Sotomayor said the court could not ignore the impact of its decisions on who can use which bathrooms. “Let’s not avoid the difficult issue,” she said.
“You have a transgender person who rightly is identifying as a woman and wants to use the women’s bathroom,” she said. “But there are other women who are made uncomfortable, and not merely uncomfortable, but who would feel intruded upon if someone who still had male characteristics walked into their bathroom. That’s why we have different bathrooms. So the hard question is how do we deal with that?”
David D. Cole, a lawyer with the American Civil Liberties Union, responded that the question was not before the court. If it arose in a future case, he said, the court could address it in due course.
Justice Samuel A. Alito Jr. asked whether a transgender woman could play on a women’s college sports team. That issue, Mr. Cole said, was also not before the court.
Justice Gorsuch asked whether a ruling in favor of Mr. Cole’s client would do away with sex-specific dress codes. Mr. Cole said no.
“Recognizing that transgender people have a right to exist in the workplace and not be turned away because of who they are,” he said, “does not end dress codes or restrooms.”
“There are transgender male lawyers in this courtroom following the male dress code and going to the men’s room,” Mr. Cole said, “and the court’s dress code and sex-segregated restrooms have not fallen.”
But John J. Bursch, a lawyer for the funeral home that fired Ms. Stephens, said a ruling in her favor would have vast consequences.
It would mean, he said, “that a women’s overnight shelter must hire a man who identifies as a woman to serve as a counselor to women who have been raped, trafficked, and abused and also share restroom, shower, and locker room facilities with them.”
Near the end of the arguments, Justice Sotomayor appeared to urge the court to act to protect historically disfavored groups.
“We can’t deny that homosexuals are being fired merely for being who they are and not because of religious reasons, not because they are performing their jobs poorly, not because they can’t do whatever is required of a position,” she said, “but merely because they’re a suspect class to some people. They may have power in some regions, but they are still being beaten, they are still being ostracized from certain things.”
In the first argument, Justice Alito directed skeptical questions at a lawyer who argued on behalf of two men who said they had been fired for being gay.
Justice Alito suggested that it would be absurd to conclude that when Congress passed Title VII, it intended to protect gay, lesbian, bisexual and transgender people. “You’re trying to change the meaning of what Congress understood sex to mean and what everybody understood,” he told the lawyer, Pamela S. Karlan.
Ms. Karlan said that sexual-orientation discrimination was a form of sex discrimination.
“When an employer fires a male employee for dating men but does not fire female employees who date men,” Ms. Karlan said, “he violates Title VII.”
Justice Elena Kagan said that conduct satisfied what she said was the law’s “extremely simple test”: “Would the same thing have happened to you if you were of a different sex?”
Justice Kagan added that hewing closely to the words of the statute was how the court ordinarily went about its work.
“And the text of the statute appears to be pretty firmly in Ms. Karlan’s corner,” she said. “Did you discriminate against somebody, against her client, because of sex? Yes, you did. Because you fired the person because this was a man who loved other men.”
“This is,” she said, “the usual kind of way in which we interpret statutes now. We look to laws. We don’t look to predictions. We don’t look to desires. We don’t look to wishes. We look to laws.”
Justice Alito said the public would find it hard to accept a ruling from the Supreme Court interpreting Title VII to encompass other forms of discrimination.
“If the court takes this up and interprets this 1964 statute to prohibit discrimination based on sexual orientation,” he said, “we will be acting exactly like a legislature.”
Chief Justice John G. Roberts Jr. said he was concerned that a ruling from the Supreme Court in favor of the plaintiffs would not adequately protect employers with religious objections to same-sex relationship and transgender status.
Justice Stephen G. Breyer said that firing a member of a gay couple was no different from firing a Catholic for marrying a Jew.
“There are many people, at least in the religious context,” he said, “who are against intermarriage and are not against Catholics or Jews. That’s not an unrealistic example.”
Solicitor General Noel J. Francisco, representing the Trump administration, said it was up to Congress and not the courts to change the law.
“The issue is not whether Congress can or should prohibit employment discrimination because of sexual orientation,” he said. “The issue, rather, is whether it did so when it prohibited discrimination because of sex.”
A lawyer for the employers in the sexual-orientation cases, Jeffrey M. Harris, opened his argument by noting that if Congress had meant to cover L.G.B.T. people, there would have been no need for states to address the question in their own laws, which some two dozen have done.
“Sex and sexual orientation are distinct and independent characteristics,” he said. “That’s just as true today as it was in 1964.”
The cases concerning gay rights are Bostock v. Clayton County, Ga., No. 17-1618, and Altitude Express Inc. v. Zarda, No. 17-1623. The case on transgender rights is R.G. & G.R. Harris Funeral Homes v. Equal Employment Opportunity Commission, No. 18-107.
Over the course of two hours, five lawyers used comparisons to try to persuade the justices that various forms of discrimination were or were not similar. Justice Alito, himself a master of the telling hypothetical question, at one point declared himself lost. “They will make your head spin,” he said of the comparisons, “if you try to figure them all out.”