A 15-year-old girl was unlawfully killed when she unknowingly ate a takeaway meal containing peanuts, a court has heard.
Megan Lee died on 1 January 2017 from acute asthma brought on by an allergic reaction to food from the Royal Spice Takeaway in Hyndburn, Lancashire.
Her friend wrote "prawns, nuts" on the Just Eat online order, but staff paid no attention to it, the jury heard.
Takeaway owner Mohammed Kuddus and co-accused Harun Rashid deny manslaughter.
Peter Wright QC, prosecuting, said staff served a meal including an onion bhaji, a Peshwari naan and a seekh kebab which tests later showed had the "widespread presence" of peanut protein.
After the delivery was dropped off at her friend's house, the girls shared the food but Megan suffered an "immediate reaction" when she began to eat the kebab.
Her friend noted Megan appeared "lumpy" and the friend's mum gave her some liquid antihistamine, which made her feel better.
Megan left the kebab but continued eating and, aside for a rash on her cheek, showed no signs of discomfort when her mum, Gemma, took her home.
Mr Wright said Megan went upstairs to her bedroom but shortly after Mrs Lee heard her daughter call out.
He said: "Megan was in a state of distress. Her lips were swollen and blue, she was struggling to breathe and an ambulance was called. Megan's condition continued to deteriorate. She stopped breathing and her heart stopped."
Mrs Lee and paramedics tried to revive Megan but she had suffered irreversible brain damage and was pronounced dead two days later when her life support was switched off, the prosecutor said.
A police investigation was launched as well as a probe by local Trading Standards and environmental health officers who closed the takeaway.
Mr Wright said there were "no procedures in place" to manage foods known to cause allergic reactions and "no audit of their available dishes or written records of their recipes".
He said the premises were not clean and evidence of mouse droppings was found.
Samples of the dishes were tested and detected the "widespread presence of peanut protein of levels that were unsafe for people allergic to peanuts", Mr Wright said.
Mr Kuddus, 40, of Belper Street, Blackburn, earlier pleaded guilty to failing to discharge a general duty of employers, contrary to the Health and Safety at Work Act.
He also admitted failing to put in place, implement and maintain a permanent procedure or procedures in contravention of European Union food safety regulations.
Mr Kuddus also entered guilty pleas to the same offences on behalf of Royal Spice Takeaway Limited, trading as Royal Spice Takeaway.
His co-defendant, fellow Bangladeshi national Rashid, 38, of Rudd Street, Haslingden, pleaded not guilty to those charges.
The trial continues.