/* Le palmarès (palmares.js) : le panneau du tableau de la salle de jeux, et la page des badges du
   téléphone. Les places se lisent à leur chiffre, les badges gagnés à leur médaille et à leur trait
   plein : jamais à la couleur seule. */
.modal.palm-modal {
  width: min(1080px, 100%);
}
.palm-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.palm-sub {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sub);
}
.palm-modal .modal-head-actions .btn {
  white-space: nowrap;
}
.palm-modal .modal-head-actions .btn .ic {
  width: 15px;
  height: 15px;
}

/* Retiré du palmarès : on le dit en tête, avec le chemin des réglages. */
.palm-hidden {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--fill);
  font-size: var(--fs-sub);
}
.palm-hidden > span {
  flex: 1;
}
.palm-hidden .ic {
  width: 18px;
  height: 18px;
  color: var(--text-2);
}

/* Les familles, puis leurs cartes. */
.palm-group + .palm-group,
.palm-hidden + .palm-group {
  margin-top: var(--sp-3);
}
.palm-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px var(--sp-2);
  color: var(--text-3);
  font-size: var(--fs-footnote);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.palm-group-title .ic {
  width: 14px;
  height: 14px;
}
.palm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-2);
}
.palm-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--fill);
}
.palm-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--fs-sub);
  font-weight: 650;
}
.palm-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #ffffff;
}
.palm-ic .ic {
  width: 15px;
  height: 15px;
}

/* Le podium : place (chiffre), visage, nom, valeur. */
.palm-podium {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.palm-row {
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--r-md);
  font-size: var(--fs-sub);
}
.palm-row.me {
  background: var(--glass-strong);
  font-weight: 600;
}
.palm-rank {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--glass-strong);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.palm-rank.r1 {
  background: #f8d239;
  color: #3a2a00;
}
.palm-rank.r2 {
  background: #d9dce8;
  color: #2a2a3a;
}
.palm-rank.r3 {
  background: #e0a36e;
  color: #3a1f0a;
}
.palm-row canvas,
.palm-initial {
  border-radius: 50%;
  background: var(--glass-strong);
}
.palm-initial {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 700;
}
.palm-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.palm-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.palm-empty,
.palm-me {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-footnote);
}
.palm-me {
  padding: 0 6px;
}

/* Le badge, et la jauge vers le prochain (sa phrase dit tout). */
.palm-next {
  display: grid;
  gap: 5px;
  margin-top: auto;
}
.palm-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--fs-footnote);
}
.palm-badge .ic {
  flex: none;
  width: 15px;
  height: 15px;
  color: #b9780e;
}
.palm-bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  overflow: hidden;
}
.palm-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.palm-next-text {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-footnote);
}

/* Un secret pas encore trouvé. */
.palm-card.locked {
  background: none;
  border: 1.5px dashed var(--hairline);
}
.palm-card.locked .palm-card-head > span:last-child {
  letter-spacing: 0.2em;
}

.palm-foot {
  margin: var(--sp-3) 4px 0;
  color: var(--text-3);
  font-size: var(--fs-footnote);
}
.palm-loading {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 0;
  color: var(--text-2);
}
.palm-loading .ic {
  width: 28px;
  height: 28px;
}

/* La page des badges du téléphone : par statistique, ses paliers (gagnés : médaille et trait plein). */
.palm-badges-row {
  align-items: flex-start;
}
.palm-badges-row .palm-ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.palm-badges-row .palm-ic .ic {
  width: 18px;
  height: 18px;
}
.palm-badges-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.palm-badges-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.palm-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 2px;
}
.palm-pip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border: 1px dashed var(--hairline);
  border-radius: var(--r-pill);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.4;
}
.palm-pip.got {
  border-style: solid;
  border-color: transparent;
  background: var(--glass-strong);
  color: var(--text);
  font-weight: 600;
}
.palm-pip .ic {
  width: 11px;
  height: 11px;
  color: #b9780e;
}
