/* t307 — pixels laranja RGB(255,127,39): (26,363)–(468,562) em 1776×922.
   Conversão para 1280×800: (18,74;314,97)–(337,30;487,64). */
.tc-historico { display: none; }
@media (min-width: 1024px) {
  .tela-combate-arena .tc-historico {
    display: flex; flex-direction: column; position: fixed;
    left: 19px; top: 315px; width: 319px; height: 174px; box-sizing: border-box;
    z-index: 7; border: 1px solid #8c7845; border-radius: 7px;
    background: rgba(12,13,12,.95); color: #f3eddc; box-shadow: 0 3px 12px #0009; overflow: hidden;
  }
  .tc-historico h3 { flex: 0 0 auto; margin: 0; padding: 6px 9px; font-size: 13px; line-height: 18px; color: #e8c84a; border-bottom: 1px solid #645733; }
  .tc-historico__linhas { min-height: 0; flex: 1; overflow-y: auto; overflow-x: hidden;
    scrollbar-gutter: stable; overflow-anchor: none; padding: 4px 8px; font-size: 13px; line-height: 1.4; }
  .tc-historico__linha { padding: 3px 0; overflow-wrap: anywhere; border-bottom: 1px solid #ffffff15; }
  .tc-historico__linha[data-tipos~="derrota"] { color: #ffa798; }
  .tc-historico__linha[data-tipos~="habilidade"] { color: #b9edca; }
  /* Reserva real à esquerda; fileiras extensas têm rolagem sem reduzir as cartas. */
  html.combate-novo .tc-fila--herois, html.combate-novo .tc-fila--inimigos {
    margin-left: 350px; min-width: 0; flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; align-self: start; height: max-content;
  }
  html.combate-novo .tc-fila--herois { transform: translateY(-125px); }
}

/* §37 B1: compra pendente tem prioridade sobre o Histórico (mesma faixa dos baralhos).
   O histórico some enquanto o baralho pede a compra e volta, com as linhas, depois de resolver. */
html.ln-compra-pendente .tela-combate-arena .tc-historico { visibility: hidden; pointer-events: none; }
/* Com compra pendente e a arena de combate ainda aberta, a coluna de baralhos fica acima da arena (z 80)
   para o jogador conseguir clicar no baralho que está pedindo. */
html.layout-novo.ln-compra-pendente .ln-baralhos { z-index: 90; }
