A general optimization framework is proposed for simultaneously transmitting and reflecting reconfigurable surfaces (STAR-RISs) with coupled phase shifts, which converges to the Karush-Kuhn-Tucker (KKT) optimal solution under some mild conditions. More particularly, the amplitude and phase-shift coefficients of STAR-RISs are optimized alternatively in closed form. To demonstrate the effectiveness of the proposed optimization framework, the throughput maximization problem is considered in a case study. It is rigorously proved that the KKT optimal solution is obtained. Numerical results confirm the effectiveness of the proposed optimization framework compared to baseline schemes.