In Nancy Drew: Sea of Darkness, Nancy finds a footlocker, which can only be opened by the puzzle above it in the cupboard. According to Magnus’s notes (found in Elisabet’s bag) follow the rules to solve the gems puzzle. There must be 4 blue gems and 4 gold gems across and down in each row and column. No more than 2 of the same colors can be touching.
See the video for the correct solution for Amateur Sleuth and Master Sleuth.