I am not a lawyer but this sounds to me like the Supreme Court just admitted that while the text of the law doesn't include protection for gay or transgendered persons, they are going to retroactively "understand the term" as though it does.
How, then, can we assume any of the laws mean what the text says when a court can decide words mean something else? I have to agree with the dissent in this case; amending the Civil Rights to update, expand, or clarify the definition "sex" is the surest way to protect gay and transgender person from a future court taking a strict textual interpretation and annulling this ruling.
Too bad the court system can't create the equivalent of a bug report for legislation. If we had that then in this case the SCOTUS could have issued a legislative mandate to Congress requiring them to clarify or expand the definition of "sex" so that now-protected classes are protected from a further court ruling on what the actual text of the law says. It is the role of the court to interpret the laws, not make them.