Virginia Tech students David Eisenhauer and Natalie Keepers also allegedly planned how to dispose and conceal the body of seventh-grader Nicole Lovell over that late January meal at the Cook Out in Blacksburg, Virginia.
The details came to light in a courtroom Thursday as prosecutor Mary Pettitt argued against granting bail to Keepers.
Keepers, 19, is accused
of being an accessory to murder before the fact, concealing a body and being an accessory to murder after the fact.
Eisenhauer, 18, is charged
with abduction and murder.
Keepers' motive, Pettitt told the judge, was that she was "excited to be part of something secretive and special."
The judge denied bond to Keepers.
The pair, Pettitt said, went to the restaurant in the days before the girl's disappearance to talk about the plot to kill Nicole.
Eisenhauer told Keepers how he would lure Nicole out of her home one night, take her to a remote location and use a knife to cut her throat, the prosecutor said.
After leaving Cook Out, they drove by Lovell's home, Pettitt said.
Police arrested Eisenhauer on January 30, three days after Nicole disappeared. Eisenhauer denied involvement in killing the girl.
Investigators said they believe Eisenhauer had an inappropriate relationship with Nicole, a law enforcement official said. The girl was planning to expose their relationship, the official said, and investigators think this was the motive for killing her.
Nicole disappeared after midnight on January 27. Her mother, Tammy Weeks, went to Nicole's bedroom door and found it barricaded, the prosecutor said. Weeks saw an open window and realized Nicole was missing. So was the girl's "Minions" character blanket.
After an extensive search, Nicole's body was found three days later in a wooded area in North Carolina.
Pettitt said in court on Thursday that Eisenhauer corresponded with Lovell on January 27 at 12:39 a.m. through social media.
Also at Thursday's bail hearing, the prosecutor alleged Eisenhauer and Keepers bought a shovel and scouted a remote location for the killing.
Keepers helped Eisenhaur move Nicole's remains into the trunk of his Lexus, Pettitt said. The body was still in the trunk while the pair went to buy cleaning supplies, the prosecutor added.
After Nicole's body was found, police found Keepers at her boyfriend's house and searched the premises.
She allegedly sent Eisenhauer a text message warning: "POLICE."
The search turned up a "Minions" blanket and cleaning supplies, police said.
A preliminary hearing for Eisenhauer has been scheduled for March 28. His court-appointed attorney has not responded to CNN requests for comment.
Pettitt said the autopsy report is expected to be finished just prior to the preliminary hearing.
Eisenhauer did not lead authorities to the body, according to Blacksburg police Chief Anthony Wilson, nor did he confess to the killing.
Authorities said they decided to arrest Eisenhauer after sorting through social media, exploring 300-plus tips and searching for other information pertinent to the case.
A spokesman for Kik, an app that allows users to send anonymous messages, told CNN that it had cooperated with an FBI investigation into the case.