A mother who left her dying daughter at home while she went to a pub has pleaded guilty to neglect.
Sharon Goldie, 45, claimed her child, Robyn, was "attention seeking" despite the 13-year-old begging for help.
When she returned home in Wishaw, North Lanarkshire, Robyn was slumped on the sofa, having died from the effects of a perforated stomach ulcer.
The court heard the child had endured a year of neglect, including having to ask someone for £1 to buy food.
The High Court in Glasgow was told Robyn had lived with Goldie until she was four before moving in with her grandmother where she enjoyed a "stable life".
But she had returned to live with her mother in 2017, a year before her death.
Social workers, who were monitoring the pair, said there was often friction between them, and Robyn was unhappy with her mother's drinking.
Prosecutor Ashley Edwards QC said Goldie appeared to be a regular at the Melody Bar in Wishaw.
Miss Edwards said: "Robyn was often seen attending there looking for Goldie and asking for money to buy food.
"She also often approached a neighbour asking for £1 to get food."
Robyn once said she had only had a yoghurt that day. The child was described as "thin, dirty and unkempt".
The child told friends how when drunk, Goldie would offer her cannabis and alcohol while "constantly" insisting she did not want her in the house.
'Locked in the house'
On one occasion Robyn called a gas company, complaining she was cold at the house, which smelled badly of cat urine, the court heard.
A few months before her death Robyn was found to have a rash caused by fleas.
The week before she died Robyn had complained of a sore stomach and legs, and was given painkillers.
On 21 July, Goldie told staff at the Melody Bar she had "locked" her daughter in the house "so she could not get out".
The next day, Robyn complained to a friend she had been ill and not eaten for days.
On 24 July, Robyn texted her grandmother claiming she felt "a lot better" but a friend of Goldie saw the "drained" child that day and told her: "She's just not well".
That night, Robyn told Goldie to get help as she had "pain all over" but the mother refused to contact the ambulance service.
A friend of Goldie offered to take the girl to hospital in a taxi, but she stopped him, claiming the girl was "attention seeking".
The next day, Robyn begged a neighbour to get her an ambulance as she could not breathe, but the mother yelled at her to "get in".
On 26 July - the day Robyn died - a social worker turned up in the morning to take Robyn to a catering class.
Ms Edwards explained: "Goldie spoke...through the letterbox explaining that Robyn was not well and had been unwell since the previous Thursday."
Despite her daughter being ill, Goldie then went to the pub, returning home later with a friend to find Robyn slumped on the sofa and unresponsive.
Ms Edwards said: "Goldie and the man got another drink from the fridge and went outside 'because the weather was nice'."
The friend later checked on Robyn again and discovered she was dead.
When an ambulance was called, Goldie told paramedics: "She's at it."
On being told the child had died, she wailed and said: "No, she cannot be."
'Could have survived'
Goldie later told police she thought Robyn had a bug, but was getting better and she thought her daughter was "trying to wind her up".
Miss Edwards: "She said she had told Robyn that ambulances are for people with heart attacks."
Robyn was found to have died from peritonitis as a result of a perforated ulcer.
A senior medic concluded that had the teenager been treated during her illness, she would have been "expected to survive".
Goldie pled guilty to a charge under the Children and Young Persons Act of wilfully ill-treating and neglecting Robyn. Prosecutors accepted her not guilty plea to the charge of culpable homicide.
The court heard Goldie had suffered a brain injury following a car accident when she was a child.
In 2003, she was an in-patient for mental health issues, but stopped taking her medication.
The judge Lord Beckett said it was a serious case, but asked for more information before passing sentence.