Crystallinity from an invertible period matrix
Fix the period data described below. Let $L/Q$ be a finite field extension, $V$ an $L$-vector space with its compatible $Q$-vector-space structure, and $\rho:G\to\operatorname{GL}_L(V)$ a representation. Suppose $e_1,\ldots,e_n$ is a $Q$-basis of $V$. If $W\in M_n(B)$ has invertible determinant and $$[\rho(g)]_e\,g(W)=W\qquad(g\in G),$$ where the first factor is mapped from $Q$ to $B$ and $g$ acts entrywise on $W$, then $$\dim_L(V\otimes_Q B)^G=[K_0:Q]\dim_L V.$$
The period data consist of a group $G$, fields $Q\subseteq K_0\subseteq K$ finite over $Q$, commutative $K_0$- and $K$-algebras $B$ and $B_{\mathrm{dR}}$, and compatible scalar towers over $Q$. There are a prime $p$, a $Q$-automorphism $\sigma$ of $K_0$, and actions of $G$ on $B$ by $K_0$-algebra automorphisms and on $B_{\mathrm{dR}}$ by $K$-algebra automorphisms. Every invariant of these actions lies in the respective scalar image of $K_0$ or $K$.
There is an injective $Q$-algebra endomorphism $\varphi$ of $B$, restricting to $\sigma$ on $K_0$ and commuting with $G$, and an injective $G$-equivariant $K_0$-algebra map $\iota:B\to B_{\mathrm{dR}}$. The latter algebra has a decreasing, exhaustive, separated, multiplicative $G$-stable filtration by $K$-subspaces with $1\in\operatorname{Fil}^0$. There are a character $\chi:G\to Q^\times$ and a unit $t\in B$ with $g(t)=\chi(g)t$, $\varphi(t)=pt$, and $\iota(t)\in\operatorname{Fil}^1\setminus\operatorname{Fil}^2$. Every $b\in B$ with $\varphi(b)=b$ and $\iota(b)\in\operatorname{Fil}^0$ lies in the scalar image of $Q$. The invariant space in the conclusion uses the diagonal action on $V\otimes_QB$.