If you see a character deal with death and pain, it's not an unhappy ending. That's what I meant when I said it's about overcoming obstacles. Brad Pitt didn't deal with what was in the box in Seven, for example. We are cut off after he makes the wrong choice, and we never see if he deals with it. Are we let to believe that he is going to stay that way for the rest of his life? That's why, for example, Flight is not an unhappy ending. It would be if we didn't get Washington's monologue at the end. Without the monologue, the whole journey of the character (and the audience) was pointless. TWOK doesn't have an unhappy ending despite Spock's death, since we see the characters dealt with it (or are starting to deal with it). Kirk feels young again, which makes a point to his journey in the film. Khan managed to get a loved one killed, but Kirk deals with it, so Khan lost the battle. Now imagine the film fading out right after Spock dies. Khan wins.