  An approach to pairing in finite nuclei at nonzero temperature is proposed,
which incorporates the effects due to the quasiparticle-number fluctuation
(QNF) around Bardeen-Cooper-Schrieffer (BCS) mean field and dynamic coupling to
quasiparticle-pair vibrations within the self-consistent quasiparticle
random-phase approximation (SCQRPA). The numerical calculations of pairing gap,
total energy, and heat capacity were carried out within a doubly folded
multilevel model as well as realistic nuclei $^{56}$Fe and $^{120}$Sn. The
results obtained show that, under the effect of QNF, in the region of moderate
and strong couplings, the sharp transition between the superconducting and
normal phases is smoothed out, resulting in a thermal pairing gap, which does
not collapse at the BCS critical temperature, but has a tail, which extends to
high temperature. The dynamic coupling of quasiparticles to SCQRPA vibrations
significantly improves the agreement with the results of exact calculations and
those obtained within the finite-temperature quantal Monte Carlo method for the
total energy and heat capacity. It also causes a deviation of the quasiparticle
occupation numbers from the Fermi-Dirac distributions for free fermions.
