Thanks to a little Texas-style injustice, young Stanley Yelnats is sentenced to 18 months at Camp Green Lake, where there's little green to speak of and certainly no lake. He and his fellow campers at the youth detention facility are forced to dig holes, in the broiling sun, ostensibly to build character. In fact, they're the unwitting dupes of a sadistic warden (Sigourney Weaver), who is using them as slave labor in a vast amateur archaeology project.

With its cast of adolescent boys and its cartoon treatment of adults, most of them daft, dumb or cruel, Disney's "Holes" could so easily have been a string of food fights and flatulence jokes. Instead, it aspires to be a both warmhearted and dark fable of lost paradise, unexpiated guilt and the redeeming virtues of friendship. Based on Louis Sachar's Newbery Medal-winning novel, "Holes" follows several generations of the hapless Yelnats family, from a fateful encounter with destiny in Latvia, to the shoot-'em-up Old West, to the present, where the most recent Yelnats crop lives in humble urban squalor while Dad hunts for the mysterious elixir that will de-stink gym shoes.

More bad luck lands the youngest Yelnats in trouble with the law and facing a choice between prison and Camp Green Lake. Stanley chooses camp, expecting tents and swimming and fresh air. Instead, he's press-ganged into searching for treasure lost since vigilantes of yesteryear soiled paradise by breaking up an interracial romance. Adding to his misery is a thriving community of rattlesnakes and deadly lizards. Serpents prowl where paradise once stood.

Okay, so maybe it's not John Milton, but there are more archetypes of the unconscious running through this film than the average family fare. Producer and director Andrew Davis manages to tie it all together, but at a cost: For younger children, the cutting between present and past may be a little confusing; for older viewers, the tying up of the final package, with its apotheosis of suburban pleasures, will seem all too neat, and all too Disney.

But throughout this quirky film, one can't help but feel thankful that the movie doesn't always go the expected route, that the characters have a little more depth to them than average, and that the complexity, which is the movie's basic weakness, is also its fundamental virtue. Better this than another teens-aping-adults romance, or teens-running-the-asylum film.

It also has a surprisingly good cast. Jon Voight is a comic foil as the creepy right-hand man to Weaver's chilly warden figure. Henry Winkler is Stanley's dad, also called Stanley, a man whom only those obliged by familial duty to love could love. Dule Hill, of "The West Wing" fame, seduces Patricia Arquette with good looks and poetry (a reference to Edgar Allan Poe underscores the film's attempt to find a Gothic lyricism). And the cast of young actors, including Shia LaBeouf as Stanley and Khleo Thomas as his friend Zero, is strong enough to carry a substantial part of the movie.

If one wanted to think too much about this kind of film -- and why not? -- the issue of race offers a fascinating entry point. The film argues that race matters (by creating division among adults) and matters not at all (children are oblivious to it). Disney has always projected onto children virtues the fallen adult world lacks, suggesting what seems so simple: Put the kids in charge and all the troubles will go away. But when young Stanley has a chance to offer a simple gesture to the warden, something that might heal a woman who has herself been terribly abused, he declines to do so. So children aren't just innocents; when they arrive at adulthood dragging fresh trauma, it calls into question whether kiddie utopia was really utopia at all.

And one more thing: Without giving away the film's ending, it tracks a well-worn moral cliche of American race relations. The white kid makes his way through trouble on his own; the black kid needs a big helping hand. Put another way, white kids make Horatio Alger movies; black kids are still remaking "Diff'rent Strokes." Too bad.

Holes (111 minutes, at area theaters) is rated PG for violence and mild profanity.

Shia LaBeouf, left, and Khleo Thomas are forced to dig their way out of trouble in Disney's tale of lost paradise, unexpiated guilt and friendship.