/* Use native Japanese glyphs and line breaking without changing other locales. */
:root:lang(ja), .mt-body:lang(ja) {
  --cb-font-ja: 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  --font-sans: var(--cb-font-ja);
  --font-mono: 'Space Mono', var(--cb-font-ja);
  --default-font-family: var(--cb-font-ja);
  --default-mono-font-family: 'Space Mono', var(--cb-font-ja);
}
html:lang(ja) body,
html:lang(ja) body :is(p, li, a, input, summary, small, h1, h2, h3, h4, button):lang(ja),
html:lang(ja) body :is(h1, h2, h3, h4, button, nav, header):lang(ja) :is(span, a, div, p):lang(ja),
.mt-body:lang(ja), .mt-body :is(p, li, a, input, summary, small, h1, h2, h3, h4, button, span):lang(ja) {
  font-family: 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif !important;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}
html:lang(ja) body :is(code, pre, kbd, .font-mono, .cb-section-badge):lang(ja),
.mt-body:lang(ja) :is(.cb-edit-toolbar, .cb-edit-label, .cb-pricing__kicker) {
  font-family: 'Space Mono', 'Hiragino Sans', 'Yu Gothic', Meiryo, monospace !important;
}
html:lang(ja) #cambrain-hero-title,
html:lang(ja) #cambrain-hero-title span {
  font-family: 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif !important;
  line-height: 1.35;
  word-break: normal;
  line-break: strict;
}
html:lang(ja) #cambrain-hero-title .cb-hero__title-phase > span {
  height: auto;
  min-height: 1.35em;
  white-space: normal;
}
html:lang(ja) #cambrain-hero-title .cb-decode {
  white-space: normal;
}
html:lang(ja) .cb-workflow__title-intro,
html:lang(ja) .cb-workflow__title-line {
  white-space: normal;
  word-break: normal;
}
.mt-body:lang(ja) .cb-pricing__button { white-space: normal; }
.mt-body:lang(ja) .cb-edit-clip > span:first-child { word-break: normal; }
/* Keep Japanese copy clear of the laptop, which extends left of its grid cell. */
@media (min-width: 1200px) {
  html:lang(ja) #cambrain-hero .cb-hero__layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
  html:lang(ja) #cambrain-hero .cb-hero__copy {
    --cb-hero-title-size: clamp(40px, 3.2vw, 48px);
  }
  html:lang(ja) #cambrain-hero-title,
  html:lang(ja) #cambrain-hero .cb-hero__eyebrow,
  html:lang(ja) #cambrain-hero .cb-hero__support {
    max-width: calc(100% - 120px);
  }
  html:lang(ja) #cambrain-hero .cb-hero__eyebrow > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
html:lang(ja) #cambrain-hero-title .cb-decode-text,
html:lang(ja) #cambrain-hero-title .cb-hero__title-phase > span {
  text-wrap: balance;
}
@supports (word-break: auto-phrase) {
  html:lang(ja) #cambrain-hero-title span {
    word-break: auto-phrase;
    overflow-wrap: anywhere;
  }
}
html:lang(ja) #cambrain-hero .cb-hero__support > p {
  word-break: normal;
  overflow-wrap: break-word;
}
html:lang(ja) #product button > span { min-width: 0; line-height: 1.4; }
.mt-body:lang(ja) .cb-brand-workflow__caption { word-break: normal; overflow-wrap: break-word; }
@media (max-width: 600px) {
  .mt-body:lang(ja) .cb-brand-workflow__line { flex-wrap: wrap; justify-content: center; gap: .2em; }
}
.mt-body:lang(ja) .cb-brand-workflow__caption { white-space: normal; }
.mt-body:lang(ja) [data-footer-language] { white-space: nowrap; }
/* Latin timecode and price-system labels retain the brand's monospace face. */
.mt-body:lang(ja) :is(.cb-edit-toolbar, .cb-edit-ruler, .cb-pricing__kicker),
.mt-body:lang(ja) :is(.cb-edit-toolbar, .cb-edit-ruler) span {
  font-family: 'Space Mono', 'Hiragino Sans', 'Yu Gothic', Meiryo, monospace !important;
}
.mt-body:lang(ja) :is(h2, h3),
.mt-body:lang(ja) h2 span { text-wrap: balance; }
@supports (word-break: auto-phrase) {
  .mt-body:lang(ja) :is(h2, h3), .mt-body:lang(ja) h2 span { word-break: auto-phrase; }
}
