/* App – Stats (Präfix sx-). Nur Tokens aus app.css, damit Dunkel, Grube und Hell funktionieren. */

/* Leiste unten: 6 Reiter (Start, Liga, Live, Stats, Theke, Ich). Diese Datei wird auf allen App-Bildschirmen geladen. */
.ap-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 5px; font-size: 10.5px; }
.ap-nav a { padding: 8px 0 7px; min-width: 0; }
.ap-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 374px) {
	.ap-nav { width: calc(100% - 20px); font-size: 10px; padding: 4px; border-radius: 24px; }
}

.sx { gap: 12px; }
.sx-gold { color: var(--ap-gold-t); }
.sx-blue { color: var(--ap-blue-t); }

/* Mitglieder-Auswahl */
.sx-pick { display: flex; align-items: center; gap: 8px; background: var(--ap-card); border: 1px solid var(--ap-line); border-radius: 16px; padding: 4px 4px 4px 12px; margin: 0; }
.sx-pick__l { font-family: var(--ap-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-muted); flex: none; }
.sx-pick select { flex: 1; min-width: 0; min-height: 44px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ap-text); background: transparent; border: 0; padding: 0 4px; cursor: pointer; }
.sx-pick select:focus-visible { outline: 2px solid var(--ap-gold-t); outline-offset: 2px; border-radius: 10px; }
.sx-pick select option { color: var(--ap-text); background: var(--ap-card); }
.sx-pick__b { flex: none; min-height: 40px; padding: 0 12px; }

/* Übersicht: eigene Karte */
.sx-me { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ap-text) !important; background: var(--ap-card-grad); border: 1px solid var(--ap-gold); border-radius: 24px; padding: 14px 16px 12px; box-shadow: var(--ap-shadow); }
.sx-me__top { display: flex; align-items: center; gap: 12px; }
.sx-me__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sx-me__t strong { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 19px; line-height: 1.15; }
.sx-me__tr { display: flex; flex: none; }
.sx-me__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sx-me__facts > span { background: var(--ap-card2); border-radius: 14px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sx-me__facts b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-me__facts i { font-style: normal; font-size: 10.5px; color: var(--ap-muted); }
.sx-me__go { font-size: 13px; font-weight: 600; color: var(--ap-gold-t); }

/* Übersicht: Liste */
.sx-list { list-style: none; margin: 0; padding: 2px 12px; background: var(--ap-card); border: 1px solid var(--ap-line); border-radius: 22px; box-shadow: var(--ap-shadow); }
.sx-list li + li { border-top: 1px solid var(--ap-line); }
.sx-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; min-height: 52px; text-decoration: none; color: var(--ap-text) !important; }
.sx-row.is-me { margin: 2px -8px; padding: 9px 8px; border-radius: 14px; background: rgba(227,179,65,.12); }
.sx-row__pl { width: 20px; flex: none; font-size: 12px; color: var(--ap-muted); text-align: right; }
.sx-row.is-me .sx-row__pl { color: var(--ap-gold-t); }
.sx-row__m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sx-row__m strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-row__m > span { font-size: 11.5px; color: var(--ap-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-row__m .ap-pill { font-size: 9px; padding: 2px 6px; vertical-align: 1px; }
.sx-row__xp { flex: none; font-size: 13px; font-weight: 600; text-align: right; display: flex; flex-direction: column; line-height: 1.15; }
.sx-row__xp i { font-style: normal; font-size: 9.5px; color: var(--ap-muted); font-weight: 500; }
.sx-row__tr { display: flex; flex: none; width: 22px; }
.sx-note { text-decoration: none; display: block; }

/* Detail: Kopf */
.sx-hd { background: var(--ap-card-grad); border: 1px solid var(--ap-gold); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--ap-shadow); }
.sx-hd__top { display: flex; align-items: center; gap: 12px; }
.sx-hd__n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sx-hd__n strong { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.sx-hd__n > span:not(.sx-hd__pills) { font-size: 13px; font-weight: 600; }
.sx-hd__pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sx-hd__lv { display: flex; flex-direction: column; gap: 3px; }
.sx-hd__t { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 17px; line-height: 1.2; color: var(--ap-gold-t); }
.sx-hd__r { font-size: 11px; color: var(--ap-muted); }
.sx-hd__bar { height: 8px; margin-top: 6px; }
.sx-hd__bar > span { background: linear-gradient(90deg, #B7791F, #E3B341); }
.sx-hd__f { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.sx-hd__f b { font-weight: 600; }
.sx-hd__f span { color: var(--ap-gold-t); text-align: right; }
.sx-tr { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px; }
.sx-tr__i { display: flex; align-items: center; gap: 6px; background: var(--ap-card2); border-radius: 16px; padding: 8px 10px 8px 6px; min-width: 0; }
.sx-tr__cup { display: flex; flex: none; }
.sx-tr__cup.is-off { opacity: .4; }
.sx-tr__t { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.sx-tr__t .ap-mono { font-size: 9.5px; color: var(--ap-muted); letter-spacing: .03em; }
.sx-tr__t strong { font-size: 13px; line-height: 1.2; }
.sx-tr__t .ap-small { font-size: 11px; }

/* Karten */
.sx-card { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 12px; }
.sx-card__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sx-h { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 17px; line-height: 1.15; margin: 0; }
.sx-sub { font-family: var(--ap-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-muted); margin: 6px 0 -4px; }
.sx-seg { padding: 3px; border-radius: 14px; flex: none; }
.sx-seg a { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.sx-foot { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ap-muted); }
.sx-empty { padding: 10px 4px; margin: 0; }

/* Balkendiagramm */
.sx-chart { display: block; width: 100%; height: auto; overflow: visible; }
.sx-chart__grid { stroke: var(--ap-line); stroke-width: 1; stroke-dasharray: 3 4; }
.sx-chart__base { stroke: var(--ap-line2); stroke-width: 1; }
.sx-chart__bar { fill: var(--ap-gold); opacity: .55; }
.sx-chart__bar.is-now { opacity: 1; }
.sx-chart__zero { fill: var(--ap-line2); }
.sx-chart__v { font-family: var(--ap-mono); font-size: 9px; font-weight: 600; fill: var(--ap-soft); }
.sx-chart__v.is-neg { fill: var(--ap-red-t); }
.sx-chart__x { font-family: var(--ap-mono); font-size: 9.5px; fill: var(--ap-muted); }
.sx-chart__x.is-now { fill: var(--ap-gold-t); font-weight: 600; }
.sx-chart__f { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ap-muted); margin-top: -4px; }
.sx-chart__f .ap-mono { color: var(--ap-text); font-weight: 600; }

/* Letzte Buchungen */
.sx-log { list-style: none; margin: 0; padding: 0; }
.sx-log__i { display: flex; align-items: center; gap: 9px; padding: 8px 0; }
.sx-log__i + .sx-log__i { border-top: 1px solid var(--ap-line); }
.sx-log__d { flex: none; font-size: 11px; color: var(--ap-muted); width: 52px; }
.sx-log__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sx-log__m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-log__m strong { font-size: 13px; font-weight: 600; }
.sx-log__m span { font-size: 11.5px; color: var(--ap-muted); overflow-wrap: anywhere; }
.sx-log__p { flex: none; font-size: 13px; font-weight: 600; color: var(--ap-ok-t2); }
.sx-log__p.is-neg { color: var(--ap-red-t); }

/* Herkunft */
.sx-stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--ap-line); gap: 2px; }
.sx-stack span { display: block; height: 100%; min-width: 3px; }
.sx-src { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sx-src > li + li { border-top: 1px solid var(--ap-line); padding-top: 10px; }
.sx-src__h { display: flex; align-items: center; gap: 8px; }
.sx-src__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sx-src__h strong { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.sx-src__v { font-size: 13px; font-weight: 600; text-align: right; flex: none; }
.sx-src__v i { font-style: normal; display: inline-block; min-width: 40px; margin-left: 6px; color: var(--ap-muted); font-weight: 500; font-size: 11px; }
.sx-src__sub { list-style: none; margin: 6px 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-src__sub li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ap-soft); }
.sx-src__sub .ap-mono { color: var(--ap-muted); flex: none; padding-right: 46px; }
.sx-src__none { margin: 4px 0 0 18px; font-size: 12px; color: var(--ap-muted); }

/* Kacheln (Siege, Legend) */
.sx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sx-tiles.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sx-tile { background: var(--ap-card2); border-radius: 14px; padding: 9px 4px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 64px; }
.sx-tile b { font-size: 17px; font-weight: 600; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; }
.sx-tile b.sx-tile__txt { font-family: inherit; font-size: 12.5px; font-weight: 700; }
.sx-tile > span { font-size: 10.5px; line-height: 1.25; color: var(--ap-muted); display: flex; flex-direction: column; }
.sx-tile em { font-style: normal; font-family: var(--ap-mono); font-size: 9.5px; color: var(--ap-gold-t); }
.sx-tile.is-win b { color: var(--ap-ok-t2); }
.sx-tile.is-loss b { color: var(--ap-red2-t); }
.sx-tile--ring { padding-top: 6px; }
.sx-tile--ring svg { display: block; }
.sx-q__bg { fill: none; stroke: var(--ap-line2); stroke-width: 5; }
.sx-q__fg { fill: none; stroke: var(--ap-green); stroke-width: 5; stroke-linecap: round; }
.sx-tile--ring text { font-family: var(--ap-mono); font-size: 11px; font-weight: 600; fill: var(--ap-text); }

/* Ligatabellen */
.sx-lg { list-style: none; margin: 0; padding: 0; }
.sx-lg li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.sx-lg li + li { border-top: 1px solid var(--ap-line); }
.sx-lg__pl { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; background: var(--ap-card2); border-radius: 12px; padding: 5px 0; }
.sx-lg__pl b { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 17px; line-height: 1; color: var(--ap-gold-t); }
.sx-lg__pl i { font-style: normal; font-size: 9px; color: var(--ap-muted); }
.sx-lg__m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-lg__m strong { font-size: 13.5px; font-weight: 600; }
.sx-lg__m span { font-size: 11px; color: var(--ap-muted); }
.sx-lg__p { flex: none; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.sx-lg__p i { font-style: normal; font-size: 9.5px; color: var(--ap-muted); font-weight: 500; }

/* Legend */
.sx-lgd__b { align-self: flex-start; }

/* Barometer */
.sx-baro { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sx-gauge { display: block; width: 100%; max-width: 230px; height: auto; }
.sx-gauge__s { fill: none; stroke-width: 16; opacity: .3; }
.sx-gauge__s.is-on { opacity: 1; }
.sx-gauge__s.is-s0 { stroke: var(--ap-slate); }
.sx-gauge__s.is-s1 { stroke: var(--ap-green); }
.sx-gauge__s.is-s2 { stroke: var(--ap-gold); }
.sx-gauge__s.is-s3 { stroke: var(--ap-red2); }
.sx-gauge__n { stroke: var(--ap-text); stroke-width: 4; stroke-linecap: round; }
.sx-gauge__c { fill: var(--ap-text); stroke: var(--ap-card); stroke-width: 3; }
.sx-baro__t { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.sx-baro__t strong { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 22px; line-height: 1.1; }
.sx-baro__t > span { font-size: 13px; color: var(--ap-soft); }
.sx-baro__t b { color: var(--ap-text); }
.sx-baro-t.is-s0 { color: var(--ap-muted); }
.sx-baro-t.is-s1 { color: var(--ap-green-t); }
.sx-baro-t.is-s2 { color: var(--ap-gold-t); }
.sx-baro-t.is-s3 { color: var(--ap-red2-t); }
.sx-baro__scale { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-family: var(--ap-mono); font-size: 9.5px; color: var(--ap-muted); text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.sx-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sx-cmp > div { background: var(--ap-card2); border-radius: 14px; padding: 9px 10px; display: flex; flex-direction: column; gap: 1px; }
.sx-cmp b { font-size: 17px; font-weight: 600; }
.sx-cmp span { font-size: 11.5px; color: var(--ap-soft); }
.sx-cmp i { font-style: normal; font-size: 10.5px; color: var(--ap-muted); }

/* Prognose */
.sx-fc__big { display: flex; align-items: center; gap: 10px; background: var(--ap-card2); border-radius: 16px; padding: 8px 12px 8px 6px; }
.sx-fc__cup { display: flex; flex: none; }
.sx-fc__big > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-fc__big strong { font-family: var(--ap-head); font-stretch: 125%; font-weight: 900; font-size: 16px; line-height: 1.2; }
.sx-fc__big span { font-size: 12px; color: var(--ap-muted); }
.sx-ms { list-style: none; margin: 0; padding: 0; }
.sx-ms li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.sx-ms li + li { border-top: 1px solid var(--ap-line); }
.sx-ms__lv { flex: none; width: 46px; text-align: center; font-size: 11px; font-weight: 600; color: var(--ap-gold-t); background: rgba(227,179,65,.14); border-radius: 10px; padding: 6px 0; }
.sx-ms__m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-ms__m strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.sx-ms__m span { font-size: 11px; color: var(--ap-muted); }
.sx-ms__d { flex: none; max-width: 42%; text-align: right; font-size: 12px; font-weight: 600; color: var(--ap-text); }
.sx-ms__d.is-na { color: var(--ap-muted); font-weight: 500; }

/* Hell: farbige Zahlen etwas dunkler */
html.ap-html[data-ap-design="hell"] .sx-blue { color: var(--ap-blue-t); }
html.ap-html[data-ap-design="hell"] .sx-row.is-me { background: #FFF4D9; }
