/* „Meine Statistik" (Etappe 46D) — Chrome/Token aus ../style.css */

.stats-page { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
/* E54C2: Die globale `.panel`-Regel ist `width: min(440px, 100%)` — gedacht für
   die schmalen Spiel-Startseiten. Auf dieser Seite stutzte sie jedes Panel auf
   440px, während die Kachelreihe darüber die volle Breite nutzte: alles klebte
   links und wirkte wie zwei verschiedene Spalten. (Die Crew-Seite hat dieselbe
   Zeile längst — hier fehlte sie.) */
.stats-page .panel { width: 100%; }
.stats-head { text-align: center; margin: 14px 0 22px; }
.stats-head h1 { font-size: clamp(30px, 7vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.stats-head .tagline { color: var(--muted); margin-top: 4px; }

.s-empty-emoji { font-size: 46px; margin-bottom: 6px; }

/* Kennzahlen-Kacheln */
.s-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 460px) { .s-totals { grid-template-columns: repeat(2, 1fr); } }
.s-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 18px 10px; border-radius: 14px; min-height: 104px;
    background: var(--panel); border: 1px solid var(--panel-border);
}
/* E54C: Siege und Quote sind das, wofür man herkommt — sie bekommen Farbe,
   die anderen beiden bleiben ruhig (sonst leuchtet alles gleich laut). */
.s-tile.win { background: linear-gradient(160deg, rgba(242, 193, 78, .16), rgba(242, 193, 78, .04)); border-color: rgba(242, 193, 78, .4); }
.s-tile.win .s-num { color: var(--gold); }
.s-tile.rate { background: linear-gradient(160deg, rgba(63, 191, 111, .14), rgba(63, 191, 111, .04)); border-color: rgba(63, 191, 111, .38); }
.s-tile.rate .s-num { color: var(--green); }
/* E54C2: „12 h 13 min" brach über drei Zeilen um und blähte damit ALLE vier
   Kacheln auf 200 px auf. Die Zahl bleibt groß, ein langer Wert wird kleiner —
   statt die Reihe zu sprengen. */
.s-num { font-size: clamp(26px, 7vw, 38px); font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.s-num.long { font-size: clamp(17px, 4vw, 23px); }
.s-lbl { font-size: 13px; color: var(--muted); }

.s-fav { text-align: center; color: var(--muted); font-size: 14px; margin: -6px 0 18px; }
.s-fav b { color: var(--text); }
.s-fav[hidden] { display: none; }

.s-sec { margin-bottom: 16px; }
.s-sec h2 { font-size: 17px; font-weight: 800; margin-bottom: 12px; color: var(--muted); }

/* Nach Spiel */
.s-pergame { width: 100%; border-collapse: collapse; }
.s-pergame td { padding: 8px 6px; border-top: 1px solid var(--panel-border); vertical-align: middle; }
.s-pergame tr:first-child td { border-top: 0; }
.pg-name { font-weight: 600; }
.pg-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); width: 46px; }
.pg-time { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; white-space: nowrap; }
/* Auf schmalen Spalten (Handy, zweispaltiges Desktop-Layout) fliegt zuerst die
   Spielzeit raus — sonst schiebt sie den Quoten-Balken über den Rand. */
@media (max-width: 560px) {
    .s-pergame .pg-time, .s-pergame th:nth-child(4) { display: none; }
    .pg-bar { min-width: 92px; }
    .pg-num { width: 40px; }
}

/* E50: Profil teilen */
.s-share .hint { margin-bottom: 12px; }
.sh-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.sh-toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.sh-toggle input:disabled { cursor: not-allowed; }
.sh-link { display: flex; gap: 8px; margin-top: 12px; }
.sh-link input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; font-size: 14px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--panel-border); color: var(--text); }
/* E54C2: Der Balken war praktisch unsichtbar — die Spalte schrumpfte auf die
   Breite der Prozentzahl. Feste Mindestbreiten geben ihm wieder Platz. */
.pg-bar { display: flex; align-items: center; gap: 8px; min-width: 108px; }
.pg-track { flex: 1; min-width: 54px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pg-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pg-pct { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* Letzte Partien */
.s-recent { list-style: none; display: grid; gap: 8px; }
.s-recent li {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "game out" "who when";
    gap: 2px 10px; padding: 10px 14px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--panel-border);
    border-left: 3px solid transparent;
}
.s-recent li.won { border-left-color: var(--green); }
.s-recent li.lost { border-left-color: rgba(255, 255, 255, .12); }
.r-game { grid-area: game; font-weight: 700; }
.r-out { grid-area: out; font-size: 14px; font-weight: 700; text-align: right; }
.s-recent li.won .r-out { color: var(--green); }
.r-who { grid-area: who; font-size: 13px; color: var(--muted); }
.r-when { grid-area: when; font-size: 12.5px; color: var(--muted); text-align: right; }

/* E51D: persönliches Wrapped — Kacheln/Podium/Fakten wie auf der Crew-Seite */
.s-sec .w-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 460px) { .s-sec .w-tiles { grid-template-columns: repeat(2, 1fr); } }
.s-sec .w-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px;
    border-radius: 12px; background: rgba(255, 255, 255, .05); }
.s-sec .w-num { font-size: clamp(20px, 5vw, 26px); font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.s-sec .w-lbl { font-size: 12px; color: var(--muted); text-align: center; }
.s-sec .w-podium { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.s-sec .w-podium li { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: rgba(242, 193, 78, .08); border-radius: 9px; }
.s-sec .w-podium .w-name { font-weight: 700; }
.s-sec .w-podium .w-wins { margin-left: auto; color: var(--gold); font-size: 13.5px; }
.s-sec .w-facts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.s-sec .w-facts b { color: var(--text); }
.s-sec .own-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wrap-actions[hidden] { display: none; }


/* ── E54C2: Desktop nutzt die Breite ──
   Bis 900 px bleibt alles untereinander (Mobile war nie das Problem). Darüber
   stehen die beiden „Nachschlage"-Panels neben dem Rückblick, statt dass rechts
   eine leere Fläche bleibt. */
@media (min-width: 900px) {
    .stats-page { max-width: 1080px; }
    .s-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
    .s-cols > * { margin-bottom: 0; }
}

/* Kopfzeile für „Nach Spiel" — ohne sie raten alle, was 14 / 8 / 3 h 30 heißt */
.s-pergame thead th {
    padding: 0 6px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted);
    text-align: right; text-transform: uppercase; letter-spacing: .04em;
}
.s-pergame thead th:first-child { text-align: left; }
.s-pergame thead th.h-bar { text-align: right; }
