Court upholds red state's ban on trans surgeries, treatments for minors