/* Hoshi TCG — arbre de compétences « épine » (un nœud par palier). Version statique, sans animation. */
.st-topbar { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.st-spent { font-family: var(--font-display); font-weight: 500; color: var(--accent); letter-spacing: 0.04em; }
.st-fx { display: flex; gap: var(--s2); flex-wrap: wrap; flex: 1; }
.st-fx-chip { font-size: 0.68rem; color: var(--ink-dim); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px 9px; letter-spacing: 0.04em; }

.st-tree { position: relative; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
/* Rail central reliant les paliers. */
.st-tree::before {
  content: ""; position: absolute; top: 20px; bottom: 20px; left: 50%; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(188,215,255,0.35), rgba(188,215,255,0.12)); border-radius: 2px;
}
.st-tier {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 0;
  padding: 8px 0;
}
.st-hub {
  grid-column: 2; width: 14px; height: 14px; margin: 0 auto; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--border-strong);
}
.st-tier.state-available .st-hub { border-color: var(--accent); box-shadow: 0 0 12px rgba(188,215,255,0.4); }
.st-tier.state-done .st-hub { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(188,215,255,0.6); }

/* Nœuds compacts et de taille uniforme (juste l'effet + le coût). */
.st-node {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 56px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 14px;
  background: var(--bg-raised); transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.st-node.side-left { grid-column: 1; margin-right: 8px; }
.st-node.side-right { grid-column: 3; margin-left: 8px; }
.st-node-fx { font-weight: 500; font-size: 0.86rem; letter-spacing: 0.01em; line-height: 1.25; }
.st-node-cost { font-size: 0.74rem; font-weight: 500; color: var(--accent); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.st-node-cost.owned { color: var(--success); font-size: 0.9rem; }

.st-tier.state-available .st-node[data-buy] { cursor: pointer; }
.st-tier.state-available .st-node[data-buy]:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 18px rgba(188,215,255,0.18); }
.st-node.on { border-color: var(--accent); box-shadow: 0 0 16px rgba(188,215,255,0.18); }
.st-node.missed { opacity: 0.35; }
.st-tier.state-locked .st-node { opacity: 0.3; }

@media (max-width: 560px) {
  .st-tier { grid-template-columns: 1fr 28px 1fr; }
  .st-node { padding: var(--s2) var(--s3); }
  .st-node-desc { font-size: 0.72rem; }

  /* Chips d'effets actifs à côté de « X ◇ investis » (retour Noé 2026-07-28) : .st-fx partageait
     une ligne avec .st-spent et le bouton Réinitialiser, ce qui ne lui laissait qu'une bande
     étroite — chaque chip y dépassait la largeur dispo et retombait seul sur sa ligne. Chacun sur
     sa propre rangée pleine largeur, .st-fx peut alors enchaîner ses chips normalement. */
  .st-topbar { flex-direction: column; align-items: flex-start; }
  .st-fx { flex-basis: 100%; }
  /* La compaction des paliers acquis en pastilles horizontales (essayée le 2026-07-28) est
     retirée (retour Noé 2026-07-29 : « pas ce que tu m'as fait sur téléphone [...] l'arbre qui
     disparaît jalon après jalon ») — le mobile garde maintenant exactement la même structure
     d'arbre que le PC (spine + un nœud verrouillé d'un côté, actif/acquis de l'autre), juste
     réduite en taille via les règles ci-dessus. */
}
