/* Japanese overrides. Loaded only when the session locale is "ja". */
:root {
    --default-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --heading-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --nav-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* Every text element uses the Japanese font. Icon fonts (<i>) are left alone. */
html[lang="ja"] body,
html[lang="ja"] :is(h1, h2, h3, h4, h5, h6, p, a, li, span, div, small, strong, em, label, button, input, textarea, select, td, th, blockquote) {
    font-family: var(--default-font);
}

html[lang="ja"] body {
    line-height: 1.85;
    /* Break lines between phrases, not in the middle of a word */
    word-break: auto-phrase;
    line-break: strict;
}

html[lang="ja"] :is(h1, h2, h3, h4, h5, h6) {
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Japanese has no letter case or italics */
html[lang="ja"] body * {
    text-transform: none !important;
    font-style: normal !important;
}
