The goal of this question is to find a "geometric" definition of Frobenius element in $\text{Gal}(\overline{\mathbb{Q}}/\mathbb{Q})$.

Here are two definitions that don't work, but that should help explain what I mean. Fix an algebraic closure of $\mathbb{Q}$ and, for a prime $p$, fix an algebraic closure of $\mathbb{F}_p$. If there were a canonical morphism $f : \mathbb{Q} \to \mathbb{F}\_p$, then the induced map $f\_{\ast} : \pi_1(\text{Spec } \mathbb{F}_p) \to \pi_1(\text{Spec } \mathbb{Q})$ of étale fundamental groups (basepoints the algebraic closures above, suppressed) would be an obvious way to define Frobenius elements: we would just take the image of a generator of $\pi_1(\text{Spec } \mathbb{F}_p) \simeq \hat{\mathbb{Z}}$. (The general motivation being: "gee, if I had a category $C$ and a functor, let's call it $\pi_1 : C \to \text{Grp}$, wouldn't it be nice if I could find an object, let's call it $S^1$, with $\pi_1(S^1) \simeq \mathbb{Z}$, so I could probe elements of $\pi_1(X)$ using morphisms $S^1 \to X$," and it seems for schemes that $\pi_1(S^1) \simeq \hat{\mathbb{Z}}$ is the next best thing.)

But of course this is nonsense since no such $f$ exists. The next obvious thing (from my perspective, being someone who knows nothing about all this étale stuff) is to look at the canonical morphism $f : \mathbb{Z} \to \mathbb{F}\_p$, which induces a map $f\_{\ast} : \pi_1(\text{Spec } \mathbb{F}_p) \to \pi_1(\text{Spec } \mathbb{Z})$, and then to look at the canonical morphism $g : \mathbb{Z} \to \mathbb{Q}$ and the induced map $g\_{\ast} : \pi_1(\text{Spec } \mathbb{Q}) \to \pi_1(\text{Spec } \mathbb{Z})$. Perhaps the Frobenius elements at $p$ are nothing more than the inverse image under $g\_{\ast}$ of the image of a generator of $\pi_1(\text{Spec } \mathbb{F}_p)$ under $f\_{\ast}$ (up to conjugacy to account for changes in basepoint).

But this is also nonsense since $\pi_1(\text{Spec } \mathbb{Z})$ is trivial.

So what is the correct version of this construction?

Here's my guess: instead of using $\mathbb{Z}$, we have to use the localization $R = \mathbb{Z}_{(p)}$. As before there are morphisms $f : R \to \mathbb{F}_p, g : R \to \mathbb{Q}$ inducing maps $f\_{\ast} : \pi_1(\text{Spec } \mathbb{F}_p) \to \pi_1(\text{Spec } R)$ and $g\_{\ast} : \pi_1(\text{Spec } \mathbb{Q}) \to \pi_1(\text{Spec } R)$, and maybe now something like the statement "the Frobenius elements in $\pi_1(\text{Spec } \mathbb{Q})$ at $p$ are the inverse image under $g\_{\ast}$ of the image of a generator of $\hat{\mathbb{Z}}$ under $f\_{\ast}$ (up to conjugacy)" is finally true. Is it? And what does $g\_{\ast}$ look like?