/* Bestenliste und Spielerprofile (Stand 15.11.2026). Baut auf styles.css auf. */

.community { padding: 28px 0 72px; }
.community .crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: 0 0 18px; padding: 0; list-style: none; font-size: var(--fs-ui); font-weight: 600; }
.community .crumbs li { display: inline-flex; align-items: center; }
.community .crumbs li + li::before { content: "›"; margin: 0 8px 0 4px; color: var(--primary); font-weight: 800; }
.community .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.community-head { margin-bottom: 22px; }
.community-head h1 { margin-bottom: 10px; }
.community-head .lead { font-size: var(--fs-text); max-width: 36em; }

/* Spielersuche */
.spieler-suche { margin-bottom: 26px; max-width: 640px; }
.spieler-suche label { display: block; font-family: var(--display); font-weight: 700; font-size: var(--fs-text); margin-bottom: 8px; }
.spieler-suche input {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  font: 600 19px "Figtree", system-ui, sans-serif;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  -webkit-appearance: none;
  appearance: none;
}
.spieler-suche input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.treffer { margin: 10px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #ffffff; }
.treffer li + li { border-top: 1px solid var(--line); }
.treffer a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; text-decoration: none; }
.treffer a:hover, .treffer a:focus-visible { background: var(--primary-soft); color: var(--text); }
.treffer b { font-weight: 800; }
.treffer .leer, .chips-plaetze .leer { padding: 12px 16px; }

/* Köpfe und Rang */
.kopf { flex: none; image-rendering: pixelated; border-radius: var(--r-xs); background: var(--primary-soft); }
.rang { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 3px; font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; background: #ffffff; border: 1px solid var(--line-strong); border-radius: var(--r-full); white-space: nowrap; }
.rang i { width: 11px; height: 11px; border-radius: 3px; background: var(--line-strong); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip { display: inline-flex; align-items: center; padding: 2px 12px 3px; font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--r-full); }

/* Kategorien */
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.seg-btn {
  min-height: 48px;
  padding: 8px 16px 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  touch-action: manipulation;
}
.seg-btn:hover { border-color: var(--primary); }
.seg-btn[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #ffffff; }

/* Liste */
.board-panel { padding: 8px 8px 4px; }
.board-titel { font-size: var(--fs-h3); padding: 12px 12px 6px; }
.board { margin: 0; padding: 0; list-style: none; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); }
.board .row:first-child { border-top: 0; }
.platz { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--primary-soft); font-family: var(--display); font-weight: 800; font-size: var(--fs-ui); }
.row.top .platz { color: #ffffff; background: var(--primary); box-shadow: inset 0 -3px 0 var(--primary-dark); }
.wer { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 48px; text-decoration: none; }
a.wer:hover b { color: var(--primary); }
.wer-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.wer-text b { font-weight: 800; overflow-wrap: anywhere; }
.wert { font-family: var(--display); font-weight: 800; font-size: var(--fs-ui); text-align: right; white-space: nowrap; }
.board-info { padding: 18px 12px; }
.stand { margin-top: 14px; font-size: var(--fs-ui); }
.opt-out { margin-top: 10px; font-size: var(--fs-ui); }

/* Profil */
.profil-karte { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin-bottom: 18px; }
.profil-karte .kopf { width: 112px; height: 112px; border-radius: var(--r-sm); }
.profil-kopf h1 { overflow-wrap: anywhere; margin-bottom: 10px; }
.profil-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.profil-werte { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 26px; }
.wert-box { padding: 16px 18px; }
.wert-box dt { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
.wert-box dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.2; }
.profil-plaetze h2 { font-size: var(--fs-h3); margin-bottom: 12px; }
.chips-plaetze { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip-link { min-height: 44px; padding: 6px 16px; text-decoration: none; }
.chip-link:hover { border-color: var(--primary); color: var(--text); }
.profil-suche { margin-top: 40px; }
.profil-leer h1 { margin-bottom: 12px; }
.profil-leer p { margin-bottom: 18px; }

@media (max-width: 520px) {
  .row { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 10px; }
  .wert { grid-column: 2; text-align: left; font-size: var(--fs-sm); }
  .platz { width: 36px; height: 36px; font-size: var(--fs-sm); }
}

@media (min-width: 720px) {
  .profil-werte { grid-template-columns: repeat(4, 1fr); }
  .board-titel { font-size: var(--fs-h3-lg); }
}

/* Kopf aus echter Skin-Textur (community.js, Feld skin) */
.kopf-skin { display: inline-block; flex: none; background-repeat: no-repeat; image-rendering: pixelated; border-radius: var(--r-xs); background-color: var(--primary-soft); }

/* ---------- Bestenliste neu (15.11.2026, Joshi: "schön mit Grafiken und wenig Text") ---------- */
.bl-kopf { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: end; gap: 10px; margin-bottom: 22px; }
.bl-kopf h1 { margin-bottom: 16px; }
.bl-ente { width: 96px; height: auto; margin-bottom: -4px; }
.bl-kopf .spieler-suche { position: relative; margin: 0; max-width: 520px; }
.bl-kopf .spieler-suche input { padding-left: 50px; border-radius: var(--r-md); }
.such-ico { position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; color: var(--primary); pointer-events: none; }
.bl-kopf .treffer { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; box-shadow: var(--shadow-raised); }

.bl-kats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-ui);
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.18s;
}
.kat img { width: 64px; height: 64px; }
.kat:hover { border-color: var(--primary-line); transform: translateY(-2px); }
.kat[aria-selected="true"] { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 -4px 0 var(--primary); }
.kat:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.bl-board { padding: 10px 8px 6px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); }

/* Liste ab Platz 1, die ersten drei mit farbiger Platznummer */
.bl-board .row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 6px 10px; border-top: 0; border-radius: var(--r-md); }
.bl-board .row:hover { background: var(--bg); }
.bl-board .platz { width: 40px; height: 40px; background: none; font-size: var(--fs-ui); }
.bl-board .row.top .platz { color: var(--primary-dark); background: var(--primary-soft); box-shadow: none; }
.bl-board .row.top-1 .platz { color: #ffffff; background: var(--primary); box-shadow: inset 0 -3px 0 var(--primary-dark); }
.bl-board .row.top .wer-text b { font-size: var(--fs-md); }

.bl-board .wer-text { flex-wrap: nowrap; overflow: hidden; }
.bl-board .wer-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }

@media (max-width: 520px) {
  .bl-board .row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; }
  .bl-board .wert { grid-column: auto; text-align: right; }
  .bl-board .platz { width: 34px; }
  .bl-board .wer-text .rang { display: none; }
}

@media (min-width: 720px) {
  .bl-kopf { grid-template-columns: minmax(0, 1fr) 150px; }
  .bl-ente { width: 150px; }
  .kat { flex-direction: row; justify-content: center; gap: 14px; padding: 14px 16px; font-size: var(--fs-text); }
  .kat img { width: 72px; height: 72px; }
  .bl-board { padding: 14px 18px 10px; }
}

@media (min-width: 1000px) {
  .bl-kopf { grid-template-columns: minmax(0, 1fr) 180px; }
  .bl-ente { width: 180px; margin-bottom: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .kat { transition: none; }
  .kat:hover { transform: none; }
}

/* ---------- Spielerprofil neu (15.11.2026) ---------- */
.pf-karte { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 14px; padding: 26px 18px 22px; text-align: center; background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); }
.pf-karte .kopf, .pf-karte .kopf-skin { width: 128px; height: 128px; border-radius: var(--r-md); box-shadow: 0 14px 28px -16px #0f2346; }
.pf-kopf { min-width: 0; }
.pf-kopf h1 { margin: 0 0 10px; font-size: var(--fs-h1); overflow-wrap: anywhere; }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }
.pf-werte { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-werte li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px 14px; text-align: center; background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.pf-werte img { width: 56px; height: 56px; margin-bottom: 6px; }
.pf-werte b { font-family: var(--display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.15; }
.pf-werte span { font-size: var(--fs-sm); font-weight: 600; }
.pf-titel { margin: 0 0 12px; font-size: var(--fs-h3); }
.pf-plaetze { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pf-platz { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; color: var(--text); text-decoration: none; background: #ffffff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); transition: border-color 0.15s; }
.pf-platz:hover { border-color: var(--primary); color: var(--text); }
.pf-platz img { flex: none; width: 48px; height: 48px; }
.pf-platz-text b { display: block; font-family: var(--display); font-weight: 800; font-size: var(--fs-title); line-height: 1.1; }
.pf-platz-text span { font-size: var(--fs-sm); font-weight: 600; }
.pf-leer { padding: 6px 0; font-size: var(--fs-ui); }
.profil-suche { position: relative; max-width: 520px; }
.profil-suche input { padding-left: 50px; border-radius: var(--r-md); }

@media (min-width: 720px) {
  .pf-karte { flex-direction: row; gap: 26px; padding: 28px 32px; text-align: left; }
  .pf-chips { justify-content: flex-start; }
  .pf-werte { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
