In the case of a partial defeat, the court fixes the court costs that each party bears at its own discretion; provided, however, that depending on the circumstances, the court may have either party bear all court costs.
一部敗訴の場合における各当事者の訴訟費用の負担は、裁判所が、その裁量で定める。ただし、事情により、当事者の一方に訴訟費用の全部を負担させることができる。
Read this with the articles around it