12. For any set $S$, let $|S|$ denote the number of elements in set $S$, and let $n(S)$ denote the number of subsets of set $S$. If $A, B, C$ are three finite sets, and satisfy the conditions:
(1) $|A|=|B|=2016$;
(2) $n(A)+n(B)+n(C)=n(A \cup B \cup C)$.
Then the maximum value of $|A \cap B \cap C|$ is $\qquad$
$$
\begin{array}{l}
2^{|A|}+2^{|B|}+2^{|C|}=2^{|A \cup B \cup C|} \Rightarrow 2^{2017}+2^{|C|}=2^{|A \cup B \cup C|} \\
\Rightarrow 1+2^{|C|-2017}=2^{|A \cup B \cup C|-2017} \Rightarrow|C|=2017,|A \cup B \cup C|=2018
\end{array}
$$

Thus, $|A \cup B \cup C|=|A|+|B|+|C|-|A \cap B|-|A \cap C|-|B \cap C|+|A \cap B \cap C|$
$$
\Rightarrow|A \cap B \cap C|=|A \cap B|+|A \cap C|+|B \cap C|-4031 \text{. }
$$

If $|A \cup B|=2016$, then $C$ must have 2 elements not in $A, B$,
at this time $|A \cap C|=|B \cap C|=2015 \Rightarrow|A \cap B \cap C|=2015$;
If $|A \cup B|=2017$, then $C$ must also have 1 element not in $A, B$, at this time $|A \cap C|+|B \cap C| \leqslant 2015+2016 \Rightarrow|A \cap B \cap C| \leqslant 2015$.
In summary, the maximum value of $|A \cap B \cap C|$ is 2015.