This evening, for the first time ever, I pulled a muscle in my neck and caused myself significant pain. I think I either looked up or around too fast and one of my muscles wasn't impressed, hence the current stiffness in my neck.
The pain worried me at first, for until today this was not something I had ever experienced and not being able to move my neck without major discomfort was extremely concerning. Fortunately, after lying down and keeping my neck still for half an hour followed by a warm shower, much of the pain dissipated.
I still have pain in my neck and right shoulder but I expect this to ease further overnight. In future, I'll have to be more careful not to swing my head around too fast, lest this happen again.