In season 3 of the Railgun anime, episode 4 starting at 3:52 and happening at 4:15, Saten and Uiharu are working together to look for Shadow Metal in a stadium during the Daihaseisai festival. When they don't seem to be having luck finding any, Saten says to Uiharu (quoting the English subtitles):
This is it, Kazari! A conspiracy! A conspiracy! If you go after Shadow Metal, some people say you'll get targeted by a mysterious organization!
In the Japanese speech being transcribed to subtitles though, she actually says "Kazari-kun!", which I found quite confusing:
Wikipedia's article on Japanese Honorifics says "Kun is a semi-formal title for a man—primarily men younger or the same age as the speaker." But Uiharu is a girl. If anything, wouldn't Saten have said "Kazari-chan"?
It was pointed out to me in the comments that in that same Wikipedia article, the full section on "Kun" also says:
Kun can mean different things depending on gender. Kun for females is a more respectful honorific than -chan, implying childlike cuteness. Kun is not only used to address females formally; it can also be used for a very close friend or family member. Calling a female -kun is not insulting and can also mean that the person is respected, although that is not the normal implication. [...] The general use of -kun for females implies respectful endearment and that the person being referred to is sweet and kind.
So that mostly resolves that part of my confusion, but...
Saten almost always calls Uiharu "Uiharu" (family name) and not "Kazari" (given name). It's surprising that she suddenly calls her by her given name.
To my memory, this is the first time she ever does that in the anime. When I first watched this scene, I had to google who "Kazari" was to find out it was Uiharu's given name, since that was the first time I had heard it.
She switches right back to "Uiharu" at 5:02 of the same episode (less than one minute later). In other words, it was a one-off event.
Why does Saten call Uiharu "Kazari-kun" in that context?
Given that Saten using "kun" for Uiharu is not culturally out of place , the question can be refactored as:
Why not "Uiharu-kun" (Uiharu is the family name) instead of "Kazari-kun" (Kazari is the given name)? I don't know much about the cultural aspect with honorific suffixes here. Is it just that one culturally tends to or only uses these suffixes with the given name? Why is Saten calling Uiharu by her given name at all here?
I've only watched the anime and haven't read the light novel or manga adaptation. Is there context in there that I'm missing?
Is this a reference to something? Ex. Is she pretending to be a specific detective like Sherlock adressing a specific male partner like Watson?
I tried googling
toaru railgun "kazari-kun" and
toaru railgun "kazari kun" to see if this question had already been asked somewhere on the net, but all I got was a fanfiction.