/* ==========================================================================
   GM SPORTS: revisao de UI/UX (14/11/2026)
   Camada unica, carregada por ultimo. Um bloco por secao, na ordem da revisao:
   1 layout (desktop) · 2 tipografia, cor e contraste · 3 mobile · 4 acessibilidade.
   ========================================================================== */

/* ---------- 1. Layout e alinhamento (desktop) ---------------------------- */

:root {
  --page-max: 1320px;         /* um container para todas as telas */
  --page-top: 0px;            /* o titulo de toda tela comeca na mesma linha */
}

/* 1.1 Um unico container: o Painel ocupava o painel inteiro, Financas 1200 e Liga 1320. */
.stadium-app > .board > main.main,
.stadium-app > .board > main.main[data-view] {
  width: 100%;
  max-width: var(--page-max) !important;
  margin-inline: auto !important;
}

@media (min-width: 1024px) {
  /* 1.2 e 1.3 A grade da casca dividia a sobra de altura entre as tres linhas: o
     painel descia (y 122, 181 ou 280 conforme a tela) e o rodape boiava no meio.
     Agora o topo e o rodape tem a altura do conteudo e o painel fica com a sobra. */
  .shell.stadium-app {
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
    align-content: start;
  }
  .stadium-app > .site-footer { align-self: end; }

  /* 1.2 O mesmo topo em toda tela: os wrappers de Elenco, Mercado e Tatica somavam
     7 a 34 px antes do titulo. */
  .stadium-app > .board > main.main > .gm-view,
  .stadium-app > .board > main.main > .tactics-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .stadium-app > .board > main.main > .gm-view > :first-child,
  .stadium-app > .board > main.main > .tactics-page > :first-child {
    margin-top: 0 !important;
  }

  /* Cabecalho alto (com botoes ao lado): o titulo continua na linha de cima. */
  .stadium-app > .board > main.main .page-heading > h1 { align-self: flex-start; }
  /* Tatica: o rotulo "MATCH COMMAND" acima do titulo empurrava o h1 34 px; nenhuma
     outra tela tem rotulo ali. */
  .stadium-app .board > main.main[data-view="tatica"] .tactics-page .tactics-heading { padding-top: 0; align-items: flex-start; }
  .stadium-app main.main[data-view="tatica"] .tactics-kicker { display: none; }

  /* 1.5 Painel: a coluna dos tres cards fecha na mesma altura do card da partida. */
  .stadium-app main.main[data-view="painel"] .dash-top { align-items: stretch; }
  .stadium-app main.main[data-view="painel"] .dash-top > .dash-metrics {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    height: auto;
    padding-block: 0;
  }
  .stadium-app main.main[data-view="painel"] .dash-top > .dash-metrics > .metric-card {
    flex: 1 1 0;
    min-height: 0;
    justify-content: center;
  }

  /* 1.7 Botoes de admin: longe de "Sign out", com um fio separando. */
  .stadium-app > header.topbar > .admin-controls {
    margin-left: var(--space-6);
    padding-left: var(--space-4);
    gap: var(--space-2);
  }
}

/* 1.4 Fundo ilustrado: mais escuro e desfocado nas faixas expostas. */
body:has(.stadium-app) .gm-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3, 13, 19, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* 1.6 Financas: o livro da temporada vazio vira uma linha, nao um card esticado. */
.finance-columns > .fin-ledger:has(> .fin-ledger-empty) { align-self: start; }

/* ---------- 2. Tipografia, cor e contraste ------------------------------- */

/* 2.1 A escala de 7 passos vive em styles/tokens.css (--text-xs a --text-2xl) e as
   folhas antigas ja leem os tokens. Aqui ficam so os casos que eram relativos (em,
   clamp) e caiam fora da escala. */
.stadium-app main.main :is(.card, .topbar, .tactics-field-title-row, .tactics-squad-head) > h2 { font-size: var(--text-lg); }
.stadium-app main.main .market-title-row > h2 { font-size: var(--text-xl); }
.stadium-app .squad-table .stars,
.stadium-app .tactics-page .player-row .stars { font-size: var(--text-xs); }
.stadium-app .tactics-page .pitch .slot .slot-name,
.stadium-app .tactics-page .name-status-text { font-size: var(--text-xs); }

/* 2.3 Estrela vazia: de 1,9:1 para 4,6:1. */
.stars .off { color: var(--star-off); }
.stars .half { background-image: linear-gradient(90deg, #d4af37 50%, var(--star-off) 50%); }

/* 2.3 e 2.4 Selo de posicao: as mesmas quatro cores em toda tela, texto claro
   sobre fundo escuro (o azul e o rosa pastel com texto branco davam 2,5:1). */
.pos,
.gm-view .pos { color: var(--pos-badge-ink); font-size: var(--text-xs); font-weight: 700; }
.pos.gk, .gm-view .pos.gk { background: var(--pos-badge-gk); color: var(--pos-badge-ink); }
.pos.d, .gm-view .pos.d { background: var(--pos-badge-def); color: var(--pos-badge-ink); }
.pos.m, .gm-view .pos.m { background: var(--pos-badge-mid); color: var(--pos-badge-ink); }
.pos.f, .gm-view .pos.f { background: var(--pos-badge-att); color: var(--pos-badge-ink); }

/* 2.3 Tatica: quem ja esta escalado continua legivel. O fundo escuro e o nome em
   cinza marcam o estado; antes a linha inteira ia a 45% de opacidade. */
.tactics-page .player-row.used > * { opacity: 1; }
/* Na lista de escolha (celular) quem ja esta no campo ou no banco tem de saltar aos olhos (dono, 19/11): fundo
   mais escuro, foto sem cor e o resto apagado; o "i" fica aceso. */
.slot-picker-row.used { background: rgba(0, 0, 0, .42); }
.slot-picker-row.used > :not(.info-btn) { opacity: .5; }
.slot-picker-row.used .avatar { filter: grayscale(1); }
.slot-picker-row.used img { filter: none !important; }   /* the whole avatar (face and its coloured disc) goes grey once, on the .avatar */
.tactics-page .player-row.used :is(.player-name, .name, strong, b),
.slot-picker-row.used :is(.player-name, .name, strong, b) { color: var(--muted); }
.tactics-page .player-row.used img { filter: saturate(.55); }

/* 2.5 Fadiga sem corte: cor neutra. O verde, o amarelo e o vermelho ficam para
   quando a fadiga custa alguma coisa. */
.fatigue-pct.is-fresh { color: var(--muted); font-weight: 500; }
.fatigue-dot.is-fresh { background-color: #3d5560; color: var(--text); }

/* 2.2 "ONLINE FOOTBALL" no logo: de 7,5 px para 12 px. Em caixa alta nao cabe ao
   lado do escudo (104 px para 94 de espaco), entao vai em caixa mista. */
.stadium-app .stadium-brand-words small {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: lowercase;
  overflow: visible;
  text-overflow: clip;
}
.stadium-app .stadium-brand-words small::first-letter { text-transform: uppercase; }

/* ---------- 3. Mobile (ate 560 px) --------------------------------------- */

.topbar-search-toggle { display: none; }
.stadium-more-account { display: none; }
.stadium-more-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stadium-more-close {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: -8px -6px -8px 0;
  border: 1px solid #2d5055; border-radius: 10px; background: #102c35; color: #eff9f4; cursor: pointer;
}
.stadium-more-drawer:focus { outline: none; }
.stadium-more-drawer:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }

@media (max-width: 560px) {
  /* 3.1 Cabecalho em duas linhas (pedido do dono, 15/11): em cima o escudo, o nome do clube (20 px), a busca e a radio;
     embaixo $GMS, Glory e torcida, um terco cada. Divisao e proximo jogo saem do celular (ficam no Painel).
     Shop, Account, Moderation, Sign out e a faixa de admin vao para o menu More. */
  body .stadium-app > header.topbar.topbar {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 44px 44px;
    grid-template-areas: "crest club search radio" "cash cash cash cash";
    grid-template-rows: 44px auto;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 8px 8px 8px 10px;
  }
  body .stadium-app > header.topbar.topbar.search-open {
    grid-template-areas: "crest club search radio" "find find find find" "cash cash cash cash";
    grid-template-rows: 44px 44px auto;
  }
  body .stadium-app > header.topbar.topbar > .topbar-left { grid-area: find; display: none; width: 100%; }
  body .stadium-app > header.topbar.topbar.search-open > .topbar-left { display: flex; }
  body .stadium-app > header.topbar.topbar > .topbar-actions { display: contents; }
  body .stadium-app > header.topbar.topbar .club-identity > .crest { grid-area: crest; width: 40px; height: 40px; }
  body .stadium-app > header.topbar.topbar .club-details { grid-area: club; justify-items: start; text-align: left; min-width: 0; }
  body .stadium-app > header.topbar.topbar .club-line { justify-content: flex-start; min-width: 0; max-width: 100%; }
  body .stadium-app > header.topbar.topbar .club {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: var(--text-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  }
  body .stadium-app > header.topbar.topbar :is(.club-aside, .club-subline, .club-next) { display: none; }
  body .stadium-app > header.topbar.topbar .topbar-metrics {
    grid-area: cash; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
    width: auto; margin: 0; padding: 6px 0 0; border-top: 1px solid #2d5055;
  }
  body .stadium-app > header.topbar.topbar .topbar-metrics > .topbar-metric {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
    min-width: 0; min-height: 44px; padding: 0 4px; border: 0; background: none;
  }
  body .stadium-app > header.topbar.topbar .topbar-metrics > .topbar-metric + .topbar-metric { border-left: 1px solid #2d5055; }
  body .stadium-app > header.topbar.topbar .topbar-metric .metric-label { font-size: var(--text-xs); line-height: 1.2; letter-spacing: .08em; }
  body .stadium-app > header.topbar.topbar .topbar-metric .metric-value { font-size: var(--text-base); line-height: 1.25; font-variant-numeric: tabular-nums; }
  body .stadium-app > header.topbar.topbar .topbar-search-toggle {
    grid-area: search; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid #2f5358; border-radius: 10px; background: #0f2a33; color: var(--color-accent); cursor: pointer;
  }
  body .stadium-app > header.topbar.topbar .topbar-search-toggle[aria-expanded="true"] { background: #234239; border-color: #487364; }
  body .stadium-app > header.topbar.topbar .topbar-radio { grid-area: radio; width: 44px; height: 44px; }
  body .stadium-app > header.topbar.topbar .user-links,
  body .stadium-app > header.topbar.topbar > .admin-controls { display: none !important; }

  /* Menu More: a conta e a faixa de admin (Glory e torcida voltaram para o topo). */
  .stadium-more-account { display: block; padding-bottom: 14px; border-bottom: 1px solid #375960; }
  .stadium-app .stadium-more-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stadium-app .stadium-more-links .stadium-more-signout { color: var(--bad-text); }
  .stadium-more-account > .admin-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px; }
  .stadium-more-account > .admin-controls .btn { flex: 1 1 0; }

  /* 3.2 Rotulos da barra inferior: de 8,55 px para 12 px. */
  .stadium-app .stadium-tab-label {
    font-size: var(--text-xs); font-weight: 650; letter-spacing: -.02em; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal;
  }
  .stadium-app .stadium-mobile-tab { padding-inline: 0; }
  .stadium-app .stadium-mobile-nav { gap: 2px; padding-inline: max(4px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right)); }

  /* 3.3 Padding aninhado: casca 14 + painel 15 + main 16 + card 16 + tabela 8 de cada
     lado deixavam 292 px de 400. O main e o wrapper da tabela zeram; a casca e o
     painel encolhem. Sobra 336 px para a tabela. */
  body .shell.stadium-app { padding-inline: 8px; }
  body .stadium-app > .board { padding: 12px; }
  body .stadium-app > .board > main.main { padding-inline: 0 !important; }
  body .stadium-app > .board > main.main .card { padding-inline: 12px; }
  body .stadium-app > .board > main.main .table-wrap { padding-inline: 0; margin-inline: 0; }
}

/* 3.11 Alvos de toque pequenos (ate 1023 px, onde vale a barra inferior). */
@media (max-width: 1023px) {
  .stadium-app .site-footer a,
  .stadium-app .site-footer .lang-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .stadium-app .site-footer .footer-social a,
  .footer-social a { min-width: 44px; min-height: 44px; justify-content: center; }
  .stadium-app .side-radio-btn,
  .stadium-app .topbar-radio { min-width: 44px; min-height: 44px; }
  .stadium-app > header.topbar .topbar-metric { min-height: 44px; }
}

/* 3.4 e 3.5 Abas de celular (mobile-tabs.mjs): Tactics e League. */
.mobile-tabs { display: none; }
@media (max-width: 560px) {
  .mobile-tabs {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
    position: sticky; top: 0; z-index: 5;
    margin: 0 0 12px; padding: 4px; border: 1px solid #2d5055; border-radius: 12px; background: #0b222c;
  }
  .mobile-tab {
    min-height: 44px; padding: 0 6px; border: 1px solid transparent; border-radius: 9px; background: transparent;
    color: #bad6d2; font: inherit; font-size: var(--text-md); font-weight: 700; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mobile-tab.active { color: var(--color-accent); background: #234239; border-color: #487364; }
  .mtab-off { display: none !important; }
  /* A aba já diz "Escalação": o kicker do painel repetia a mesma palavra logo abaixo dela. */
  .tactics-page .tactics-section-heading .tactics-kicker { display: none; }

  /* A tabela da liga ganhou 50 px: a coluna GA volta (so GD continua fora). */
  .league-standings-table col.ga { display: table-column; }
  .stadium-app .board .main table.league-standings-table :is(th, td):nth-child(8) { display: table-cell; }
  /* No 360 nao ha 14 px para o clube ler o nome inteiro em uma linha: os gols contra saem (GP fica) e as linhas
     voltam a ter a mesma altura; os gols seguem na pagina do clube. */
  @media (max-width: 380px) {
    .league-standings-table col.ga { display: none; }
    .stadium-app .board .main table.league-standings-table :is(th, td):nth-child(8) { display: none; }
  }

  /* 3.4 Botao "i" sobre o avatar: 16 px de desenho, 44 px de toque. */
  .tactics-page .info-btn,
  .slot-picker .info-btn { position: relative; overflow: visible; }
  .tactics-page .pitch .slot .shirt .info-btn { position: absolute; }
  .tactics-page .info-btn::after,
  .slot-picker .info-btn::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  }
  .tactics-page .pitch .slot .shirt .info-btn { width: 22px; height: 22px; font-size: var(--text-xs); top: -6px; left: -6px; }
  .tactics-page .pitch .slot .shirt .info-btn::after { width: 40px; height: 40px; transform: translate(-60%, -60%); }
  /* No banco o "i" fica no canto do cartao: a area de toque nao passa de 32 px, senao cobre o nome e o toque no
     cartao (que abre a lista de substitutos) abre a ficha do jogador. */
  .tactics-page .bench-slot .bench-marks .info-btn::after { width: 32px; height: 32px; }
}

/* Tactics no celular: titulo e "Save tactics" na mesma linha. */
@media (max-width: 560px) {
  .stadium-app .board > main.main .tactics-page .tactics-heading { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 0 0 10px; }
  .stadium-app .board > main.main .tactics-page .tactics-heading .tactics-kicker { display: none; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-copy { flex: 1 1 auto; min-width: 0; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-actions { flex: 0 0 auto; width: auto; padding: 0; border: 0; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-actions .btn { width: auto; }
}

/* 3.6 Squad (cards): nome + posicao, estrelas a direita; segunda linha fixa. */
.squad-card-row-v2 .squad-card-topline { justify-content: flex-start; }
.squad-card-row-v2 .squad-card-name { flex: 0 1 auto; }
.squad-card-row-v2 .squad-card-pos { gap: 4px; }
.squad-card-row-v2 .squad-card-pos .pos { min-width: 30px; height: 20px; padding-inline: 4px; }
.squad-card-row-v2 .squad-card-stars { margin-left: auto; }
.squad-card-row-v2 .squad-card-meta { flex-wrap: nowrap; overflow: hidden; }
.squad-card-row-v2 .squad-card-fatigue { display: inline-flex; }

/* 3.7 Training: acao em lote por setor (toda largura) e linha compacta no celular. */
.training-bulk {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px;
  border: 1px solid var(--surface-border); border-radius: var(--radius-md); background: rgba(0, 0, 0, .16);
}
.training-bulk-title { color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.training-bulk select { width: auto; min-width: 9.5rem; flex: 0 1 12rem; }
.training-bulk .btn { align-self: end; }
/* A barra de alteracoes pendentes estica a etiqueta ate a altura dos botoes: o texto dela fica no meio, nao no alto (26/11/2026). */
.training-head > .chips { align-items: center; }
.training-head > .chips > .badge { display: inline-flex; align-items: center; align-self: stretch; }
@media (max-width: 1023px) {
  .training-bulk-title { flex: 1 1 100%; }
  .training-bulk select { flex: 1 1 0; min-width: 0; }
  body .stadium-app .training-mobile-list { gap: 0; padding-bottom: 0; }
  body .stadium-app .training-player-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 42%); align-items: center; gap: 8px;
    min-height: 56px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--surface-border); border-radius: 0; background: none;
  }
  body .stadium-app .training-player-card.changed { box-shadow: inset 3px 0 0 var(--color-accent); padding-left: 8px; }
  .training-row-player { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; min-width: 0; color: var(--text); text-decoration: none; }
  .training-row-player:hover { text-decoration: none; }
  .training-row-text { display: grid; gap: 3px; min-width: 0; }
  .training-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-md); font-weight: 650; }
  .training-row-meta { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--text-xs); white-space: nowrap; }
  .training-row-meta .pos { min-width: 28px; padding: 0 4px; line-height: 18px; }
  .training-row-up { color: var(--good); }
  .training-row-down { color: var(--bad-text); }
  .training-player-card > select { width: 100%; min-width: 0; min-height: var(--control-h-touch, 44px); padding-inline: 8px; font-size: var(--text-sm); }
  .training-player-card > select.changed { border-color: var(--color-accent); }
  /* As alteracoes pendentes acompanham a rolagem, acima da barra inferior. */
  .stadium-app .training-head > .chips:not(:empty) {
    position: sticky; top: 0; z-index: 4; width: 100%; padding: 8px; border-radius: 10px; background: #0b222c; border: 1px solid #487364;
  }
}

/* 3.8 Market: filtros recolhidos, campos em duas colunas, abas regulares. */
.market-filter-toggle { display: none; }
.market-filter-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-xs); font-weight: 800;
}
.market-filter-count[hidden] { display: none; }
@media (max-width: 560px) {
  .stadium-app .market-filters { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
  .stadium-app .market-filters > .market-filter-toggle { display: inline-flex; grid-column: 1 / -1; width: 100%; justify-content: center; }
  .stadium-app .market-filters:not(.filters-open) > :not(.market-filter-toggle) { display: none !important; }
  /* A player's name wraps to a second line instead of being cut ("Washington Azev…"); the row grows, the select stays 44 px. */
  .training-row-name { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
  /* The same in the tables of the Dashboard and of the league: the name is read whole ("Zacarías Ferraro", "Clube Atlético Patos"). */
  .stadium-app .dashboard .highlights-table .player-cell-wrap { overflow: visible; }
  .stadium-app .dashboard .highlights-table .player-name { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
  .stadium-app .board .main table.league-standings-table td.team-name .team-label { display: block; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
  .stadium-app .market-filters:not(.filters-open) { padding-block: 8px; }
  .stadium-app .market-filters > label.field { margin: 0; min-width: 0; width: auto; }
  .stadium-app .market-filters > label.field:has(select),
  .stadium-app .market-filters > label.field:has(input[type="search"]) { grid-column: 1 / -1; }
  .stadium-app .gm-tab-rail .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; }
  .stadium-app .gm-tab-rail .tabs .tab {
    display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px;
    text-align: center; white-space: normal; line-height: 1.15; font-size: var(--text-sm);
  }
}

/* 3.9 Calendar: a linha de jogo mostra o nome no desktop e a SIGLA no celular (regra unica em styles.css#team-name-fixture); esta
   folha nao troca mais o nome pela sigla no celular: aqui so ficam os ajustes de tamanho da tabela. */
@media (max-width: 760px) {
  .stadium-app main.main[data-view="partidas"] .club-fixtures-table th { font-size: var(--text-xs); }
}
@media (max-width: 760px) {
  body .stadium-app .board main.main[data-view="partidas"] table.club-fixtures-table .team-label {
    white-space: normal; overflow: visible; text-overflow: clip; min-width: 0;
  }
  body .stadium-app .board main.main[data-view="partidas"] table.club-fixtures-table .team-with-crest { min-width: 0; }
  body .stadium-app .board main.main[data-view="partidas"] table.club-fixtures-table .col-fixed-1 { width: 4.9rem; }   /* "RODADA" cabe com folga sobre a rodada, sem colar no MANDANTE */
  body .stadium-app .board main.main[data-view="partidas"] table.club-fixtures-table .fixture-when { display: block; font-size: var(--text-xs); white-space: normal; overflow-wrap: anywhere; }
}

/* ---------- 4. Acessibilidade e semantica -------------------------------- */

/* 4.1 Skip link: invisivel ate receber o foco do teclado. Fica fora da grade da casca. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200; transform: translateY(-200%);
  padding: 10px 16px; border-radius: 10px; background: var(--color-accent); color: var(--color-accent-ink);
  font-size: var(--text-md); font-weight: 800; text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid #fff; outline-offset: 2px; }
main.main:focus { outline: none; }

/* 4.2 Os nomes dos grupos do menu e os rotulos de Financas deixaram de ser h2/h3:
   mesma aparencia, sem entrar na estrutura de titulos antes do h1. */
.stadium-nav-title { display: block; }
.fin-cash-label, .fin-ledger-title { margin: 0; }

/* ---------- 5. SEO: o texto que vem no HTML inicial ------------------------ */
/* A landing pre-renderizada fica dentro de #app e some assim que o app desenha. Enquanto os modulos carregam, ela e so um texto
   sobre o fundo escuro, no lugar de uma tela em branco. */
.prerender { max-width: 40rem; margin: 0 auto; padding: 18vh 24px 24px; text-align: center; color: var(--text); }
.prerender h1 { margin: 0 0 12px; font-size: var(--text-xl); }
.prerender p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.prerender a { display: inline-block; min-height: 44px; padding: 10px 6px; }

/* ---------- Ajustes apos o primeiro teste (14/11) -------------------------- */

/* Um so cabecalho de pagina em toda tela: titulo, fio de 1 px, 14 px de respiro. */
/* Tactics tinha dois fios (o do bloco e o do titulo dentro dele) e 25 px de margem. */
.stadium-app .board > main.main .tactics-page .tactics-heading { padding: 0 0 10px; margin: 0 0 14px; align-items: center; }
.stadium-app .board > main.main .tactics-page .tactics-heading-copy .page-heading { padding: 0; margin: 0; border: 0; min-height: 0; }
.stadium-app .board > main.main .tactics-page .tactics-heading-copy .page-heading::after { content: none; }
/* Squad: o link do salario tinha 44 px de altura e esticava a linha do titulo (55 px); o alvo de toque segue, a linha volta a 35. */
.squad-title-row { align-items: center; margin-bottom: 14px; }
.squad-wage-chip-link { margin-block: -10px; }
.stadium-app .gm-view.gm-squad,
.stadium-app .gm-view.gm-market { row-gap: 14px; }

/* Valores do topo centralizados com o rotulo. */
.stadium-app > header.topbar .topbar-metric { justify-items: center; text-align: center; }
.stadium-app > header.topbar .topbar-metric .metric-label,
.stadium-app > header.topbar .topbar-metric .metric-value { text-align: center; }

/* Training, card Programmes: a tabela ocupa o card inteiro e o fundo e translucido como o resto. */
.training-programs-card .table-wrap { background: transparent; }
.training-programs-card table { width: 100% !important; }
.training-programs-card td { background: rgba(16, 44, 43, .55); }

/* Manual: a fileira de chips ocupa a propria linha e quebra, em vez de passar da borda do card. */
.manual-head > .manual-chips { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
.manual-head { min-width: 0; }

/* Busca: o topo vira uma camada acima do painel (o blur do topo criava um contexto que ficava atras do painel). */
.stadium-app > header.topbar { position: relative; z-index: 30; }
.stadium-app .board > main.main .tactics-page .tactics-heading-copy .page-heading { margin: 0 !important; padding: 0 !important; border: 0 !important; }

/* A linha do titulo marca o espaco ate o conteudo uma vez so (14 px): sem a margem do titulo somada ao gap da grade. */
.stadium-app .gm-view.gm-squad > .page-heading,
.stadium-app .gm-view.gm-market > .page-heading { margin-bottom: 0; }
.stadium-app .gm-view.gm-market > .page-heading .gm-hero-shortcut { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; }
.stadium-app .board > main.main .tactics-page .tactics-heading { align-items: flex-start !important; }
.stadium-app .board > main.main .tactics-page .tactics-heading-actions { margin-top: -6px; }
.stadium-app .gm-view.gm-squad > .page-heading,
.stadium-app .gm-view.gm-market > .page-heading { margin-bottom: 0 !important; }

/* Radio (popup da lateral): so o nome da faixa e os botoes. O texto fixo "NOW PLAYING · MATCHDAY SOUND" saiu (era o mesmo para qualquer musica);
   a ordem e Anterior, Play, Proximo, e o volume numa segunda linha. */
#side-radio-panel.side-radio-panel { padding: 12px 12px 12px; }
#side-radio-panel.side-radio-panel .gm-radio-info { display: block !important; padding-right: 40px !important; }
#side-radio-panel.side-radio-panel .gm-radio-track-title {
  display: block; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-size: var(--text-md); font-weight: 700; line-height: 32px;
}
#side-radio-panel.side-radio-panel .gm-radio-content { display: grid !important; gap: 8px; }
#side-radio-panel.side-radio-panel .gm-radio-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
#side-radio-panel.side-radio-panel .gm-radio-btn { width: 40px; height: 40px; flex: none; }
#side-radio-panel.side-radio-panel .gm-radio-btn-prev { display: inline-flex !important; opacity: 1 !important; visibility: visible !important; }
#side-radio-panel.side-radio-panel .gm-radio-volume-wrap { display: flex; align-items: center; justify-content: center; gap: 4px; }
#side-radio-panel.side-radio-panel .gm-radio-volume-wrap .gm-radio-btn { width: 36px; height: 36px; }

/* Estadio: os botoes de melhoria voltam ao CENTRO da area de cada instalacao. A regra "revert-v2" (styles-stadium-redesign.css) os colocava
   no canto superior esquerdo do retangulo do manifest (left: --x, top: --y); o centro (--cx, --cy) ja vem calculado por placePin(). */
.stadium-app .hotspots .hotspot.on-image,
.stadium-app .hotspots .hotspot.bowl.on-image {
  left: var(--cx, 50%);
  top: var(--cy, 50%);
  width: clamp(30px, 3.2vw, 42px);
  height: clamp(30px, 3.2vw, 42px);
  min-width: 30px;
  min-height: 30px;
  transform: translate(-50%, -50%);
}

/* Tactics no celular: substitutos em linhas de uma so linha (eram cartoes de 102 px, 315 px no total) e o espaco ganho vai para o campo. */
@media (max-width: 560px) {
  .tactics-page .bench { gap: 4px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tactics-page .bench-slot,
  .tactics-page .bench-slot.filled,
  .tactics-page .bench-slot.filled.dual-status {
    display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 6px 4px 8px; text-align: left;
  }
  .tactics-page .bench-slot .bench-body { display: flex; align-items: center; gap: 6px; justify-items: initial; flex: 1 1 auto; min-width: 0; order: 1; }
  .tactics-page .bench-slot .bench-body > div { flex: 1 1 auto; min-width: 0; }
  .tactics-page .bench-slot .name-status { justify-content: flex-start; }
  .tactics-page .bench-slot .name-status-text { font-size: var(--text-sm); font-weight: 650; }
  .tactics-page .bench-slot .bench-marks { position: static; order: 3; flex: none; display: flex; padding: 0; gap: 3px; }
  .tactics-page .bench-slot .fatigue-dot { position: static; order: 2; flex: none; }
  .tactics-page .bench-slot .fatigue-dot.is-fresh { display: none; }
  .tactics-page .bench-slot .pos { min-width: 28px; padding-inline: 4px; }
  .tactics-page .tactics-bench-heading { margin-top: 8px; }
  .tactics-page .tactics-selection-bar { margin-top: 8px; }
  /* O campo ganha o que o banco devolveu: camisas maiores e mais ar entre as linhas. */
  .tactics-page .pitch { gap: clamp(12px, 4.4cqw, 20px) 0; }
  .tactics-page .pitch .slot .shirt { width: clamp(40px, 17cqw, 66px); height: clamp(40px, 17cqw, 66px); }
}
@media (max-width: 560px) {
  .stadium-app .board > main.main .tactics-page .tactics-heading { display: flex !important; flex-direction: row !important; align-items: center !important; flex-wrap: nowrap !important; gap: 8px; padding: 0 0 10px; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-copy { flex: 1 1 auto; min-width: 0; text-align: left; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-actions { flex: 0 0 auto !important; width: auto !important; margin: 0 !important; }
  .stadium-app .board > main.main .tactics-page .tactics-heading-actions .btn { width: auto !important; max-width: none !important; margin: 0 !important; }
}
/* Painel: os tres cards laterais dividem a altura do card da partida sem rolagem interna (nunca abaixo do proprio conteudo). */
@media (min-width: 1024px) {
  .stadium-app main.main[data-view="painel"] .dash-top > .dash-metrics > .metric-card { flex: 1 1 auto; min-height: auto; overflow: visible; }
  .stadium-app main.main[data-view="painel"] .dash-top > .dash-metrics { overflow: visible; }
}
.stadium-app .training-programs-card table { max-width: none !important; width: 100% !important; }
.stadium-app .training-programs-card .table-wrap { background: transparent !important; }
.stadium-app .training-programs-card td { background: rgba(16, 44, 43, .5) !important; }

/* Topbar com o grupo Admin: em vez de vazar para fora do card (1280 e 1440), a
   barra quebra em duas linhas e o grupo fica alinhado a direita na segunda. So
   no desktop: no celular o admin vive no painel "Main menu". */
@media (min-width: 1024px) {
  .stadium-app > header.topbar:has(.admin-controls) {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .stadium-app > header.topbar:has(.admin-controls) > .topbar-left {
    flex: 0 1 220px;
    min-width: 120px;
  }
  .stadium-app > header.topbar:has(.admin-controls) > .admin-controls {
    flex: 1 1 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
  .stadium-app > header.topbar .admin-controls > .btn { white-space: nowrap; }
  .stadium-app > header.topbar .admin-controls > .admin-label { margin-right: auto; }
}

/* Liga: nenhum nome cortado nas tabelas (card da rodada, artilheiros e classificacao). O texto quebra em duas linhas e
   o escudo fica inteiro; antes o nome era cortado no meio da palavra, sem reticencias (Gabriel, 15/11/2026). Fora de
   qualquer media query: o corte acontecia tambem em 1280 e 1440. */
.stadium-app .board .main[data-view="liga"] table .team-label,
.stadium-app .board .main[data-view="liga"] table td.player-col,
.stadium-app .board .main[data-view="liga"] table td.player-col a,
.stadium-app .board .main[data-view="liga"] table td.team-home,
.stadium-app .board .main[data-view="liga"] table td.team-away,
.stadium-app .board .main[data-view="liga"] table td.team-name,
.stadium-app .board .main[data-view="liga"] table td.team-name .team-label {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
.stadium-app .board .main[data-view="liga"] table .team-with-crest { min-width: 0; max-width: 100%; }
@media (min-width: 761px) {
  .stadium-app .board .main[data-view="liga"] table .team-name-full {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
}
/* Escudo em slot fixo nas tabelas de jogos (Calendario, Copa Regional, Partidas). O escudo fica sempre na borda externa
   da coluna e o nome encosta nele, com o mesmo alinhamento do resto do jogo (card da rodada, classificacao): antes o
   escudo andava junto com o comprimento do nome, 12 px de variacao no mandante e 40 px no visitante em 390 (Gabriel,
   15/11/2026). Grid com uma coluna para o escudo e outra para o nome resolve nas duas tabelas de uma vez. */
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest {
  display: grid; align-items: center; column-gap: 6px; width: 100%; max-width: 100%;
  grid-template-columns: auto auto minmax(0, 1fr);   /* escudo, camisa (quando existe), nome */
  justify-items: start;
}
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest {
  display: grid; align-items: center; column-gap: 6px; width: 100%; max-width: 100%;
  grid-template-columns: minmax(0, 1fr) auto auto;   /* nome, camisa, escudo */
  justify-items: end;
}
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest > .team-label,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest > .team-label {
  justify-self: start; text-align: left; min-width: 0;
}
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest > .team-label,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest > .team-label {
  justify-self: end; text-align: right; min-width: 0;
}
/* Cada filho na sua coluna: no HTML a camisa vem entre o escudo e o nome nos dois lados. */
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest > .crest,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest > .crest { grid-column: 1; }
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest > .kit-mark,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest > .kit-mark { grid-column: 2; }
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest > .team-label,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest > .team-label { grid-column: 3; }
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest > .team-label,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest > .team-label { grid-column: 1; }
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest > .kit-mark,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest > .kit-mark { grid-column: 2; }
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest > .crest,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest > .crest { grid-column: 3; }
/* Os dois filhos na MESMA linha do grid (com grid-column explicito o segundo item cai na linha de baixo). */
.stadium-app .board .main table.club-fixtures-table td.team-home .team-with-crest > *,
.stadium-app .board .main table.club-fixtures-table td.team-away .team-with-crest > *,
.stadium-app .board .main table.dense-table td.team-home .team-with-crest > *,
.stadium-app .board .main table.dense-table td.team-away .team-with-crest > * { grid-row: 1; }
/* Botao ao lado de campo (Treino, filtros do Mercado e afins): mesma base e mesma altura do controle vizinho. */
.chips:has(> label.field):has(> .btn),
.chips:has(> label.field) > .training-sector,
.training-sector, .market-filters, .field-row, .form-row { align-items: end; }
.chips:has(> label.field) > label.field,
.training-sector > label.field, .market-filters > label.field, .field-row > label.field, .form-row > label.field { margin-bottom: 0; }
/* Botao de apoio dentro de uma linha de texto (ex.: "Compre espacos... Ver na Loja"): alinha pela BASE do texto vizinho,
   nao pelo centro. Vale para paragrafos, itens de lista e a linha de "Taticas salvas". */
:is(p, li):has(> .btn),
.tactics-saved-locked { align-items: baseline; }
:is(p, li) > .btn, .tactics-saved-locked > .btn { vertical-align: baseline; }
/* ==========================================================================
   UMA LARGURA (E UMA ALTURA) POR COLUNA DE CONTROLE (Gabriel, 15/11/2026): na tabela do Treino o select do
   goleiro saia menor que o dos outros porque o controle se ajustava ao texto da opcao escolhida ("Goleiro",
   79 px, contra "Finalizacao", 100 px), entao o x e a largura mudavam de linha para linha. Agora todo select,
   input ou textarea dentro de uma celula ocupa a largura da coluna (--control-col, a do maior rotulo nos dois
   idiomas), com a mesma altura da coluna, e o texto corta com reticencias. Vale para qualquer tabela do app;
   uma folha de tela nao define largura de controle por linha.
   ========================================================================== */
table :is(td, th) > :is(select, input:not([type="checkbox"]):not([type="radio"]), textarea) {
  width: min(100%, var(--control-col, 8rem));
  max-width: none;
  text-overflow: ellipsis;
}
/* Os dois selects do "aplicar ao setor" (Setor e Programa) sao um grupo lado a lado: a mesma largura, a da coluna
   de controle, em vez de cada um ficar do tamanho do texto que esta mostrando. */
.training-sector > label.field > select { width: var(--control-col, 8rem); }
/* 15/11/2026 (dono): o grupo do setor fica fora da tabela e tem espaco, entao usa uma coluna propria um pouco mais larga
   (8rem cortava "Goalkeepers" e "Goalkeeping") e se afasta da tabela abaixo. A tabela continua com --control-col. */
.training-sector { --control-col: 9.5rem; margin-bottom: 14px; }
/* Celular: "Aplicar a todos do setor" desce para a propria linha e fica no centro do card (pedido do dono, 15/11). */
@media (max-width: 560px) { .training-sector > .btn { margin-inline: auto; } }

/* ==========================================================================
   ETIQUETA, NAO BOTAO (Gabriel, 15/11/2026): um chip ou badge que nao e clicavel e uma etiqueta, nao um controle.
   Antes ele repetia a caixa verde com borda dos botoes antigos ("Academia - nivel 1" na Base, "sua regiao" na Copa),
   entao parecia um botao verde ao lado do titulo. Agora: fundo translucido discreto (--tag-bg), sem borda, p�lula
   (--tag-radius) contra o retangulo de 10 px do botao, e alinhado pela base do titulo vizinho. A cor de estado
   (bom/ruim/atencao) continua no texto. Chip clicavel (filtro, aba, link) nao entra: continua controle.
   ========================================================================== */
main.main :is(.badge, .chip, .gm-count-pill):not(a):not(button):not([role="button"]):not([onclick]) {
  background: var(--tag-bg, rgba(255, 255, 255, .07)) !important;
  border: 0 !important;
  border-radius: var(--tag-radius, 999px) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
/* A etiqueta ao lado de um titulo fica na linha de base dele, nao flutuando no meio da linha. */
main.main .topbar:has(> :is(h1, h2, h3) + :is(.badge, .chip)) { align-items: baseline; }
/* Cabecalho mais largo que a sua coluna (ex.: "Ranking de regioes" numa coluna de 120 px) quebra em duas linhas
   em vez de vazar para fora da tabela; o resto continua numa linha so. */
table.dense-table thead th { white-space: normal; }

/* ==========================================================================
   CASA E FORA NO MEIO DO CAMINHO ATE O PLACAR (dono, 15/11/2026): em toda tabela de jogos (Calendario, Copa Regional,
   rodada da Liga, Copa Internacional, Selecoes, ultimos jogos do clube) o mandante ficava colado na coluna da esquerda
   e o visitante colado na da direita, longe do placar. Agora cada lado e um bloco de largura fixa (--fixture-team-w)
   centrado na propria coluna, e o cabecalho tambem: o meio do bloco fica na metade da distancia entre a coluna vizinha
   e o placar. A largura e a mesma em todas as linhas, entao o escudo continua no mesmo x de linha a linha (slot fixo).
   No celular a linha mostra a sigla, entao o bloco encolhe para o tamanho dela.
   ========================================================================== */
.stadium-app .board .main table.dense-table { --fixture-team-w: 13rem; }
@media (max-width: 760px) { .stadium-app .board .main table.dense-table { --fixture-team-w: 5.75rem; } }
.stadium-app .board .main table.dense-table :is(th, td):is(.team-home, .team-away),
.stadium-app .board .main table.dense-table.club-profile-matches td.team-name { text-align: center; }
.stadium-app .board .main table.dense-table td.team-home > :is(.team-with-crest, .team-with-flag),
.stadium-app .board .main table.dense-table td.team-away > :is(.team-with-crest, .team-with-flag),
.stadium-app .board .main table.dense-table.club-profile-matches td.team-name > .team-with-crest {
  width: min(100%, var(--fixture-team-w)); max-width: 100%; margin-inline: auto; box-sizing: border-box;
}
.stadium-app .board .main table.dense-table td.team-home > .team-with-flag { display: flex; align-items: center; justify-content: flex-start; text-align: left; }
.stadium-app .board .main table.dense-table td.team-away > .team-with-flag { display: flex; align-items: center; justify-content: flex-start; text-align: left; }

/* TOPO NO DESKTOP (dono, 15/11/2026, segunda versão): tudo centrado na vertical. Escudo encostado à esquerda, o nome
   maior logo ao lado e, à direita dele em letra menor, a divisão em cima e o próximo jogo embaixo. A busca no centro da
   barra. O rádio, o dinheiro, a glória e os fãs à direita, colados no Shop. Do 1180 px para baixo o topo segue em linhas. */
/* the division and next-step wrapper only matters on the desktop row; elsewhere its two lines stay where they were */
.stadium-app > header.topbar .club-aside { display: contents; }
@media (min-width: 1181px) {
  body .stadium-app > header.topbar.topbar {
    display: grid; grid-template-columns: minmax(0, max-content) minmax(140px, 1fr) max-content;   /* too narrow to centre: the name gives way first */
    align-items: center; column-gap: 20px; row-gap: 8px;
  }
  /* both sides as wide as the wider one, so the search is in the true middle (main.mjs#centreSearch) */
  body .stadium-app > header.topbar.topbar.topbar-centred { grid-template-columns: minmax(var(--topbar-side), 1fr) minmax(200px, 340px) minmax(var(--topbar-side), 1fr); }
  body .stadium-app > header.topbar.topbar > .club-identity {
    grid-column: 1; grid-row: 1; justify-self: start; display: flex; align-items: center; gap: 12px;
    flex: none; order: 0; min-width: 0; max-width: 100%;
  }
  body .stadium-app > header.topbar.topbar > .club-identity .club-details { display: flex; align-items: center; gap: 14px; min-width: 0; text-align: left; }
  body .stadium-app > header.topbar.topbar > .club-identity .club-line { justify-content: flex-start; min-width: 0; }
  body .stadium-app > header.topbar.topbar > .club-identity .club {
    max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
    font-size: var(--text-xl); line-height: 1.1;
  }
  body .stadium-app > header.topbar.topbar > .club-identity .club-aside { display: grid; gap: 2px; justify-items: start; text-align: left; }
  body .stadium-app > header.topbar.topbar > .club-identity .club-aside > :is(.club-subline, .club-next) { font-size: var(--text-xs); line-height: 1.25; white-space: nowrap; }
  body .stadium-app > header.topbar.topbar > .topbar-left {
    grid-column: 2; grid-row: 1; justify-self: center; display: flex; align-items: center;
    flex: none; order: 0; width: 100%; min-width: 0; max-width: 340px;
  }
  body .stadium-app > header.topbar.topbar > .topbar-left > .search { flex: 1 1 auto; width: 100%; min-width: 0; max-width: none; }
  body .stadium-app > header.topbar.topbar > .topbar-actions {
    grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 14px;
    flex: none; order: 0; min-width: 0;
  }
  body .stadium-app > header.topbar.topbar > .topbar-actions > .topbar-radio { order: -1; }
  body .stadium-app > header.topbar.topbar > .topbar-actions > .topbar-metrics { order: 0; }
  body .stadium-app > header.topbar.topbar > .topbar-actions > .user-links { order: 1; }
  body .stadium-app > header.topbar.topbar > .admin-controls { grid-column: 1 / -1; grid-row: 2; }
}


/* CABECALHO DE PAGINA (dono, 15/11/2026): o titulo fica sempre a mesma distancia do fio (10 px + 1 do fio), em toda tela.
   O que vai ao lado (botao de 44 px, abas, seletor da Copa com rotulo) era mais alto que o titulo e esticava a linha, e o
   titulo, preso no alto, ficava 18 a 47 px acima do fio. Agora a linha se alinha por baixo: o titulo e as acoes terminam
   juntos, logo acima do fio. A bandeira e a etiqueta da Copa ficam no meio da linha do titulo. */
.stadium-app > .board > main.main .page-heading { align-items: flex-end !important; }
.stadium-app > .board > main.main .page-heading > h1 { align-self: flex-end; }
.stadium-app > .board > main.main .page-heading.cup-head > .flag { align-self: flex-end; margin-bottom: 3px; }
.stadium-app > .board > main.main .page-heading.cup-head > .badge { align-self: flex-end; }
/* Copa Regional no celular (pedido do dono, 15/11): o seletor de Regiao desce para a esquerda, com a bandeira dentro dele, e
   a bandeira e o "sua regiao" ao lado do titulo saem. Do 561 px para cima a bandeira fica so ao lado do titulo. */
.cup-region-box { position: relative; display: block; }
.cup-region-box > .flag { display: none; }
@media (max-width: 560px) {
  .stadium-app > .board > main.main .page-heading.cup-head { flex-wrap: wrap !important; row-gap: 8px; }
  .stadium-app > .board > main.main .page-heading.cup-head > :is(.flag, .badge) { display: none; }
  .stadium-app .board .main .page-heading.cup-head > .page-heading-actions { flex: 1 1 100% !important; margin-left: 0 !important; justify-content: flex-start !important; }
  .page-heading.cup-head .league-pickers { width: 100%; }
  .page-heading.cup-head .league-pickers > label.field { width: 100%; max-width: 22rem; margin: 0; }
  .cup-region-box > .flag { display: block; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
  .cup-region-box > select { width: 100%; min-height: 44px; padding-left: 44px; }
}
/* Conquistas: o titulo vive numa linha propria com o botao de informacoes (44 px); a mesma regra, por baixo. */
.stadium-app > .board > main.main .page-heading .ach-title-row { align-items: flex-end !important; }
/* Partida rapida: as abas ao lado do titulo nao trazem a margem de baixo das abas soltas. */
.stadium-app > .board > main.main .page-heading > .page-heading-actions.tabs { margin-block: 0 !important; }
