The court decision is part of a long-running effort by some environmental advocates to protect century-old, state-managed forests from being logged.