Effective field theory for closed strings near the Hagedorn temperature