/* /spiele/ (fi-spiele.php): nächstes Spiel groß, letztes Spiel + Bilanz, Spielplan mit Filter, Tabellen.
 * Handy zuerst (Reiter Spielplan/Tabelle), ab 1024 px Spielplan und Tabelle nebeneinander, max. 1280 px. */
.fi-sp { --pk: #e6197a; --ink: #121212; --mu: #6b6b74; --ln: #e7e7e9; --soft: #f5f5f7; --navy: var(--fi-navy, #0f1729); color: var(--ink); }
.fi-sp-head { padding: 18px 16px 14px; }
.fi-sp-kicker, .fi-sp-label { display: flex; align-items: center; gap: 10px; color: var(--pk); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.fi-sp-kicker::before { content: ""; width: 22px; height: 3px; background: var(--pk); }
.fi-sp-head h1 { margin: 6px 0 0; font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.fi-sp-empty { margin: 0; padding: 16px; color: var(--mu); font-size: 14px; }

/* ---------- Nächstes Spiel ---------- */
.fi-sp-top { display: grid; gap: 12px; padding: 0 16px; }
.fi-sp-next { display: flex; flex-direction: column; gap: 18px; padding: 16px 16px 14px; background: var(--navy); color: #fff; text-decoration: none; }
.fi-sp-next-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fi-sp-next-label { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.fi-sp-next-label::before { content: ""; width: 4px; height: 14px; background: var(--pk); }
.fi-sp-next.is-live .fi-sp-next-label::before { display: none; }
.fi-sp-next-label i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; animation: fi-sp-pulse 1.4s infinite; }
@keyframes fi-sp-pulse { 50% { opacity: .3; } }
.fi-sp-next-comp { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .75); font-size: 12.5px; font-weight: 600; }
.fi-sp-next-comp img { padding: 2px; background: #fff; object-fit: contain; }
.fi-sp-next-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.fi-sp-next-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.fi-sp-next-team img { width: 56px; height: 56px; object-fit: contain; }
.fi-sp-next-team b { max-width: 100%; overflow: hidden; font-size: 14px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; }
.fi-sp-next-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; text-align: center; }
.fi-sp-next-mid small { color: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 600; }
.fi-sp-next-time, .fi-sp-next-score { font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fi-sp-next-mid em { margin-top: 4px; padding: 2px 8px; background: var(--pk); color: #fff; font-size: 11.5px; font-style: normal; font-weight: 800; letter-spacing: .04em; }
.fi-sp-next-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .7); font-size: 12.5px; }
.fi-sp-next-foot > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-sp-next-cta { flex: none; color: #fff; font-weight: 800; }
.fi-sp-next:hover .fi-sp-next-cta { color: var(--pk); }

/* ---------- Letztes Spiel + Bilanz ---------- */
.fi-sp-side { display: grid; gap: 12px; }
.fi-sp-last { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--ln); color: inherit; text-decoration: none; }
.fi-sp-last:hover { border-color: var(--pk); }
.fi-sp-last-top { display: flex; align-items: center; justify-content: space-between; }
.fi-sp-last-comp { color: var(--mu); font-size: 12.5px; }
.fi-sp-last-team { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.fi-sp-last-team img { width: 26px; height: 26px; object-fit: contain; }
.fi-sp-last-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-sp-last-team b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fi-sp-last-team.is-win { font-weight: 800; }
.fi-sp-badge { padding: 3px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fi-sp-badge.is-s { background: #15803d; color: #fff; }
.fi-sp-badge.is-u { background: #c9cad0; color: var(--ink); }
.fi-sp-badge.is-n { background: var(--pk); color: #fff; }
.fi-sp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fi-sp-stats div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--soft); }
.fi-sp-stats span { color: var(--mu); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fi-sp-stats b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Reiter (Handy) ---------- */
.fi-sp-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 20px; background: #fff; border-bottom: 1px solid var(--ln); }
.fi-sp-tabs button { position: relative; height: 46px; border: 0; background: none; color: var(--mu); font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.fi-sp-tabs button.is-on { color: var(--ink); }
.fi-sp-tabs button.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--pk); }
[data-sp-panel] { display: none; }
[data-sp-panel].is-shown { display: block; }

/* ---------- Spielplan ---------- */
.fi-sp-body { padding: 16px 16px 8px; }
.fi-sp-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fi-sp-h h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 800; }
.fi-sp-h h2::before { content: ""; width: 4px; height: 18px; background: var(--pk); }
.fi-sp-seg { display: flex; border: 1px solid var(--ln); }
.fi-sp-seg button { height: 32px; padding: 0 12px; border: 0; background: #fff; color: var(--mu); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fi-sp-seg button.is-on { background: var(--ink); color: #fff; }
.fi-sp-filter { display: flex; gap: 8px; margin: 0 -16px 6px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.fi-sp-filter::-webkit-scrollbar { display: none; }
.fi-sp-filter button { flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--ln); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fi-sp-filter button.is-on { border-color: var(--pk); background: var(--pk); color: #fff; }
.fi-sp-month[hidden], .fi-sp-row[hidden] { display: none; }
.fi-sp-month h3 { margin: 14px 0 0; padding: 0 0 8px; border-bottom: 1px solid var(--ln); color: var(--mu); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fi-sp-month ul { margin: 0; padding: 0; list-style: none; }
.fi-sp-row a { display: grid; grid-template-columns: 62px minmax(0, 1fr) 30px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ln); color: inherit; text-decoration: none; }
.fi-sp-row.is-next a { position: relative; }
.fi-sp-row.is-next a::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; background: var(--pk); }
.fi-sp-when { display: flex; flex-direction: column; gap: 2px; }
.fi-sp-when b { font-size: 12.5px; font-weight: 800; }
.fi-sp-when small { color: var(--mu); font-size: 12px; font-variant-numeric: tabular-nums; }
.fi-sp-comp { display: none; }
.fi-sp-wc { align-self: flex-start; margin-top: 3px; padding: 1px 5px; background: var(--soft); color: var(--mu); font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; } /* Handy: Wettbewerb kurz */
.fi-sp-teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fi-sp-team { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; }
.fi-sp-team img { width: 22px; height: 22px; object-fit: contain; }
.fi-sp-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-sp-team b { min-width: 14px; font-size: 15px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.fi-sp-team.is-win { font-weight: 800; }
.fi-sp-res { display: grid; place-items: center; width: 28px; height: 28px; justify-self: end; font-size: 13px; font-weight: 800; }
.fi-sp-res small { display: none; }
.fi-sp-res.is-s { background: #15803d; color: #fff; }
.fi-sp-res.is-u { background: #c9cad0; color: var(--ink); }
.fi-sp-res.is-n { background: var(--pk); color: #fff; }
.fi-sp-res.is-live { width: auto; padding: 0 6px; background: #ff3b5c; color: #fff; font-size: 12px; }
.fi-sp-res.is-pre { color: var(--mu); }
.fi-sp-row a:hover .fi-sp-team.is-own span, .fi-sp-row a:hover .fi-sp-res.is-pre { color: var(--pk); }

/* ---------- Tabelle ---------- */
.fi-sp-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fi-sp-table th { padding: 0 6px 8px; border-bottom: 1px solid var(--ln); color: var(--mu); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.fi-sp-table th:nth-child(-n+2) { text-align: left; }
.fi-sp-table td { padding: 8px 6px; border-bottom: 1px solid var(--ln); text-align: right; }
.fi-sp-table td:first-child { position: relative; width: 26px; padding-left: 10px; color: var(--mu); font-weight: 700; text-align: left; }
.fi-sp-table td:nth-child(2) { text-align: left; }
.fi-sp-table tr[class*="z-"] td:first-child::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; }
.fi-sp-table .z-cl td:first-child::before, .fi-sp-legend .z-cl::before { background: #1d4ed8; }
.fi-sp-table .z-playoff td:first-child::before, .fi-sp-legend .z-playoff::before { background: #60a5fa; }
.fi-sp-table .z-el td:first-child::before, .fi-sp-legend .z-el::before { background: #f59e0b; }
.fi-sp-table .z-ecl td:first-child::before, .fi-sp-legend .z-ecl::before { background: #10b981; }
.fi-sp-table .z-relplay td:first-child::before, .fi-sp-legend .z-relplay::before { background: #fb923c; }
.fi-sp-table .z-down td:first-child::before, .fi-sp-legend .z-down::before { background: #dc2626; }
.fi-sp-table tr.is-own td { background: #fdeef5; font-weight: 800; }
.fi-sp-tteam { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fi-sp-tteam img { flex: none; width: 20px; height: 20px; object-fit: contain; }
.fi-sp-tteam span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.fi-sp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--mu); font-size: 12px; font-weight: 600; }
.fi-sp-legend li { display: flex; align-items: center; gap: 6px; }
.fi-sp-legend li::before { content: ""; width: 10px; height: 10px; }
.fi-sp-tables [hidden] { display: none; }

.fi-sp-newskick { margin-top: 12px !important; }

@media (min-width: 600px) {
	.fi-sp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ======================= Computer ======================= */
@media (min-width: 1024px) {
	.fi-sp { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--w-pad); box-sizing: border-box; }
	.fi-sp-head { padding: 36px 0 24px; }
	.fi-sp-kicker { font-size: 12px; letter-spacing: .16em; }
	.fi-sp-head h1 { margin-top: 10px; font-size: 52px; line-height: 1.02; letter-spacing: -.035em; }
	.fi-sp-empty { padding: 16px 0; }

	/* nächstes Spiel (2/3) | letztes Spiel + Bilanz (1/3), gleich hoch */
	.fi-sp-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--w-gap); align-items: stretch; padding: 0; }
	.fi-sp-next { justify-content: space-between; gap: 24px; padding: 24px 28px 20px; }
	.fi-sp-next-label { font-size: 12.5px; }
	.fi-sp-next-comp { font-size: 14px; }
	.fi-sp-next-team img { width: 96px; height: 96px; }
	.fi-sp-next-team b { font-size: 20px; }
	.fi-sp-next-mid { min-width: 200px; gap: 4px; }
	.fi-sp-next-mid small { font-size: 14px; }
	.fi-sp-next-time, .fi-sp-next-score { font-size: 56px; }
	.fi-sp-next-mid em { font-size: 12.5px; padding: 3px 10px; }
	.fi-sp-next-foot { padding-top: 16px; font-size: 14px; }
	.fi-sp-side { grid-template-rows: 1fr auto; gap: 16px; }
	.fi-sp-last { justify-content: center; gap: 10px; padding: 20px 22px; }
	.fi-sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.fi-sp-stats div { padding: 14px 16px; }
	.fi-sp-stats b { font-size: 22px; }

	/* Spielplan (2/3) | Tabelle (1/3) nebeneinander, keine Reiter */
	.fi-sp-tabs { display: none; }
	[data-sp-panel] { display: block; }
	.fi-sp-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--w-gap); align-items: start; padding: 48px 0 56px; }
	.fi-sp-h { margin-bottom: 14px; }
	.fi-sp-h h2 { font-size: 22px; }
	.fi-sp-h h2::before { height: 22px; }
	.fi-sp-filter { flex-wrap: wrap; margin: 0 0 8px; padding: 0; overflow: visible; }
	.fi-sp-filter button:hover:not(.is-on) { border-color: var(--pk); color: var(--pk); }
	.fi-sp-month h3 { margin-top: 22px; }
	.fi-sp-row a { grid-template-columns: 92px 190px minmax(0, 1fr) 34px; gap: 20px; padding: 14px 0; }
	.fi-sp-row.is-next a::before { left: -12px; }
	.fi-sp-row a:hover { background: linear-gradient(90deg, transparent, #fafafb 12%, #fafafb 88%, transparent); }
	.fi-sp-when b { font-size: 14px; }
	.fi-sp-when small { font-size: 13px; }
	.fi-sp-wc { display: none; }
	.fi-sp-comp { display: flex; align-items: center; gap: 10px; min-width: 0; }
	.fi-sp-comp img { flex: none; width: 22px; height: 22px; object-fit: contain; }
	.fi-sp-comp > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
	.fi-sp-comp b { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
	.fi-sp-comp small { overflow: hidden; color: var(--mu); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
	/* Paarung in einer Zeile: Heim  2 : 1  Gast */
	.fi-sp-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; position: relative; }
	.fi-sp-team { font-size: 15px; }
	.fi-sp-team:first-child { grid-template-columns: minmax(0, 1fr) 22px auto; text-align: right; }
	.fi-sp-team:first-child img { order: 2; }
	.fi-sp-team:first-child b { order: 3; }
	.fi-sp-team:last-child { grid-template-columns: auto 22px minmax(0, 1fr); }
	.fi-sp-team:last-child b { order: -2; text-align: left; }
	.fi-sp-team:last-child img { order: -1; }
	.fi-sp-teams::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 2px; background: var(--mu); transform: translate(-50%, -50%); }
	.fi-sp-res { width: 30px; height: 30px; }

	.fi-sp-tables .fi-sp-h { flex-wrap: nowrap; }
	.fi-sp-tables .fi-sp-seg button { padding: 0 10px; font-size: 12px; }
	.fi-sp-table { font-size: 13.5px; }
	.fi-sp-table td { padding: 7px 6px; }
	.fi-sp-tteam span { max-width: 170px; }

	.fi-sp-newskick { display: none; }
	body.fi-spielepage .fi-au-list { padding-top: 24px; }
}
