  We derive precise upper bounds for the maximum of the Riemann zeta function
on short intervals on the critical line, showing for any $\theta\in(-1,0]$, the
set of $t\in [T,2T]$ for which $$\max_{|h|\leq \log^\theta
T}|\zeta(\tfrac{1}{2}+it+ih)|>\exp\bigg({y+\sqrt{(\log\log T)|\theta|/2}\cdot
{S}}\bigg)\frac{(\log T)^{(1+\theta)}}{(\log\log T)^{3/4}}$$ is bounded above
by $Cy\exp({-2y-y^2/((1+\theta)\log\log T)})$ (where $S$ is a random variable
that is approximately a standard Gaussian as $T$ tends to infinity). This
settles a strong form of a conjecture of Fyodorov--Hiary--Keating in mesoscopic
intervals which was only known in the leading order. Using similar techniques,
we also derive upper bounds for the second moment of the zeta function on such
intervals. Conditioning on the value of $S$, we show that for all $t\in[T,2T]$
outside a set of order $o(T)$, $$\frac{1}{\log^\theta T}\int_{|h|\in
\log^\theta T} |\zeta(\tfrac{1}{2}+it+ih)|^2\mathrm{d}h \ll e^{2S}\cdot
\left(\frac{(\log T)^{(1+\theta)}}{\sqrt{\log\log T}}\right).$$ This proves a
weak form of another conjecture of Fyodorov-Keating and generalizes a result of
Harper, which is recovered at $\theta = 0$ (in which case $S$ is defined to be
zero). Our main tool is an adaptation of the recursive scheme introduced by one
of the authors, Bourgade and Radziwi{\l}{\l} to mesoscopic intervals.
