/* ShushuLab shared typography
 * Japanese readability first. Visual identity remains page-specific.
 */
:root {
  --shushu-font-ja: "BIZ UDPGothic", "BIZ UDPゴシック", "Yu Gothic UI", "YuGothic", "Meiryo UI", Meiryo, sans-serif;
  --shushu-font-latin: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --shushu-body-weight: 500;
  --shushu-heading-weight: 750;
  --shushu-body-leading: 1.78;
}

html {
  font-family: var(--shushu-font-ja);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea,
select,
option {
  font-family: var(--shushu-font-ja) !important;
}

body {
  font-weight: var(--shushu-body-weight);
  line-height: var(--shushu-body-leading);
  font-kerning: normal;
  font-feature-settings: "palt" 1;
}

/* Japanese text gets enough optical weight on Windows without becoming heavy. */
p,
li,
dd,
dt,
td,
th,
label,
input,
textarea,
select,
button {
  letter-spacing: 0;
}

p,
li,
dd,
td,
label {
  line-height: 1.78;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-family: var(--shushu-font-ja) !important;
  font-weight: var(--shushu-heading-weight);
  font-feature-settings: "palt" 1;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* Keep compact UI copy readable instead of ultra-bold. */
button,
.btn,
.button,
.pill,
.badge,
.tag,
.chip,
.nav a,
.desktop-nav a,
.mobile-nav a {
  font-weight: 700;
}

/* English display labels may retain a Latin-first face while Japanese still falls back cleanly. */
.eyebrow,
.kicker,
.type,
.overline,
.english,
.latin,
.code-like,
code,
pre,
kbd,
samp {
  font-family: var(--shushu-font-latin), var(--shushu-font-ja) !important;
}

code,
pre,
kbd,
samp {
  font-feature-settings: normal;
  letter-spacing: 0;
}

/* Form text was especially thin on Windows in several legacy screens. */
input,
textarea,
select {
  font-weight: 500;
  line-height: 1.5;
}

::placeholder {
  font-family: var(--shushu-font-ja);
  font-weight: 400;
  opacity: .68;
}

/* Avoid very small Japanese copy where existing layouts permit it. */
small,
.muted,
.note,
.help,
.hint {
  line-height: 1.65;
}

@media (max-width: 640px) {
  body {
    line-height: 1.74;
  }

  p,
  li,
  dd,
  td,
  label {
    line-height: 1.74;
  }
}
