/* ===== 多言語（/en・/vi）=====
   言語スイッチャは全言語のヘッダーに出る。:lang() のフォント指定は英語版・ベトナム語版だけに効く。
   ベトナム語の声調記号（ạ ế ữ など）は Noto Sans JP に無いので、Vietnamese を含む Noto Sans / Noto Serif を先に置く
   （フォントは i18n:build が他言語版のレイアウトにだけ読み込む）。 */

:root:lang(en),
:root:lang(vi) {
  --font-sans: "Noto Sans", "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", sans-serif;
  --font-serif: "Noto Serif", Georgia, "Noto Serif JP", serif;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  margin: 0 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  white-space: nowrap;
}

.lang-switcher a {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-light, #666);
  text-decoration: none;
  line-height: 1.4;
}

.lang-switcher a:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.04);
}

.lang-switcher a.is-current {
  color: var(--primary);
  font-weight: 600;
}

.lang-switcher-code {
  display: none;
}

/* 日本語版のページはベトナム語用のフォントを読み込まない。Arial などが無い環境で Noto Sans JP に落ちると
   「ế」が合成表示で崩れるので、「Tiếng Việt」だけは日本語フォントを外し、システムの欧文フォントで出す */
:root:lang(ja) .lang-switcher a:lang(vi) {
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 900px) {
  .lang-switcher {
    margin-left: auto;
    margin-right: 8px;
  }
}

/* 狭い画面: ハンバーガーが押し出されないよう略号にする（言語名は読み上げ用に残す） */
@media (max-width: 600px) {
  .lang-switcher {
    gap: 2px;
    font-size: 0.7rem;
  }

  .lang-switcher a {
    padding: 4px 5px;
  }

  .lang-switcher-code {
    display: inline;
  }

  .lang-switcher-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  header.site-header .logo {
    font-size: 0.85rem;
  }

  .lang-switcher a {
    padding: 4px 3px;
  }
}

/* 他言語版の本文冒頭の注記（AI 翻訳である旨。/privacy は日本語版が正本である旨もあわせて） */
.i18n-source-notice {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent, #c9a96e);
  background: #f7f5f0;
  font-size: 0.85rem;
  line-height: 1.7;
}

.i18n-source-notice a {
  color: var(--primary);
}

/* 記事: 本文の段（.article-section > *）と同じく中央寄せ */
.article-section > .i18n-source-notice {
  margin: 0 auto 24px;
}

/* サービスページ: h1 とリード文のあいだ（.adv-lead は margin: 0） */
.service-detail .adv-intro .i18n-source-notice {
  margin: 20px 0;
}
