/* v81 — トップ「実績バー」が仕切り線を越えて飛び出す問題の修正
   2026-09-17

   原因: .home-proof__item strong に white-space:nowrap が効いていたため、
         日本語（20年／150社以上）より長い英語・タイ語の単位が枠外へはみ出していた。
         例: 英語 "150+ companies" は 1440px で 39.9px、1100px で 51.9px はみ出していた。

   方針:
     ① 日本語以外は「単位」を数字の下の行に置く（数字の大きさ・色・金の罫線は変えない）
     ② 320px 級の狭い画面は 2列→1列にして、各項目に幅を与える（日本語の1行表示を守るため）

   実測: 1512 / 1440 / 1280 / 1100 / 900 / 760 / 600 / 414 / 390 / 375 / 360 / 320px
         × 日本語・英語・タイ語 ＝ はみ出し 0（36件 PASSED） */

/* ① 日本語以外は単位を改行 */
html:not([lang="ja"]) .p-home .home-proof__item strong small {
  display: block;
  margin-left: 0;
  line-height: 1.25;
}

/* ② 極小画面は1列にする */
@media (max-width: 24rem) {
  .p-home .home-proof__grid {
    grid-template-columns: 1fr;
  }

  .p-home .home-proof__item {
    border-left: 0;
  }

  .p-home .home-proof__item + .home-proof__item {
    border-top: 1px solid var(--line);
  }
}

/* タイ語のトップ見出し：「จดทะเบียนบริษัท」が語の途中で折り返すのを防ぐ */
html[lang="th"] .p-home .hero h1 .hero__accent {
  white-space: nowrap;
}

/* 2026-09-24: CSSの content: で描いている日本語を言語別に差し替え（タイ語ページに日本語が残っていた） */
html[lang="th"] .p-setup #docs .section__head::after { display: none; } /* 2026-10-02 タイ語は文言変更で「1つだけ」が成り立たないため非表示 */
html[lang="en"] .p-setup #docs .section__head::after { content: "✓　Just one item\A　　 Prepared by you"; }
html[lang="th"] .p-setup .warnbox::after { content: "ข้อดีของการตรวจสอบก่อน\Aก่อนยื่นขอ เราตรวจสอบให้ว่าสถานที่นั้นสามารถขอใบอนุญาตประเภทธุรกิจที่ท่านต้องการได้หรือไม่"; }
html[lang="en"] .p-setup .warnbox::after { content: "Why check first\ABefore you apply, we confirm that the premises can obtain the licence your business needs."; }
html[lang="th"] .page-cs .form--v4 .form__examples li::before { content: "เช่น:"; }
html[lang="en"] .page-cs .form--v4 .form__examples li::before { content: "e.g.:"; }

/* ============================================================================
   （v81に統合）社長のモバイル確認（2026-09-24）
   ① 会社設立: 「対応範囲」チップ列はモバイルでは出さない（手順カードと重複）／手順カード7枚目の枠抜け
   ② 連絡欄（各ページ末尾）: モバイルでは 見出し→本文→フォーム→電話→標語 の順（フォームがいきなり出ない）
   ③ 会社設立の注意枠: 印は見出しの横、本文は左端から全幅
   ④ フッター: リンクの下線を消し、1行1リンク。言語切替は丸いボタン
   ========================================================================= */

/* ④ フッター（全幅） */
.footer--compact .footer__links a { border-bottom: 0; padding-bottom: 0; }
.footer--compact .footer__links a:not([hreflang]) { flex-basis: 100%; white-space: normal; }
.footer--compact .footer__links a[hreflang] { padding: .38rem .95rem; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; font-weight: 600; }
.footer--compact .footer__links a[hreflang]:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 40rem) {
  /* ① */
  .p-setup .scope { display: none !important; }
  .page-cs .proc tbody tr:last-child { border: 1px solid var(--tk-card-line, #d8dfe9); }
  /* ③ */
  .p-setup .warnbox { grid-template-columns: 46px minmax(0, 1fr); align-items: center; column-gap: .75rem; }
  .p-setup .warnbox::before { grid-column: 1; grid-row: 1; }
  .p-setup .warnbox b { grid-column: 2; grid-row: 1; align-self: center; }
  .p-setup .warnbox p { grid-column: 1 / -1; grid-row: 2; margin-top: .85rem; }
  .p-setup .warnbox::after { grid-column: 1 / -1; grid-row: 3; }
  /* ② */
  .site-contact .site-contact__intro { display: contents; }
  .site-contact .site-contact__kicker { order: 1; }
  .site-contact .site-contact__intro h2 { order: 2; }
  .site-contact .site-contact__lead { order: 3; }
  .site-contact .site-contact__form { order: 4; margin-top: 1.4rem; }
  .site-contact .site-contact__phones { order: 5; margin-top: 1.6rem; }
  .site-contact .site-contact__tagline { order: 6; margin-top: 1.6rem; }
  /* ④ */
  .footer--compact .footer__links { gap: .8rem .6rem; }
  /* ②' 連絡欄の各パーツを横幅いっぱいに（display:contents 化で幅が縮んでいた） */
  .site-contact .site-contact__form, .site-contact .site-contact__phones, .site-contact .site-contact__tagline { width: 100%; }
  /* ⑤ TOPのFV: 最初の1画面はFVだけ（実績バーは1画面目に入れない）。固定CTAバーはFVが見えている間は下に隠す */
  /* ⑤ TOPのFV（2026-09-24 社長決定）: FV内のボタンは隠し、実績バーまで1画面目に。行動は追従ボタン（無料相談／料金を見る）に集約 */
  .p-home .hero .hero__actions { display: none; }
  /* FVを「実績バーの下端＝画面の下端（追従ボタンの上）」まで伸ばし、文字の間隔もゆったり。高さは v64 の JS が機種ごとに計算 */
  .p-home .hero { display: flex; flex-direction: column; justify-content: center; }
  .p-home .hero h1 { margin-top: 1.9rem; }
  .p-home .hero .hero__lede { margin-top: 1.9rem; }
}

/* 追従ボタン（スマホ下部）: 無料相談＝金、料金を見る／お電話で相談＝紺 2026-09-24 */
.callbar a.callbar__cta { background: var(--gold); color: var(--navy-deep); font-weight: 700; }
.callbar a.callbar__price, .callbar a.callbar__cta + .callbar__tel { background: var(--navy); color: var(--on-navy); }

/* タイ語スマホ: 12〜13pxのタイ文字は読みにくい → 本文系14px・バッジ/パンくず系13px（2026-10-02 スタッフ指摘） */
@media (max-width: 40rem) {
  html[lang="th"] .home-strip small,
  html[lang="th"] p.home-note,
  html[lang="th"] .flow-features small,
  html[lang="th"] .access-panel__foot small,
  html[lang="th"] a.btn,
  html[lang="th"] .site-contact__phone small,
  html[lang="th"] .site-contact__phone em,
  html[lang="th"] .site-contact__form-head p,
  html[lang="th"] .form__consent span,
  html[lang="th"] .form__consent a,
  html[lang="th"] p.form__note,
  html[lang="th"] p.footer__tagline,
  html[lang="th"] p.footer__meta,
  html[lang="th"] .footer__links a,
  html[lang="th"] p.setup-package__label,
  html[lang="th"] .setup-package li,
  html[lang="th"] p.pagetoc__ttl,
  html[lang="th"] .cmp span,
  html[lang="th"] p.cmp__note,
  html[lang="th"] td.proc__note,
  html[lang="th"] .setup-docs__groups li,
  html[lang="th"] .setup-docs__groups p,
  html[lang="th"] p.setup-docs__caution,
  html[lang="th"] .subhead em,
  html[lang="th"] .perm span,
  html[lang="th"] .perm__more span,
  html[lang="th"] p.setup-price-package__lead,
  html[lang="th"] .setup-price-services span,
  html[lang="th"] .setup-price-panel span,
  html[lang="th"] .fee-note li,
  html[lang="th"] .fee-note a,
  html[lang="th"] p.section__lede,
  html[lang="th"] p.phead__ribbon,
  html[lang="th"] p.phead__promise,
  html[lang="th"] .service-hero__features li,
  html[lang="th"] .dutygrid p,
  html[lang="th"] p.dutynote,
  html[lang="th"] div.fee-mobile__note,
  html[lang="th"] em.bandnote,
  html[lang="th"] .fee-mobile__chapter span,
  html[lang="th"] .fee-mobile__note a,
  html[lang="th"] .benefit__copy small,
  html[lang="th"] .benefit__copy p,
  html[lang="th"] a.benefit__link,
  html[lang="th"] .visa-concept li,
  html[lang="th"] .visa-support p,
  html[lang="th"] td.col-note,
  html[lang="th"] .col-note a,
  html[lang="th"] .doclist span,
  html[lang="th"] p.visa-docs__note,
  html[lang="th"] .pricemap__links a,
  html[lang="th"] p.feelede,
  html[lang="th"] .corp th,
  html[lang="th"] .company-access__note li,
  html[lang="th"] .contact-hero__title p,
  html[lang="th"] .contact-quickcall__copy span,
  html[lang="th"] .contact-quickcall__copy small,
  html[lang="th"] p.form__hint,
  html[lang="th"] .form__opt small,
  html[lang="th"] .form__examples li,
  html[lang="th"] .contact-form__notes p { font-size: 14px !important; }
  html[lang="th"] .home-proof__item small,
  html[lang="th"] .phead__crumb a,
  html[lang="th"] p.phead__crumb,
  html[lang="th"] .setup-docs__groups span,
  html[lang="th"] p.phead__figlabel,
  html[lang="th"] span.chip,
  html[lang="th"] div.fee-mobile__price,
  html[lang="th"] span.annual-unit,
  html[lang="th"] .phead__crumb span,
  html[lang="th"] p.feeunit,
  html[lang="th"] .jumpnav a,
  html[lang="th"] .phead__jump a,
  html[lang="th"] .price-subnav a,
  html[lang="th"] .contact-hero__crumb a,
  html[lang="th"] p.contact-hero__crumb,
  html[lang="th"] span.req,
  html[lang="th"] span.opt { font-size: 13px !important; }
}

/* ── タイ語 文字サイズ試作 第3版（2026-11-02 先方「書体・デザインは拡大前のまま／大きいモニターでも本文が画面の約8割・両脇の余白は約1割に収まるように」）
      2026-11-02 タイ語の全ページに展開（最初は就労ビザだけで試作）。
      ページ全体（ヘッダー含む）をブラウザの拡大と同じ方法で大きくする。倍率は画面幅に合わせて段階的に＝本文の幅 ≒ 画面幅の8割。
      1600px未満の画面は今のまま（本文1120pxで既に8割前後）。書体は変えない。 ── */
@media screen and (min-width: 100rem)  { html[lang="th"]:not(.tk-before) body { zoom: 1.15; } }
@media screen and (min-width: 112.5rem){ html[lang="th"]:not(.tk-before) body { zoom: 1.28; } }
@media screen and (min-width: 125rem)  { html[lang="th"]:not(.tk-before) body { zoom: 1.42; } }
@media screen and (min-width: 140rem)  { html[lang="th"]:not(.tk-before) body { zoom: 1.58; } }
@media screen and (min-width: 160rem)  { html[lang="th"]:not(.tk-before) body { zoom: 1.8; } }

/* ── 同 第3版の続き（2026-11-02 先方「本文の文字が異常に小さい」／参考 e-Filing＝本文 PSL Kanda 22px・Sarabun 18px 相当）
      PC幅のタイ語本文を 12〜13px → 15px に底上げ（注記14px・リード文16px）。見出し・金額は今のまま（大きい文字の部品は :not で除外・2026-11-02 全9ページで縮み0を実測）。上の拡大と掛け算になる（2000px幅で本文≒21px）。 ── */
@media screen and (min-width: 64rem) {
  html[lang="th"]:not(.tk-before) body #main :is(p, li, td, th, label):not(.num, .section__no, .site-contact__tag-en, .site-contact__kicker, .price-card__price, .setup-package__price, .setup-price-package__ribbon, .phead__price-title, .company-heading__tagline, .company-mission__sign, .setup-price-panel td) { font-size: 15px; }
  html[lang="th"]:not(.tk-before) body #main :is(td, li, p, label):not(.price-card__price, .setup-package__price, .phead__price-title) > :is(b, em, a, span:not([class]), strong:not([class])) { font-size: inherit; }
  html[lang="th"]:not(.tk-before) body #main .jumpnav a { font-size: 15px; }
  html[lang="th"]:not(.tk-before) body #main :is(td, li, .form__consent) span > :is(em, a) { font-size: inherit; }
  html[lang="th"]:not(.tk-before) body #main#main :is(.visa-concept h3, .visa-support h3, .setup-docs h3, h3.dutyhead) { font-size: 18px; }
  /* よくあるご質問（質問16px・回答15px）／トップの会社情報の表（15px） */
  html[lang="th"]:not(.tk-before) body #main#main :is(.qa dt, .home-accordion summary) { font-size: 16px; }
  html[lang="th"]:not(.tk-before) body #main#main :is(.qa dd, .company-panel dt, .company-panel dd) { font-size: 15px; }
  /* カードの説明文・補足（各ページ）: 12〜13px → 14〜15px */
  html[lang="th"]:not(.tk-before) body #main#main :is(.solution-card__body > span:not([class]), .dutygrid li div > b) { font-size: 15px; }
  html[lang="th"]:not(.tk-before) body #main#main :is(.home-proof__item small:not(strong small), .home-strip small, .reason-facts small, .flow-features small, .access-panel__foot small, .access-panel__foot strong, .contact-quickcall__copy small, .cta2__tel span, .cta2__mail span, .benefit__copy small, .price-subnav a, .phead__jump a) { font-size: 14px; }
  html[lang="th"]:not(.tk-before) body #main#main :is(th > span:not([class]), th > em.bandnote) { font-size: 13.5px; }
  /* 入力欄の項目名は1行に（必須の * だけが次の行に落ちないように）／会社設立の手順図は枠が狭いので14px */
  html[lang="th"]:not(.tk-before) body #main#main .form label:not(.form__consent):not(.form__opt) { white-space: nowrap; }
  html[lang="th"]:not(.tk-before) body #main#main .flowfig__step { font-size: 14px; }
  html[lang="th"]:not(.tk-before) body #main#main .form__consent a { white-space: nowrap; }
  html[lang="th"]:not(.tk-before) body #main#main :is(td.col-note, .fee-note li, .visa-docs__note, .form__note, .phead__crumb, .phead__crumb *, .feeunit) { font-size: 14px; }
  html[lang="th"]:not(.tk-before) body #main#main :is(.phead__lede, .section__lede) { font-size: 16px; }
  /* 文字が大きくなって段落の最後に1〜2語だけ残る行が出るため、行の折り返しを均す（Chrome/Edge/Safari対応・非対応ブラウザは従来どおり） */
  html[lang="th"]:not(.tk-before) body main p { text-wrap: pretty; }
}

/* 会社概要の紹介文（タイ語は2段落・2026-10-30）: スマホで<br>を隠す指定があるため、段落の区切りだけは残す */
html[lang="th"] .p-company .company-heading__body br[data-keep] { display: inline; }

/* トップの「選ばれる理由」「ご利用の流れ」「会社概要・アクセス」は本文の枠（1120px）より広く、PCで横いっぱいに見えていた。
   他のセクション・ヘッダーと同じ幅にそろえる（2026-11-02 社長指示・全言語） */
.p-home.p-home :is(.home-reasons, .home-flow, .home-company) > .container, .p-home #reason > .container { max-width: 1120px; }
