feat(stats): final ranking 1-48, favorite highlight, team records (Stage C)

- Canonical final ranking: each team carries a .rank from the stage-reached
  chain (champion>runner-up>3rd>4th>QF>R16>R32>group, then pts>GD>GF>id),
  computed from REAL knockout results only (simulation never moves it). The #
  column shows this rank and is the default sort; it stays canonical when
  sorting other columns, and clicking # returns to it.
- Favorite-team row highlight (gold inset border + tint); re-renders on
  favchange. No stars in the table (highlight-only, like the bracket).
- Team record cards: biggest win (-> openMatchModal), longest win streak
  (>=2, else hidden), and champion's path (R32->Final route, gated on the
  verdict, rows -> openMatchModal). Each degrades away when its data is null.
- stats.js imports getFavorites (storage) + openMatchModal (modal). i18n
  tip.rank/stats.rankCol/biggestWin/winStreak/championPath (EN/PT); CSS for
  .row-fav, record cards, champion path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Lucas Kalil 2026-06-17 00:22:24 -03:00
parent beac60518f
commit 8a521575aa
3 changed files with 301 additions and 23 deletions

View file

@ -151,9 +151,14 @@ const dicts = {
'tip.pts': 'Points',
'tip.gpg': 'Goals per match (average)',
'tip.cs': 'Clean sheets (no goals conceded)',
'tip.rank': 'Final ranking — deepest stage reached, then points',
'stats.rankCol': 'Rank',
'stats.bestAttack': 'Best attack',
'stats.bestDefense': 'Best defense',
'stats.mostCleanSheets': 'Most clean sheets',
'stats.biggestWin': 'Biggest win',
'stats.winStreak': 'Longest win streak',
'stats.championPath': "Champion's path",
'stats.prevPage': 'Previous page',
'stats.nextPage': 'Next page',
'stats.seeAllMatches': 'See all matches',
@ -304,9 +309,14 @@ const dicts = {
'tip.pts': 'Pontos',
'tip.gpg': 'Gols por jogo (média)',
'tip.cs': 'Clean sheets (sem sofrer gols)',
'tip.rank': 'Classificação final — fase alcançada, depois pontos',
'stats.rankCol': 'Posição',
'stats.bestAttack': 'Melhor ataque',
'stats.bestDefense': 'Melhor defesa',
'stats.mostCleanSheets': 'Mais clean sheets',
'stats.biggestWin': 'Maior goleada',
'stats.winStreak': 'Maior sequência de vitórias',
'stats.championPath': 'Caminho do campeão',
'stats.prevPage': 'Página anterior',
'stats.nextPage': 'Próxima página',
'stats.seeAllMatches': 'Ver todas as partidas',