[dev-overlay] font style backward compat with react 18 (#76225)
Style tag hoisting is not available in React 18 -- see [failed
test](https://github.com/vercel/next.js/actions/runs/13416102637/job/37480399204).
Thus, replace it with a backward-compatible solution.