Takes place the summer before their fifth year, so between GoF and OotP. Friendship and a bit more, but nothing untoward. Could hypothetically be canon.
Disclaimer: It's all J.K.'s, not mine.
Hermione Granger yawned, pulling her socked feet onto the dark leather couch beside her. The library at Number 12 Grimmauld Place was not the cheeriest of spots, but it was cozy and quiet. Here she could read uninterrupted late into the night while Crookshanks slept on her lap, purring gently.
So it was an utter surprise when hours after everyone had gone to bed, the door to the library creaked open. Hermione started at the sound and turned so suddenly she woke the cat. There in the dimly lit doorway was a familiar silhouette.
"Good evening, Professor Snape," she said, surprised. "When did you get here?"
"Moments ago. What are you doing?" He shrugged off a traveling cloak and draped it on the back of an armchair, narrowing his eyes critically at his student.
"Reading," Hermione replied nonchalantly, burying herself in her book again and absentmindedly stroking Crookshanks.
Snape huffed. "I can see that. Miss Granger, are you aware it is after two o'clock in the morning? Shouldn't you be in bed?"
"It's summer!" she protested, turning to look at him with a slightly wicked smile. "What, were you going to give me detention or something?"
Snape collapsed a bit heavily into the armchair and she noticed he looked even paler than usual. "Clearly I cannot actually punish you, but I do strongly suggest you go to sleep now."
"Are you alright, Professor?" she asked hesitantly.
He glared at her. "Why wouldn't I be?"
"You just look… well, tired." She braced herself for the biting response, but to her surprise Snape just looked slightly amused.
"It happens my responsibilities are a bit more far-reaching than you would know, Miss Granger, in this current climate." He sounded bitter.
Hermione's eyes widened as she realized suddenly where he must have come from. There was a long pause, during which Crookshanks jumped down from her lap, sniffed suspiciously at Snape, and proceeded to curl up by the hearth.
"Oh," she said.
Snape smirked. "Have I rendered you speechless? I thought the day would never come…"
Hermione matched his smirk, but turned serious soon. "Do you need something? Shall I find Mrs. Weasley?"
"Gods no," he said, leaning his head back and closing his eyes as if pained by something.
Hermione lowered her voice the way her mother had taught her to do when speaking to the elderly or the gravely ill. "Can I do anything?"
"You can go away and leave me alone," he said, then with less of an edge than usual, as if he was too exhausted to argue, "Go to sleep, Granger." Here he opened his eyes, which were a bit brighter now, to look at her beseechingly. The color was coming back into his cheeks but he still looked worn out.
Hermione looked down at the her lap, distractedly brushing off cat hair, and replied quietly, "I can't." She looked up to see him examining her face, his expression unreadable.
After a moment, he said, "Hot chocolate?"
"What about it?"
Snape gritted his teeth, exasperated. "Do you want some?"
Hermione paused, a bit taken aback, half-expecting him to be joking. "Oh. Yes, please."
Without looking, the Professor gestured towards the door with his wand, and seconds later a tray came swooping into the room and settled itself on the table, where a kettle of warm milk began to pour itself into two mugs of chocolate. When the kettle was still, Hermione carefully took the mug closest to her and brought it to her lips, blowing the steam off before sipping. Her eyes slid closed at the rich, creamy taste. "Mmm. Thank you, sir."
"You're most welcome. Are you tired yet?"
She snapped her eyes open to scowl at him and found him similarly incapacitated by the first taste of chocolate. When he opened his eyes and registered her frown, he made a dismissive gesture with his arm. "Go upstairs. Insomnia's completely psychological, you'll get over it."
Hermione's frown melted and she took another long swig of cocoa, steeling herself. "It's not insomnia. I have nightmares."
"Ah. A common problem during wartime," he said with a pedantic air.
She looked up at him and said in a quiet, resigned voice, "That's what this is, isn't it, sir. War."
"Yes," he responded a bit too gruffly. Hermione set her mug down and buried her face in her arms. For a moment he thought she must finally be getting tired, but soon her shoulders began to shake slightly and he realized she was crying, albeit silently.
Professor Snape had little experience with crying teenagers. His own Slytherins were often too thick-skinned to be brought to tears during the school term, and any other student he dispatched immediately to his or her Head of House. As Minerva McGonagall was miles away, he cleared his throat a bit and moved to sit on the couch next to her. Unsure how to proceed, he patted her back awkwardly, which only seemed to make her cry harder, now sobbing audibly.
"Hermione," he began gently, but was cut off by a little gasp as she stopped crying suddenly, apparently shocked into silence by the use of her given name. She looked up at him, and despite her red, tear-streaked face, she appeared further from the incorrigibly annoying little girl he had first met than she ever had. He pulled a green silk handkerchief from a pocket of his robes and handed it to her. She took it with a mumbled, ragged sounding "Thanks," and began to dab at her tears.
He took a deep breath before speaking. "There is no doubt the coming years will be dangerous and stressful, and that our loyalties will be tested. There will be tragedy and fear."
Her eyes widened and looked about to brim with tears again, so he continued hastily, "But you are safe here, for the time being, as you will be at Hogwarts. While Albus Dumbledore is protecting you, I promise you that you cannot be harmed."
"What about my parents?" she said desperately. "How do I know they will be safe?"
"They must be intelligent enough to keep themselves under the radar, to have produced the likes of you," he said, and she reflected his playful grin. "It will be a long time before the Dark Lord reaches into the Muggle world, and by then we will be prepared. They will be protected."
Hermione nodded, pulling herself together. "What about you, Professor?"
"What about me?"
She met his eyes and saw for the first time the utter dark that was held there, the lonely depths of his soul. "You put your life in danger routinely. You suffer pain regularly. You do things I don't even want to think about in order to keep your cover. Who protects you?"
Snape was thrown by her concern, but touched nonetheless. "Miss Granger, I decided long ago that this fight is worth more than my life."
He expected her to cry again, or argue, but he did not expect the blazing look she gave him. "I think I know what you mean," she said, her voice finally steady. The lonely resignation she had found in his eyes resonated through her words, and the Potions professor found himself drawn to her unconsciously. He brushed her hair back and pulled her slowly to his chest, where she stayed for a moment, hands twined around his back.
Eventually she extricated herself from the hug and tried to hold back a yawn. "Alright, to bed with you," Snape said, slipping back into his cold professor persona.
Hermione stood and went to collect her familiar without complaint, but eyed him critically before leaving. "You ought to get some sleep too, Professor. You look dead tired."
Snape huffed, but stood as well and followed her up the stairs. At the landing where Ginny and Hermione's bedroom and the spare room were, he nodded to her briskly. "Goodnight, Miss Granger."
"Goodnight, Professor," she said with a warm smile. "And thank you, sir, for everything."
He softened and returned her smile. "It was my pleasure."
With that he disappeared into the spare room and Hermione slipped into the room next door, where her bed waited, warm and soft. Ginny's breath indicated she was sleeping deeply. As Hermione pulled the covers over herself, she heard through the wall muffled footsteps, rustling fabric, and then a silky voice saying quietly, "Nox."
She grinned slightly as sleep overtook her, and the next room went silent. She suspected he would be gone come morning, and act as though nothing at all had happened once they got back to school, but she knew that neither of them would have nightmares tonight.