  Axion-CMB scenario is an interesting possibility to explain the temperature
anisotropy of the cosmic microwave background (CMB) by primordial fluctuations
of the QCD axion \cite{Iso:2020pzv}. In this scenario, fluctuations of
radiations are generated by an energy exchange between axions and radiations,
which results in the correlation between the primordial axion fluctuations and
the CMB anisotropies. Consequently, the cosmological observations stringently
constrain a model of the axion and the early history of the universe. In
particular, we need a large energy fraction $\Omega_A^{}$ of the axion at the
QCD phase transition, but it must become tiny at the present universe to
suppress the isocurvature power spectrum. One of natural cosmological scenarios
to realize such a situation is the thermal inflation which can sufficiently
dilute the axion abundance. Thermal inflation occurs in various models. In this
paper, we focus on a classically conformal (CC) $B$-$L$ model with a QCD axion.
In this model, the early universe undergoes a long supercooling era of the
$B$-$L$ and electroweak symmetries, and thermal inflation naturally occurs.
Thus it can be a good candidate for the axion-CMB scenario. But the axion
abundance at the QCD transition is shown to be insufficient in the original CC
$B$-$L$ model. To overcome the situation, we extend the model by introducing
$N$ scalar fields $S$ (either massive or massless) and consider a novel
cosmological history such that the $O(N)$ and the $B$-$L$ sectors evolve almost
separately in the early universe. We find that all the necessary conditions for
the axion-CMB scenario can be satisfied in some parameter regions for massless
$S$ fields, typically $N\sim 10^{19}$ and the mass of $B$-$L$ gauge boson
around $5-10$ TeV.
