What if I don’t have a court order for child custody?

Only a court order creates legal custody. If there is no court order, there is nothing for a judge to enforce, and each parent is free to take the child at any time.