/* ============================================================
   LINHAGEM.CSS — Escolha de clã e ficha da linhagem escolhida
   Reaproveita os tokens/paleta "branco gelo" já usados no resto
   do jogo (cards claros, bordas #D8D2C7, sombra dourada suave).
   ============================================================ */

.lin-body { background: var(--page-bg) !important; min-height: 100vh; }

.lin-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.lin-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.lin-header-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #EDE9DE, #F4F2ED);
  border: 1px solid #D9D5CC;
}
.lin-titulo-page { font-family: var(--font-body); font-weight: 800; font-size: 1.35rem; color: #20232A; margin: 0; }
.lin-subtitulo-page { font-size: .82rem; color: #74777F; margin: 4px 0 0; }

.lin-msg { margin-bottom: 14px; }

/* ── Introdução (tela de seleção) ── */
.lin-intro {
  background: #F4F2ED;
  border: 1px solid #D8D2C7;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 5px 18px rgba(91,62,10,.13);
}
.lin-intro p { margin: 0; font-size: .84rem; color: #4A4D54; line-height: 1.6; }
.lin-intro strong { color: #20232A; }

/* ── Grid de linhagens (seleção) ── */
.lin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.lin-card {
  flex: 1 1 300px;
  min-width: 280px;
  max-width: 340px;
  background: #F4F2ED;
  border: 1px solid #D8D2C7;
  border-top: 3px solid #92949A;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 5px 18px rgba(91,62,10,.13);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lin-card-topo { display: flex; align-items: center; gap: 10px; }
.lin-card-icon { font-size: 1.6rem; }
.lin-card-nome { font-size: 1rem; font-weight: 800; color: #20232A; margin: 0; }
.lin-card-desc { font-size: .78rem; color: #74777F; line-height: 1.5; margin: 0; }

.lin-card-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.lin-hab-mini {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #EDE9DE;
  border: 1px solid #D9D5CC;
  flex-shrink: 0;
}
.lin-hab-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lin-hab-mini-rank {
  position: absolute;
  right: 1px; bottom: 1px;
  font-size: .52rem;
  font-weight: 800;
  color: #fff;
  background: #e74c3c;
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.3;
}

/* Selo de rank (S por enquanto — todas as habilidades de linhagem) */
.lin-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 800;
  color: #fff;
  background: #e74c3c;
  border-radius: 5px;
  padding: 2px 6px;
  letter-spacing: .3px;
}

.lin-card-bonus {
  font-size: .7rem;
  font-weight: 700;
  color: #b5820f;
  background: rgba(229,173,34,.12);
  border: 1px solid rgba(229,173,34,.35);
  border-radius: 6px;
  padding: 5px 9px;
  text-align: center;
}

.lin-btn-escolher {
  margin-top: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--ember-dim), var(--ember));
  color: #fff;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.lin-btn-escolher:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Ficha da linhagem já escolhida ── */
.lin-atual {
  background: #F4F2ED;
  border: 1px solid #D8D2C7;
  border-top: 3px solid #92949A;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 5px 18px rgba(91,62,10,.13);
}
.lin-atual-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.lin-atual-icon { font-size: 2.4rem; flex-shrink: 0; }
.lin-atual-nome { font-size: 1.2rem; font-weight: 800; color: #20232A; margin: 0; }
.lin-atual-desc { font-size: .82rem; color: #74777F; margin: 4px 0 0; line-height: 1.5; }

.lin-atual-bonus {
  font-size: .78rem;
  font-weight: 700;
  color: #2e7d32;
  background: rgba(46,125,50,.1);
  border: 1px solid rgba(46,125,50,.3);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 16px;
}

.lin-atual-sub { font-size: .92rem; font-weight: 800; color: #20232A; margin: 0 0 10px; }

.lin-hab-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lin-hab-card {
  width: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: #EDE9DE;
  border: 1px solid #D9D5CC;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.lin-hab-card-img-wrap { position: relative; width: 72px; height: 72px; }
.lin-hab-card img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.lin-hab-card-rank {
  position: absolute;
  right: -2px; bottom: -2px;
  font-size: .58rem;
  font-weight: 800;
  color: #fff;
  background: #e74c3c;
  border-radius: 4px;
  padding: 1px 4px;
  border: 1px solid #F4F2ED;
}
.lin-hab-nome { font-size: .68rem; font-weight: 600; color: #4A4D54; line-height: 1.3; }
.lin-hab-dano { font-size: .6rem; color: #92949A; line-height: 1.3; }

.lin-vazio { font-size: .84rem; color: #74777F; padding: 20px; text-align: center; }

@media (max-width: 640px) {
  .lin-card { min-width: 100%; max-width: 100%; }
}
