/* 外国語版（/en/ /th/ /vi/ /zh-cn/ /zh-tw/ /ko/）だけが読む追加の CSS。日本語版は読まない。
   site.css の後に読み、言語ごとの書体・行間と、言語切替のメニューを足す。 */

/* ---- 書体 ---- */
:lang(en) body, :lang(vi) body {
    font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.7;
}
:lang(th) body {
    font-family: "Noto Sans Thai", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.85;   /* 上下の記号が重なるので日本語より少し広く */
}
:lang(vi) body { line-height: 1.8; }   /* 声調記号が重なるので英語より広く */
/* 中国語は Web フォントを読まない（本土で Google Fonts が読めないため）。端末の字に任せ、
   日本語の字形が先に当たらないよう、日本語の書体を並べない */
:lang(zh-CN) body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
    line-height: 1.8;
}
:lang(zh-TW) body {
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Source Han Sans TC", system-ui, sans-serif;
    line-height: 1.8;
}
/* 韓国語も端末の字に任せる。日本語の書体を先に並べるとハングルの字形が合わない。
   ハングルは語（分かち書きの単位）の途中で折らないのが普通なので keep-all にし、入りきらない語だけ折る */
:lang(ko) body {
    font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Source Han Sans KR", system-ui, sans-serif;
    line-height: 1.8;
    word-break: keep-all; overflow-wrap: break-word;
}

/* 英語は単語の途中で折らない。長い単語（型番・URL）だけ折る */
/* anywhere だと表の列が「語より狭く」縮んで、普通の語まで途中で折れる（B/ánh mì、Com/pression）。
   break-word は、行に入りきらない語だけを折る（2026-11-24 監査） */
:lang(en) body, :lang(vi) body { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { letter-spacing: -.005em; }

/* ---- 言語切替（ヘッダー右端の小さなメニュー） ---- */
.lang-switch { position: relative; flex: none; font-size: .85rem; }
.lang-switch summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: .35rem;
    padding: .3rem .6rem; border: 1px solid var(--color-line); border-radius: 999px;
    color: var(--color-muted); background: var(--color-surface, #fff); min-height: 24px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { color: var(--color-text); border-color: var(--color-muted); }
.lang-switch ul {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; margin: 0; padding: .35rem 0;
    list-style: none; min-width: 10rem; background: var(--color-surface, #fff);
    border: 1px solid var(--color-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.lang-switch li a { display: block; padding: .45rem .9rem; text-decoration: none; color: var(--color-text); }
.lang-switch li a:hover { background: #f4f6f5; }
.lang-switch li a[aria-current] { color: var(--color-primary); font-weight: 700; }

/* 1200px 未満は地球のアイコンだけにする。言語名まで出すと、日本語版のナビが 1 段に収まらなくなる */
@media (max-width: 1199px) {
    .lang-switch summary span { display: none; }
    .lang-switch summary { padding: .35rem; }
}
@media (max-width: 720px) {
    /* ナビとのあいだは詰める（ナビの右端はぼかしで区切られる）。ナビに使える幅を少しでも残す */
    .site-header .lang-switch { margin-left: -.4rem; }
}

/* 英語などはナビの語が長く、PC 幅でも 2 段に落ちる。ロゴ横の副題を外し、間隔を詰めて 1 段に収める */
:lang(en) .site-brand small, :lang(vi) .site-brand small { display: none; }
@media (min-width: 721px) {
    :lang(en) .site-nav, :lang(vi) .site-nav { flex-wrap: nowrap; column-gap: .8rem; font-size: .84rem; white-space: nowrap; }
}
@media (min-width: 721px) and (max-width: 1179px) {
    /* 中くらいの幅は 1 段に収まらない。横スクロールにすると右端の「相談」ボタンが隠れるので、2 段に折り返す */
    :lang(en) .site-nav, :lang(vi) .site-nav { flex-wrap: wrap; row-gap: .3rem; }
}

/* 行き先が日本語のページ・サイトであることを示す小さな印（リンクの末尾） */
.lang-badge {
    display: inline-block; margin-left: .35em; padding: 0 .4em; vertical-align: .08em;
    font-size: .68em; font-weight: 500; line-height: 1.6; letter-spacing: .02em;
    color: var(--color-muted); border: 1px solid var(--color-line); border-radius: 4px; white-space: nowrap;
    text-decoration: none;
}
.btn .lang-badge { color: inherit; border-color: currentColor; opacity: .8; }

/* 見出しの最後の行に 1〜2 字だけ落ちるのを防ぐ（中国語・タイ語は語の切れ目が少なく起きやすい） */
:lang(en) :is(h1, h2, h3), :lang(th) :is(h1, h2, h3), :lang(vi) :is(h1, h2, h3),
:lang(zh-CN) :is(h1, h2, h3), :lang(zh-TW) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { text-wrap: balance; }

/* タイ語は字間を空けると上下に付く記号の位置が崩れるので、見出しの装飾的な字間（eyebrow など）を外す */
:lang(th) body, :lang(th) body * { letter-spacing: normal !important; }

/* タイ語もナビの語が長い。ロゴ横の副題を外して、PC 幅で 1 段に収まる余地を作る */
:lang(th) .site-brand small { display: none; }
@media (min-width: 1180px) {
    :lang(th) .site-nav { column-gap: .8rem; font-size: .84rem; }
}

/* =========================================================
   一般向け（ToC）の外国語版（計画 06 C-21）
   ========================================================= */
/* 本文は丸ゴシック。上の企業向けの書体の指定より強く当てる */
:lang(en) body[data-i18n-layer="toc"], :lang(vi) body[data-i18n-layer="toc"] {
    font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:lang(th) body[data-i18n-layer="toc"] {
    font-family: "M PLUS Rounded 1c", "Noto Sans Thai", system-ui, sans-serif;
}
body[data-i18n-layer="toc"] { --toc-font: "M PLUS Rounded 1c", system-ui, sans-serif; }
:lang(th) body[data-i18n-layer="toc"] { --toc-font: "M PLUS Rounded 1c", "Noto Sans Thai", system-ui, sans-serif; }
:lang(zh-CN) body[data-i18n-layer="toc"] { --toc-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-TW) body[data-i18n-layer="toc"] { --toc-font: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
:lang(ko) body[data-i18n-layer="toc"] { --toc-font: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
/* 日本語版の見出しの飾り書体（Kaisei Decol・Zen Kaku Gothic New・DotGothic16）は日本語の字だけを絞って
   読み込んでいるので、外国語では当たらず明朝などに落ちる。丸ゴシックにそろえる */
body[data-i18n-layer="toc"] :is(.pt-grid, .pt-dots, .pt-glow, .pt-stripe) .ttl,
body[data-i18n-layer="toc"] .fc :is(h2, h3, h4, h5),
body[data-i18n-layer="toc"] .ka-word {
    font-family: var(--toc-font);
}
/* 日本語のまま見せる語（オノマトペ）。外国語の書体には日本語の字が無いので、日本語の書体を当てる */
html:not([lang="ja"]) body [lang="ja"] {
    font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}
body[data-i18n-layer="toc"] .yomi [lang="ja"] { font-weight: 700; }
/* 本文に添えた日本語の語（オノマトペなど）は短いので、語の途中で折り返さない */
html:not([lang="ja"]) span[lang="ja"] { white-space: nowrap; }
/* 英語版は図鑑カードの名前が英語なので、日本語版の飾りの英字（BISCUIT など）が同じ語の繰り返しになる。外す */
:lang(en) .ttl > small { display: none; }

/* 一般向けのヘッダーの言語切替（一般向けは独自の色の変数を使う） */
.toc-header .lang-switch summary {
    border: 2px solid var(--c-ink); border-radius: var(--r-sm); color: var(--c-ink);
    background: var(--c-surface); font-weight: 900; padding: 5px 9px; min-height: 0;
}
.toc-header .lang-switch summary:hover, .toc-header .lang-switch[open] summary { background: var(--c-paper); border-color: var(--c-ink); }
.toc-header .lang-switch ul { border: 2px solid var(--c-ink); border-radius: var(--r-sm); background: var(--c-surface); box-shadow: 3px 3px 0 var(--c-ink); }
.toc-header .lang-switch li a { color: var(--c-ink); font-weight: 700; }
.toc-header .lang-switch li a:hover { background: var(--c-paper); }
.toc-header .lang-switch li a[aria-current] { color: var(--c-red); }
@media (max-width: 1199px) {
    .toc-header .lang-switch summary { padding: 5px; }
}
@media (max-width: 819px) {
    .toc-header .lang-switch { margin-left: 0; }
}
/* ロゴは縮ませない。ロゴ横の副題（研究所の名前）は折り返さない（縮むと 1 字ずつ縦に並んでしまう） */
body[data-i18n-layer="toc"] .toc-brand { flex: none; }
body[data-i18n-layer="toc"] .toc-brand small { white-space: nowrap; }
/* ベトナム語・タイ語は研究所の名前もナビも長いので、PC 幅でも副題は畳む（名前はページの中と足元に出る） */
:lang(vi) body[data-i18n-layer="toc"] .toc-brand small, :lang(th) body[data-i18n-layer="toc"] .toc-brand small { display: none; }
/* 外国語のナビは語が長い。PC 幅で 1 段に収まるよう、ロゴ横の副題を畳んで間を詰める */
@media (min-width: 820px) {
    body[data-i18n-layer="toc"] .toc-nav { flex-wrap: nowrap; }
    body[data-i18n-layer="toc"] .toc-nav a { white-space: nowrap; padding: 7px 9px; }
}
@media (min-width: 820px) and (max-width: 1179px) {
    body[data-i18n-layer="toc"] .toc-brand small { display: none; }
    body[data-i18n-layer="toc"] .toc-nav a { font-size: .8rem; padding: 6px 7px; }
    /* それでも収まらない言語（ベトナム語など）は、スマホ幅と同じく横に流す。言語切替は外に出して隠さない */
    body[data-i18n-layer="toc"] .toc-nav {
        min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none;
    }
    body[data-i18n-layer="toc"] .toc-nav::-webkit-scrollbar { display: none; }
    body[data-i18n-layer="toc"] .toc-nav a { flex: 0 0 auto; }
    /* 右寄せは auto の余白で（あふれたときは 0 になり、先頭まで横に戻れる） */
    body[data-i18n-layer="toc"] .toc-nav > a:first-child { margin-left: auto; }
}

/* ---- 日本語版で、ブラウザの言語が日本語以外の人に出す帯（lang-suggest.js。計画 06 N-21） ---- */
.lang-suggest {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
    display: flex; align-items: center; gap: .4rem 1rem; flex-wrap: wrap;
    width: min(560px, calc(100% - 32px)); box-sizing: border-box; padding: .7rem 3.2rem .7rem 1.1rem;
    background: var(--c-surface, var(--color-surface, #fff)); color: var(--c-ink, var(--color-text, #222));
    border: 2px solid var(--c-ink, var(--color-text, #222)); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    font-family: "Noto Sans", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .92rem; line-height: 1.5;
}
.lang-suggest p { margin: 0; flex: 1 1 14rem; }
.lang-suggest a { font-weight: 700; color: inherit; white-space: nowrap; }
.lang-suggest-close {
    position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border: 0; background: transparent; color: inherit;
    font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 999px;
}
.lang-suggest-close:hover { background: rgba(0,0,0,.06); }
/* ベトナム語はナビが最も長い。1440px 未満は言語切替を地球のアイコンだけにして 1 段に収める */
@media (max-width: 1439px) {
    :lang(vi) .toc-header .lang-switch summary span { display: none; }
    :lang(vi) .toc-header .lang-switch summary { padding: 5px; }
}
/* かるたの取った札の一覧（JS で組む小さな字）も、日本語の語の途中では折らない */
html:not([lang="ja"]) .ka-got-list small { word-break: keep-all; }
/* ベトナム語の企業向けは、一般向けへのリンクを戻してナビがさらに長くなった。1440px 未満は 2 段に折り返し、
   言語切替は地球のアイコンだけにする（横にあふれると右端の相談ボタンと言語切替が隠れる） */
@media (min-width: 721px) and (max-width: 1439px) {
    :lang(vi) .site-nav { flex-wrap: wrap; row-gap: .3rem; }
    :lang(vi) .site-header .lang-switch summary span { display: none; }
    :lang(vi) .site-header .lang-switch summary { padding: .35rem; }
}

/* ---- 2026-11-24 全コンテンツ監査での追加 ---- */
/* 受付番号: 和文は全角のコロンが空きを持つが、欧文のコロンは詰まるので、番号の前を少し空ける */
html:not([lang="ja"]) .trace-id code { margin-left: .35em; }
/* 等幅の飾り文字（SINCE 1969 など）: 中国語のページでは端末の既定の等幅（宋体）に落ちて細い明朝になるので、
   欧文の等幅を先に、漢字はページの書体で受ける */
:lang(zh-CN) .hero-thread .kicker, :lang(zh-CN) .hero-thread .rail .meta, :lang(zh-CN) .hero-thread .card .cap,
:lang(zh-CN) .hero-thread .perch .tag, :lang(zh-CN) .hero-thread .footline, :lang(zh-CN) .ro-val {
    font-family: Consolas, "SF Mono", Menlo, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", monospace;
}
:lang(zh-TW) .hero-thread .kicker, :lang(zh-TW) .hero-thread .rail .meta, :lang(zh-TW) .hero-thread .card .cap,
:lang(zh-TW) .hero-thread .perch .tag, :lang(zh-TW) .hero-thread .footline, :lang(zh-TW) .ro-val {
    font-family: Consolas, "SF Mono", Menlo, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", monospace;
}
:lang(ko) .hero-thread .kicker, :lang(ko) .hero-thread .rail .meta, :lang(ko) .hero-thread .card .cap,
:lang(ko) .hero-thread .perch .tag, :lang(ko) .hero-thread .footline, :lang(ko) .ro-val {
    font-family: Consolas, "SF Mono", Menlo, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", monospace;
}
/* かるたのことばの札: 外国語版では、ことばの下に意味を小さく添える（game-onomatopoeia.js） */
.ka-word.has-gloss { display: flex; flex-direction: column; justify-content: center; gap: .35em; min-width: 7.2em; }
.ka-word .ka-w { display: block; white-space: nowrap; }
.ka-word .ka-gloss { display: block; font-size: .68em; font-weight: 500; line-height: 1.25; letter-spacing: .02em; opacity: .78; margin: .1em auto 0; max-width: 13em; white-space: normal; }
/* タイ語の見出し: 日本語向けの詰めた行間（1.16〜1.32）だと、2 行になったとき上下の母音・声調記号がぶつかる */
:lang(th) .hero-thread h1 { line-height: 1.42; }
:lang(th) .prose h1, :lang(th) .prose h2, :lang(th) .band h2, :lang(th) .bz-hero h1, :lang(th) .bz-hero h1 .hl-text,
:lang(th) .bz-title, :lang(th) .fc-logo, :lang(th) .sec-h { line-height: 1.5; }
/* 図鑑のタイルの品名: 日本語は短いので 1 行固定だが、外国語の長い名前（Packaged cooked rice など）は
   写真の上へはみ出して切れる。折り返して 2 行に収める */
html:not([lang="ja"]) .tile .ttl { white-space: normal; overflow-wrap: break-word; right: 36%; font-size: 1.16rem; line-height: 1.18; }
/* 等幅の飾り文字は、端末の既定の等幅まかせにしない（言語によって明朝や字の欠けた書体に落ちる） */
:lang(en) .hero-thread .kicker, :lang(en) .hero-thread .rail .meta, :lang(en) .hero-thread .card .cap,
:lang(en) .hero-thread .perch .tag, :lang(en) .hero-thread .footline, :lang(en) .ro-val,
:lang(vi) .hero-thread .kicker, :lang(vi) .hero-thread .rail .meta, :lang(vi) .hero-thread .card .cap,
:lang(vi) .hero-thread .perch .tag, :lang(vi) .hero-thread .footline, :lang(vi) .ro-val {
    font-family: Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", "Noto Sans Mono", monospace;
}
:lang(th) .hero-thread .kicker, :lang(th) .hero-thread .rail .meta, :lang(th) .hero-thread .card .cap,
:lang(th) .hero-thread .perch .tag, :lang(th) .hero-thread .footline, :lang(th) .ro-val {
    font-family: Consolas, "SF Mono", Menlo, "Noto Sans Thai", "Leelawadee UI", Thonburi, monospace;
}

/* ---- ヘッダーの横スクロールのナビ: 続きがある側の端だけをぼかす（nav-scroll.js が --fade-l / --fade-r を付ける） ---- */
header.toc-header .nav-scrolls, header.site-header .nav-scrolls {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 28px)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 28px)), transparent 100%);
}

/* ---- 日本語の食感のことば（オノマトペ）を「紹介」として見せる（2026-11-27）----
   かなの語だけが置いてあっても、日本語を知らない人には何のことか分からない。
   帯には札とローマ字を付け、図鑑の品名の横には「日本語ではこう呼びます」の札と意味を出す。 */
.marquee.mq-labeled { display: flex; align-items: stretch; padding: 0; }
.marquee.mq-labeled .mq-label {
    flex: none; display: flex; align-items: center; padding: 0 14px; z-index: 1;
    background: var(--c-yellow); color: var(--c-ink); text-decoration: none;
    font-size: 11px; font-weight: 900; letter-spacing: .04em; white-space: nowrap;
}
.marquee.mq-labeled .mq-label::after { content: "→"; margin-left: .45em; }
.marquee.mq-labeled .mq-label:hover { text-decoration: underline; }
.marquee.mq-labeled .mq-track { display: block; flex: 1; min-width: 0; overflow: hidden; padding: 8px 0; animation: none; }
.marquee.mq-labeled .mq-track > div { display: inline-block; animation: mq-run 44s linear infinite; }
.marquee.mq-labeled .mq-track span { padding: 0 11px; }
.marquee.mq-labeled .mq-track span span { padding: 0; }
.marquee.mq-labeled .mq-track i { font-style: normal; font-weight: 700; font-size: .82em; letter-spacing: .04em; opacity: .72; margin: 0 .5em 0 .15em; }
@media (prefers-reduced-motion: reduce) { .marquee.mq-labeled .mq-track > div { animation: none; } }
@media (max-width: 560px) { .marquee.mq-labeled .mq-label { font-size: 10px; padding: 0 9px; letter-spacing: 0; } }

.jw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .7rem; }
.jw-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.jw-w { font-weight: 900; letter-spacing: .04em; white-space: nowrap; }
.jw-r { font-style: normal; font-weight: 700; font-size: .86em; opacity: .8; white-space: nowrap; }
.jw-g { font-weight: 700; }
.jw-g::before { content: "— "; opacity: .6; }

/* 図鑑の品名の横: 日本語版は黒い丸バッジ（.onm）。外国語版は札つきの帯にする */
.zukan-head .jw-strip {
    flex: 1 1 22rem; min-width: 0; background: var(--c-ink); color: #fff;
    border-radius: 14px; padding: .55rem .95rem .6rem; font-size: .84rem; line-height: 1.5;
}
.zukan-head .jw-strip .jw-l { margin: 0 0 .25rem; font-size: .7rem; font-weight: 900; letter-spacing: .06em; color: var(--c-yellow); }
.zukan-head .jw-strip .jw-list { flex-direction: column; gap: .12rem; }
.zukan-head .jw-strip .jw-more { margin: .35rem 0 0; font-size: .72rem; font-weight: 700; }
.zukan-head .jw-strip .jw-more a { color: #fff; opacity: .85; }

/* トップの導入と、用語集の一覧 */
.jw-intro .jw-cards { gap: .7rem; }
.jw-intro .jw-cards li {
    flex: 1 1 15rem; background: var(--c-surface); border: var(--bd); border-radius: var(--r);
    box-shadow: var(--sh); padding: .7rem .95rem; font-size: .92rem;
}
.jw-intro .jw-cards .jw-w { font-size: 1.25rem; }
.jw-intro .jw-cards .jw-g { flex-basis: 100%; }
.jw-intro .jw-cards .jw-g::before { content: none; }
.jw-sec { margin-top: 2.6rem; scroll-margin-top: 5rem; }
.jw-sec .jw-note { max-width: 46em; font-size: .95rem; }
.jw-table { width: 100%; border-collapse: collapse; background: var(--c-surface); border: var(--bd); border-radius: var(--r); overflow: hidden; font-size: .92rem; }
.jw-table th, .jw-table td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid rgba(0, 0, 0, .12); vertical-align: baseline; }
.jw-table thead th { font-size: .76rem; letter-spacing: .04em; background: var(--c-ink); color: var(--c-paper); }
.jw-table tbody th { font-size: 1.05rem; white-space: nowrap; }
.jw-table tbody tr:last-child th, .jw-table tbody tr:last-child td { border-bottom: 0; }
.jw-table .jw-r { font-size: .9em; }
.jw-sec .tbl-wrap { overflow-x: auto; margin: 1rem 0; }

/* ---- 画面レビュー（2026-11-28、6 言語 × 一般向け・企業向け）で出た崩れの直し。外国語版だけに効かせる ---- */
/* 語・単位・ローマ字を行の途中で切らない（build_i18n.py の nobreak が付ける印） */
.nw { white-space: nowrap; }

/* 表: 見出しのセルを折り返す。日本語版は見出しを 1 行に保つ指定で、訳語が長いと表が枠からはみ出していた。
   数値の列は折らない。行見出しは細くなりすぎないように */
html:not([lang="ja"]) th,
html:not([lang="ja"]) .page .table-wrap tbody th,
html:not([lang="ja"]) .table-wrap th,
html:not([lang="ja"]) .table-wrap td { white-space: normal; }
html:not([lang="ja"]) .table-wrap .num,
html:not([lang="ja"]) .table-wrap td.n,
html:not([lang="ja"]) .table-wrap th.n { white-space: nowrap; }
html:not([lang="ja"]) .tbl-scroll tbody th,
html:not([lang="ja"]) .table-wrap tbody th { min-width: 6.5em; }
html:not([lang="ja"]) :is(.tbl-scroll, .table-wrap) caption { white-space: normal; }
/* 横に流せる表は、続きのある端をぼかして知らせる（nav-scroll.js が --fade-l / --fade-r を入れる） */
html:not([lang="ja"]) .x-scrolls {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
}

/* 研究ノートの末尾の帯: 長い見出しがページの幅を押し広げ、本文が左にずれていた */
html:not([lang="ja"]) .page > .prose ~ .cta-band { width: 0; min-width: 100%; box-sizing: border-box; }
/* 図の番号（Fig. 1）の後ろの空き: 中国語・韓国語は後ろに句読点・助詞が直接つくので空けない */
:lang(zh-CN) .lbl-fig, :lang(zh-TW) .lbl-fig, :lang(ko) .lbl-fig { margin-right: 0; }

/* 小さすぎた字 */
.lang-badge { font-size: .78em; }
.ka-word .ka-gloss { font-size: .8em; opacity: .92; }
@media (max-width: 560px) { .marquee.mq-labeled .mq-label { font-size: 11px; } }

/* 図鑑の品名の横の札: PC で横いっぱいに伸びて、空の黒い帯になっていた */
.zukan-head .jw-strip { flex: 0 1 auto; max-width: 36rem; }
/* 用語集の 14 語の表: スマホでは 1 語ずつ縦に積む（表のままだと右端が切れ、意味が 1 語ずつ折れていた） */
@media (max-width: 640px) {
    .jw-table thead { display: none; }
    .jw-table, .jw-table tbody, .jw-table tr, .jw-table th, .jw-table td { display: block; }
    .jw-table tr { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .1rem .6rem; padding: .6rem .85rem; border-bottom: 1px solid rgba(0, 0, 0, .12); }
    .jw-table tbody tr:last-child { border-bottom: 0; }
    .jw-table th, .jw-table td { border: 0; padding: 0; }
    .jw-table td:nth-of-type(2), .jw-table td:nth-of-type(3) { grid-column: 1 / -1; }
    .jw-table td:nth-of-type(3) { font-size: .86em; }
}
/* 用語集の見出しに添えた日本語の用語: 何の字か分かるように「日本語」と名乗らせる */
html:not([lang="ja"]) .glossary dt .yomi::before { font-weight: 500; opacity: .85; }
:lang(en) .glossary dt .yomi::before { content: "Japanese: "; }
:lang(th) .glossary dt .yomi::before { content: "ภาษาญี่ปุ่น: "; }
:lang(vi) .glossary dt .yomi::before { content: "tiếng Nhật: "; }
:lang(zh-CN) .glossary dt .yomi::before { content: "日语："; }
:lang(zh-TW) .glossary dt .yomi::before { content: "日語："; }
:lang(ko) .glossary dt .yomi::before { content: "일본어: "; }

/* 言語メニューと日本語版の案内帯の「Tiếng Việt」: 中国語・韓国語・丸ゴシックの書体にはベトナム語の字が無く、
   声調記号が字から離れて描かれていた。ベトナム語の字を持つ書体を先に当てる */
.lang-switch a[lang="vi"] { font-family: "Segoe UI", Arial, "Noto Sans", "Helvetica Neue", sans-serif; }
.lang-suggest { font-family: "Noto Sans", "Segoe UI", Arial, "Noto Sans Thai", system-ui, -apple-system, sans-serif; }
