Brilliant straight-A student Milena Gagic, 16, died instantly when she was hit by the night train at a crossing in Hipperholme, Halifax, in December 2014.
She and her best friend, Amelia Hustwick, had gone to the railway after midnight to chat because it was “a nice place to hang out”, a court heard.
The pair were sitting between the actual train tracks, “laughing and giggling” because they were convinced trains did not run at night.
Both girls had also grown up in the local area and believed that, if any train did in fact approach, it would sound its horn.
But since 2007, a “night time quiet period” had been ushered in, barring horns between 11pm and 7am, "lulling her into a false sense of security", her mum, Leanne, claimed.
Following the aspiring zoologist's death, Mrs Gagic sued Network Rail Infrastructure Ltd, blaming a lack of signs warning of the overnight quiet period for the tragedy.
But after a trial at Central London County Court, Judge Heather Baucher threw out the mum's claim to £22,000 damages from the rail infrastructure body.
A sign informing pedestrians to "stop, look, listen" was next to the crossing gate, which was a "perfectly adequate" way of warning users, she said.
"In my view, it couldn't have been clearer," she said.
"It was self-evident on its face and should have been readily apparent to two highly intelligent teenagers that they needed to keep a careful lookout.
"Had Amelia and Milena stopped, looked and listened, then the incident would never have occurred."
In fact, the girls had sat between the tracks and neither was facing in a position which would have allowed them to see an oncoming train, she said.
"This tragic accident was not caused by Network Rail's actions or inactions," she continued.
"It was caused by Amelia and Milena assuming that no trains ran at night and assuming that a horn might be sounded, and then recklessly sitting down in the middle of the track.
"Had they been using the crossing in a conventional manner, or even if they had kept a proper lookout, they would have seen the train's headlight.
"They took a calculated risk, based on assumptions, and with total disregard for their own safety."
During the hearing earlier this month, Mrs Gagic's lawyers argued that Network Rail had breached its duty of care to Milena.
They claimed her daughter and Amelia were "lulled into a false sense of security" that they would be safe.
Had there been a sign at the crossing to warn users that trains ran overnight and would not toot their horns, the accident would not have happened, it was claimed.
However, the rail body denied fault and suggested that it was Milena who was to blame for her tragic death.
Signs may have been ineffective anyway, as studies suggest they are frequently missed, it said.
The court heard from a witness statement, given by Amelia Hustwick to police after she saw her friend killed.
She explained how the two girls had gone out that night to buy ingredients for baking biscuits before going to sit at the railway.
“We just sat there laughing and giggling,” Amelia told police.
“The train rushed past out of nowhere going very fast. I looked up and assumed that Milena had jumped out of the way.
“But then I saw her body lying in a heap ten metres away.”
She added: "We thought if a train comes, it would toot. We just didn't think they ran at night."
She and Milena were like “two peas in a pod”, she explained, adding: “She was my favourite person in the world.”
The train was travelling at around 55mph at impact and only Amelia managed to jump out of its path.
Dismissing Mrs Gagic's claim against Network Rail - which she said was not about money - the judge paid tribute to the mum's dignity throughout her ordeal.
"Milena's death was a bitter blow for the family to sustain," she said.
"I hope that the conclusion of this claim may allow Mrs Gagic some solace and an opportunity to move on with her life."
Network Rail said it would not seek its costs of the case from Mrs Gagic.