What is the origin of makai?

Makai “toward the sea” is a loanword from Hawaiian, in which it is equivalent to ma, a particle indicating direction, and kai “ocean, sea.” The opposite of makai is mauka, comprising the particle ma and the noun uka “inland.” Because Hawaiian is a member of the expansive Austronesian language family, kai has cognates in languages spoken throughout the Pacific and Indian Oceans. Although the k and t sounds are allophonic in Hawaiian, meaning that they are variations of the same sound that only appear in certain contexts, the Hawaiian alphabet does not have the letter t and instead uses k regardless of a word’s pronunciation in a given dialect. This alternation between k, which is pronounced in the rear of the mouth, and t, which is pronounced near the teeth, is not as unusual as one might think; after all, in English, French, and Spanish alike, the letter c is pronounced either as k or s depending on the context. Makai was first recorded in English in the late 19th century.