/* Japanese readability baseline (2026) */

html {
  line-break: strict;
  overflow-wrap: anywhere;
  word-break: normal;
}

body {
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/*
  Heading scale for Japanese UI:
  Keep hierarchy, avoid oversized CJK on wide screens.
  Use !important to win against Tailwind CDN utilities.
*/
h1 {
  font-size: clamp(2rem, 1.4rem + 3.2vw, 4.5rem) !important; /* 32px–72px */
  line-height: 1.05 !important;
}

h2 {
  font-size: clamp(1.75rem, 1.35rem + 2.2vw, 3.5rem) !important; /* 28px–56px */
  line-height: 1.08 !important;
}

/* お問い合わせハブのカード見出し：上記 h2 の !important より詳細度で上書き（約半分の clamp） */
h2.contact-hub-card-title {
  font-size: clamp(0.875rem, 0.675rem + 1.1vw, 1.75rem) !important; /* 上記の各係数を 1/2 */
  line-height: 1.2 !important;
}

h3 {
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2.25rem) !important; /* 22px–36px */
  line-height: 1.15 !important;
}

h4 {
  font-size: clamp(1.125rem, 1rem + 0.9vw, 1.75rem) !important; /* 18px–28px */
  line-height: 1.2 !important;
}

@supports (text-autospace: normal) {
  html {
    text-autospace: normal;
  }

  pre,
  code,
  kbd,
  samp {
    text-autospace: no-autospace;
  }
}

@supports (text-wrap: balance) {
  h1,
  h2,
  h3 {
    text-wrap: balance;
  }
}

