49ers take NFC West, No. 1 seed with 26-21 win over Seahawks