Magic-state injection teleports a T gate onto ∣ψ⟩=a∣0⟩+b∣1⟩ with the target T∣ψ⟩=a∣0⟩+beiπ/4∣1⟩. Both measurement branches are corrected: outcome 0 needs no fix, and outcome 1 is repaired by applying the S=diag(1,i) gate. After correction, what is the gate fidelity F=∣⟨Tψ∣corrected⟩∣2 of the worse of the two branches?