With school going back into session, students are as likely to be buried in a screen as in a textbook, and that has families, teachers – and even students themselves – looking for ways to rein in out-of-control digital habits.

“Even with clear rules, it’s difficult,” Biddeford Schools Superintendent Jeremy Ray said. “Think of our lives, of how much we’re looking at that phone. That’s a really tough thing.”

Time spent online is soaring, with the average teenager now spending far more time online – nine hours a day – than in classrooms – 6.7 hours a day, according to a 2015 survey by Common Sense Media.

Aside from stealing away time that might be spent studying, being with friends and family or getting some exercise, excessive screen time has been linked to a host of ills by various studies. Researchers find long hours online linked to higher levels of unhappiness, problems socializing with others, higher suicide rates for girls and MRI evidence of reshaping the brain in a way that makes kids more moody, less attentive and less able to make decisions.

For parents, the struggle over screen time can mean constant nagging, fights and emotional showdowns over when and where to use devices. Teachers have school rules to fall back on, but the reality is that there is a near-constant policing of students using phones, or using school-issued devices, for education use – not surfing YouTube or social media.

Even students know they have a problem with devices sometimes.

Manny Lam got his wake-up call when he got his first phone in middle school.

“I started texting everybody,” Lam, now 18, says with a grin. “Eventually it gets boring, but then you can’t stop. It’s kind of addicting.”

His friend Paul Kana said it wasn’t a phone that distracted him. It was his Xbox: “Ever since I got my Xbox, well, I fell in love with my house.”

Schools can become ground zero in the fight for students’ attention.

SCHOOLS DEPLOY LOCK BOXES

Most schools have a ban on cellphones in the classroom, but students are allowed access in the hallways or during lunch.

In Biddeford, middle school teachers were spending too much time policing students in the classroom, so the school instituted a rule several years ago that cellphones had to be left in lockers.

That’s worked really well, said Ray, the superintendent. At the high school, students can keep their phones on them, but they’re not supposed to be out in class.

And even when everyone is following the rules, it can be a bit sad.

“It’s difficult to walk into the lunchroom and see kids not conversing and just seeing them buried in their phones,” Ray said.

Teachers take various approaches to the sight of a cellphone. For many, a quick warning to put it away is enough, while some teachers take them away for the period or the entire day. Creative approaches include creating a combination check-in/charging station in the room, such as a repurposed hanging shoe organizer. At one Boston charter school, arriving students must put their phones into a special locked Yondr case that is unlocked at dismissal time, according to published reports. About 600 schools use Yondr cases.

Dan Ryder, who taught English for 20 years and runs the innovation center at Mt. Blue High School, said he gave up on trying to keep cellphones out of his classroom, and resorted to gently giving blatant users a hard time instead.

“I’d say, ‘Oh, dude, hey! If you super need to send that, go into the hall. I know it must be super important,’ ” Ryder said, mimicking his shtick with an imaginary student. Sometimes that wasn’t enough.

“In the past four years of teaching, I’ve had maybe seven actual altercations involving heated intensity – sort of, you need to put it away, I’ve asked you 10 times,” he said. “I’m quite permissive about them – I used to not be – but it was a massive waste of energy policing (them).”

Parents face the same dilemma at home.

But experts say this time of year – when kids are transitioning from unplugged and unstructured summer days to a more regimented school schedule – is a good time for parents to set ground rules around screen use, according to Corrin Cross, a Los Angeles pediatrician who helped write the American Academy of Pediatrics guidelines for screen use.

“When we grew up, screens were very easy to define, and it was very obvious when you should or should not be on them. We don’t look at it in the same way now,” Cross said. “Now we spend half our lives on phones, and it’s harder to regulate what you do so frequently.”

The American Academy of Pediatrics suggests virtually no screen time, except for video chatting, for children under 18 months; limited high-quality media with children 18 to 24 months old; and no more than one hour a day for 2- to 5-year-olds. Older than that, and the recommendations are about consistent time limits and balancing screen use with exercise and sleep.

The academy also suggests that families create a personalized family media use plan that includes limiting or eliminating screens at certain times or in certain locations, such as storing all devices in one place, or not charging phones in bedrooms.

Parents have to balance the need for students to go online for homework, or quality programming, while avoiding time-wasting, violent or inappropriate material. Social media sites – generally limited to ages 13 and up – and video games come with special warnings about overuse.

CHILDREN SEEK PLASTIC SURGERY

Cyberbullying, sexting and an unhealthy selfie culture can taint social media sites for parents, while endless hours playing Angry Birds, Minecraft or Fortnite can strain parents’ patience. A recent Journal of the American Medical Association article said plastic surgeons are seeing patients seeking surgery in what’s called “Snapchat dysmorphia” or “selfie surgery” – because they want to look like photo-filtered versions of themselves.

Gaming can trigger family showdowns over the sheer amount of time spent playing, the cost of buy-ins or the perceived level of violence, particularly with younger children or first-person shooter games. Fortnite is wildly popular with elementary school-age children even though in its Battle Royal version a player is dropped on an island with 99 other players, and the goal is to kill everyone and be the last player standing. Similarly, “Five Nights at Freddy’s” merchandise is pitched for the pre-teen set despite its survivor-horror storyline of homicidal animatronic characters that come alive after closing in a Chuck E. Cheese-like pizzeria.

Last spring, more than a dozen parents turned out for a Deering High School PTA-sponsored talk on video gaming, with some parents complaining that their kids were playing video games all night. The compulsive nature of Fortnite even made national headlines this spring when Boston Red Sox pitcher and Fortnite enthusiast David Price missed his start against the Yankees because of a mild case of carpal tunnel syndrome.

Paul Kana of Portland, 18, splits his time Thursday between his Xbox and texting. “Ever since I got my Xbox … I fell in love with my house,” he says. Staff photo by Brianna Soukup

Parents can use technology to help limit screen use. There are routers that can shut off certain devices at night and “Nanny” apps for tracking a child’s phone use or online activity. Other apps track and report user time on social media or restrict screen use to certain time periods.

In recent months, the concern has led Apple and Microsoft to announce enhanced parental controls in operating systems on new devices, and kid-friendly websites with curated, age-appropriate material. Microsoft Launcher lets parents see kids’ activity, even on linked devices, such as an Xbox. Apple’s “Families” website has links to various apps and resources for parents, such as pointing out a setting that allows parents to authorize any app activity or instructions on how to install special web browsers that curate what websites show up on kids’ devices.

In the end, Cross said, parents should be training their children to navigate the online world themselves.

“What you need to do is teach your kids how they are going to manage this when they are not in your home,” she said.

‘WATCHING A CAT ON INSTAGRAM’

Gina Dellasala of Gorham, a mother of four, said clear time limits and screen time rules help them find the right balance. Her now-adult sons were avid gamers, while her daughter Angela – going into eighth grade – uses social media on her phone. One rule: Dellasala takes Angela’s phone away before bedtime; otherwise she would “be on it all night.”

But that’s a sign of the times, and not just for kids.

“They’re so connected to everyone all the time,” Dellasala said, pausing a moment. “The parents are just as bad.”

Pew studies find that 36 percent of parents say they spend too much time on their cellphones and about half of all 13- to 17-year-olds worry they spend too much time on their cellphones.

More than half of the teenagers – 52 percent – said they had tried cutting back on cellphone use, 57 percent tried limiting social media time, and 58 percent have tried to limit video game time.

“Without even knowing it, time can fly by,” Lam said. “I think that’s one of the problems with screen time with teenagers, because you get so sucked into your devices that you forget your surrounding area and you’re just – oh snap – it’s time to go! Or, it’s time to do this! And you’re like, I should have done this earlier but I was watching a cat on Instagram.”

Across the library table from Lam, Kana laughs and shakes his head. “That’s me every day,” Kana says.

Cross said kids admit to screen time problems in her examining room.

“I do actually have kids who say they have a hard time putting (their phone) down. They’ll say, I try to put it down for an hour and I freak out,” Cross said.

Student Lily Biacho, 18, said she tried to limit her phone use after realizing her grades in high school started to suffer once she got a smartphone. But it didn’t really work, despite her best intentions.

“I’ve tried to distance myself from my phone,” said Biacho, 18, who attended Deering High School and is studying biology at the University of Southern Maine this fall. She tried setting up her own rules – no taking the phone from the house, then cutting back her internet access, then switching from an iPhone to a flip phone.

Now that she’s gotten better at self-managing her phone use, she is more aware of how much everyone around her is constantly online.

“I can feel like the oddball,” she says, admitting to sometimes using her phone as a prop to look “normal.”

“Even if I’m not doing anything on my phone, just staring at it, I feel like, OK, now I’m a part of society. Now I look normal,” Biacho said.

“It’s a strange feeling but I catch myself doing that a lot. But it’s considered normal.”