[proofplan]
Fix a sufficiently large regular cardinal $\theta$, a countable elementary submodel $M \prec H_\theta$ containing $P$, and a condition $p \in P \cap M$. Since $M$ is countable externally, enumerate the dense subsets of $P$ that belong to $M$, and recursively meet them inside $M$ by elementarity. Countable closure supplies a single lower bound $q$ for the resulting descending sequence. That lower bound is an $(M,P)$-master condition because every extension of $q$ is compatible with the condition chosen from each dense set in the enumeration.
[/proofplan]
[step:Enumerate the dense subsets of $P$ that lie in $M$]
Let $\mathcal{D}_M$ denote the set of all dense subsets $D \subseteq P$ such that $D \in M$. Since $M$ is countable, $\mathcal{D}_M$ is countable in the ambient universe. Choose an enumeration $(D_n)_{n<\omega}$ of $\mathcal{D}_M$, allowing repetitions if necessary.
Here dense means that for every $a \in P$ there exists $b \in D$ with $b \leq_P a$. Compatibility in $P$ means that two conditions $a,b \in P$ have a common extension: there exists $c \in P$ with $c \leq_P a$ and $c \leq_P b$.
[/step]
[step:Build a descending sequence in $M$ meeting each dense set]
We recursively define a sequence $(p_n)_{n<\omega}$ of conditions in $P \cap M$. Set $p_0 := p$. Suppose $p_n \in P \cap M$ has been defined. Since $D_n \in M$, $P \in M$, and $p_n \in M$, the assertion
\begin{align*}
\exists r \in P \, (r \in D_n \text{ and } r \leq_P p_n)
\end{align*}
has all its parameters in $M$. It is true in $H_\theta$ because $D_n$ is dense in $P$. By elementarity of $M \prec H_\theta$, there is $p_{n+1} \in M$ such that $p_{n+1} \in P$, $p_{n+1} \in D_n$, and $p_{n+1} \leq_P p_n$.
Thus $(p_n)_{n<\omega}$ is a $\leq_P$-descending sequence in $P$, with $p_0=p$, and for every $n<\omega$ we have $p_{n+1} \in D_n \cap M$.
[guided]
The goal of the recursion is to prepare one condition that simultaneously accounts for every dense set in $M$. We cannot usually choose a condition lying in all dense sets at once, so we meet them one at a time.
Define $p_0 := p$. Assume that $p_n \in P \cap M$ has already been constructed. We want the next condition $p_{n+1}$ to satisfy two requirements: it should extend $p_n$, and it should lie in the next dense set $D_n$. Since $D_n$ is dense in $P$, the following statement is true in $H_\theta$:
\begin{align*}
\exists r \in P \, (r \in D_n \text{ and } r \leq_P p_n).
\end{align*}
The parameters appearing in this formula are $P$, $D_n$, and $p_n$, and all three belong to $M$. Because $M \prec H_\theta$, every first-order assertion with parameters from $M$ that is true in $H_\theta$ is also true in $M$. Therefore $M$ contains a witness to the displayed existential statement. Choose such a witness and call it $p_{n+1}$.
This gives $p_{n+1} \in P \cap M$, $p_{n+1} \in D_n$, and $p_{n+1} \leq_P p_n$. Repeating this construction for all $n<\omega$ produces a $\leq_P$-descending sequence $(p_n)_{n<\omega}$ in $P$ with $p_0=p$ and with $p_{n+1} \in D_n \cap M$ for every $n<\omega$.
[/guided]
[/step]
[step:Use countable closure to obtain a lower bound]
Since $(P,\leq_P)$ is countably closed and $(p_n)_{n<\omega}$ is a $\leq_P$-descending sequence in $P$, there exists $q \in P$ such that $q \leq_P p_n$ for every $n<\omega$. In particular, $q \leq_P p_0=p$.
[/step]
[step:Verify that $q$ is an $(M,P)$-master condition]
Let $D \subseteq P$ be dense with $D \in M$. Since $(D_n)_{n<\omega}$ enumerates all dense subsets of $P$ belonging to $M$, choose $n<\omega$ such that $D=D_n$.
We prove that $D \cap M$ is predense below $q$. Let $s \in P$ satisfy $s \leq_P q$. Since $q \leq_P p_{n+1}$, transitivity of $\leq_P$ gives $s \leq_P p_{n+1}$. Also $p_{n+1} \in D_n \cap M = D \cap M$. Hence $p_{n+1}$ is compatible with $s$, witnessed by $s$ itself, because $s \leq_P p_{n+1}$.
Therefore, for every $s \leq_P q$, some member of $D \cap M$ is compatible with $s$. Since $D \in M$ was arbitrary, $q$ is an $(M,P)$-master condition. Thus every $p \in P \cap M$ has an $(M,P)$-master extension, and $P$ is proper.
[/step]