@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunito-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0250-02FF, U+0370-1FFF, U+2070-218F, U+2200-24FF, U+2E80-9FFF, U+AC00-D7AF, U+F900-FAFF, U+FE10-FE6F, U+FF00-FFEF, U+20000-323AF;
  src: url("fonts/noto-sans-jp-400-600.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-024F, U+0300-036F, U+2000-206F, U+2190-21FF, U+2500-257F;
  src: url("fonts/noto-sans-latin-400-600.woff2") format("woff2");
}

/* Latin symbols must not fetch the Japanese fallback on English pages. */
@font-face {
  font-family: "Noto Sans JP Japanese";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/noto-sans-jp-400-600.woff2") format("woff2");
  unicode-range: U+2E80-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

/* Keep the game's larger control glyphs at their established optical scale. */
@font-face {
  font-family: "UD Marugo";
  size-adjust: 92%;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ud-marugo-large-pro-bold.woff2") format("woff2");
}

:root {
  --font-ui: "Noto Sans JP", system-ui, sans-serif;
  --font-display: var(--font-ui);
  --font-sprite: "Nunito", "Noto Sans JP Japanese", system-ui, sans-serif;
  font-synthesis: none;
}

:root:lang(ja) {
  --font-sprite: "UD Marugo", "Noto Sans JP", system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

body {
  font-weight: 400;
}

:is(b, strong) {
  font-weight: 600;
}

:is(button, summary, [role="button"], .button, .button-quiet) {
  font-weight: 600;
}

/* The Latin wordmark keeps the same typography in either interface language. */
:is(.site-bar-title, .site-header h1) {
  font-family: "Nunito", "Noto Sans JP Japanese", system-ui, sans-serif;
  font-weight: 700;
}

/* Only explicit clue-language blocks override inheritance from a control. */
[lang="ja"]:not(html) {
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-weight: 400;
}

[lang="ja-Latn"] {
  font-family: var(--font-ui);
  font-weight: 400;
}
