/* ============================================================
   DART's — 多言語表示のレイアウト調整
   body に付く lang-xx / is-translated クラス(inc/i18n.php)で切り分ける。
   日本語(既定)には一切影響させない。
   ============================================================ */

/* ---------- 言語切替メニュー ----------
   項目を <button> から <a>(実リンク)へ変えたぶんの補正。 */
a.lang-menu__item {
  text-decoration: none;
  box-sizing: border-box;
}
a.lang-menu__item:hover,
a.lang-menu__item:focus-visible {
  text-decoration: none;
  color: var(--c-primary);
}
/* 14言語ぶん並ぶので、画面が低いときはメニュー内でスクロールさせる */
.lang-menu {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---------- グローバルナビの文字数増加 ----------
   DE / FR / ES / PT / VI などは日本語比 1.5〜2倍になる。
   ドロワーに切り替わる 1180px までの間で詰めて折り返しを防ぐ。 */
@media (min-width: 1181px) and (max-width: 1480px) {
  body.is-translated .gnav { gap: 12px; }
  body.is-translated .gnav__link { font-size: 12px; }
  body.is-translated .btn-wallet { padding-left: 14px; padding-right: 14px; }
  body.is-translated .btn-wallet__brand { display: none; }
}

/* ---------- ボタン・チップ ----------
   固定幅は使われていないが、長い訳語で高さが崩れないよう折り返しを許す。 */
body.is-translated .btn,
body.is-translated .btn-pill,
body.is-translated .filter-btn,
body.is-translated .sort-btn {
  height: auto;
  min-height: 56px;
  padding-top: 10px;
  padding-bottom: 10px;
  text-align: center;
  white-space: normal;
}
body.is-translated .filter-btn,
body.is-translated .sort-btn {
  min-height: 0;
}
body.is-translated .chip,
body.is-translated .cat-pill {
  white-space: normal;
  height: auto;
  line-height: 1.35;
}

/* ---------- 見出し・カードタイトル ----------
   訳文が伸びてもカードの高さが揃うように行数を制限する。 */
body.is-translated .news-card__title,
body.is-translated .news-h-card__title,
body.is-translated .event-card__title,
body.is-translated .wp-press__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
body.is-translated .hero__title,
body.is-translated .sec-title,
body.is-translated .mission__title {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* ---------- 書字系ごとの行間 ----------
   タイ語は声調記号、デーヴァナーガリー(ヒンディー語)はマートラーのぶん
   字形が縦に大きいので、既定の行間では上下が詰まって見える。 */
body.lang-th,
body.lang-hi {
  line-height: 1.9;
}
body.lang-th .hero__title,
body.lang-hi .hero__title,
body.lang-th .sec-title,
body.lang-hi .sec-title,
body.lang-th .page-hero__title,
body.lang-hi .page-hero__title {
  line-height: 1.5;
}
body.lang-th .btn,
body.lang-hi .btn,
body.lang-th .chip,
body.lang-hi .chip {
  line-height: 1.6;
}

/* ---------- ラテン系言語の字間 ----------
   日本語向けに広げてある letter-spacing はラテン文字では間延びして見える。 */
body.is-translated:not(.lang-zh-hans):not(.lang-zh-hant):not(.lang-ko):not(.lang-th):not(.lang-hi) .btn,
body.is-translated:not(.lang-zh-hans):not(.lang-zh-hant):not(.lang-ko):not(.lang-th):not(.lang-hi) .sec-title {
  letter-spacing: .01em;
}
