/*
 * P5X licensed font bridge.
 *
 * The UI reference pack contains TextMeshPro SDF atlas PNGs. Those are glyph
 * textures, not browser font binaries, so they cannot be used directly by
 * @font-face. The source-family identities were recovered in
 * data/templates/font-sources.json; these faces resolve licensed local
 * installations without committing or serving the atlas art.
 *
 * A licensed web build can prepend a WOFF2 URL to each `src` list. Keep the
 * local() entries as development fallbacks and use the real licensed font
 * binary rather than tracing/repacking the SDF atlas.
 */

@font-face {
  font-family: "P5X UI Display";
  src:
    local("FOT-RodinWanpaku Pro"),
    local("FOT-RodinWanpaku Pro LB"),
    local("AsiaKCHD-B"),
    local("Tensentype JiaLiZhunCuYuanGB18030");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "P5X UI Text";
  src:
    local("FOT-Slump Std"),
    local("AsiaKCM-R"),
    local("Liberation Sans");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --p5x-display: "P5X UI Display", "Arial Narrow", "Haettenschweiler",
                 "Impact", system-ui, sans-serif;
  --p5x-text: "P5X UI Text", "Liberation Sans", system-ui, -apple-system,
              "Segoe UI", sans-serif;

  /* Override app.css's generic stacks once this stylesheet is loaded. */
  --display: var(--p5x-display);
  --body: var(--p5x-text);
}

body,
button,
input,
select,
textarea {
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* The game face is upright. Existing Persona-style italic declarations can
 * still synthesize the deliberate menu slant while preserving this family. */
.brand-mark,
.brand-name,
.tab,
button.ghost,
h2,
h3,
h4,
th,
.buffs legend {
  font-family: var(--p5x-display);
}
