function formatCharRow(entry: VoteEntry, showNationEmoji = false): string {
  const cfgFormat  = cfg("charDisplayFormat");
  const nation     = entry.characterNation;
  const wRankEntry = entry.characterName ? getEntry(entry.characterName, nation ?? "Capella") : null;

  let wrank = "";
  if (wRankEntry) {
    const wRankGoal    = cfg("wRankGoal");
    wrank = format.wrank.full(wRankEntry, { goal: wRankGoal, brackets: true });
  }

  const classStr = entry.characterClass
    ? (getClassEmoji(entry.characterClass) || entry.characterClass)
    : "";

  const levelStr = entry.characterLevel && cfg("showLevelInMessages" as any)
    ? `${entry.characterLevel}`
    : "";

  let row = cfgFormat
    .replace("{wrank}", wrank)
    .replace("{class}",  classStr)
    .replace("{level}",  levelStr)
    .replace("{name}",   entry.characterName ?? entry.displayName)
    .replace(/\s+/g, " ")
    .trim();

  // Bringer title — independent of W.Rank so override always shows
  function getNationBringerTitle(nation: Nation) {
    const stormBringerIcon = getEmoji("storm_bringer") || "⚡";
    const stormBringer = `${stormBringerIcon}`;

    const luminousBringerIcon = getEmoji("luminous_bringer") || "⚡";
    const luminousBringer = `${luminousBringerIcon}` || `⚡ Luminous Bringer`;

    const nationMap = {
      "Capella": luminousBringer,
      "Procyon": stormBringer
    };

    return nationMap[nation];
  }
  if (nation && entry.userKey) {
    const bringer = getBringer(nation);
    if (bringer && bringer === entry.characterName) {
      const bringerTitle = getNationBringerTitle(nation);
      row += ` · ${bringerTitle}`;
    }
    // if (bringer && bringer === entry.characterName) {
    //   const emoji = nation === "Capella"
    //     ? (getEmoji("luminous_bringer") || "🔆")
    //     : (getEmoji("storm_bringer")    || "⚡");
    //   const title = nation === "Capella" ? "Luminous Bringer" : "Storm Bringer";
    //   row += ` · ${emoji} **${title}**`;
    // }
  }

  if (entry.borrowedFrom) {
    row += ` ${getEmoji("borrowed") || "🔗"}`;
  }

  if (showNationEmoji && nation) row = `${getNationEmoji(nation)} ${row}`;

  return row;
}