/* Fonts are selected per glyph before the first paint. */
@font-face {
  font-family:"SJ Site Japanese";
  src:local("Yu Mincho Regular"),local("YuMincho-Regular"),local("游明朝 Regular"),local("Yu Mincho"),local("YuMincho"),local("游明朝"),local("Hiragino Mincho ProN");
  font-weight:400;font-style:normal;
  unicode-range:U+2E80-2FFF,U+3000-30FF,U+31F0-31FF,U+3200-33FF,U+3400-4DBF,U+4E00-9FFF,U+F900-FAFF,U+FF01-FF60,U+FFE0-FFE6,U+1B000-1B16F,U+20000-3134F;
}
@font-face {
  font-family:"SJ Site Japanese";
  src:local("Yu Mincho Demibold"),local("YuMincho-Demibold"),local("Yu Mincho"),local("YuMincho");
  font-weight:700;font-style:normal;
  unicode-range:U+2E80-2FFF,U+3000-30FF,U+31F0-31FF,U+3200-33FF,U+3400-4DBF,U+4E00-9FFF,U+F900-FAFF,U+FF01-FF60,U+FFE0-FFE6,U+1B000-1B16F,U+20000-3134F;
}
:root {--sj-font-mixed:"SJ Site Japanese",Arial,"Segoe UI","Noto Serif JP",serif;}

/* The only shared font families. Existing sizes, weights, colours and layout remain local. */
:root {
  --sj-font-vi:Arial,"Segoe UI",sans-serif;
  --sj-font-ja:"Yu Mincho","YuMincho","游明朝","Hiragino Mincho ProN","Noto Serif JP",serif;
  --sj-font-control:var(--sj-font-mixed);
}
html body {font-family:var(--sj-font-vi)}
html body :is(input,textarea,select,option) {font-family:var(--sj-font-control);font-style:normal}
/* Named markers are useful for inspecting typography without changing native form controls. */
.sj-font-text {font-size:inherit;line-height:inherit;font-weight:inherit;letter-spacing:inherit}
.sj-font-vi {font-family:var(--sj-font-vi);font-style:normal}
.sj-font-ja {font-family:var(--sj-font-ja);font-style:normal}

/* Per-character CSS font selection replaces the former full-page JS text wrapping. */
html body :where(h1,h2,h3,h4,h5,h6,p,div,span,li,dt,dd,td,th,caption,label,legend,a,button,small,strong,b,em,i,u,s,ruby,rb,rt):not(script,style,noscript,textarea,input,select,option,pre,pre *,code,code *,kbd,kbd *,samp,samp *,svg,svg *,canvas,canvas *,math,math *,[role="math"],[role="math"] *,[contenteditable],[contenteditable] *,.tox,.tox *,.editor_atto_content,.editor_atto_content *,.CodeMirror,.CodeMirror *,.accesshide,.sr-only,.visually-hidden,.icon,.icon *,.fa,.fa *,.fas,.fas *,.far,.far *,.fab,.fab *,.material-icons,.material-icons *,.material-symbols-outlined,.material-symbols-outlined *),
html body #page#page#page :where(h1,h2,h3,h4,h5,h6,p,div,span,li,dt,dd,td,th,caption,label,legend,a,button,small,strong,b,em,i,u,s,ruby,rb,rt):not(script,style,noscript,textarea,input,select,option,pre,pre *,code,code *,kbd,kbd *,samp,samp *,svg,svg *,canvas,canvas *,math,math *,[role="math"],[role="math"] *,[contenteditable],[contenteditable] *,.tox,.tox *,.editor_atto_content,.editor_atto_content *,.CodeMirror,.CodeMirror *,.accesshide,.sr-only,.visually-hidden,.icon,.icon *,.fa,.fa *,.fas,.fas *,.far,.far *,.fab,.fab *,.material-icons,.material-icons *,.material-symbols-outlined,.material-symbols-outlined *) {font-family:var(--sj-font-mixed)!important;font-style:normal}
html body :is(input,textarea,select,option) {font-family:var(--sj-font-control)!important;font-style:normal}
