/* ===========================================================
   CRJ WEB — common.css
   全ページ共通: リセット / トークン / ヘッダー / フッター / ボタン / fade-up
   =========================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===========================================================
   グローバル幅制御 — 全要素が viewport を超えないよう防御
   PC表示は影響なし(max-width: 100% は親より広くならない指示)
   =========================================================== */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

iframe {
  /* 外部埋め込み iframe(Google Maps等)は height 自動だと崩れるため除外 */
  height: revert;
}

/* テーブル等の横幅オーバーは個別の overflow-x:auto で対応 */

/* ===========================================================
   スマホ専用改行 (.sp-br) — PC(769px以上)は非表示で1行
   スマホ(768px以下)は <br> として機能し、意味単位で改行
   =========================================================== */
.sp-br {
  display: none;
}

@media (max-width: 768px) {
  .sp-br {
    display: inline;
  }

  /* スマホでの大見出しの単語途中改行防止 */
  h2 {
    word-break: keep-all;
    overflow-wrap: break-word;
    line-break: strict;
    line-height: 1.4;
  }
}

:root {
  /* 背景 */
  --bg: #fafaf7;
  --bg-alt: #f2efe8;

  /* テキスト */
  --fg: #111111;
  --fg-muted: #5a5a56;
  --fg-subtle: #8a8a84;

  /* 線 */
  --line: #e2dfd6;

  /* アクセント */
  --accent: #e04a30;
  --accent-soft: rgba(224, 74, 48, 0.08);

  /* ロゴ */
  --logo-bg: #1e1e1c;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== コンテナ ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== ラッパー (粒子球体の上に乗せるコンテンツ) ===== */
.wrap {
  position: relative;
  z-index: 2;
}

/* ===========================================================
   Header
   =========================================================== */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(226, 223, 214, 0.5);
  transition: transform 0.3s ease;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--logo-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.logo-mark .c,
.logo-mark .r {
  color: #fff;
}

.logo-mark .j {
  color: var(--accent);
}

.logo-text {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* グローバルナビ */
nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  font-size: 14px;
}

nav a {
  color: var(--fg);
  font-weight: 400;
  position: relative;
  transition: color 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent);
}

nav a:hover::after,
nav a.is-current::after {
  width: 100%;
}

nav a.is-current {
  color: var(--accent);
}

/* ヘッダー内CTA */
.cta-header {
  background: var(--fg);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.cta-header:hover {
  transform: translateY(-1px);
}

/* ===========================================================
   Buttons
   =========================================================== */
.btn-primary {
  background: var(--fg);
  color: #fff;
  padding: 17px 34px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: left 0.35s ease;
  z-index: 0;
}

.btn-primary > * {
  position: relative;
  z-index: 1;
}

.btn-primary:hover::before {
  left: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  color: var(--fg);
  padding: 17px 34px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, transform 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}

/* リンク風 (samples-link 等) */
.link-underline {
  color: var(--fg);
  font-size: 14px;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease;
  display: inline-block;
}

.link-underline:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===========================================================
   Page Hero (トップ以外のページ冒頭)
   =========================================================== */
.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 160px 40px 80px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.page-hero-kicker {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.2em;
  margin-bottom: 28px;
  font-weight: 500;
}

.page-hero-kicker::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
}

.page-hero-title {
  font-size: clamp(36px, 4.8vw, 64px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
  max-width: 800px;
}

.page-hero-title .accent {
  color: var(--accent);
}

.page-hero-sub {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 640px;
  line-height: 1.8;
}

/* ===========================================================
   Section Heading Utilities (全ページ共通)
   =========================================================== */
.kicker {
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
  font-weight: 500;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 780px;
  /* 日本語禁則処理:「3つのプラン。」等が単語の途中で改行されないように */
  word-break: keep-all;
  overflow-wrap: break-word;
}

.section-head {
  margin-bottom: 64px;
}

/* ===========================================================
   Final CTA (全ページ共通)
   =========================================================== */
.final-cta {
  max-width: 1280px;
  margin: 0 auto;
  padding: 140px 40px 160px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.final-cta-kicker {
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.2em;
  font-weight: 500;
  margin-bottom: 28px;
}

.final-cta-title {
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 32px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  /* 日本語禁則処理:「相談を。」等が単語の途中で改行されないように */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 本体ページヒーロータイトルにも禁則処理を適用 */
.page-hero-title {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 本文・箇条書き・リストアイテムに日本語禁則処理
   (単語の途中で機械的に改行されるのを防ぐ。
   長い英単語やURLは overflow-wrap: anywhere でフォールバック)
*/
p,
li,
dd,
.hero-sub,
.section-lead,
.vertical-list li,
.vertical-lead,
.plan-feat li,
.plan-tagline,
.service-feat li,
.maint-feat li,
.stat-desc,
.sample-desc,
.work-card-desc,
.about-text p,
.mission-body p,
.team-bio,
.group-tagline,
.feat-name-desc,
.faq-acc-a,
.faq-a,
.step-desc,
.step-note,
.aftercare-desc,
.fv-desc,
.news-title,
.access-value,
.contact-info-value {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.final-cta-sub {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.final-cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================================================
   FAQ List (pricing / flow / faq で共通使用)
   =========================================================== */
.faq-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 28px 8px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  transition: background 0.2s ease;
}

.faq-item:hover {
  background: var(--accent-soft);
}

.faq-mark {
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--accent);
  padding-top: 2px;
}

.faq-q {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.5;
}

.faq-a {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.8;
}

.faq-foot {
  margin-top: 40px;
  text-align: right;
}

/* ===========================================================
   fade-up (スクロール連動フェードイン)
   =========================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* スタガー: 子要素に順次ディレイを付けたい時に使う */
.stagger > .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-up:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-up:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-up:nth-child(4) { transition-delay: 0.3s; }
.stagger > .fade-up:nth-child(5) { transition-delay: 0.4s; }

/* ===========================================================
   共通キーフレーム
   =========================================================== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes expandLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ===========================================================
   Footer
   =========================================================== */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  margin-top: 120px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 56px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand .logo {
  width: max-content;
}

.footer-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 320px;
}

.footer-col-title {
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-list a {
  color: var(--fg);
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-info {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.9;
  /* <address> 要素はブラウザ初期値が italic。会社情報は通常スタイルに戻す */
  font-style: normal;
}

address {
  font-style: normal;
}

.footer-info a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-info a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
}

.footer-legal {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-legal a {
  color: var(--fg-subtle);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ===========================================================
   Responsive (common)
   =========================================================== */
@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }

  .header-inner {
    padding: 14px 24px;
  }

  nav ul {
    display: none;
  }

  .page-hero {
    padding: 120px 24px 56px;
  }

  .final-cta {
    padding: 80px 24px 100px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .faq-item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 4px;
  }

  .faq-q {
    font-size: 15px;
  }

  footer {
    margin-top: 80px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 24px 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    padding: 20px 24px 32px;
  }
}

/* ===========================================================
   モバイル幅オーバー防御 — 既存padding を変えずに hard cap だけ追加
   =========================================================== */
@media (max-width: 768px) {
  section,
  main,
  article,
  aside,
  header,
  footer,
  .wrap {
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* 装飾の絶対配置要素が viewport を越えないよう親に overflow を保険でかける */
  .hero,
  .page-hero,
  .stats-section,
  .samples,
  .services-overview,
  .flow-overview,
  .final-cta,
  .campaigns-section,
  .pricing-section {
    overflow-x: clip;
  }
}

/* ===========================================================
   Hamburger Menu Toggle Button (mobile only)
   =========================================================== */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  color: var(--fg);
}

.menu-toggle span {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 19.25px; }
.menu-toggle span:nth-child(3) { top: 25.5px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 19.25px;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 19.25px;
  transform: rotate(-45deg);
}

/* ===========================================================
   Mobile Menu Overlay (mobile only)
   =========================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 1000;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 80px 32px 48px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
}

.menu-close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--fg);
}

.mobile-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-menu-nav li {
  border-bottom: 1px solid var(--line);
}

.mobile-menu-nav a {
  display: block;
  padding: 22px 4px;
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.is-current {
  color: var(--accent);
}

.mobile-menu-cta {
  margin-top: auto;
  padding-top: 40px;
}

.mobile-menu-cta .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 18px 24px;
  font-size: 15px;
}

/* ===========================================================
   Mobile breakpoint (≤768px): hamburger on, header CTA off
   =========================================================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .cta-header {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  /* FAQ 質問文がはみ出ないよう折返し強制 */
  .faq-q,
  .faq-a,
  .faq-acc-q,
  .faq-acc-a {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  /* FAQ summary の右パディングを広げ、詰まりを解消 */
  .faq-acc-summary {
    padding-right: 56px;
  }
}

/* ===========================================================
   固有名詞の保護 (例: CRJ WEB が改行で "CRJ" / "WEB" に割れない)
   =========================================================== */
.brand-name {
  display: inline-block;
  white-space: nowrap;
}

/* ===========================================================
   「詳細は注釈」誘導 (pricing / campaigns から notes.html へ)
   =========================================================== */
.legal-notes-ref {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 20px;
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.7;
  text-align: center;
}

.legal-notes-ref a {
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-notes-ref a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===========================================================
   Top Campaign Banner (全ページ最上部・ヘッダーの上)
   =========================================================== */
.top-banner {
  position: relative;
  background: #0F0F0F;
  color: #FAFAFA;
  overflow: hidden;
  z-index: 10;
}

.top-banner.is-closed {
  display: none;
}

/* 背景装飾 (粒子風ドット・バナーの視認性を邪魔しない低opacity) */
.top-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 40%, rgba(224, 74, 48, 0.35) 0.8px, transparent 1.2px),
    radial-gradient(circle at 88% 72%, rgba(250, 250, 250, 0.25) 0.8px, transparent 1.2px),
    radial-gradient(circle at 35% 85%, rgba(224, 74, 48, 0.2) 0.6px, transparent 1px),
    radial-gradient(circle at 65% 20%, rgba(250, 250, 250, 0.18) 0.6px, transparent 1px),
    radial-gradient(circle at 92% 30%, rgba(224, 74, 48, 0.22) 0.5px, transparent 1px);
  background-size: 220px 120px, 180px 100px, 260px 140px, 200px 110px, 240px 130px;
  background-position: 0 0, 40px 30px, 100px 20px, 70px 40px, 20px 10px;
  pointer-events: none;
  opacity: 0.9;
}

.top-banner-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 60px 16px 40px;
  max-width: 1280px;
  margin: 0 auto;
  color: inherit;
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.top-banner-link:hover {
  opacity: 0.92;
}

.top-banner-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  flex-shrink: 0;
}

.top-banner-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.top-banner-heading {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #FAFAFA;
  line-height: 1.4;
}

.top-banner-sub {
  font-size: 12.5px;
  color: rgba(250, 250, 250, 0.7);
  line-height: 1.5;
}

.top-banner-arrow {
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.top-banner-link:hover .top-banner-arrow {
  transform: translateX(3px);
}

.top-banner-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(250, 250, 250, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  z-index: 2;
  transition: color 0.2s ease, background 0.2s ease;
}

.top-banner-close:hover,
.top-banner-close:focus-visible {
  color: #fff;
  background: rgba(250, 250, 250, 0.08);
  outline: none;
}

/* タブレット */
@media (max-width: 900px) {
  .top-banner-link {
    padding: 14px 50px 14px 20px;
    gap: 12px;
  }

  .top-banner-content {
    gap: 8px;
  }

  .top-banner-sub {
    font-size: 11.5px;
  }
}

/* スマホ */
@media (max-width: 768px) {
  .top-banner-link {
    padding: 12px 44px 12px 16px;
    gap: 10px;
  }

  .top-banner-badge {
    font-size: 9px;
    padding: 5px 9px;
    letter-spacing: 0.18em;
  }

  .top-banner-heading {
    font-size: 13px;
  }

  /* スマホではサブ文を非表示 */
  .top-banner-sub {
    display: none;
  }

  .top-banner-arrow {
    font-size: 14px;
  }

  .top-banner-close {
    right: 10px;
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}

/* ===========================================================
   日本語改行制御の強制適用(全ページ・全デバイス)
   既存CSSの取りこぼしをカバーする最終防衛ライン
   PC/タブレット/スマホ全幅で「、」「。」以外の位置で
   意味単位の改行崩れを防ぐ
   =========================================================== */

/* box-sizing と横スクロール防止 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 見出し: 強制 keep-all */
h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  hyphens: none;
}

/* 本文・リンク: 強制 keep-all */
p, li, blockquote, dd, dt,
a, button, label {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

/* インラインコード・URL: 強制ブレークOK */
code, pre, kbd, samp, var,
.url, .code, .email, [href^="mailto:"], [href^="tel:"] {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* テーブルセル */
td, th {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* flex/grid の子要素が min-content で広がらないよう防御 */
main, section, article, aside, .wrap, .container {
  min-width: 0;
}

/* ===========================================================
   スマホ(≤768px)の見出しフォント安全マージン
   既存の clamp() を尊重しつつ、極端に大きい見出しを抑制
   =========================================================== */
@media (max-width: 768px) {
  /* ボタン・CTA のテキスト折返し許可 */
  .btn-primary,
  .btn-secondary,
  .cta-header,
  button {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
}
