.lexicarte-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: inherit;
  color: var(--text, #222);
}

/* Scores */
.lexicarte-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lexicarte-player {
  flex: 1 1 120px;
  padding: 8px 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: var(--bg-soft, #f7f7f7);
}
.lexicarte-active {
  border-color: var(--accent, #6c5ce7);
  box-shadow: 0 0 0 2px var(--accent, #6c5ce7);
}
.lexicarte-pname { font-weight: 700; font-size: 0.9em; }
.lexicarte-pscore { font-size: 1.15em; font-weight: 700; color: var(--accent, #6c5ce7); }
.lexicarte-pinfo { font-size: 0.8em; opacity: 0.75; }
.lexicarte-pbonus { font-size: 0.8em; font-weight: 700; }

.lexicarte-status { font-weight: 700; }
.lexicarte-last { font-size: 0.85em; opacity: 0.75; }

.lexicarte-panel {
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-soft, #f7f7f7);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lexicarte-title { font-weight: 700; font-size: 0.95em; }
.lexicarte-hint { font-size: 0.85em; opacity: 0.85; }
.lexicarte-err { font-size: 0.85em; color: #d63031; font-weight: 600; }
.lexicarte-okmsg { font-size: 0.85em; color: var(--accent, #00b894); font-weight: 700; }

/* Table de jeu */
.lexicarte-table {
  border: 1px dashed var(--line, #ccc);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lexicarte-word {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.lexicarte-owner { font-size: 0.75em; opacity: 0.6; margin-left: 8px; }

/* Badges de multiplicateur en fin de mot */
.lexicarte-badge {
  font-size: 0.72em;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
  white-space: nowrap;
  cursor: help;
}
.lexicarte-badge-dbl {
  background: var(--accent, #6c5ce7);
  color: #fff;
}
.lexicarte-badge-bonus {
  background: #f6b93b;
  color: #3a2c00;
}

/* Tuiles lettres */
.lexicarte-tile {
  position: relative;
  width: 34px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line, #ccc);
  background: var(--bg-soft, #fdf6e3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05em;
  user-select: none;
}
.lexicarte-ch { line-height: 1; }
.lexicarte-val {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 0.55em;
  font-weight: 700;
  opacity: 0.7;
}
.lexicarte-clickable { cursor: pointer; }
.lexicarte-clickable:hover { border-color: var(--accent, #6c5ce7); }
.lexicarte-selected {
  border-color: var(--accent, #6c5ce7);
  box-shadow: 0 0 0 2px var(--accent, #6c5ce7);
  transform: translateY(-2px);
}
.lexicarte-blocked { opacity: 0.35; text-decoration: line-through; }
.lexicarte-gone { opacity: 0.2; border-style: dashed; background: transparent; }
.lexicarte-borrowed { background: var(--accent, #6c5ce7); color: #fff; }
.lexicarte-joker { border-style: dotted; font-style: italic; }

/* Main et composition */
.lexicarte-hand, .lexicarte-compose {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 40px;
}

/* Boutons */
.lexicarte-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lexicarte-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent, #6c5ce7);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.lexicarte-btn:disabled { opacity: 0.4; cursor: default; }
.lexicarte-secondary {
  background: transparent;
  color: var(--text, #222);
  border: 1px solid var(--line, #ccc);
}
.lexicarte-bcard {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--accent, #6c5ce7);
  background: transparent;
  color: var(--text, #222);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85em;
}
.lexicarte-bcard:disabled { opacity: 0.5; cursor: default; }
.lexicarte-bcard:hover:not(:disabled) { background: var(--bg-soft, #f0edff); }

/* Info-bulle des cartes bonus */
.lexicarte-bcard-wrap { position: relative; display: inline-flex; }
.lexicarte-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--text, #222);
  color: var(--bg, #fff);
  font-size: 0.8em;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 20;
  pointer-events: none;
}
.lexicarte-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text, #222);
}
.lexicarte-bcard-wrap:hover .lexicarte-tip,
.lexicarte-bcard-wrap:focus-within .lexicarte-tip {
  opacity: 1;
  visibility: visible;
}

/* Sélecteur joker */
.lexicarte-picker { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.lexicarte-mini {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--line, #ccc);
  background: var(--bg-soft, #fff);
  color: var(--text, #222);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.lexicarte-mini:hover { border-color: var(--accent, #6c5ce7); }

/* Sélecteur de niveau des bots */
.lexicarte-lvl-on {
  background: var(--accent, #6c5ce7);
  color: #fff;
  border-color: var(--accent, #6c5ce7);
}
