  Encoding quantum information onto bosonic systems is a promising route to
quantum error correction. In a cat code, this encoding relies on the
confinement of the system's dynamics onto the two-dimensional manifold spanned
by Schr\"odinger cats of opposite parity. In dissipative cat qubits, an
engineered dissipation scheme combining two-photon drive and loss has been used
to autonomously stabilize this manifold, ensuring passive protection against
bit-flip errors, regardless of their origin. In Kerr cat qubits, where
highly-performing gates can be engineered, two-photon drive and Kerr
nonlinearity cooperate to confine the system to a two-fold degenerate ground
state manifold spanned by cats of opposite parity. Dissipative, Hamiltonian,
and hybrid confinements have been investigated at resonance. Here, we propose a
critical cat code, where both two-photon loss and Kerr nonlinearity are
present, and the two-photon drive is allowed to be out of resonance. The
performance of this code is assessed via the spectral theory of Liouvillians in
all configurations, from the purely dissipative to the Kerr limit. We show that
large detunings and small, but non-negligible, two-photon loss rates are
fundamental to achieve optimal performance. We demonstrate that the competition
between nonlinearity and detuning results in a first-order dissipative phase
transition, leading to a squeezed vacuum steady state. To achieve the maximal
suppression of the logical bit-flip rate requires initializing the system in
the metastable state emerging from the first-order transition, and we detail a
protocol to do so. Efficiently operating over a broad range of detuning values,
the critical cat code is particularly resistant to random frequency shifts
characterizing multiple-qubit operations, opening venues for the realization of
reliable protocols for scalable and concatenated bosonic qubit architectures.
