Who cares if it ends with muscle ache? I was thinking that once for myself - I went to the doctor next morning, and it was - spontaneous pneumothorax!
I was also thinking on GERD. Aspirin and tramadol can do it worse, try with paracetamol, if you have it, but just go to the doctor. Gastroscopy will probably be needed, but don't scare your daughter with this at this point.
This is probably not a muscle pain. Call your doc and take her in to see him/her. In the meantime, discontinue the ibuprofen just in case it has anything to do with her stomach. Ibuprofen is not good for stomach issues.
Is there anyone in your family with a history of GERD or gallbladder issues? Any other forms of GI issues?