/* =========================================================
   小さいスマートフォン向けの表示調整（幅 400px 以下のみ有効）
   ・arrows We（A101FC / Android 14）など画面幅 360px 前後の端末や、
     「文字の大きさ」「表示サイズ」を大きくしている端末で、
     見出しやボタンの文字が単語の途中で折り返されて崩れる問題を修正します。
   ・既存の CSS / JS / HTML の中身は変更せず、このファイルだけで上書きします。
   ・PC / タブレット（401px 以上）の表示には影響しません。
   ========================================================= */
@media (max-width: 400px) {

  /* ---------- 共通：日本語を文節単位で折り返す（「相/談」「選/ぶ」のような分断を防ぐ） ---------- */
  body { word-break: auto-phrase; overflow-wrap: break-word; }
  table { word-break: normal; }  /* 表は通常の折り返し（はみ出し防止） */

  /* ---------- index.html：ヒーロー ---------- */
  .hero h1 { font-size: clamp(23px, 7.6vw, 28px); line-height: 1.4; letter-spacing: 0; }
  .hero-lead { font-size: 15px; letter-spacing: .03em; }
  .hero .btn-hero { max-width: 100%; }

  /* ---------- index.html：サービスカード（写真を上・文章を下の縦並びに） ---------- */
  .service-card { grid-template-columns: 1fr; min-height: 0; }
  .service-photo { height: 150px; clip-path: none; }
  .service-card:first-child .service-photo { height: auto; aspect-ratio: 1465 / 1073; }
  .service-body { padding: 14px 16px 16px; }
  .service-body h3 { margin-bottom: 8px; font-size: 18px; }

  /* ---------- index.html：特徴・相談例・税理士の帯 ---------- */
  .feature h3 br, .band p br { display: none; }
  .band h2 { font-size: 22px; }
  .case-quote { font-size: 17px; }
  .btn { max-width: 100%; text-align: center; }
  .btn-white, .btn-primary { padding-left: 20px; padding-right: 20px; }

  /* ---------- contact / register / faq / 規約系：ページ上部の大見出し ---------- */
  main > .hero:not(#top) h1, .legal-hero h1 { font-size: clamp(24px, 8vw, 30px); line-height: 1.35; letter-spacing: 0; }
  main > .hero:not(#top) p { font-size: 13px; }

  /* ---------- contact / register：フォーム ---------- */
  .check span { min-width: 0; }
  .file-row { gap: 10px; }
  .file-thumb { flex-basis: 64px; height: 64px; font-size: 12px; }
  .file-btn { padding: 10px 12px; white-space: nowrap; }

  /* ---------- フッター ---------- */
  .site-footer .footer-links { gap: 8px 18px; }
}

/* 特に狭い場合（表示サイズ・文字サイズを大きくした端末など 340px 以下） */
@media (max-width: 340px) {
  .site-header .brand, .site-header .brand-link .brand { width: 150px; }
  .site-footer .brand { width: 150px; }
  .site-footer .footer-company span { font-size: 14px; }
  .site-footer .footer-links a { font-size: 13.5px; }
  .file-thumb { display: none; }
}
