/* DBD Stats & Compare — dunkles Theme im Nebel-Look */
:root {
  --bg: #0e0e12;
  --bg-card: #17171f;
  --bg-card-hover: #1d1d27;
  --border: #2a2a36;
  --text: #e6e2da;
  --text-muted: #8f8b83;
  --accent: #b3202e;
  --accent-soft: #d4404e;
  --ok: #4caf6e;
  --warn: #e0a63a;
  --best: #2c4a33;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.6rem; margin: 0.5rem 0; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; }

code { background: var(--bg-card); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }

.muted { color: var(--text-muted); }
.hint { font-size: 0.9rem; }
.pos { color: var(--ok); }

/* Header / Footer */
.site-header {
  background: linear-gradient(180deg, #16161d, #101016);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent-soft); }
.nav-links a { margin-left: 1.2rem; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }

.site-footer {
  margin-top: 3rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.site-footer p { margin: 0.2rem 0; }

/* Karten & Tabellen */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { padding: 0.5rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-card-hover); }
.table thead th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.num-col { text-align: right !important; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.stat-key { display: block; color: var(--text-muted); font-size: 0.7rem; font-family: monospace; }
.stat-value { font-weight: 600; }

.best { background: var(--best) !important; font-weight: 700; }

/* Badges & Notices */
.badge { display: inline-block; padding: 0.1em 0.55em; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-ok { background: rgba(76, 175, 110, 0.15); color: var(--ok); }
.badge-warn { background: rgba(224, 166, 58, 0.15); color: var(--warn); }
.badge-muted { background: rgba(143, 139, 131, 0.15); color: var(--text-muted); }

.notice { padding: 0.7rem 1rem; border-radius: 8px; margin: 1rem 0; font-size: 0.92rem; }
.notice-warn { background: rgba(224, 166, 58, 0.1); border: 1px solid rgba(224, 166, 58, 0.35); }

.error-box { background: rgba(179, 32, 46, 0.12); border: 1px solid rgba(179, 32, 46, 0.4); padding: 0.7rem 1rem; border-radius: 8px; }

/* Buttons & Formulare */
.btn {
  display: inline-block;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { background: var(--bg-card-hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-soft); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

input[type="text"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  width: 100%;
}
input[type="text"]:focus { outline: 2px solid var(--accent); border-color: transparent; }

.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.search-form { display: flex; gap: 0.6rem; max-width: 560px; margin: 1.2rem auto 0; }
.search-form input { flex: 1; }

.compare-form { max-width: 560px; margin: 1.2rem auto 0; }
#compare-inputs { display: flex; flex-direction: column; gap: 0.6rem; }
.compare-form-actions { display: flex; justify-content: space-between; margin-top: 0.8rem; }

/* Profil-Header */
.profile-header { display: flex; gap: 1.2rem; padding: 1.2rem; margin-top: 1.5rem; align-items: center; }
.profile-meta p { margin: 0.25rem 0; }
.avatar-lg { width: 96px; height: 96px; border-radius: 10px; border: 2px solid var(--border); }
.avatar-md { width: 48px; height: 48px; border-radius: 8px; }
.avatar-sm { width: 24px; height: 24px; border-radius: 4px; vertical-align: middle; margin-right: 0.4rem; }
.level-badge {
  display: inline-block; background: var(--accent); color: #fff;
  border-radius: 999px; font-size: 0.8rem; padding: 0.1em 0.6em; vertical-align: middle; margin-left: 0.4rem;
}
.country { font-size: 0.85rem; margin-left: 0.4rem; }
.refresh-link { margin-left: 0.6rem; font-size: 0.85rem; }
.player-link { color: var(--text); display: inline-flex; align-items: center; }

/* Seit-gestern-Panel */
.since-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; }
.since-card { padding: 0.9rem 1rem; }
.since-label { color: var(--text-muted); font-size: 0.8rem; }
.since-value { font-size: 1.5rem; font-weight: 700; margin: 0.15rem 0; }
.since-deltas { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); }

/* Tabs */
.tabs { display: flex; gap: 0.4rem; margin: 1.5rem 0 1rem; flex-wrap: wrap; }
.tab {
  background: var(--bg-card); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.45rem 1rem; cursor: pointer; font-size: 0.92rem;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Adept-Grid */
.adept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.adept-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.8rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.adept-card img { width: 48px; height: 48px; border-radius: 6px; }
.adept-card.locked { opacity: 0.55; }
.adept-card.achieved { border-color: rgba(76, 175, 110, 0.4); }
.adept-name { font-size: 0.85rem; font-weight: 600; }
.adept-state { font-size: 0.8rem; }
.adept-card.achieved .adept-state { color: var(--ok); }
.adept-date { font-size: 0.7rem; }

/* Achievements */
.ach-list { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.6rem; }
.ach-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.8rem;
}
.ach-row img { width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0; }
.ach-row.locked { opacity: 0.6; }
.ach-text { display: flex; flex-direction: column; flex: 1; font-size: 0.9rem; }
.ach-text .muted { font-size: 0.8rem; }
.ach-date { font-size: 0.8rem; white-space: nowrap; }
.locked-details { margin-top: 1rem; }
.locked-details summary { cursor: pointer; color: var(--text-muted); }

/* Vergleich */
.compare-players { display: flex; gap: 0.8rem; margin: 1.5rem 0; flex-wrap: wrap; }
.compare-player-card {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem; color: var(--text); flex: 1; min-width: 200px;
}
.compare-player-card:hover { text-decoration: none; background: var(--bg-card-hover); }
.perhour-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }

/* Anmeldung */
.steam-login { color: var(--accent-soft); font-weight: 600; }
.login-hint { margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted); }

/* Datenqualität & unklare Statistiken */
.quality-reasons { margin: 0.5rem 0 0.3rem; padding-left: 1.2rem; }
.quality-reasons li { margin: 0.2rem 0; }
.unclear-details { margin-top: 1rem; }
.unclear-details summary { cursor: pointer; color: var(--text-muted); padding: 0.4rem 0; }
.unclear-details summary:hover { color: var(--text); }
.unclear-details .hint { margin: 0.3rem 0 0.7rem; font-size: 0.85rem; }

/* Zuletzt geändert */
.change-run { margin-bottom: 0.8rem; }
.change-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.change-head .muted { font-size: 0.85rem; }
.change-before { font-size: 0.85rem; width: 8rem; }
.change-delta { width: 7rem; }
.change-delta strong { color: var(--text-muted); }
.change-delta strong.pos { color: var(--ok); }
.partial-mark { color: var(--warn); font-weight: 700; }

/* Match-Details (aufklappbar) */
.match-zeile { cursor: pointer; }
.match-zeile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Feste Breite, damit der Zeitpunkt beim Umschalten ▸/▾ nicht springt. */
.aufklapp {
  color: var(--text-muted); font-size: 0.75rem;
  display: inline-block; width: 0.85rem; margin-right: 0.25rem;
}
.detail-zeile > td { background: rgba(0, 0, 0, 0.25); padding: 1rem !important; }
.match-detail { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-start; }

/* Kartenbild bewusst groß — es ist das einzige Bild mit Wiedererkennungswert. */
.detail-karte { flex: 0 1 300px; min-width: 240px; }
.detail-karte img { width: 100%; border-radius: 8px; border: 1px solid var(--border); display: block; }
.detail-karte span { display: block; margin-top: 0.4rem; font-size: 0.9rem; color: var(--text-muted); }

.detail-spieler { flex: 1 1 340px; min-width: 320px; display: flex; flex-direction: column; gap: 0.6rem; }
/* Zwei Spalten, sobald der Platz reicht: fünf Spieler passen so auf drei
   Reihen statt auf fünf. */
.spieler-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.6rem; }
.spieler-hinweis { margin: 0; }
.spieler-karte { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 0.85rem; }
.spieler-selbst { border-color: rgba(76, 175, 110, 0.45); }
.spieler-kopf { display: flex; align-items: center; gap: 0.7rem; }
.spieler-portrait { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.spieler-info { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 0.92rem; }
.spieler-info .muted { font-size: 0.78rem; }
.spieler-punkte { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

.ausruestung { display: flex; gap: 0.6rem 1.1rem; flex-wrap: wrap; margin-top: 0.7rem; }
/* Blöcke wandern als Ganzes in die nächste Zeile, statt dass einzelne
   Symbole aus ihrer Gruppe herausbrechen oder gestaucht werden. */
.aus-block { display: flex; flex-direction: column; gap: 0.3rem; flex: 0 0 auto; }
.aus-titel { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.aus-icons { display: flex; gap: 0.35rem; align-items: center; flex-wrap: nowrap; }
/* Perks, Item und Opfergabe sind die aussagekräftigsten Symbole und
   deshalb am größten; Add-ons hängen als Zubehör am Item.
   Die Größe steht AUSSCHLIESSLICH in den .ic-*-Klassen (weiter unten). Hier
   stand sie früher auch — und weil `.aus-icons img` mit (0,1,1) spezifischer
   ist als `.ic-perk` mit (0,1,0), gewann sie: Gemessen am 15.08.2026 waren
   alle gefüllten Symbole 48×48, während die leeren Platzhalter (ein span,
   kein img!) ihre echten 38/34/28 behielten. Dadurch verschoben sich die
   Ausrüstungsblöcke von Zeile zu Zeile um 10 px — genau das, was der
   Kopfkommentar von match_details.html zu verhindern verspricht. */
.aus-icons img { border-radius: 4px; }

/* Erkannte Runden (Rekonstruktion) */
.rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem; }
.round-card { padding: 0.8rem 1rem; }
.round-unsure { border-style: dashed; opacity: 0.85; }
.round-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; margin-bottom: 0.5rem; }
.round-ergebnis { font-weight: 600; margin-bottom: 0.3rem; }
.round-zahlen { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.round-aktivitaet { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.round-aktivitaet li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.12rem 0; }
.small { font-size: 0.78rem; }

/* Match-Verlauf */
/* Feste Spaltenbreiten: so bleiben die Spalten über alle Zeilen hinweg
   ruhig und die Tabelle passt ohne Querscrollen in den Inhaltsbereich.
   Die frühere Spalte »Mitspieler« ist entfallen — die Punkte der anderen
   stehen in der aufklappbaren Detailansicht. */
.match-table { table-layout: fixed; min-width: 940px; }
.match-table th, .match-table td { padding: 0.5rem 0.7rem; }
.match-table th:nth-child(1), .match-table td:nth-child(1) { width: 18%; }
.match-table th:nth-child(2), .match-table td:nth-child(2) { width: 10%; }
.match-table th:nth-child(3), .match-table td:nth-child(3) { width: 16%; }
.match-table th:nth-child(4), .match-table td:nth-child(4) { width: 15%; }
.match-table th:nth-child(5), .match-table td:nth-child(5) { width: 24%; }
.match-table th:nth-child(6), .match-table td:nth-child(6) { width: 7%; }
.match-table th:nth-child(7), .match-table td:nth-child(7) { width: 10%; }
.match-table td { white-space: nowrap; }
/* Die Detailzeile spannt über alle Spalten und darf frei umbrechen. */
.match-table .detail-zeile > td { width: auto; white-space: normal; }
/* Zu lange Namen werden gekürzt; der volle Text steht im title-Attribut. */
.match-table td.kuerzbar { overflow: hidden; text-overflow: ellipsis; }
.badge-killer { background: rgba(179, 32, 46, 0.18); color: #e2707a; }
.badge-survivor { background: rgba(76, 140, 175, 0.18); color: #7fb4d4; }

/* Ausgang der Partie: farbiger Balken links plus dezent getönte Zeile.
   Ersetzt die früheren Haken/Kreuze hinter dem Ausgang. */
.match-table tr.row-success > td { background: rgba(76, 175, 110, 0.07); }
.match-table tr.row-fail > td { background: rgba(179, 32, 46, 0.09); }
.match-table tr.row-success:hover > td { background: rgba(76, 175, 110, 0.15); }
.match-table tr.row-fail:hover > td { background: rgba(179, 32, 46, 0.18); }
.match-table tr.row-success > td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.match-table tr.row-fail > td:first-child { box-shadow: inset 4px 0 0 var(--accent-soft); }
/* Ohne Wertung: neutraler Balken, kein Farbton. Der Ausgang ist unbekannt —
   etwa weil das Spiel eine neue Bezeichnung liefert, die die Zuordnung noch
   nicht kennt. Ohne diesen Balken wäre die Zeile von einem Darstellungsfehler
   nicht zu unterscheiden. */
.match-table tr.match-zeile:not(.row-success):not(.row-fail) > td:first-child {
  box-shadow: inset 4px 0 0 var(--text-muted);
}

.match-legende { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin: 0 0 0.6rem; }
.legende-eintrag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.legende-eintrag::before { content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--border); flex-shrink: 0; }
.legende-erfolg::before { background: var(--ok); }
.legende-fehl::before { background: var(--accent-soft); }
/* var(--border) wäre hier als Vorgabe zwar neutral, aber auf dem dunklen
   Hintergrund praktisch unsichtbar (1,4:1) — der dritte Eintrag hätte dann
   keinen erkennbaren Balken. */
.legende-offen::before { background: var(--text-muted); }
.neg { color: var(--accent-soft); }
.pager { display: flex; gap: 0.6rem; margin-top: 1rem; }
.setup-steps { line-height: 1.9; padding-left: 1.3rem; }
.setup-steps li { margin-bottom: 0.5rem; }
.token-box { padding: 0.8rem 1rem; overflow-x: auto; }
.token-box code { background: none; font-size: 0.85rem; word-break: break-all; }
a.tab { text-decoration: none; }
a.tab:hover { text-decoration: none; }

/* Warteschlangen-Status */
.queue-status {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-muted);
  padding: 0.5rem 0.9rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-card); margin-top: 1rem;
}
.queue-status .warn { color: var(--warn); }

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

/* Import-Token: standardmäßig unkenntlich, per Schaltfläche umschaltbar */
.token-wert { transition: filter 0.15s ease; }
.token-verdeckt { filter: blur(6px); user-select: none; }
.token-aktionen {
  display: flex; align-items: center; gap: 0.6rem;
  flex-wrap: wrap; margin-top: 0.6rem;
}
.token-rueckmeldung { font-size: 0.85rem; color: var(--ok); }
.token-rueckmeldung.fehler { color: var(--warn); }

/* Leseintervall des Userscripts */
.sync-optionen {
  border: 0; padding: 0; margin: 0.6rem 0 0;
  display: grid; gap: 0.5rem;
}
.sync-optionen legend { padding: 0 0 0.3rem; }
.sync-option {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.6rem 0.8rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-card); cursor: pointer;
}
.sync-option:hover { background: var(--bg-card-hover); }
.sync-option input { margin: 0.3rem 0 0; accent-color: var(--accent-soft); }
.sync-option-hinweis {
  display: block; margin-top: 0.15rem;
  font-size: 0.82rem; color: var(--text-muted);
}
.sync-rueckmeldung { color: var(--ok); margin-top: 0.6rem; }

/* Detailansicht als Wertungstafel: eine Zeile je Spieler, untereinander —
   angelehnt an die Tafel im Spiel. Das frühere Raster nebeneinander wurde
   bei fünf Spielern schnell unübersichtlich. */
.detail-tafel { flex: 1; min-width: 320px; display: flex; flex-direction: column; gap: 0.4rem; }
.spieler-zeile {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
}
.spieler-zeile.spieler-selbst { border-color: rgba(76, 175, 110, 0.45); background: rgba(76, 175, 110, 0.05); }
.sz-person { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.sz-portrait { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sz-namen { display: flex; flex-direction: column; min-width: 0; font-size: 0.9rem; }
/* Der Name darf gekürzt werden, das Abzeichen daneben nicht: Es sitzt in
   einer eigenen Flex-Zeile und ist gegen Schrumpfen gesichert. */
.sz-titel { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.sz-namen strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sz-du { flex: 0 0 auto; }
.sz-namen .muted { font-size: 0.76rem; }
.sz-ausruestung { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: flex-start; }
.sz-punkte { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.ic-perk { width: 44px; height: 44px; }
.ic-item { width: 40px; height: 40px; }
.ic-addon { width: 32px; height: 32px; }
.ic-emblem { width: 34px; height: 34px; }
.tafel-hinweis { margin: 0.3rem 0 0; }

@media (max-width: 900px) {
  .spieler-zeile { grid-template-columns: 1fr auto; }
  .sz-ausruestung { grid-column: 1 / -1; }
}

/* Feste Plätze in der Wertungstafel: Jeder Ausrüstungsblock hat eine feste
   Anzahl Felder (4 Perks, 1 Item + 2 Add-ons, 1 Opfergabe, 4 Embleme). Fehlt
   etwas, bleibt der Platz leer — sonst verspringen die Zeilen der Spieler
   gegeneinander, je nachdem wer was dabeihatte. */
.aus-icons .leer {
  display: inline-block;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.015);
}
.sz-ausruestung {
  display: grid;
  grid-template-columns: max-content max-content max-content max-content;
  gap: 0 1.1rem;
  align-items: start;
}
.aus-block { min-width: 0; }
.aus-icons { display: flex; gap: 0.25rem; align-items: center; }

/* Portrait mit Status-Symbol wie im Spiel (Entkommen, geopfert, verblutet …) */
.sz-portraitfeld { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.sz-portraitfeld .sz-portrait { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.sz-status {
  position: absolute; right: -5px; bottom: -5px;
  width: 22px; height: 22px;
  background: var(--bg); border-radius: 50%; padding: 2px;
}
.sz-person { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }

@media (max-width: 1100px) {
  .sz-ausruestung { grid-template-columns: max-content max-content; gap: 0.5rem 1rem; }
}

/* Kartenbild über die Tafel statt daneben: Die Spielerzeilen brauchen die
   volle Breite, sonst werden die Embleme rechts abgeschnitten. */
.match-detail { flex-direction: column; gap: 0.8rem; }
.detail-karte { flex: none; width: 100%; max-width: 340px; }
.detail-karte img { height: 110px; object-fit: cover; }
.detail-tafel { width: 100%; }
.spieler-zeile { grid-template-columns: minmax(140px, 170px) 1fr max-content; gap: 0.8rem; }
.sz-ausruestung { gap: 0 0.9rem; justify-content: start; }
.ic-perk { width: 38px; height: 38px; }
.ic-item { width: 34px; height: 34px; }
.ic-addon { width: 28px; height: 28px; }
.ic-emblem { width: 30px; height: 30px; }
.aus-titel { font-size: 0.62rem; }

/* Sondermodi (2v8 & Co.) */
.badge-modus { background: rgba(120, 90, 200, 0.2); color: #a99adf; }
.modus-hinweis { font-size: 0.8rem; color: var(--text-muted); }
.ic-klasse { width: 38px; height: 38px; }
.klassen-name { font-size: 0.82rem; margin-left: 0.4rem; }

/* Erkannte Freunde in der Wertungstafel. Die Zuordnung ist erschlossen,
   nicht gemessen — die Farbe zeigt, wie sicher sie ist. */
.freund-treffer {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem; margin-top: 0.15rem;
  padding: 0.05em 0.45em; border-radius: 999px;
  border: 1px dashed var(--border); width: fit-content;
}
.freund-treffer a { color: inherit; }
.freund-konfidenz { opacity: 0.7; font-size: 0.68rem; }
.freund-hoch { border-color: rgba(76,175,110,0.5); color: var(--ok); }
.freund-mittel { border-color: rgba(224,166,58,0.5); color: var(--warn); }
.freund-niedrig { border-color: var(--border); color: var(--text-muted); }

/* Abruf-Takt eines einzelnen Profils */
.watch-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.85rem;
  font-size: 0.9rem;
}
.watch-picker select {
  padding: 0.25rem 0.4rem;
  font: inherit;
}
.watch-hinweis {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  max-width: 60ch;
}

/* ---------------------------------------------- Einzelne Partie unter /m/… */

/* Bewusst schmal gehalten: Die Seite hat genau einen Gegenstand, und wer sie
   über einen geteilten Link öffnet, soll ihn sofort sehen — nicht erst nach
   dem Scrollen an einem bildschirmhohen Kartenbild vorbei. */
.einzelpartie { max-width: 62rem; margin: 0 auto; }

.ep-kopf {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.ep-kopf.ep-erfolg { border-left-color: var(--ok); }
.ep-kopf.ep-misserfolg { border-left-color: var(--accent); }
.ep-kopf-text { min-width: 0; }
.ep-kopf h1 { margin: 0.15rem 0; font-size: 1.5rem; }
.ep-datum { margin: 0; }
.ep-utc { color: var(--text-muted); }
.ep-ausgang { margin: 0; color: var(--text-muted); }

/* Feste Kachelgröße statt Originalmaß — das Kartenbild kommt mit 1024 px und
   würde die Seite sonst allein füllen. */
.ep-karte {
  flex: 0 0 auto;
  width: 190px;
  height: 108px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.ep-fakten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.ep-fakten div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}
.ep-fakten dt { color: var(--text-muted); font-size: 0.8rem; }
.ep-fakten dd { margin: 0.15rem 0 0; font-size: 1.15rem; font-weight: 600; }

.ep-fuss { margin-top: 1.25rem; }
.ep-teilen {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 0.75rem 0;
}
.ep-teilen-label { display: block; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.35rem; }
.ep-link {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .ep-kopf { flex-direction: column; align-items: flex-start; }
  .ep-karte { width: 100%; height: 140px; }
}

/* --------------------------------------------- Auswahlleiste für Darstellungen */

/* Nur zum Vergleichen da: Sie soll auffindbar sein, aber der Sache nicht die
   Schau stehlen — deshalb gedeckt und ohne Akzentfarbe, außer beim aktiven
   Eintrag. */
.designwahl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.designwahl-titel {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.2rem;
}
.designwahl-knopf {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  text-decoration: none;
}
.designwahl-knopf:hover { background: var(--bg-card-hover); }
.designwahl-knopf.ist-aktiv {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.designwahl-hinweis { flex: 1 1 100%; margin-top: 0.2rem; }

/* ------------------------------------------- Informationssymbol an Statistiken */

/* Ein „i“ im Kreis. Zurückhaltend genug, um bei 300 Zeilen nicht zu lärmen,
   aber groß genug für den Daumen (24 px Trefferfläche). */
.stat-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font: 600 0.72rem/1 system-ui, sans-serif;
  font-style: italic;
  cursor: pointer;
  vertical-align: middle;
}
.stat-info:hover,
.stat-info[aria-expanded="true"] {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}
.stat-info:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

.stat-hinweis td {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  background: var(--bg);
  border-left: 3px solid var(--accent-soft);
  padding: 0.5rem 0.8rem;
  max-width: 70ch;
}

/* Datenverlust-Warnung, wenn der serverseitige BHVR-Abruf pausiert */
.bhvr-alarm {
  margin: 0.75rem 0 1rem;
  padding: 0.7rem 1rem;
  border-left: 4px solid var(--akzent, #b3202e);
  background: rgba(179, 32, 46, 0.12);
  color: var(--akzent, #b3202e);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
}
.bhvr-alarm a { margin-left: 0.5rem; color: inherit; text-decoration: underline; }

/* Fusszeile: Info links, Rechtliches rechts — und Luft dazwischen.
   Auf schmalen Schirmen untereinander, Rechtliches dann linksbuendig. */
.footer-zeilen {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 3rem;
  flex-wrap: wrap;
}
.footer-info { max-width: 46rem; }
/* .site-footer p (0,1,1) schlaegt eine blosse Klasse — deshalb hier mit
   .site-footer davor, sonst verliert margin-left:auto den Kampf. */
.site-footer .footer-recht {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.footer-recht a { color: inherit; }
@media (max-width: 700px) {
  .site-footer .footer-recht { margin-left: 0; text-align: left; white-space: normal; }
}

/* Rechtsseiten (Impressum, Datenschutz) */
.recht { max-width: 46rem; margin: 0 auto; }
.recht h1 { margin-bottom: 0.25rem; }
.recht-block { padding: 1rem 1.25rem; margin: 1rem 0; }
.recht-block h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.recht-block p { margin: 0.5rem 0 0; line-height: 1.55; }

/* Einzelpartie: mehr Luft — die Bloecke sassen zu dicht aufeinander. */
.ep-zurueck { margin: 0 0 1rem; }
.einzelpartie .ep-kopf { padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.einzelpartie .ep-fakten { gap: 1rem; margin: 0 0 1.5rem; }
.einzelpartie .match-detail { margin-top: 0.25rem; }
.einzelpartie .ep-fuss {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Sichtbarkeits-Umschalter auf dem eigenen Profil */
.sichtbarkeit-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

/* Rechtliches im Fuß */
.footer-recht a { color: inherit; }

/* Admin-Leiste auf der Startseite */
.admin-leiste { margin-top: 1.2rem; }

/* Autovervollstaendigung der Suche */
.such-feld { position: relative; display: inline-block; }
.such-vorschlaege {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 20rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 50;
  text-align: left;
  overflow: hidden;
}
.vorschlag {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  color: inherit;
}
.vorschlag:hover { background: rgba(255, 255, 255, 0.06); }
.vorschlag img { width: 28px; height: 28px; border-radius: 4px; }
.vorschlag-text { display: flex; flex-direction: column; min-width: 0; }
.vorschlag-text strong { font-size: 0.95rem; }
.vorschlag-text code { font-size: 0.7rem; color: var(--text-muted); }

/* Vergleichs-Ablage (schwebend, unten rechts) */
.vergleichs-ablage {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 16.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 0.7rem 0.8rem;
  z-index: 60;
  font-size: 0.85rem;
}
.ablage-titel { font-weight: 600; margin-bottom: 0.4rem; }
.ablage-zeile { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; }
.ablage-zeile img { width: 22px; height: 22px; border-radius: 4px; }
.ablage-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ablage-entfernen {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.2rem;
}
.ablage-entfernen:hover { color: var(--accent, #b3202e); }
.ablage-fuss { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.btn-aus { opacity: 0.55; cursor: not-allowed; }
.profil-werkzeuge { margin-top: 0.4rem; }
