/* One local Latin / numeric face, with the existing Chinese reading stacks.
   This aliases the original Cosmic Solace Regular file; it is not a new font.
   The range keeps Chinese and UI symbols in their appropriate fallback faces. */
@font-face {
  font-family: "Cosmic Solace Latin";
  src: url("/assets/CosmicSolace-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-024F, U+1E00-1EFF;
}

:root {
  --displayLatin: "Cosmic Solace Latin", "Cosmic Solace", "Times New Roman", serif;
  --numeric: "Cosmic Solace Latin", "Cosmic Solace", "Times New Roman", serif;
  --headingCJK: "Cosmic Solace Latin", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --bodyCJK: "Cosmic Solace Latin", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-ui: var(--bodyCJK);
}

/* Includes the independent public-submit page, which does not load themes.css. */
html,
body {
  font-family: var(--bodyCJK);
}
button,
input,
textarea,
select,
option,
optgroup {
  font-family: var(--bodyCJK);
}
input::file-selector-button {
  font-family: var(--bodyCJK);
}
code,
pre,
kbd,
samp {
  font-family: var(--bodyCJK);
}

/* Older editorial font shorthands named Georgia / Arial directly. Keep all
   existing sizes and line heights; replace only the family they select. */
.narrative-brand > span,
.narrative-backtype span,
.narrative-backtype strong,
.narrative-now a strong,
.narrative-now a b,
.narrative-opening-note > span,
.narrative-statement-footer > span,
.narrative-chapter-word,
.narrative-menu-art > span,
.decision-mark > span,
.decision-mark > em,
.water-depth > span {
  font-family: var(--displayLatin);
}
.narrative-opening .stream-story-credit > div > strong {
  font-family: var(--headingCJK);
}

/* Symbol-only menu affordances deliberately retain a symbol-capable system
   face. Cosmic Solace has no arrows or playback/menu glyphs. */
.narrative-menu-glyph,
#stream-menu button > i,
[data-chapter-video-toggle] [aria-hidden="true"] {
  font-family: system-ui, "Apple Symbols", sans-serif;
}
