Text this: Modular invariance and thermal effective field theory in CFT