/* Ergaenzungen zu main.css - bewusst separat, damit main.css unangetastet bleibt. */

/* Statistik-Fenster wird durch die Partie-Liste laenger als der Bildschirm */
#stats-modal {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-subhead {
  margin: 4px 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8f7a66;
  text-align: left;
}

.stats-empty {
  margin: 0 0 18px;
  font-size: 13px;
  color: #a39489;
}

.stats-history {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
}

.hist-row {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(187, 173, 160, 0.25);
  padding: 7px 10px;
  margin-bottom: 5px;
  line-height: 1.25;
}

/* Der Balken liegt hinter dem Text und zeigt den Score im Verhaeltnis zum besten */
.hist-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #bbada0;
  z-index: 0;
}

.hist-row.hist-won .hist-bar { background: #edc22e; }

.hist-score,
.hist-meta {
  position: relative;
  z-index: 1;
  display: block;
}

.hist-score {
  font-size: 15px;
  font-weight: 700;
  color: #776e65;
}

.hist-meta {
  font-size: 11px;
  color: #8f7a66;
}

/* Undo-Knopf zeigt jetzt eine Zahl - schmalere Schrift haelt die Leiste ruhig */
#undoBtn { font-variant-numeric: tabular-nums; }

/* ---------- Nachtrag: Meilenstein-Einblendung ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: #8f7a66;
  color: #f9f6f2;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9998;
}

#toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Neue Bestleistung faellt farblich auf */
#toast.toast-strong { background: #edc22e; color: #776e65; }

/* ---------- Nachtrag: Rundenuhr ---------- */
#round-timer {
  min-height: 16px;
  margin: -8px 0 8px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #a39489;
}

/* ---------- Nachtrag: Hilfe ---------- */
.help-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #776e65;
  text-align: left;
}

.help-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
  font-size: 14px;
  color: #776e65;
}

.help-list li { margin-bottom: 6px; }

.help-key {
  display: inline-block;
  min-width: 74px;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(187, 173, 160, 0.35);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

/* Text darf nicht unter die Taste rutschen - Taste und Erklaerung nebeneinander */
.help-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.help-key { flex: 0 0 auto; margin-right: 0; }
