We consider the construction of capacity-approaching variable-length constrained sequence codes based on the multi-state encoders that permit state-independent decoding. Based on the finite-state machine description of the constraint, we first select the principal states and establish the minimal sets. By performing partial extensions and normalized geometric Huffman coding, efficient codebooks that enable state-independent decoding are obtained. We then extend this multi-state approach to a construction technique based on the n-step FSMs. We demonstrate the usefulness of this approach by constructing the capacity-approaching variable-length constrained sequence codes with improved efficiency and/or reduced implementation complexity to satisfy a variety of constraints, including the runlength-limited (RLL) constraint, the DC-free constraint, and the DC-free RLL constraint, with an emphasis on their application in visible light communications. INDEX TERMS Constrained sequence codes, variable-length codes, capacity-approaching codes, multi-state codes, state-independent decoding, visible light communication.