/* 文字が箱からはみ出さないための共通の指定（2026-11-05）
   きっかけ: ベトナム語トップの「Tất cả tin tức (English)」が、幅と高さが固定のボタン（14.4rem × 3.6rem）からはみ出して切れていた。
   - ボタンの枠は、今の幅を最小として、文字が長いときだけ横に伸ばす（min-width:max-content）。短い日本語のボタンは見た目が変わらない。
   - 中の文字には左右の余白を取り、伸びたときに枠の端に付かないようにする。
   - スマホ幅では画面からはみ出さないよう、伸びるのは画面幅まで。それでも入らなければ2行に折り返して縦に伸ばす。
   - 全ページの最後に読む（_parts/head.html・en/head.html・vi/head.html）。確認は 本番移行/tests/text_clip_check.py。 */

html .bl_topPageInformationButton,
html .bl_articleCardButtonFrame,
html .bl_servicePageOtherServiceButtonFrame,
html .bl_consultingPageOtherServiceButtonFrame,
html .bl_recyclingPageOtherServiceButtonFrame,
html .bl_artificialTurfPageOtherServiceButtonFrame,
html .bl_servicePageSection_contactFrame,
html .bl_servicePageSection_contactFrame__first,
html .bl_servicePageSection_contactFrame__recycling,
html .bl_servicePageSection_contactFrame_noBottom,
html .bl_servicePageSection_downloadFrame,
html .bl_contactPageSection_contactFrame__first,
html .bl_contactPageSection_downloadFrame,
html .bl_downloadForm_buttonFrame,
html .bl_downloadForm_buttonFrame__manualDownload,
html .bl_downloadForm_buttonFrame__backToForm,
html .bl_pageCaseReturnSection_button,
html .bl_pageInformationDetailSection_button,
html .bl_publicSurveyResultsPageSection_fullScreenButton,
html .bl_publicSurveyResultsPage_sponsorship_moreButton,
html .bl_recruitPage_jobName_readMoreButton,
html .bl_leaksButton{min-width:max-content}

html .bl_topPageInformationButton > :is(a,button),
html .bl_articleCardButtonFrame > :is(a,button),
html .bl_servicePageOtherServiceButtonFrame > :is(a,button),
html .bl_consultingPageOtherServiceButtonFrame > :is(a,button),
html .bl_recyclingPageOtherServiceButtonFrame > :is(a,button),
html .bl_artificialTurfPageOtherServiceButtonFrame > :is(a,button),
html .bl_servicePageSection_contactFrame > :is(a,button),
html .bl_servicePageSection_contactFrame__first > :is(a,button),
html .bl_servicePageSection_contactFrame__recycling > :is(a,button),
html .bl_servicePageSection_contactFrame_noBottom > :is(a,button),
html .bl_servicePageSection_downloadFrame > :is(a,button),
html .bl_contactPageSection_contactFrame__first > :is(a,button),
html .bl_contactPageSection_downloadFrame > :is(a,button),
html .bl_downloadForm_buttonFrame > :is(a,button),
html .bl_downloadForm_buttonFrame__manualDownload > :is(a,button),
html .bl_downloadForm_buttonFrame__backToForm > :is(a,button),
html .bl_pageCaseReturnSection_button > :is(a,button),
html .bl_pageInformationDetailSection_button > :is(a,button),
html .bl_publicSurveyResultsPageSection_fullScreenButton > :is(a,button),
html .bl_publicSurveyResultsPage_sponsorship_moreButton > :is(a,button),
html .bl_recruitPage_jobName_readMoreButton > :is(a,button),
html .bl_leaksButton > :is(a,button){padding-left:2rem;padding-right:2rem;box-sizing:border-box;white-space:nowrap}

/* スマホ幅: 画面幅までしか伸ばさず、入らなければ折り返して縦に伸ばす（送信ボタン等の大きい枠 .bl_articleCardButtonFrame・資料DLは除く） */
@media screen and (max-width: 752px){
  html .bl_topPageInformationButton,
  html .bl_servicePageOtherServiceButtonFrame,
  html .bl_consultingPageOtherServiceButtonFrame,
  html .bl_recyclingPageOtherServiceButtonFrame,
  html .bl_artificialTurfPageOtherServiceButtonFrame,
  html .bl_downloadForm_buttonFrame__backToForm,
  html .bl_pageCaseReturnSection_button,
  html .bl_pageInformationDetailSection_button,
  html .bl_publicSurveyResultsPageSection_fullScreenButton,
  html .bl_publicSurveyResultsPage_sponsorship_moreButton,
  html .bl_recruitPage_jobName_readMoreButton{min-width:0;width:max-content;max-width:100%;min-height:3.6rem;height:auto}
  html .bl_topPageInformationButton > :is(a,button),
  html .bl_servicePageOtherServiceButtonFrame > :is(a,button),
  html .bl_consultingPageOtherServiceButtonFrame > :is(a,button),
  html .bl_recyclingPageOtherServiceButtonFrame > :is(a,button),
  html .bl_artificialTurfPageOtherServiceButtonFrame > :is(a,button),
  html .bl_downloadForm_buttonFrame__backToForm > :is(a,button),
  html .bl_pageCaseReturnSection_button > :is(a,button),
  html .bl_pageInformationDetailSection_button > :is(a,button),
  html .bl_publicSurveyResultsPageSection_fullScreenButton > :is(a,button),
  html .bl_publicSurveyResultsPage_sponsorship_moreButton > :is(a,button),
  html .bl_recruitPage_jobName_readMoreButton > :is(a,button){white-space:normal;min-height:3.6rem;min-width:14.4rem;padding-top:.4rem;padding-bottom:.4rem;line-height:1.5;text-align:center}
}

/* 数字の箱（サービス紹介の実績）: 英語・ベトナム語は単位が長く、768〜1150px の3列で箱の外へ出ていた（例: 600 million+ records）。入らないときだけ単位を次の行へ送る */
html:not([lang="ja"]) .bl_pirikaStats_num{white-space:normal !important;flex-wrap:wrap;justify-content:center}
html:not([lang="ja"]) .bl_pirikaStats_unit{white-space:normal !important}

/* ピリカの紹介（英語・ベトナム語）の流れ図の右の数字: 961px 以上は箱の高さを左の画像に合わせて固定していたため、単位の長い英語・ベトナム語では文字が箱から出た。
   日本語以外は高さを固定せず、中身に合わせて伸ばす */
@media screen and (min-width: 961px){
  html:not([lang="ja"]) .bl_pirikaFlow_result .bl_pirikaStats_list{position:static;grid-template-rows:none}
}

/* サービス紹介の冒頭の文（英語・ベトナム語）: 日本語は1文ごとに改行し、幅を80remに絞る作り。英語・ベトナム語は1文が長いので、
   1文ごとの改行だと「map.」だけが次の行に残り、幅の制限で右に大きな余白が出ていた（2026-11-05 小嶌さんの指摘）。
   日本語以外は文を続けて流し、幅は親（本文の列）に合わせる */
html:not([lang="ja"]) .bl_govLead_line,
html:not([lang="ja"]) .bl_tknIdealLead_text .bl_govLead_line,
html:not([lang="ja"]) .bl_cslLead_text .bl_govLead_line{display:inline}
html:not([lang="ja"]) .bl_tknIdealLead_text{max-width:none}

/* 「2014年〜」の英語・ベトナム語（Since 2014 / Từ năm 2014）: 単位を数字の前に置く */
.bl_pirikaStats_unit.bl_pirikaStats_unit__pre{margin:0 .6rem 0 0}

/* 事例の絞り込み（2026-11-05 小嶌さんの指摘）: 列の幅が 8em・20em に固定で、英語は「Customer type」が開閉の矢印に重なり、
   ベトナム語は「Loại khách hàng」や選択肢が2〜3行に折り返していた。列は文字に合わせて伸ばし（今の幅は最小として残す）、
   見出しの右には矢印の分の余白を取る */
@media screen and (min-width: 753px){
  html .ly_pageCaseControls{grid-template-columns:minmax(8em, max-content) minmax(20em, max-content)}
}
html .bl_pageCaseListBox_title{padding-right:calc(1.6rem + 1.2em)}

/* 事例の記事の上の「日付・タグ」の並び: 上下中央でそろえると、書体によって日付とタグの文字の基準線が 1px ずれた（英語の記事。2026-11-06 layout_check の align）。
   そこで基準線でそろえたが、今度は枠つきのタグが日付より 1px 低く見えた（英語の記事 22ページ。2026-11-09 design_audit A）。
   上下中央に戻すと、本番の layout_check で英語の文字の基準線が 1.5px ずれて不合格（2026-11-10）。2つの点検は見る所が違う（文字の基準線／枠の中心）。
   基準線でそろえたままタグを 0.5px 上げると、両方とも基準の内に入る（design_audit 日 −0.25px・英 +0.5px、layout_check 0.5px＜0.75px） */
html .bl_pageCaseDetailSection_header_props{align-items:baseline}
html .el_pageCaseDetailSection_tag{position:relative;top:-.5px}

/* 情報漏えいの窓口ページのボタン（スマホ幅。2026-11-09 design_audit E）: 幅 24rem・1行に固定で、ポルトガル語の長い文
   （Ir para o formulário de envio de informações）が枠と画面の右へ出て切れていた。ほかのボタンと同じく画面幅まで伸ばし、入らなければ折り返す */
@media screen and (max-width: 752px){
  html .bl_leaksButton{min-width:0;width:max-content;max-width:100%;height:auto;min-height:4.4rem}
  html .bl_leaksButton > :is(a,button){white-space:normal;min-height:4.4rem;padding-top:.6rem;padding-bottom:.6rem;line-height:1.5;text-align:center}
}

/* 調査結果ページの上のページ内リンク（753px 以上）: 高さ固定・1行の並びで、es・pt・fr は 768px で項目が画面の右へ出て、
   ページ全体が横にスクロールしていた（2026-11-07。text_clip_check の offscreen で発見）。入らないときだけ折り返し、高さは最小として残す。
   企業情報のページの上のページ内リンクも同じ作りで、ha・sw は 768px で項目どうしが重なり、最後の項目が画面の右へ出ていた（2026-11-08。layout_check の offscreen）ので同じ指定にする */
@media screen and (min-width: 753px){
  html .bl_companyPageAnchorLinkList,
  html .bl_publicSurveyResultsPageAnchorLinkList{flex-wrap:wrap;height:auto;min-height:6.8rem;row-gap:.8rem;padding-top:.8rem;padding-bottom:.8rem;box-sizing:border-box}
}

/* リサイクルのページの工程図の「選別不要」「ペレット化を省略」の白い箱（2026-11-08）: 高さ固定・幅は工程の列の幅（768px で 87px）で、
   ha・sw・ta・zh-hant の訳が箱から上下・左右に出ていた（layout_check の spill）。高さは今の値を最小として文字が多いときだけ縦に伸ばし、
   列より長い語は箱の中で折り返す（日本語は今のまま箱に収まるので見た目は変わらない） */
html .bl_rcyTech_skip{height:auto;min-height:6.4rem;overflow-wrap:anywhere}
html .bl_rcyTech_step.is_skip .bl_rcyTech_icon{height:auto;min-height:8.4rem}
@media screen and (max-width: 752px){
  html .bl_rcyTech_skip{min-height:5.2rem}
  html .bl_rcyTech_step.is_skip .bl_rcyTech_icon{min-height:6.4rem}
}

/* タカノメのページの報告書へのリンク（本文の後ろに続く1かたまり。2026-11-08）: 1行に固定で、タミル語の長い訳が 390px で画面の右へ 55px 出て切れていた
   （layout_check の clip）。1かたまりのまま行に入らなければ次の行へ送り（今と同じ）、それでも1行より長いときだけかたまりの中で折り返す。
   日本語等の短いリンクは見た目が変わらない */
html .bl_tknLeadLink{display:inline-block;max-width:calc(100% - 1rem);white-space:normal}

/* 会社ページのメンバー紹介のスライド: 768px 前後では文の列が約106pxと細く、ドイツ語・イタリア語・トルコ語・タミル語の長い語が箱からはみ出して切れていた（2026-11-08 本番の layout_check）。長い語は折り返す（ハイフンが使える言語はハイフン） */
.bl_commonPage_memberSlideItem_text_jobName,
.bl_commonPage_memberSlideItem_text_description{overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto}

/* ボタンの文字が枠の中で約1px上に寄っていた（Noto Sans JP は字の形が行の中で上寄り。2026-11-08 design_audit B）。
   上下の余白を 0・0.5・1px ずらして日英越・ヒンディー・アラビア・タイ・タミルの46ページで測り、ずれが一番小さい値を採用。
   「Back to News」（お知らせ詳細）だけは 0.5px では残ったので 1px。404 の .bl_ctaButton（.bl_cta_item の外）は中央なので対象外 */
html .bl_cta_item>.bl_ctaButton{padding-top:calc(1.2rem + .5px);padding-bottom:calc(1.2rem - .5px)}
html .bl_topPageInformationButton_link,html .el_publicSurveyResultsPageSection_fullScreenButton,html .el_pageCaseReturnSection_button{padding-top:4.5px;padding-bottom:3.5px}
html .el_pageInformationDetailSection_button{padding-top:5px;padding-bottom:3px}
