/* Turnier – gemeinsame Bausteine für Verwaltung, Turnierseite und Anzeige: Tabelle, Spielzeile, K.-o.-Baum, Wappen.
   Nutzt die Farben der jeweiligen Seite: --text, --text-2, --text-3, --rand und die Akzentfarbe --akzent. */

.tu-wappen { display: inline-grid; place-items: center; flex: none; width: 2.1em; height: 2.1em; border-radius: .6em; background: linear-gradient(150deg, hsl(var(--h, 210) 70% 52%), hsl(var(--h, 210) 70% 38%)); color: #fff; font-size: .72em; font-weight: 850; letter-spacing: .02em; }
.tu-live-punkt { display: inline-flex; align-items: center; gap: .35em; color: #ef4444; font-size: .78em; font-weight: 850; letter-spacing: .08em; }
.tu-live-punkt::before { content: ''; width: .6em; height: .6em; border-radius: 50%; background: currentColor; animation: tu-puls 1.4s ease-in-out infinite; }
@keyframes tu-puls { 50% { opacity: .25; transform: scale(.7); } }

/* Tabelle */
.tu-tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tu-tabelle th { padding: .45em .4em; color: var(--text-3); font-size: .74em; font-weight: 750; letter-spacing: .06em; text-align: center; text-transform: uppercase; border-bottom: 1px solid var(--rand); }
.tu-tabelle td { padding: .55em .4em; text-align: center; border-bottom: 1px solid var(--rand); }
.tu-tabelle tr:last-child td { border-bottom: 0; }
.tu-tabelle .tu-t-team { text-align: left; }
.tu-tabelle td.tu-t-team { display: flex; align-items: center; gap: .6em; min-width: 0; font-weight: 650; }
.tu-tabelle td.tu-t-team span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-tabelle .tu-t-platz { width: 2.2em; color: var(--text-3); font-weight: 750; }
.tu-tabelle .tu-t-pkt { font-weight: 850; }
.tu-tabelle tr.weiter td.tu-t-platz { color: var(--akzent); box-shadow: inset 3px 0 0 var(--akzent); }
.tu-tabelle tr.hl td { background: color-mix(in srgb, var(--akzent) 12%, transparent); }
.tu-t-form { white-space: nowrap; }
.tu-t-form i { display: inline-block; width: .62em; height: .62em; margin: 0 1px; border-radius: 50%; background: var(--text-3); }
.tu-t-form i.f-s { background: #22c55e; } .tu-t-form i.f-n { background: #ef4444; } .tu-t-form i.f-u { background: #a3a3a3; }
@media (max-width: 560px) { .tu-tabelle .tu-t-form, .tu-tabelle .tu-t-tore { display: none; } }

/* Spielzeile */
.tu-spiele { display: grid; gap: .4em; margin: 0; padding: 0; list-style: none; }
.tu-spiel { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto minmax(0, 1fr) 5.4em; align-items: center; gap: .7em; padding: .65em .8em; border-radius: .9em; background: var(--tu-zeile, rgba(127, 127, 127, .07)); border: 1px solid var(--rand); }
.tu-spiel.live { border-color: rgba(239, 68, 68, .55); background: rgba(239, 68, 68, .07); }
.tu-spiel.hl { box-shadow: inset 4px 0 0 var(--akzent); }
.tu-s-zeit { display: grid; line-height: 1.15; } .tu-s-zeit b { font-variant-numeric: tabular-nums; } .tu-s-zeit small { color: var(--text-3); font-size: .74em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-s-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tu-s-team.heim { text-align: right; }
.tu-s-team.sieg { font-weight: 850; }
.tu-s-team.offen { color: var(--text-3); font-style: italic; font-weight: 500; }
.tu-spiel.fertig .tu-s-team:not(.sieg) { color: var(--text-2); }
.tu-s-stand { display: grid; justify-items: center; min-width: 3.6em; padding: .2em .55em; border-radius: .55em; background: var(--tu-stand, rgba(127, 127, 127, .14)); font-weight: 850; font-variant-numeric: tabular-nums; }
.tu-s-stand small { color: var(--text-3); font-size: .62em; font-weight: 650; }
.tu-spiel.live .tu-s-stand { background: #ef4444; color: #fff; }
.tu-s-info { display: grid; justify-items: end; color: var(--text-3); font-size: .76em; line-height: 1.2; text-align: right; }
@media (max-width: 560px) { .tu-spiel { grid-template-columns: 3.4em minmax(0, 1fr) auto minmax(0, 1fr); gap: .5em; padding: .6em; } .tu-s-info { display: none; } }

/* K.-o.-Baum */
.tu-baum { display: grid; grid-template-columns: repeat(var(--runden), minmax(11em, 1fr)); gap: 1.4em; overflow-x: auto; padding-bottom: .4em; }
.tu-b-runde { display: flex; flex-direction: column; min-width: 0; }
.tu-b-runde h4, .tu-b-platz3 h4 { margin: 0 0 .6em; color: var(--text-3); font-size: .74em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.tu-b-spiele { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: .8em; }
.tu-b-spiel { position: relative; display: grid; gap: 1px; padding: .3em; border-radius: .7em; background: var(--tu-zeile, rgba(127, 127, 127, .07)); border: 1px solid var(--rand); }
.tu-b-spiel.live { border-color: rgba(239, 68, 68, .6); }
.tu-b-runde:not(:last-child) .tu-b-spiel::after { content: ''; position: absolute; left: 100%; top: 50%; width: .7em; border-top: 2px solid var(--rand); }
.tu-b-runde:not(:first-child) .tu-b-spiel::before { content: ''; position: absolute; right: 100%; top: 50%; width: .7em; border-top: 2px solid var(--rand); }
.tu-b-team { display: flex; align-items: center; justify-content: space-between; gap: .5em; padding: .35em .5em; border-radius: .45em; }
.tu-b-team span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-b-team b { font-variant-numeric: tabular-nums; }
.tu-b-team.sieg { background: color-mix(in srgb, var(--akzent) 16%, transparent); font-weight: 800; }
.tu-b-team.offen span { color: var(--text-3); font-style: italic; }
.tu-b-team.hl { box-shadow: inset 3px 0 0 var(--akzent); }
.tu-b-spiel > small { padding: .1em .5em .15em; color: var(--text-3); font-size: .7em; }
.tu-b-platz3 { grid-column: -2 / -1; max-width: 100%; }
