Court overturns part of 2021 California law modifying three