@font-face {
  font-family: "xinwei";
  src: local("华文新魏_GBK"), url("font/xinwei.woff2") format("woff2");
  font-display: swap;
}

/* Keep the original fonts outside settings, notifications and results text.
   The layer covers later engine styles and responsive font shorthands. */
@layer game-typography {
  :is(.menu-container, .popup-container > .menu, .game-prompt,
    #arena .damage.normal-font, #arena > .popup,
    #target-reason, #selection-summary, #noname-connection-status),
  :is(.menu-container, .popup-container > .menu, .game-prompt,
    #arena .damage.normal-font, #arena > .popup,
    #target-reason, #selection-summary, #noname-connection-status) * {
    font-family: "xinwei", "NonameSuits", sans-serif !important;
  }

  /* Only result headings and statistics; card labels and actions keep their fonts. */
  #window .dialog.game-results .content :is(.caption, .text, td, th):not(.card, .card *) {
    font-family: "xinwei", "NonameSuits", sans-serif !important;
  }

  /* These spans contain pictograms rather than text. */
  :is(.menu-container, .popup-container > .menu, .game-prompt,
    #arena .damage.normal-font, #arena > .popup,
    #target-reason, #selection-summary, #noname-connection-status) [style*="NonameSuits" i] {
    font-family: "NonameSuits" !important;
  }
}
