A 13-year-old Queensland boy was confined to his cell for 20 hours or more for 78 days, a court hears.