お気の毒に
おきのどくに · okinodokuni · JLPT N2 · noun
I'm sorry to hear that…
気の毒 = spirit + poison: something that poisons your spirit
お is polite, 気 means spirit or feelings, and 毒 means poison. 気の毒 is a situation that poisons someone's spirit, so お気の毒に says your news would hurt anyone's spirit. Use it for someone else's misfortune, not to apologise for your own mistake.
毒 — grass 屮 on top + 母 (mother/below)
Originally an associative compound showing a toxic plant (the 屮/生 element on top) over 毋, suggesting something harmful that must be forbidden. The early meaning was 'poisonous herb,' which broadened to 'poison,' 'toxic,' and figuratively 'cruel' or 'malicious.' The modern form keeps this top-plant + bottom-warning structure.