I am writing a paper using an sty which puts the section title on top of each page together with the page number at the corner (using fancyhdr). The problem is that if the section title is too long and has to be split into 2 lines, the page number get aligned with the second line of the section title instead of the first. Please refer to the MWE below. How can I fix it so that the page number is always flush with the upper right corner? Thank you.
Bonus question: is it the right thing to do to have \setlength{\headheight}{27.16pt} in order to suppress the fancyhdr warning (when the section title is too long)? More thanks!
\documentclass[11pt]{article}
\usepackage{fancyhdr}
\setlength{\headheight}{27.16pt} % sometimes section title takes 2 lines
\pagestyle{fancyplain}
\lhead[\fancyplain{\thepage}{\thepage}]{\fancyplain{}{\scshape\rightmark}}
\rhead[\fancyplain{}{\scshape\leftmark}]{\fancyplain{\thepage}{\thepage}}
\chead{}
\cfoot{}
\lfoot{}
\rfoot{}
\def\chaptermark#1{%
\markboth{\@chapapp\ \thechapter.~~ #1}{}}
\def\sectionmark#1{%
\markright{Section \thesection.~~ #1}}
\begin{document}
\section{An unnecessarily long and wordy title for some stuff}
Words here
\end{document}