/* Grundgeruest: Layout und Bausteine, fuer alle Anzeige-Styles gleich.
   Farben, Schrift und die Form der Karten kommen aus styles/<name>.css
   (Tokens wie --plane, --accent, --chart-ramp ...), die danach geladen wird.
   Neuer Style: siehe README, Abschnitt "Anzeige-Styles". */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--plane);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;

  /* Die Leiste hat eigene Farben (--bar-*), die jeder Style setzen muss -- so
     bleibt sie auch im hellen Modus dunkel und der Style erkennbar. Die Text-
     Tokens werden hier umgebogen, damit Buttons und Auswahl mitziehen. */
  color-scheme: var(--bar-scheme);
  color: var(--bar-ink);
  --text-primary: var(--bar-ink);
  --text-secondary: var(--bar-ink-2);
  --text-muted: var(--bar-ink-2);
  --border: var(--bar-line);
  --glass-border: var(--bar-line);
  --glass-edge: var(--bar-line);
  --wash: var(--bar-wash);
  --accent: var(--bar-accent);
}

.topbar__brand {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.ghost-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ghost-btn:hover {
  background: var(--wash);
  color: var(--text-primary);
}

/* Links im Look der Knoepfe (Admin in der Topbar, Dashboard im Adminbereich) */
a.ghost-btn {
  text-decoration: none;
}

#app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  gap: 20px;
}

.state {
  color: var(--text-secondary);
  padding: 48px 0;
  text-align: center;
}

.state--error {
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: left;
  white-space: pre-line;
}

/* Hintergrund-Mosaik aus den meistgespielten Titeln.
   Der Schleier haelt den Kontrast der Panels dort, wo ihn die Palette braucht. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

/* Bild-Ebene des Styles (--scene, z. B. Berge oder Skyline): ueber dem
   Spiele-Mosaik, unter dem Inhalt. Ein Style ohne Bild setzt --scene: none. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--scene, none);
}

.backdrop__grid {
  position: absolute;
  inset: -10%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  filter: blur(34px) saturate(0.7);
  opacity: 0;
  transition: opacity 900ms ease;
}

.backdrop__grid.is-ready {
  opacity: 0.75;
}

.backdrop__tile {
  background-size: cover;
  background-position: center;
}

.backdrop__veil {
  position: absolute;
  inset: 0;
  background: var(--plane);
  opacity: 0.68;
}

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

/* Profil */
.profile {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.profile__banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 35%;
  opacity: 0;
  transition: opacity 900ms ease;
}

.profile__banner.is-ready {
  opacity: 0.5;
}

.profile__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    var(--surface) 22%,
    color-mix(in srgb, var(--surface) 62%, transparent) 62%,
    color-mix(in srgb, var(--surface) 25%, transparent) 100%
  );
}

.profile__avatar,
.profile__meta {
  position: relative;
  z-index: 2;
}

.profile__avatar {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  flex: none;
}

.profile__name {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.profile__sub {
  margin: 2px 0 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.profile__link {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}

.profile__link:hover {
  text-decoration: underline;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 6px;
  vertical-align: 1px;
}

.dot--on {
  background: var(--good);
}

.dot--live {
  background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot--live {
    animation: none;
  }
}

.is-refreshing .profile__sub::after {
  content: " · aktualisiere …";
  color: var(--text-muted);
}

/* KPI-Reihe */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

/* Leicht durchscheinend, damit das Mosaik spuerbar bleibt -- aber hoch genug
   deckend, dass Text und Balken ihren Kontrast behalten. */
.kpi {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.kpi__label {
  color: var(--text-secondary);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi__value {
  font-size: 30px;
  font-weight: 640;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.kpi__hint {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.kpi--hero .kpi__value {
  font-size: 48px;
}

/* Panel */
.panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel__head {
  margin-bottom: 16px;
}

.panel__head h2 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

/* Der Titel ist der Schalter. Eingeklappt bleibt der Kopf stehen -- die
   Unterzeile traegt die Zusammenfassung und ist genau dann interessant,
   wenn der Inhalt weg ist. */
.panel__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.panel__toggle::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 150ms ease;
}

.panel__toggle:hover::before {
  border-color: var(--text-primary);
}

.panel.is-collapsed .panel__toggle::before {
  transform: rotate(-45deg) translate(-1px, 1px);
}

.panel.is-collapsed .panel__head {
  margin-bottom: 0;
}

.panel.is-collapsed > *:not(.panel__head) {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .panel__toggle::before {
    transition: none;
  }
}

.panel__sub {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* Balkendiagramm */
.chart {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: default;
}

.bar-row:hover {
  background: var(--wash);
}

.bar-row__name {
  color: var(--text-secondary);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row__track {
  display: block;
  height: 14px;
  background: var(--track);
  border-radius: 4px;
  overflow: hidden;
}

.bar-row__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  min-width: 3px;
}

.bar-row__value {
  color: var(--text-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 78px;
  text-align: right;
}

/* Verlauf: gestapelte Saeulen */
.hchart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--axis);
}

.hcol {
  flex: 1 1 0;
  min-width: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: default;
}

.hcol__stack {
  height: 180px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 2px; /* Trennfuge zwischen den Segmenten */
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.hcol:hover .hcol__stack {
  outline: 2px solid var(--border);
  outline-offset: 1px;
}

.hseg {
  display: block;
  width: 100%;
  min-height: 2px;
}

/* Nur das oberste Segment bekommt die runde Kante -- unten sitzt die Saeule
   auf der Grundlinie auf. */
.hseg:last-child {
  border-radius: 4px 4px 0 0;
}

.hcol__label {
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  min-height: 14px;
}

.legend {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend__dot,
.card__dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

/* Freundesvergleich und Erfolgs-Rangliste: alle grau, du im Akzent -- die
   Farbe traegt hier "wo stehe ich", nicht "wer ist wer". */
#chart-friends .bar-row__fill,
#ach-rank .bar-row__fill {
  background: var(--text-muted);
}

.bar-gap {
  margin: 2px 0;
  padding: 3px 4px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px dashed var(--grid);
  border-bottom: 1px dashed var(--grid);
}

/* Privates Profil: leere Spur statt Balken -- ein Balken der Laenge 0 waere
   eine Aussage ueber die Spielzeit, und die kennen wir eben nicht. */
.bar-row--private .bar-row__name,
.bar-row--private .bar-row__value {
  color: var(--text-muted);
}

#ach-rank .bar-row--private .bar-row__value {
  min-width: 92px;
  font-size: 12px;
}

.bar-row--private .bar-row__track {
  background: transparent;
  border: 1px dashed var(--grid);
  border-radius: 4px;
}

.panel__foot {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.card__note {
  margin: 0;
  color: var(--text-muted);
}

.card__list-title {
  margin: 9px 0 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.card__list li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card__list img,
.card__list-blank {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex: none;
  background: var(--track);
}

.card__game {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Punkt = hast du auch. Der Titel-Tooltip erklaert ihn, die Zahl
   "Gemeinsam" oben traegt dieselbe Information nochmal ausgeschrieben. */
.card__both {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  flex: none;
}

.card__time {
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#chart-friends .bar-row--me .bar-row__fill,
#ach-rank .bar-row--me .bar-row__fill {
  background: var(--accent);
}

.bar-row--me .bar-row__name,
.bar-row--me .bar-row__value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Erfolge */
.ach__pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

select,
#search {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--plane);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}

select {
  max-width: 340px;
  flex: 1;
}

.meter {
  height: 10px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
  margin: 10px 0 6px;
}

.meter__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.ach-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
}

.ach-item {
  display: flex;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13.5px;
}

.ach-item:hover {
  background: var(--wash);
}

.ach-item__mark {
  flex: none;
  width: 16px;
  font-weight: 700;
  color: var(--good);
}

.ach-item--locked {
  color: var(--text-muted);
}

.ach-item--locked .ach-item__mark {
  color: var(--text-muted);
}

.ach-item__date {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Bibliothek */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

#search {
  flex: 1;
  min-width: 200px;
}

.chips {
  display: flex;
  gap: 6px;
}

.chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.chip:hover {
  background: var(--wash);
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--axis);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
}

.table th.num {
  text-align: right;
}

.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable:hover {
  color: var(--text-primary);
}

.sortable[aria-sort="descending"]::after {
  content: " ↓";
}

.sortable[aria-sort="ascending"]::after {
  content: " ↑";
}

.table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--grid);
  color: var(--text-secondary);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--wash);
}

.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.game-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.game-cell img,
.game-cell__blank {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex: none;
  background: var(--track);
}

.ach-item__desc {
  color: var(--text-muted);
  font-size: 12.5px;
}

.ach-item__text {
  min-width: 0;
}

/* Weltweite Freischaltquote. Der Prozentwert steht immer als Zahl da --
   die Hervorhebung der seltenen ist Zugabe, nicht die Information selbst. */
.rarity {
  display: inline-block;
  margin-left: 7px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--wash);
  color: var(--text-muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

.rarity--rare {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.chips--sort {
  margin: 12px 0 4px;
}

.rank__head {
  margin: 18px 0 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.rank__note {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.ghost-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
}

/* Fuss */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 0 4px;
}

/* Nur fuer Besitzer und Admins sichtbar, die waehrend der Wartung hereinkommen. */
.maintenance-badge {
  padding: 3px 10px;
  border-radius: 999px;
  /* Nur Leisten-Tokens: --bar-bg ist bei manchen Styles ein Verlauf, keine Farbe. */
  border: 1px solid var(--bar-accent);
  background: color-mix(in srgb, var(--bar-accent) 22%, transparent);
  color: var(--bar-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.maintenance-badge[hidden] {
  display: none;
}

/* Gleiche Signatur wie auf der Login-Seite. */
.foot__credit {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11.5px;
}

.foot__credit strong {
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* Spielkarte beim Hover */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  pointer-events: none;
  width: max-content;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.45;
}

/* Die Karte bestimmt ihre Breite selbst -- die Freundeskarte traegt eine
   Spieleliste und braucht mehr als die Spielkarte. */
.card {
  width: 252px;
}

.card--friend {
  width: 296px;
}

/* Bleibt als Platzhalter stehen, solange Steams CDN das Bild liefert. */
.card__art {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: var(--track);
  border-bottom: 1px solid var(--border);
}

.card__body {
  padding: 10px 12px 11px;
}

.card__who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  flex: none;
  background: var(--track);
}

.card__who strong {
  margin: 0;
}

.tooltip strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}

.card__stats {
  margin: 0;
  display: grid;
  gap: 3px;
}

.card__stats > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.card__stats dt {
  color: var(--text-muted);
}

/* Trennt die Weltzahl von deinen eigenen Werten darueber -- die Zeile
   beantwortet eine andere Frage als der Rest der Karte. */
.card__live-row {
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px dashed var(--grid);
}

.card__stats dd {
  margin: 0;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .profile__title {
    justify-content: center;
  }

  .bar-row {
    grid-template-columns: minmax(90px, 130px) 1fr auto;
  }

  .bar-row__value {
    min-width: 62px;
  }
}

/* ---------- Spielstatistiken ---------- */

.gs-table {
  table-layout: auto;
}

/* Der Statistikname ist eine Zeilenueberschrift, soll aber nicht fett schreien. */
.gs-name {
  font-weight: 400;
  text-align: left;
  color: var(--text-secondary);
}

.gs-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---------- Freunde live ---------- */

.live {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.live-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 8px;
}

.live-row:hover {
  background: var(--wash);
}

.live-row__avatar {
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.live-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.live-row__name a {
  color: inherit;
  text-decoration: none;
}

.live-row__name a:hover {
  text-decoration: underline;
}

.live-row__state {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Wer gerade spielt, ist die eigentliche Nachricht dieses Panels. */
.live-row--playing .live-row__state {
  color: var(--good);
  font-weight: 550;
}

/**
 * Die Spieldauer ist selbst gemessen, nicht von Steam -- sie tritt deshalb
 * zurueck und uebernimmt nicht das Gruen des Spielnamens, der eine echte
 * Steam-Auskunft ist.
 */
.live-row__since {
  margin-left: 8px;
  color: var(--text-secondary);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* "seit mind." ist eine Untergrenze, keine Messung. Die gestrichelte Linie
   laedt zum Hovern ein -- dort steht, warum. */
.live-row__since.is-min {
  border-bottom: 1px dotted var(--line);
  cursor: help;
}

/* ---------- News ---------- */

/* Kompakt: eine Zeile pro Meldung, der Rest klappt per <details> auf. */
.news {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.news-item {
  border-radius: 8px;
}

.news-item[open] {
  background: var(--wash);
}

.news-item__head {
  display: grid;
  grid-template-columns: 64px 1fr 14px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.news-item__head::-webkit-details-marker {
  display: none;
}

/* Pfeil rechts: zeigt, dass sich hier etwas aufklappen laesst. */
.news-item__head::after {
  content: '';
  width: 7px;
  height: 7px;
  justify-self: center;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 150ms ease;
}

.news-item[open] .news-item__head::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.news-item__head:hover {
  background: var(--wash);
}

.news-item__head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.news-item__art {
  width: 64px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--track);
}

.news-item__body {
  display: grid;
  min-width: 0;
}

.news-item__title,
.news-item__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-item__title {
  color: var(--text-primary);
  font-weight: 550;
  font-size: 14px;
  line-height: 1.35;
}

.news-item__meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Aufgeklappt steht der Titel ganz da -- abgeschnitten waere er hier sinnlos. */
.news-item[open] .news-item__title {
  white-space: normal;
}

.news-item__more {
  padding: 2px 8px 10px 84px;
}

.news-item__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.news-item__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.news-item__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.news-item__link:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .news-item__head::after {
    transition: none;
  }
}

@media (max-width: 560px) {
  .news-item__head {
    grid-template-columns: 1fr 14px;
  }

  .news-item__art {
    display: none;
  }

  .news-item__more {
    padding-left: 8px;
  }
}

/* ---------- Spielstatistiken: Gruppen ---------- */

.gs-group {
  margin-bottom: 22px;
}

.gs-group__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.gs-group__sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Anmeldung ---------- */

[hidden] {
  display: none !important;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__actions form {
  margin: 0;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.topbar__avatar {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.topbar__name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  /* Avatar, Abmelden, Style-Auswahl und Theme passen am Handy nicht neben den
     Namen der Seite (gemessen: 410 px bei 375 px Breite) -- dann eigene Zeile. */
  .topbar__actions {
    margin-left: auto;
  }

  .topbar__name {
    display: none;
  }
}

.login {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
  padding: 32px 16px;
}

.login__card {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.login__title {
  font-size: 22px;
}

.login__text,
.login__hint {
  margin: 0;
  color: var(--text-secondary);
}

.login__hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* Gleiche Kombination wie .chip.is-active -- keine neue Farbe. */
.login__btn {
  display: flex;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.login__btn:hover {
  filter: brightness(1.08);
}

.login__msg {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--wash);
  font-size: 14px;
}

.login__msg p {
  margin: 6px 0;
  color: var(--text-secondary);
}

.login__id {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--track);
  font-size: 15px;
  user-select: all;
}

@media (max-width: 480px) {
  .login__card {
    padding: 24px 20px;
  }
}

/* ---------- Eigener Login ---------- */

.field {
  display: grid;
  gap: 4px;
}

.field__label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Wie #search -- gleiche Eingabefelder im ganzen Projekt. */
.field__input {
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--plane);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}

.field__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.login__or {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.login__or::before,
.login__or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.login__form {
  display: grid;
  gap: 12px;
}

button.login__btn {
  width: 100%;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.login__btn--alt {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

button.login__btn--alt:hover {
  background: var(--wash);
  filter: none;
}

button.login__btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.acct-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.acct-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 720px;
}

.acct-form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acct-msg {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--wash);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Registrieren und Steam verbinden ---------- */

.login__switch {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

/* Signatur unten in der Karte: in der Karte, damit sie auf jedem Hintergrundbild lesbar bleibt. */
.login__credit {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

/* Pflichthinweis klein unter der Signatur: Steam ist eine Marke von Valve. */
.login__legal {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.85;
}

.login__credit strong {
  color: var(--accent);
  letter-spacing: 0.04em;
}

.login__switch a {
  color: var(--accent);
}

.connect__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.connect__actions form {
  margin: 0;
}

/* ---------- News: Filter und Sortierung ---------- */

.news-toolbar {
  align-items: flex-start;
  justify-content: space-between;
}

.news-toolbar .chips {
  flex-wrap: wrap;
  flex: 1;
}

.chip__count {
  margin-left: 2px;
  opacity: 0.7;
  font-size: 12px;
}

.news-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.news-sort select {
  flex: none;
}

.news-group {
  margin: 12px 0 2px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-group:first-child {
  margin-top: 0;
}

/* ---------- Auswahl des Anzeige-Styles (Topbar) ---------- */

select.style-select {
  flex: none;
  width: auto;
  max-width: 160px;
  padding-block: 6px;
  font-size: 13px;
}

/* ---------- Pile of Shame & Jahresrückblick ---------- */

/* Hauptknopf: dieselbe Kombination wie .chip.is-active -- keine neue Farbe. */
.accent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.accent-btn:hover {
  filter: brightness(1.08);
}

.accent-btn:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}

.shame__actions .ghost-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.shame__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mini {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--wash);
  padding: 12px 14px;
}

.mini__value {
  font-size: 26px;
  font-weight: 640;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Ein Spielname statt einer Zahl: kleiner und einzeilig gekuerzt. */
.mini__value--name {
  font-size: 18px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini__label {
  color: var(--text-secondary);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.mini__hint {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.shame .toolbar,
.wrapped-teaser .toolbar {
  justify-content: space-between;
}

.shame__hint {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.shame__card {
  display: grid;
  grid-template-columns: minmax(0, 230px) 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--wash);
  padding: 12px;
}

.shame__art {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  border-radius: 6px;
  background: var(--track);
}

.shame__info {
  min-width: 0;
}

.shame__name {
  display: block;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shame__card.is-rolling .shame__art {
  opacity: 0.35;
}

.shame__meta {
  margin: 4px 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.shame__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 560px) {
  .shame__card {
    grid-template-columns: 1fr;
  }
}

/* Rückblick: Vollbild-Dialog mit einer Karte pro Seite */
body.has-overlay {
  overflow: hidden;
}

.wrapped {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--plane) 72%, transparent);
  backdrop-filter: blur(10px);
}

.wrapped[hidden] {
  display: none;
}

.wrapped__box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.wrapped__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.wrapped__stage {
  flex: 1;
  overflow-y: auto;
  padding: 32px 28px 8px;
  min-height: 380px;
}

.wrapped__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

.wrapped__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

/* Sichtbar 8 px, anklickbar 20 px. */
.wrapped__dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.wrapped__dot::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  margin: auto;
  border-radius: 50%;
  background: var(--border);
}

.wrapped__dot.is-active::before {
  background: var(--accent);
  transform: scale(1.3);
}

.wslide {
  animation: wslide-in 260ms ease;
}

@keyframes wslide-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wslide {
    animation: none;
  }
}

.wslide__kicker {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wslide__title {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.wslide__big {
  font-size: clamp(64px, 18vw, 104px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 14px;
}

.wslide__unit {
  font-size: 0.4em;
  margin-left: 6px;
  letter-spacing: 0;
}

.wslide__text {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
}

.wslide__fine {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.wslide__who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.wslide__who img {
  border-radius: 8px;
}

.wslide__art {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  border-radius: 8px;
  background: var(--track);
  margin-bottom: 14px;
}

.wslide__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.wslide__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--wash);
  font-size: 14px;
}

.wslide__list li > span:last-child {
  flex: none;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.wslide__list small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.wslide__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 18px;
}

.wslide__grid div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--wash);
}

/* Bei ungerader Zahl fuellt die letzte Kachel die Zeile. */
.wslide__grid div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.wslide__grid dt {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wslide__grid dd {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Diagramme im Rückblick: eine Reihe, das Maximum im Akzent, der Rest als
   klar abgesetzte, aber ruhigere Stufe desselben Tons -- auf die Flaeche
   gemischt, nicht auf die Spur, sonst wird es trueb. */
.wrapped__box,
.wrank {
  --wmute: color-mix(in srgb, var(--accent) 52%, var(--surface));
}

/* Rangliste: Name und Wert ueber dem Balken, damit beide Platz haben. */
.wrank {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.wrank__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.wrank__pos {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 10px;
}

.wrank__row.is-peak .wrank__pos {
  color: var(--accent);
}

.wrank__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.wrank__name {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrank__val {
  flex: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.wrank__track {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--track);
  overflow: hidden;
}

.wrank__fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 5px;
  background: var(--wmute);
}

.wrank__row.is-peak .wrank__fill {
  background: var(--accent);
}

/* Saeulen: Platz fuer den Wert oben, feine Gitterlinien, kraeftige Grundlinie,
   schmale Balken mit Luft dazwischen. */
.wchart {
  --gap: 8px;
  margin: 18px 0 0;
}

.wchart--dense {
  --gap: 3px;
}

.wchart__plot,
.wchart__axis {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: var(--gap);
}

.wchart__plot {
  position: relative;
  height: 170px;
  margin-top: 22px;
  border-bottom: 1.5px solid var(--axis);
  /* Linien oben und bei 25, 50, 75 % -- die Grundlinie ist der Rand. */
  background: linear-gradient(to bottom, var(--grid) 1px, transparent 1px) 0 0 / 100% 25%;
}

.wcol {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.wcol__bar {
  display: block;
  width: min(72%, 30px);
  border-radius: 4px 4px 0 0;
  background: var(--wmute);
  transition: filter 120ms ease;
}

.wchart--dense .wcol__bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
}

.wcol:hover .wcol__bar {
  filter: brightness(1.15);
}

.wcol.is-peak .wcol__bar {
  background: var(--accent);
}

.wcol__val {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -6px);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Nicht aufgezeichnet: schraffiert statt Nullbalken -- "unbekannt" ist nicht "nichts gespielt". */
.wcol.is-off {
  background: repeating-linear-gradient(135deg, var(--border) 0 1px, transparent 1px 6px);
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
}

.wchart__axis {
  margin-top: 6px;
}

.wchart__axis span {
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Dicht: jede dritte Stunde beschriftet, die Zahl darf ueber die schmale Spalte hinausragen. */
.wchart--dense .wchart__axis span {
  overflow: visible;
  display: flex;
  justify-content: center;
}

.wchart__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.wchart__swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: repeating-linear-gradient(135deg, var(--border) 0 1px, transparent 1px 4px);
  outline: 1px solid var(--border);
}

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

@media (max-width: 480px) {
  .wrapped {
    padding: 0;
  }

  .wrapped__box {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .wrapped__stage {
    padding: 28px 18px 8px;
  }

  .wchart__plot {
    height: 150px;
  }

  .wrapped__dot {
    width: 15px;
  }

  /* Drei Kacheln nebeneinander statt untereinander; die Erklaerung steht auch im Panel-Kopf. */
  .shame__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .mini {
    padding: 10px;
  }

  .mini__value {
    font-size: 21px;
  }

  .mini__value--name {
    font-size: 15px;
    line-height: 1.7;
  }

  .mini__label {
    font-size: 11px;
  }

  .mini__hint {
    display: none;
  }
}

/* ---------- Radar, Zusammen zocken, Leichte Beute, Sammelkarte ---------- */

/* Radar: Schirm links, Legende rechts; am Handy untereinander. */
.radar {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.radar__scope {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  overflow: hidden;
}

.radar__svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.radar__sweep {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70deg);
  animation: radar-sweep 5s linear infinite;
  pointer-events: none;
}

@keyframes radar-sweep {
  to {
    transform: rotate(-360deg);
  }
}

.radar__ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 0.6;
}

.radar__ring--zone {
  stroke-dasharray: 2 2;
}

.radar__axis {
  stroke: var(--border);
  stroke-width: 0.4;
}

.radar__me {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1.2;
}

.blip__ring {
  fill: var(--surface);
  stroke-width: 2;
}

.blip__pulse {
  fill: none;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: blip-pulse 2.4s ease-out infinite;
}

@keyframes blip-pulse {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar__sweep,
  .blip__pulse {
    animation: none;
  }

  .blip__pulse {
    display: none;
  }
}

.radar__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.radar__legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  font-size: 13.5px;
}

.radar__game {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar__who {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar__none {
  display: block !important;
  color: var(--text-muted);
}

.radar__foot {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

@media (max-width: 620px) {
  .radar {
    grid-template-columns: 1fr;
  }

  .radar__scope {
    width: min(280px, 100%);
    margin: 0 auto;
  }

  .radar__legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}

/* Mitspieler-Auswahl: eine Zeile, seitlich scrollbar statt vieler Zeilen. */
.pick-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}

.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: 170px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  padding: 3px 10px 3px 3px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pick img {
  border-radius: 50%;
  flex: none;
}

.pick span:not(.dot) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick:hover {
  background: var(--wash);
}

.pick.is-on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text-primary);
}

.finder__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.finder__pick {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 14px;
}

.finder__pick a {
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
}

.finder__sub {
  margin: 14px 0 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finder__more {
  margin-top: 6px;
}

/* Kompakte Zeilen: Icon, Name, Wert, Aktion. */
.flist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.frow {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13.5px;
}

.frow:hover {
  background: var(--wash);
}

.frow.is-picked {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  outline: 1px solid var(--accent);
}

.frow img {
  border-radius: 4px;
}

.frow__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frow__name small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frow__val {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.flist--almost .frow {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.frow__go {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.frow__go:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.frow--ach {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.frow__pct {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.frow__meter {
  display: block;
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}

.frow__meter span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* Fast 100 %: kleine Kacheln nebeneinander. */
.nearly {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

.nearly li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--wash);
  font-size: 13px;
}

.nearly img {
  border-radius: 4px;
}

.nearly__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearly__val {
  color: var(--accent);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

/* Wochen-Duell: nutzt die Rangliste aus dem Rückblick. */
.duel {
  margin-top: 4px;
}

.duel__avatar {
  border-radius: 50%;
  vertical-align: -5px;
  margin-right: 8px;
}

.wrank__name small {
  color: var(--text-muted);
  font-weight: 500;
}

.duel__champ {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--wash);
  border: 1px solid var(--border);
  font-size: 14px;
}

/* Sammelkarte */
.profile__card-btn {
  margin-top: 8px;
}

.tcard-box {
  width: min(420px, 100%);
}

.tcard-box__stage {
  display: grid;
  place-items: center;
  padding: 44px 24px 16px;
  overflow-y: auto;
}

.tcard {
  display: block;
  width: min(340px, 100%);
  height: auto;
  aspect-ratio: 600 / 840;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.tcard-box__hint {
  color: var(--text-muted);
  font-size: 12.5px;
}

@media (max-width: 480px) {
  .frow {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .frow .frow__val {
    display: none;
  }

  .flist--almost .frow .frow__val,
  .frow--ach .frow__pct {
    display: flex;
  }

  .frow__meter {
    width: 36px;
  }

  /* Die Karte braucht keinen Vollbild-Dialog wie der Rückblick. */
  .wrapped__box.tcard-box {
    height: auto;
  }
}

/* ---------- Titel & Kartenhintergrund ---------- */

.profile__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 4px 0 2px;
  cursor: default;
}

.profile__title[hidden] {
  display: none;
}

.title-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile__rank {
  color: var(--text-secondary);
  font-size: 13px;
}

.tcard-box__bgs {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 20px 6px;
}

.tcard-box__label {
  flex: none;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Alle Bilder auf einen Blick: umbrechen statt seitlich scrollen. */
.tcard-box__bgs .pick-row {
  flex-wrap: wrap;
  overflow: visible;
  margin: 0;
  padding: 3px;
}

/* Vorschaubild statt Text: der Hintergrund erklaert sich selbst, der Name steht im Tooltip. */
.bg-pick {
  flex: none;
  width: 54px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 7px;
  background: var(--track);
  overflow: hidden;
  cursor: pointer;
}

.bg-pick img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-pick:hover {
  border-color: var(--text-muted);
}

.bg-pick.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ---------- Zugang verwalten ---------- */

.admin {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.admin-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
}

.admin-row:hover {
  background: var(--wash);
}

.admin-row img,
.admin-row__blank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--track);
}

.admin-row__who {
  display: grid;
  min-width: 0;
}

.admin-row__name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__meta {
  color: var(--text-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent, #ffffff);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* Gesperrte bleiben sichtbar, treten aber zurueck. */
.admin-row.is-blocked img {
  filter: grayscale(1);
  opacity: 0.6;
}

.admin-row__btn {
  flex: none;
}

/* ---------- Feedback ---------- */

.admin-tabs {
  margin-bottom: 12px;
}

.fb-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.fb-box {
  width: min(520px, 100%);
}

.fb-form {
  display: grid;
  gap: 14px;
  padding: 28px 24px 20px;
  overflow-y: auto;
}

.fb-form__title {
  margin: 0;
  padding-right: 40px;
  font-size: 18px;
}

.fb-form__sub {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.fb-form__text {
  resize: vertical;
  min-height: 120px;
  line-height: 1.45;
}

.fb-form__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -6px;
  font-size: 12px;
  color: var(--text-muted);
}

.fb-form__count {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.fb-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fb-form .acct-msg {
  margin: 0;
}

.fb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.fb-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.fb-item__head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.fb-item__head img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--track);
}

.fb-item__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fb-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-item.is-done {
  opacity: 0.65;
}

.fb-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.fb-tag--bug {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent, #ffffff);
}
