/* Japanese text keeps the existing Hugoplate layout and colors. The local
   Noto Sans JP subset covers all published Japanese copy and form results. */
@font-face {
  font-family: "VPS Noto Sans JP";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/noto-sans-jp/NotoSansJP-site.woff2") format("woff2");
}

html:lang(ja) body,
html:lang(ja) main h1,
html:lang(ja) main h2,
html:lang(ja) main h3,
html:lang(ja) main h4,
html:lang(ja) button,
html:lang(ja) input,
html:lang(ja) select {
  font-family: "VPS Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif !important;
  word-break: normal;
  line-break: strict;
}

html:lang(ja) main h1,
html:lang(ja) .vps-home .vps-hero-copy h1 {
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  font-size: clamp(2rem, 3.3vw, 3.4rem) !important;
  text-wrap: pretty !important;
}

@media (max-width: 767px) {
  html:lang(ja) main h1,
  html:lang(ja) .vps-home .vps-hero-copy h1 {
    font-size: clamp(1.9rem, 8.4vw, 2.5rem) !important;
  }
}

html:lang(ja) main .content {
  min-width: 0;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

html:lang(ja) main .btn {
  white-space: normal;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

html:lang(ja) .content .vps-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html:lang(ja) .content .vps-table-scroll table {
  min-width: 720px;
  margin-block: 0;
}

html:lang(ja) .content pre {
  max-width: 100%;
  overflow-x: auto;
}

html:lang(ja) .content code {
  font-family: ui-monospace, Consolas, monospace;
}

/* Progressive enhancement: keep natural Japanese phrases together where the
   browser supports phrase analysis. Normal CJK wrapping remains the fallback. */
@supports (word-break: auto-phrase) {
  html:lang(ja) main h1,
  html:lang(ja) main h2,
  html:lang(ja) main h3,
  html:lang(ja) main .btn {
    word-break: auto-phrase !important;
  }
}
