A teenager who took her own life in a children's home was "thriving" in the weeks before her death, an inquest has heard.