The two kanji that make up zanshin are ? , which can mean to remain, remainder, leftover, or balance, and ?, which can mean heart, mind, or spirit. Some of the original meanings of the word included regret and lingering affection. There is a great overview of its various meanings on this page at the Encyclopedia Japan. (It’s about two thirds of the way down the page.)
I first learned the martial art definition of zanshin which refers to keeping one’s awareness active even after a technique is completed–remaining mind/spirit. But it has other context, too. From the link above:
Zan-shin in sado (tea ceremony) is expressed in SEN no Rikyu’s doka.
“Naninitemo okitsukekaheru tebanarewa koishikihitoni wakarurutoshire”
(When withdrawing hands from tea utensils, give its movement the yoin [lingering memory/aftertaste] as when parting from someone you love.)
Also, Naosuke II teaches that one should not talk loudly, slam doors, or hurry into the house and quickly clear up, as soon as the visitor leaves. The host should see off the guest until the leaving guest is no longer visible, even if the host cannot actually see the guest. Later, the host should silently return to the tea room alone and make tea, and ponder the thought that the same meeting as today will never occur again (called “Ichigo Ichie” (treasuring every meeting, which will never recur)). This manner is the expression of the host’s lingering farewell, or “yojo-zan-shin”, as taught by II.
Rather inept kanji calligraphy by yours truly.