/* =====================================================================
   DoubleOut · Darts Tournament Manager – Gestaltung
   Dunkles Design mit eigenen Grafiken (bilder/):
   - logo.svg: gestreiftes D, daraus favicon.png, apple-touch-icon.png, icon-*.png (tools/icons/icons-erzeugen.js)
   - hintergrund.svg: angedeutete Dartscheibe mit hervorgehobenem Doppel (dunkel)
   - hintergrund_hell.svg: dieselbe Scheibe für den hellen Beamer
   Bereich Turnierleitung: derselbe Hintergrund, blau abgedunkelt.
   ===================================================================== */

:root {
    /* Farbschema (Standard „DoubleOut-Rot“). Ein anderes Schema setzt App.razor per <style> aus Dienste/Farbschemata.cs. */
    --tv-akzent: #c8102e;
    --tv-akzent-hell: #e23a52;
    --tv-akzent-dunkel: #b00020;
    --tv-akzent-tief: #780818;
    --tv-akzent-rgb: 200, 16, 46;
    --tv-akzent-hell-rgb: 226, 58, 82;
    --tv-akzent-tief-rgb: 120, 8, 28;
    --tv-leitung: #2f7de1;
    --tv-leitung-hell: #7fb1f2;
    --tv-leitung-dunkel: #0b57c2;
    --tv-leitung-rgb: 47, 125, 225;
    --tv-leitung-dunkel-rgb: 11, 87, 194;
    --tv-leitung-tief-rgb: 18, 60, 130;
    /* Hintergründe; App.razor setzt sie mit ?farbschema=…, damit nach einem Wechsel kein altes Bild aus dem Browser-Speicher kommt. */
    --tv-hintergrund: url('/bilder/hintergrund.svg');
    --tv-hintergrund-hell: url('/bilder/hintergrund_hell.svg');
    --tv-text: #e6e6e6;
    --tv-text-gedimmt: #a7a7a7;
    --tv-karte: rgba(22, 22, 22, 0.82);
    --tv-karte-rand: rgba(255, 255, 255, 0.08);
    --bs-body-bg: #121212;
    --bs-body-color: var(--tv-text);
    --bs-link-color-rgb: 255, 255, 255;
    --bs-link-hover-color-rgb: 204, 204, 204;
    --bs-primary: var(--tv-akzent);
    --bs-primary-rgb: var(--tv-akzent-rgb);
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    color: var(--tv-text);
    background-color: #0f1117;
    background-image: var(--tv-hintergrund);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    background-attachment: fixed;
}

/* Handy: Scheibe rechts angeschnitten; fixed ruckelt auf iOS, daher scroll. */
@media (max-width: 576px) {
    body {
        background-position: 72% top;
        background-size: auto 100vh;
        background-attachment: scroll;
    }
}

.seite { min-height: 100vh; display: flex; flex-direction: column; }
.seite > main { flex: 1; }

/* Bereich Turnierleitung: derselbe Hintergrund, blau abgedunkelt – man sieht sofort, dass man in der Leitung ist. */
.seite-turnierleitung {
    background-image: linear-gradient(rgba(8, 14, 28, 0.62), rgba(8, 12, 22, 0.80)), var(--tv-hintergrund);
    background-size: cover;
    background-position: right center;
    background-attachment: fixed;
}
@media (max-width: 576px) {
    .seite-turnierleitung { background-attachment: scroll; background-size: auto 100vh; background-position: 72% top; }
}

footer { color: #888; background: rgba(10, 10, 10, 0.7); }
footer a { color: #aaa; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Impressum / Datenschutz ---------- */
.rechtstext { max-width: 52rem; }
.rechtstext h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.rechtstext dt { color: #aaa; font-weight: normal; }
.platzhalter { color: #ffc107; background: rgba(255, 193, 7, 0.12); padding: 0 .25rem; border-radius: .2rem; }

/* ---------- Navigation ---------- */
/* Schriftzug (bilder/schriftzug.svg: gestreiftes D mit Pfeil) mit Untertitel */
.hauptmenue .marke { display: flex; flex-direction: column; line-height: 1; }
.hauptmenue .marke img { height: 34px; width: auto; margin: -4px 0 1px -4px; }
.hauptmenue .marke small { font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--tv-text-gedimmt); padding-left: 2px; }
.hauptmenue { background: rgba(14, 14, 14, 0.92); border-bottom: 2px solid var(--tv-akzent); backdrop-filter: blur(4px); }
.hauptmenue .nav-link { color: #ddd !important; }
.hauptmenue .nav-link.active { color: #fff !important; border-bottom: 2px solid var(--tv-akzent); }
.hauptmenue .nav-turnierleitung.active { border-bottom-color: var(--tv-leitung); }
.hauptmenue .navbar-toggler { cursor: pointer; border-color: rgba(255, 255, 255, 0.25); }
.hauptmenue form .nav-link { padding-left: 0; }
@media (min-width: 992px) { .hauptmenue form .nav-link { padding-left: var(--bs-navbar-nav-link-padding-x); } }

/* Installierbare App (js/app.js): Menüpunkt nur, wenn der Browser die Installation anbietet, bzw. auf iPhone/iPad. */
.app-installieren { display: none; }
html.app-installierbar .app-installieren, html.app-ios .app-installieren { display: list-item; }
.hauptmenue .app-installieren .nav-link { color: var(--tv-akzent-hell) !important; }
/* Zurück-Knopf (NavMenu, js/app.js): nur in der installierten App, die keine Zurück-Taste des Browsers hat. */
.app-zurueck { display: none; }
html.app-eigenstaendig .app-zurueck {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 38px; height: 38px; margin-right: .6rem; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 50%; color: #fff;
}
.app-zurueck svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.app-zurueck:hover, .app-zurueck:focus-visible { background: rgba(var(--tv-akzent-rgb), 0.25); border-color: var(--tv-akzent); }
#app-hinweis {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 2000; width: min(22rem, calc(100% - 2rem));
    background: #1b1b1b; border: 1px solid var(--tv-akzent); border-radius: 10px; padding: 1rem 1.2rem; text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .6); line-height: 1.5;
}
#app-hinweis button { margin-top: .6rem; background: var(--tv-akzent); color: #fff; border: 0; border-radius: 6px; padding: .3rem 1.4rem; }

/* Menü ohne JavaScript auf- und zuklappen (funktioniert auch auf statischen Seiten). */
@media (max-width: 991.98px) {
    .hauptmenue .menue-inhalt { display: none; width: 100%; }
    #menue-umschalter:checked ~ .menue-inhalt { display: block; }
}
@media (min-width: 992px) {
    .hauptmenue .navbar-toggler { display: none; }
    .hauptmenue .menue-inhalt { display: flex !important; }
}

/* ---------- Bausteine ---------- */
h1, .h1 { font-weight: 700; letter-spacing: 0.01em; }
h1 { font-size: 1.9rem; }
.text-secondary { color: var(--tv-text-gedimmt) !important; }

.karte {
    background: var(--tv-karte);
    border: 1px solid var(--tv-karte-rand);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.karte-titel { font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; }

.kennzahl { text-align: center; padding: .9rem .5rem; }
.kennzahl .wert { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.kennzahl .bez { font-size: .82rem; color: var(--tv-text-gedimmt); }

.table { --bs-table-bg: transparent; --bs-table-color: var(--tv-text); margin-bottom: 0; }
.table > :not(caption) > * > * { border-bottom-color: rgba(255, 255, 255, 0.08); }
.table thead th { color: #fff; font-weight: 600; background: rgba(57, 57, 57, 0.8); position: sticky; top: 0; z-index: 2; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(255, 255, 255, 0.05); }
.tabelle-scroll { max-height: 70vh; overflow-y: auto; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }

.platz-1 { color: #ffd54a; font-weight: 700; }
.platz-2 { color: #d9d9d9; font-weight: 700; }
.platz-3 { color: #d39858; font-weight: 700; }

.btn-primary { --bs-btn-bg: var(--tv-akzent); --bs-btn-border-color: var(--tv-akzent); --bs-btn-hover-bg: var(--tv-akzent-hell); --bs-btn-hover-border-color: var(--tv-akzent-hell); --bs-btn-active-bg: var(--tv-akzent-tief); }
.btn-outline-light { --bs-btn-hover-color: #000; }

.form-control, .form-select { background-color: rgba(30, 30, 30, 0.9); color: #f0f0f0; border-color: #4a4a4a; }
.form-control:focus, .form-select:focus { background-color: rgba(36, 36, 36, 0.95); color: #fff; border-color: var(--tv-akzent-hell); box-shadow: 0 0 0 .2rem rgba(var(--tv-akzent-rgb), .3); }
.form-floating > label { color: #aaa; }
.form-check-input:checked { background-color: var(--tv-akzent); border-color: var(--tv-akzent); }
.form-switch .form-check-input { cursor: pointer; }

.badge-status { font-weight: 500; }
.spielerbild { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; border: 1px solid #444; background: #222; }
.spielerbild-gross { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid #444; }
.vereinslogo { max-height: 80px; max-width: 160px; }

/* RFID-/Suchfeld am Turnierabend groß und gut treffbar */
.eingabe-gross { font-size: 1.25rem; padding: .7rem 1rem; }

/* Diagramme (SVG) */
.diagramm { width: 100%; height: auto; }
.diagramm text { fill: #bbb; font-size: 11px; }
.diagramm .gitter { stroke: rgba(255, 255, 255, .08); }
.diagramm .achse { stroke: rgba(255, 255, 255, .25); }
.legende { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .9rem; }
.legende .punkt { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

/* ---------- Blazor ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #ff6b6b; }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    color: #222;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: 6px; }
.blazor-error-boundary::after { content: "Es ist ein Fehler aufgetreten."; }

/* Links: hell wie im Altbestand, rote Unterstreichung als Akzent. */
a { color: #f3f3f3; text-underline-offset: 3px; text-decoration-color: rgba(var(--tv-akzent-hell-rgb), 0.75); }
a:hover { color: #fff; text-decoration-color: var(--tv-akzent-hell); }
.table a, .navbar a, a.karte, a.btn { text-decoration: none; }
.table a:hover { text-decoration: underline; text-decoration-color: var(--tv-akzent-hell); }
a.karte:hover { border-color: rgba(var(--tv-akzent-hell-rgb), 0.6); }
h1:focus, h1:focus-visible { outline: none; }

/* ---------- Startseite ---------- */
.startbuehne {
    display: flex; align-items: center; gap: 2rem;
    padding: 2rem 2.25rem;
    border-radius: 14px;
    border: 1px solid var(--tv-karte-rand);
    background: linear-gradient(110deg, rgba(var(--tv-akzent-rgb), 0.28), rgba(14, 14, 14, 0.88) 55%);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}
.startbuehne h1 { margin: 0; }
.startbuehne-marke img { height: 96px; width: auto; max-width: 100%; margin-left: -8px; }
.startbuehne p { color: #cfcfcf; font-size: 1.1rem; }
.vorzeile { color: var(--tv-akzent-hell); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; }
@media (max-width: 576px) {
    .startbuehne { flex-direction: column; text-align: center; padding: 1.5rem 1rem; gap: 1rem; }
    .startbuehne-marke img { height: 68px; }
    .startbuehne .d-flex { justify-content: center; }
}

/* Karten mit Kopfzeile und Listen */
.karte-kopf {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .9rem 1.1rem .7rem;
    border-bottom: 1px solid var(--tv-karte-rand);
}
.karte-kopf h2 { font-size: 1.05rem; font-weight: 700; margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.karte-kopf h2::before { content: ""; display: inline-block; width: 4px; height: .95em; background: var(--tv-akzent); border-radius: 2px; margin-right: .55rem; vertical-align: -2px; }
.karte-kopf a { color: var(--tv-text-gedimmt); text-decoration: none; }
.karte-kopf a:hover { color: #fff; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; align-items: center; gap: .85rem; padding: .7rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.liste > li:last-child { border-bottom: 0; }
.liste > li:hover { background: rgba(255, 255, 255, .03); }
.liste a { text-decoration: none; }
.liste a:hover { text-decoration: underline; text-decoration-color: var(--tv-akzent-hell); }
.min-w-0 { min-width: 0; }

.datumskachel {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 3.1rem; height: 3.1rem; flex-shrink: 0;
    border-radius: 8px; background: rgba(var(--tv-akzent-rgb), .18); border: 1px solid rgba(var(--tv-akzent-hell-rgb), .45);
    line-height: 1;
}
.datumskachel .tag { font-size: 1.25rem; font-weight: 800; }
.datumskachel .monat { font-size: .7rem; text-transform: uppercase; color: #ddd; margin-top: .15rem; }

.medaille {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.9rem; height: 1.9rem; flex-shrink: 0;
    border-radius: 50%; font-weight: 700; font-size: .85rem;
    background: rgba(255, 255, 255, .08); color: #ddd;
}
.medaille-1 { background: linear-gradient(145deg, #ffe082, #c9a227); color: #2a2000; }
.medaille-2 { background: linear-gradient(145deg, #f1f1f1, #9e9e9e); color: #222; }
.medaille-3 { background: linear-gradient(145deg, #e3a76b, #8d5524); color: #1e1005; }
.zahl { font-variant-numeric: tabular-nums; }

/* Seitentitel: roter Akzent wie auf der Startseite */
main h1 { margin-bottom: 1rem; padding-left: .8rem; border-left: 5px solid var(--tv-akzent); line-height: 1.15; }
main .startbuehne h1 { padding-left: 0; border-left: 0; }
.seite-turnierleitung main h1 { border-left-color: var(--tv-leitung); }
.seite-turnierleitung a.karte:hover { border-color: rgba(var(--tv-leitung-rgb), 0.7); }

/* ---------- Spielbetrieb: Partien, Turnierbaum, Gruppen, Boards ---------- */
.partie {
    background: rgba(30, 30, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid #555;
    border-radius: 6px;
    min-width: 12.5rem;
    max-width: 16rem;
    font-size: .88rem;
    line-height: 1.25;
}
.partie-kopf { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem .5rem; font-size: .72rem; color: var(--tv-text-gedimmt); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.partie-zeile { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem .5rem; }
.partie-zeile + .partie-zeile { border-top: 1px solid rgba(255, 255, 255, .05); }
.partie-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partie-legs { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 1ch; text-align: right; }
.partie-sieger { color: #fff; font-weight: 700; }
.partie-verlierer { color: var(--tv-text-gedimmt); }
.partie-freilos { color: #777; font-style: italic; }
.partie-bereit { border-left-color: #e0a526; }
.partie-laeuft { border-left-color: var(--tv-leitung); box-shadow: 0 0 0 1px rgba(var(--tv-leitung-rgb), .5); }
.partie-beendet { border-left-color: #2e9e5b; }
.partie-freilos, .partie-entfaellt { opacity: .55; }
.partie-offen { opacity: .8; }
.partie-board { color: #8fc0ff; font-weight: 700; }
.partie-hinweis { color: #e0a526; }
.partie-herkunft { margin-left: auto; font-size: .7rem; opacity: .55; white-space: nowrap; align-self: center; }
.partie-moeglich { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, .25); text-underline-offset: 3px; }
.partie-klickbar { cursor: pointer; }
.partie-klickbar:hover { border-color: rgba(255, 255, 255, .35); }
.partie-markiert { outline: 2px solid var(--tv-akzent-hell); }

.baum-rahmen { overflow-x: auto; }
[data-ziehen] { cursor: grab; }
[data-ziehen].wird-gezogen, [data-ziehen].wird-gezogen * { cursor: grabbing; user-select: none; }
.baum-abschnitt + .baum-abschnitt { margin-top: 1.5rem; }
.baum-titel { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--tv-text-gedimmt); margin-bottom: .5rem; }
.baum { display: flex; gap: 1.25rem; align-items: stretch; }
.baum-runde { display: flex; flex-direction: column; flex-shrink: 0; }
.baum-rundenname { font-size: .78rem; color: var(--tv-text-gedimmt); margin-bottom: .4rem; white-space: nowrap; }
.baum-partien { display: flex; flex-direction: column; justify-content: space-around; gap: .6rem; flex: 1; }

/* Beidseitiger Turnierbaum: Verliererseite links (nach außen wachsend), Siegerseite rechts, Finale rechts außen */
.baum-beidseitig { display: flex; gap: 1.25rem; align-items: stretch; width: max-content; }
.baum-seite { display: flex; flex-direction: column; }
.baum-seite > .baum { flex: 1; }
.baum-seite-verlierer > .baum-titel { text-align: right; }
.baum-seite-sieger { border-left: 2px dashed rgba(255, 255, 255, .15); padding-left: 1.25rem; }
.baum-seite-finale { border-left: 2px dashed rgba(255, 255, 255, .15); padding-left: 1.25rem; }
.baum-seite-verlierer .baum-rundenname { text-align: right; }

.gruppen-partien, .partien-raster { display: flex; flex-wrap: wrap; gap: .5rem; }
.tabelle-gruppe tr.aufsteiger td { background: rgba(46, 158, 91, .16); }

.reiter .nav-link { color: #ddd; }
.reiter .nav-link.active { background: var(--tv-leitung); color: #fff; }

.board-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.board { padding: .6rem .75rem; }
.board-nummer { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.board-belegt { border-color: rgba(var(--tv-leitung-rgb), .6); }
.board-frei .board-nummer { color: #2e9e5b; }
.ergebnis-knopf { min-width: 3.6rem; font-variant-numeric: tabular-nums; }
.auswahl { border-color: rgba(var(--tv-akzent-hell-rgb), .6); }
.setzliste { padding-left: 1.6rem; max-width: 36rem; }
.setzliste li { padding: .15rem 0; }
.setzliste li .btn { padding: 0 .45rem; }

/* QR-Code für die Tablet-Kopplung */
.qr-code svg { display: block; width: 100%; height: auto; }

/* Turnierleitung: Uhren an den Boards (Wartezeit nach Aufruf, Spielzeit) */
.uhr { font-variant-numeric: tabular-nums; color: var(--tv-text-gedimmt); }
.uhr-gelb { color: #f0c419; font-weight: 700; }
.uhr-rot { color: #ff5a5a; font-weight: 800; }
.naechste tr.klickbar { cursor: pointer; }
.naechste tr.klickbar:hover td { background: rgba(255, 255, 255, .06); }

/* Board-Karte: vorgemerkte Partien anklickbar, Schreiber wählbar */
.board span.klickbar { cursor: pointer; text-decoration: underline dotted; }
/* Eigene Auswahl statt <select>, damit Doppel-Namen „A / B“ nach dem Schrägstrich umbrechen können */
.board .schreiber-wahl { position: relative; }
.board button.schreiber { width: 100%; font-size: .8rem; line-height: 1.25; white-space: normal; overflow-wrap: break-word; padding-top: .2rem; padding-bottom: .2rem; }
.board .schreiber-hintergrund { position: fixed; inset: 0; z-index: 1040; }
.board .schreiber-liste { position: absolute; top: 100%; left: 0; z-index: 1050; min-width: 100%; max-width: 16rem; max-height: 18rem;
    overflow-y: auto; margin-top: 2px; padding: .2rem 0; background: #1f1f1f; border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 6px; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .5); }
.board .schreiber-liste button { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit;
    font-size: .8rem; line-height: 1.25; padding: .3rem .6rem; white-space: normal; overflow-wrap: break-word; }
.board .schreiber-liste button:hover { background: rgba(255, 255, 255, .1); }
.board .schreiber-liste button.gewaehlt { background: var(--tv-leitung); color: #fff; }
.board .fw-semibold > .me-auto { min-width: 0; overflow-wrap: break-word; }
.board .fw-semibold + .fw-semibold { margin-top: .2rem; }

/* Handbuch (Seite /hilfe) */
.handbuch-menue .nav-link { color: var(--tv-text-gedimmt); padding: .3rem .6rem; border-radius: 6px; }
.handbuch-menue .nav-link.active { background: var(--tv-leitung); color: #fff; }
.handbuch { line-height: 1.6; max-width: 56rem; }
.handbuch h1 { margin-bottom: 1rem; }
.handbuch h2 { margin-top: 2rem; font-size: 1.4rem; }
.handbuch h3 { margin-top: 1.5rem; font-size: 1.15rem; }
.handbuch img { display: block; max-width: 100%; height: auto; margin: .75rem 0 1.25rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); }
.handbuch table { margin: .5rem 0 1.25rem; }
.handbuch code { color: color-mix(in srgb, var(--tv-akzent-hell) 45%, #fff); }
.handbuch h2, .handbuch h3 { scroll-margin-top: 5.5rem; }

/* ---------- Statistikmodul ---------- */
.statistik-reiter { display: flex; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid var(--tv-karte-rand); padding-bottom: .5rem; }
.statistik-reiter a { padding: .35rem .9rem; border-radius: 999px; color: var(--tv-text-gedimmt); text-decoration: none; font-weight: 600; }
.statistik-reiter a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.statistik-reiter a.aktiv { color: #fff; background: var(--tv-akzent); }

.bestenliste .table td { padding-top: .3rem; padding-bottom: .3rem; }
.bestenliste .wert { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.bestenliste .wert a { text-decoration: none; }
.bestenliste .platz { color: var(--tv-text-gedimmt); }

.karte-kopf span.small { margin-left: auto; }

.meilensteine { display: flex; flex-wrap: wrap; gap: .5rem; }
.meilenstein { display: flex; align-items: center; gap: .55rem; padding: .4rem .8rem .4rem .45rem; border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--tv-akzent-rgb), .28), rgba(22, 22, 22, .85)); border: 1px solid rgba(var(--tv-akzent-hell-rgb), .45); }
.meilenstein .symbol { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .3rem;
    border-radius: 999px; background: var(--tv-akzent); color: #fff; font-weight: 800; font-size: .85rem; }
.meilenstein b { display: block; font-size: .9rem; line-height: 1.1; }
.meilenstein small { display: block; color: var(--tv-text-gedimmt); font-size: .75rem; line-height: 1.1; }

.verteilung .zeile { display: grid; grid-template-columns: 4.6rem 1fr 2.6rem 2.6rem; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.verteilung .bez { font-size: .85rem; color: var(--tv-text-gedimmt); }
.verteilung .balken { height: .8rem; background: rgba(255, 255, 255, .06); border-radius: 4px; overflow: hidden; }
.verteilung .balken span { display: block; height: 100%; background: linear-gradient(90deg, var(--tv-akzent), var(--tv-akzent-hell)); border-radius: 4px; }

.spieler-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.spieler-kachel { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; color: #fff; }
.spieler-kachel b { display: block; line-height: 1.15; }
.spieler-kachel small { display: block; color: var(--tv-text-gedimmt); font-size: .78rem; }

.duell { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; text-align: center; }
.duell .seite-a, .duell .seite-b { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.duell .name { font-size: 1.3rem; font-weight: 700; }
.duell .bilanz { font-size: 3rem; font-weight: 800; line-height: 1; }
@media (max-width: 576px) { .duell .bilanz { font-size: 2.2rem; } .duell .spielerbild-gross { width: 72px; height: 72px; } }
.vergleich-tabelle td.besser { color: #5fd38d; font-weight: 700; }
.vergleich-tabelle tr.abschnitt td { color: var(--tv-text-gedimmt); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding-top: .8rem; }

.scoresheet .table td, .scoresheet .table th { padding: .15rem .35rem; }
.scoresheet td.max { color: #ffd54a; font-weight: 800; }
.scoresheet td.hoch { color: #fff; font-weight: 600; }
.scoresheet td.checkout { color: #5fd38d; }
.scoresheet tfoot td { color: var(--tv-text-gedimmt); border-bottom: 0; }

.bestleistungen li { display: flex; gap: .6rem; align-items: baseline; padding: .15rem 0; }
.bestleistungen .wert { min-width: 4.5rem; font-weight: 700; text-decoration: none; }

.heute-bestleistungen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 768px) { .heute-bestleistungen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.heute-bestleistungen .titel { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tv-akzent-hell); margin-bottom: .4rem; }
.heute-bestleistungen .eintrag { display: flex; gap: .6rem; align-items: baseline; padding: .15rem 0; }
.heute-bestleistungen .eintrag .wert { min-width: 4.4rem; font-weight: 700; color: #fff; }
.heute-bestleistungen .eintrag .name { color: var(--tv-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heute-bestleistungen .eintrag.erster .wert { color: #ffd54a; }
.heute-bestleistungen.gross { gap: 1.5rem; }
.heute-bestleistungen.gross .titel { font-size: 1rem; }
.heute-bestleistungen.gross .eintrag { font-size: 1.35rem; padding: .3rem 0; }
.heute-bestleistungen.gross .eintrag .wert { min-width: 6.2rem; }

/* ---------- Statistik-Tablet (/statistik-tablet) ---------- */
.stat-tablet { min-height: 100vh; display: flex; flex-direction: column; font-size: 1.1rem; user-select: none; -webkit-user-select: none; }
.stat-kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; height: 64px; padding: 0 1.2rem;
    background: rgba(10, 10, 12, .95); border-bottom: 2px solid #2fae5f; }
.stat-kopf .marke { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.stat-kopf .marke img { height: 40px; width: 40px; }
.stat-kopf .board-statistik { background: #2fae5f; color: #fff; font-weight: 800; padding: .2rem .8rem; border-radius: 6px; font-size: 1.15rem; }
.stat-reiter { display: flex; gap: .4rem; margin: 0 auto; }
.stat-reiter a { padding: .55rem 1.2rem; border-radius: 999px; color: var(--tv-text-gedimmt); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.stat-reiter a.aktiv { background: #2fae5f; color: #fff; }
.stat-kopf .uhr { color: #fff; font-weight: 600; font-size: 1.15rem; }
.stat-hinweis { background: #b8860b; color: #fff; padding: .6rem 1.2rem; font-weight: 600; }
.stat-inhalt { flex: 1; padding: 1.2rem 1.4rem 2rem; }
.stat-tablet .table { font-size: 1.05rem; }
.stat-tablet .btn { padding: .55rem 1rem; }
.stat-tablet .spielerbild { width: 44px; height: 44px; }
.stat-tablet .spieler-kacheln { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stat-tablet .spieler-kachel { padding: .75rem 1rem; font-size: 1.15rem; }
.stat-tablet .spieler-kachel .spielerbild { width: 54px; height: 54px; }
@media (max-width: 900px) { .stat-reiter a { padding: .45rem .7rem; font-size: 1rem; } .stat-kopf .uhr { display: none; } }

.tablet-start .meine-statistik { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 1.4rem; margin-bottom: 1.5rem; color: #fff;
    background: linear-gradient(90deg, rgba(47, 174, 95, .45), rgba(22, 22, 22, .85)); border-color: rgba(47, 174, 95, .7); }
.tablet-start .meine-statistik .symbol { font-size: 2.6rem; }
.tablet-start .meine-statistik b { display: block; font-size: 1.6rem; }
.tablet-start .meine-statistik small { color: var(--tv-text); font-size: 1rem; }

.tablet-suche .suchzeile { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.tablet-suche .suchtext { flex: 1; font-size: 1.8rem; font-weight: 700; padding: .4rem 1rem; border-radius: 10px; background: rgba(255, 255, 255, .06);
    border: 1px solid var(--tv-karte-rand); min-height: 3.4rem; }
.tablet-suche input.suchtext { color: #fff; outline: none; user-select: text; -webkit-user-select: text; }
.tablet-suche input.suchtext:focus { border-color: #2fae5f; box-shadow: 0 0 0 .2rem rgba(47, 174, 95, .35); }
.tablet-suche input.suchtext::placeholder { color: var(--tv-text-gedimmt); font-weight: 600; }
.tablet-suche .tastatur { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .45rem; }
.tablet-suche .tastatur .btn { font-size: 1.5rem; font-weight: 700; padding: .55rem 0; }
.tablet-suche .tastatur .btn.breit { grid-column: span 2; }

/* Spielername mit Bild: Bild und Name in einer Zeile, zu lange Namen mit „…“. */
.stat-spieler { display: inline-flex; align-items: center; max-width: 100%; white-space: nowrap; }
.stat-spieler > span { overflow: hidden; text-overflow: ellipsis; }
.stat-spieler > .spielerbild { flex: 0 0 auto; }

/* ---------- Farbschema (Verwaltung → Farbschema): Vorschau je Schema ---------- */
.farbschema-karte { overflow: hidden; }
.farbschema-karte.aktiv { border-color: var(--fs-akzent); box-shadow: 0 0 0 2px var(--fs-akzent), 0 6px 24px rgba(0, 0, 0, 0.35); }
.farbschema-vorschau { background: #0f1117; }
.farbschema-vorschau .fs-kopf { background: rgba(14, 14, 14, 0.92); border-bottom: 2px solid var(--fs-akzent); padding: .45rem .75rem; }
.farbschema-vorschau .fs-kopf img { height: 26px; width: auto; }
.farbschema-vorschau .fs-inhalt { display: flex; align-items: center; gap: .9rem; padding: .9rem .75rem;
    background: linear-gradient(110deg, color-mix(in srgb, var(--fs-akzent) 28%, transparent), rgba(14, 14, 14, 0.88) 60%); }
.farbschema-vorschau .fs-d { width: 52px; height: 52px; border-radius: 10px; }
.farbschema-vorschau .fs-vorzeile { color: var(--fs-hell); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; margin-bottom: .35rem; }
.farbschema-vorschau .fs-knopf { display: inline-block; background: var(--fs-akzent); color: #fff; border-radius: 6px; padding: .15rem .6rem; font-size: .8rem; font-weight: 600; margin-right: .3rem; }
.farbschema-vorschau .fs-knopf.fs-leitung { background: var(--fs-leitung); }

/* ---------- Trainingsbereich: eigenes Farbschema (Variablen kommen per style vom Rahmen TrainingsBereich) ---------- */
.trainings-bereich { --bs-primary: var(--tv-akzent); --bs-primary-rgb: var(--tv-akzent-rgb); --bs-link-color-rgb: var(--tv-akzent-hell-rgb); }
.trainings-band { display: flex; align-items: baseline; gap: .8rem; margin: -.25rem 0 1rem; padding: .45rem .9rem; border-radius: 10px;
    background: linear-gradient(90deg, rgba(var(--tv-akzent-rgb), .55), rgba(var(--tv-akzent-rgb), .08)); border-left: 5px solid var(--tv-akzent); }
.trainings-band span { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; }
.trainings-band small { color: rgba(255, 255, 255, .8); }
.trainings-bereich .karte.training-laeuft { border-color: var(--tv-akzent); box-shadow: 0 0 18px rgba(var(--tv-akzent-rgb), .3); }
.trainings-bereich .statistik-reiter a.aktiv { border-color: var(--tv-akzent); }
.farbpunkt { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); }
.training-spieler-wahl .list-group-item { background: rgba(36, 36, 36, .9); color: #eee; border-color: rgba(255, 255, 255, .1); }
.ziel-balken { height: .55rem; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; min-width: 80px; }
.ziel-balken > span { display: block; height: 100%; background: var(--tv-akzent); }
.board-karte-training { border: 1px dashed var(--tv-akzent-hell); border-radius: 8px; padding: .3rem .5rem; margin-top: .4rem; }
.ziel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .35rem 1.5rem; }
.ziel-zeile { display: flex; align-items: center; gap: .5rem; }
.ziel-zeile .ziel-name { min-width: 3.2em; font-weight: 600; }
.training-aufnahmen td, .training-aufnahmen th { white-space: nowrap; }

/* ---------- Mein Profil (/ich): Hinweis „Du bist dran“, Partienliste, Kopplungscode ---------- */
.ich-koppeln { max-width: 640px; }
.kopplungscode-feld { max-width: 12rem; font-size: 1.3rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
.ich-hinweis {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem; border-radius: 12px;
    background: var(--tv-karte); border: 2px solid var(--tv-karte-rand); box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.ich-hinweis.rot { border-color: var(--tv-akzent); background: rgba(var(--tv-akzent-rgb), .22); animation: ich-puls 1.6s ease-in-out infinite; }
.ich-hinweis.gelb { border-color: #f0b429; background: rgba(240, 180, 41, .14); }
.ich-hinweis.blau { border-color: var(--tv-leitung); background: rgba(var(--tv-leitung-rgb), .18); }
.ich-hinweis-titel { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.ich-hinweis-text { color: var(--tv-text-gedimmt); }
.ich-board { flex: none; min-width: 4.6rem; text-align: center; padding: .35rem .6rem; border-radius: 10px; background: rgba(0, 0, 0, .45); }
.ich-board small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tv-text-gedimmt); }
.ich-board b { display: block; font-size: 2rem; line-height: 1; font-weight: 900; }
.ich-hinweis.rot .ich-board b { color: var(--tv-akzent-hell); }
@keyframes ich-puls { 50% { box-shadow: 0 0 0 6px rgba(var(--tv-akzent-rgb), .25); } }
@media (prefers-reduced-motion: reduce) { .ich-hinweis.rot { animation: none; } }
.ich-partien { list-style: none; margin: 0; padding: 0; }
.ich-partien li { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-top: 1px solid var(--tv-karte-rand); }
.ich-partien li:first-child { border-top: 0; }
.ich-partien li.aktiv { background: rgba(255, 255, 255, .04); }
.ich-partien .nr { flex: none; width: 2.2rem; text-align: center; font-weight: 700; color: var(--tv-text-gedimmt); }
.ich-partien .mitte { flex: 1; min-width: 0; }
.ich-partien .mitte b, .ich-partien .mitte small { display: block; overflow: hidden; text-overflow: ellipsis; }
.ich-partien .mitte small { color: var(--tv-text-gedimmt); }
.ich-partien .zustand { flex: none; text-align: right; }
.kopplung { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.kopplung-qr { flex: none; width: 150px; background: #fff; padding: 6px; border-radius: 8px; }
.kopplung-qr svg { display: block; width: 100%; height: auto; }
.kopplung-text { flex: 1; min-width: 12rem; }
.kopplung-name { font-weight: 700; font-size: 1.1rem; }
.kopplung-code { font-size: 2rem; font-weight: 900; letter-spacing: .12em; font-family: ui-monospace, Consolas, monospace; }
.kopplung-hinweis { font-size: .85rem; color: var(--tv-text-gedimmt); }
.kopplung-schmal .kopplung-qr { width: 120px; }
.kopplung-schmal .kopplung-code { font-size: 1.5rem; }
