/* Public Spielcenter: theme tokens adapt automatically to light/dark palettes. */
.cs-game-center {min-width:0;margin-block:1.5rem;}
.cs-game-center-controls {display:grid;gap:1rem;margin-bottom:1.25rem;}
.cs-game-center-selector {min-width:0;}
.cs-game-center-caption {display:block;font-size:.875rem;font-weight:700;margin-bottom:.4rem;color:var(--text,var(--theme-text,inherit));}
.cs-game-center-selector [role=group] {display:flex;gap:.5rem;overflow-x:auto;overscroll-behavior-inline:contain;padding:.25rem 0 .5rem;}
.cs-game-center-tab {flex:0 0 auto;min-height:44px;border:1px solid var(--border,#c9cecb);background:var(--surface,#fff);color:var(--text,#222);border-radius:999px;padding:.55rem 1rem;font:inherit;font-weight:600;cursor:pointer;}
.cs-game-center-tab:hover {border-color:var(--accent,var(--theme-primary,#257647));}
.cs-game-center-tab[data-selected=true] {background:var(--accent,var(--theme-primary,#257647));color:var(--accent-text,#fff);border-color:var(--accent,var(--theme-primary,#257647));}
.cs-game-center-tab:focus-visible {outline:3px solid var(--accent,var(--theme-primary,#257647));outline-offset:2px;}
.cs-game-center-status {margin:.5rem 0;color:var(--text,var(--theme-text,inherit));}
.cs-game-center [hidden] {display:none!important;}
@media(max-width:600px) {.cs-game-center-controls {gap:.7rem;}.cs-game-center-tab {padding-inline:.85rem;}}


/* Shared recent-results region: manual banner, stacked list and narrow widgets. */
.cs-last-matches, [data-game-center-region="lastMatches"]{min-width:0;}
.cs-last-matches h2{margin-block:0 .8rem;}
.cs-last-match-frame,.cs-last-match-list{min-width:0;}
.cs-last-match-list{display:grid;gap:.75rem;}
.cs-last-match-card{min-width:0;padding:1rem;border:1px solid var(--border,#cbd5ce);background:var(--surface,transparent);color:var(--text,inherit);border-radius:12px;}
.cs-last-match-meta{font-size:.85rem;opacity:.75;margin:0 0 .65rem;}
.cs-last-match-teams{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:1rem;align-items:center;text-align:center;}
.cs-last-match-team{display:grid;justify-items:center;gap:.5rem;min-width:0;}
.cs-last-team-name{font-weight:600;overflow-wrap:anywhere;}
.cs-last-match-score{font-size:clamp(1.25rem,3vw,2rem);white-space:nowrap;font-variant-numeric:tabular-nums;}
.cs-last-crest{width:64px;height:64px;display:grid;place-items:center;position:relative;}
.cs-last-crest img{max-width:100%;max-height:100%;object-fit:contain;}
.cs-last-crest-fallback{position:absolute;inset:0;border-radius:20%;border:2px solid var(--accent,#238148);display:grid;place-items:center;background:var(--surface,#fff);color:var(--text,#222);font-weight:800;}
.cs-last-crest-fallback[hidden]{display:none;}
.cs-last-match-place{font-size:.85rem;margin:.65rem 0 0;text-align:center;}
.cs-last-match-links{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center;margin-top:.75rem;}
.cs-last-match-links a{color:var(--accent,var(--theme-primary,#257647));font-weight:600;text-decoration:underline;}
.cs-last-match-controls{display:flex;gap:.75rem;justify-content:center;align-items:center;margin-top:.65rem;}
.cs-last-match-controls button{min-width:44px;min-height:44px;border-radius:99px;border:1px solid var(--border,#cbd5ce);background:var(--surface,transparent);color:var(--text,inherit);font:inherit;font-size:1.6rem;cursor:pointer;}
.cs-last-match-controls button:focus-visible{outline:3px solid var(--accent,#238148);outline-offset:2px;}
.cs-last-match-controls button:disabled{opacity:.35;cursor:default;}
.cs-last-match-count{font-variant-numeric:tabular-nums;min-width:3.5em;text-align:center;}
.cs-last-matches--compact .cs-last-match-card{padding:.6rem;}
.cs-last-matches--compact .cs-last-crest{width:42px;height:42px;}
.cs-last-matches--compact .cs-last-match-score{font-size:1.2rem;}
.cs-last-matches--compact .cs-last-match-teams{gap:.3rem;}
@media(max-width:540px){.cs-last-match-teams{gap:.4rem;}.cs-last-crest{width:48px;height:48px;}.cs-last-match-card{padding:.75rem;}}


/* CS-194: same layout vocabulary for upcoming matches and previous results. */
.cs-next-matches, [data-game-center-region="nextMatches"]{min-width:0;}
.cs-next-matches h2{margin-block:0 .8rem;}
.cs-next-match-status{text-align:center;font-size:.84rem;font-weight:600;color:var(--text,inherit);opacity:.8;margin:.75rem 0 0;}
.cs-next-matches .cs-last-match-frame,.cs-next-matches .cs-last-match-list{min-width:0;}
.cs-next-matches .cs-last-match-card{border-color:var(--border,#cbd5ce);}
.cs-next-matches .cs-last-match-score{color:var(--accent,var(--theme-primary,#257647));}
.cs-next-matches [hidden]{display:none!important;}

/* CS-195: visually label the past/future card while preserving theme variables. */
.cs-combined-matches{min-width:0;}
.cs-combined-matches h2{margin-block:0 .8rem;}
.cs-combined-match-phase{font-size:.86rem;letter-spacing:.04em;text-transform:uppercase;color:var(--accent,var(--theme-primary,#257647));margin:0 0 .5rem;}
.cs-combined-match{min-width:0;}
.cs-combined-matches .cs-last-match-controls button:focus-visible{outline-offset:3px;}


/* CS-196: one consistent crest/card treatment across all Spielcenter layouts. */
.cs-last-crest svg{width:100%;height:100%;display:block;}
.cs-last-crest svg[hidden],.cs-last-crest img[hidden]{display:none!important;}
.cs-last-crest:hover,.cs-last-crest:focus-visible{filter:drop-shadow(0 2px 6px rgba(0,0,0,.2));}
.cs-last-crest:focus-visible{outline:2px solid var(--accent,var(--theme-primary,#257647));outline-offset:3px;border-radius:8px;}
.cs-last-match-card .cs-last-match-links a:focus-visible{outline:2px solid var(--accent,var(--theme-primary,#257647));outline-offset:3px;}
.cs-last-match-card .cs-last-match-meta{overflow-wrap:anywhere;}


/* CS-197: a discrete S/U/N outcome chart; position never suggests goal magnitude. */
.cs-results-chart{min-width:0;}
.cs-results-chart h2{margin:0 0 .8rem;}
.cs-result-chart-plot{display:grid;grid-template-columns:2.25rem minmax(0,1fr);gap:.5rem;min-height:210px;}
.cs-result-chart-axis{display:grid;grid-template-rows:repeat(3,minmax(42px,1fr));gap:.3rem;align-items:center;text-align:center;font-weight:700;}
.cs-result-chart-columns{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.5rem;}
.cs-result-chart-column{display:grid;grid-template-rows:repeat(3,minmax(42px,1fr));gap:.3rem;justify-items:center;align-items:center;min-width:0;position:relative;}
.cs-result-chart-indicator{grid-row:var(--cs-result-chart-row);font-weight:800;border-radius:999px;display:grid;place-items:center;min-width:2.3rem;min-height:2.3rem;background:var(--surface-secondary,var(--surface,#eef3ed));border:2px solid var(--accent,var(--theme-primary,#257647));color:var(--text,inherit);}
.cs-result-chart-column .cs-last-crest{position:absolute;bottom:-43px;width:36px;height:36px;}
.cs-result-chart-score{position:absolute;bottom:-64px;font-size:.78rem;font-variant-numeric:tabular-nums;white-space:nowrap;}
.cs-result-chart-plot{margin-bottom:75px;}
.cs-result-chart-table{width:100%;border-collapse:collapse;font-size:.88rem;}
.cs-result-chart-table caption{text-align:left;font-weight:600;margin-bottom:.5rem;}
.cs-result-chart-table th,.cs-result-chart-table td{border-bottom:1px solid var(--border,#ccd1cb);padding:.5rem .35rem;text-align:left;}
.cs-result-chart-table th{font-weight:700;}
@media(max-width:520px){.cs-result-chart-plot{min-height:175px;}.cs-result-chart-columns{gap:.15rem;}.cs-result-chart-indicator{min-width:1.8rem;min-height:1.8rem;}.cs-result-chart-table{font-size:.75rem;}.cs-result-chart-table th,.cs-result-chart-table td{padding:.4rem .2rem;}}


/* CS-198 table window: sticky identity and optional numeric columns */
.cs-standing-scroll{width:100%;overflow-x:auto;overscroll-behavior-inline:contain;}
.cs-standing-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:.92rem;}
.cs-standing-table caption{text-align:left;font-weight:700;margin-bottom:.65rem;}
.cs-standing-table th,.cs-standing-table td{padding:.65rem .5rem;border-bottom:1px solid var(--border,#cbd5ce);white-space:nowrap;text-align:right;}
.cs-standing-table th:nth-child(2),.cs-standing-table td:nth-child(2){text-align:left;}
.cs-standing-table th[scope=row]{font-weight:600;}
.cs-standing-team{display:inline-flex;align-items:center;gap:.55rem;}
.cs-standing-team img{width:28px;height:28px;object-fit:contain;}
.cs-standing-own{background:color-mix(in srgb,var(--accent,var(--theme-primary,#257647)) 14%,transparent);font-weight:700;}
.cs-standing-own th,.cs-standing-own td{border-bottom:2px solid var(--accent,var(--theme-primary,#257647));}
@media(max-width:600px){.cs-standing-table{font-size:.8rem;}.cs-standing-table th,.cs-standing-table td{padding:.5rem .3rem;}}


/* CS-199: composable two-column game center with responsive source order. */
.cs-game-center-regions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(.75rem,2vw,1.5rem);align-items:start;}
.cs-game-center-regions>[data-game-center-overview]{grid-column:1/-1;margin:0;}
.cs-game-center-regions>[data-game-center-region]{min-width:0;}
.cs-game-center-regions[data-columns="wide-left"]{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr);}
.cs-game-center-regions[data-columns="wide-right"]{grid-template-columns:minmax(0,1fr) minmax(0,1.85fr);}
.cs-game-center-regions[data-layout="combined"]>[data-game-center-region="combinedMatches"]{grid-column:1/-1;}
.cs-game-center-regions.cs-game-center--compact .cs-last-match-card{padding:.65rem;}
.cs-game-center-regions.cs-game-center--compact .cs-last-crest{width:42px;height:42px;}
.cs-game-center-regions.cs-game-center--compact .cs-last-match-score{font-size:1.2rem;}
@media(max-width:760px){.cs-game-center-regions,.cs-game-center-regions[data-columns="wide-left"],.cs-game-center-regions[data-columns="wide-right"]{grid-template-columns:minmax(0,1fr);}.cs-game-center-regions>[data-game-center-overview],.cs-game-center-regions[data-layout="combined"]>[data-game-center-region="combinedMatches"]{grid-column:auto;}}


/* Game Center UI refresh: contrast-safe tabs, aligned cards, inline controls. */
.cs-game-center .cs-game-center-tab{
 background:var(--surface,#fff)!important;color:var(--text,#1b2921)!important;
 border-color:var(--border,#98a99d)!important;
}
.cs-game-center .cs-game-center-tab[data-selected="true"]{
 background:var(--accent,var(--theme-primary,#148438))!important;
 color:var(--theme-primary-ink,#fff)!important;
 border-color:var(--accent,var(--theme-primary,#148438))!important;
}
.cs-game-center .cs-game-center-tab:not([data-selected="true"]):hover{background:var(--surface-secondary,var(--surface,#e9eee9))!important;}
.cs-game-center-regions>[data-game-center-region]{min-height:0;display:flex;flex-direction:column;}
.cs-game-center-regions .cs-last-match-frame{height:100%;flex:1;}
.cs-last-match-frame{position:relative;min-height:270px;}
.cs-last-match-slide{height:100%;}
.cs-last-match-slide>.cs-last-match-card,.cs-last-match-slide>.cs-combined-match{height:100%;box-sizing:border-box;}
.cs-last-match-slide>.cs-last-match-card,.cs-last-match-slide>.cs-combined-match>.cs-last-match-card{min-height:270px;padding-bottom:4rem;}
.cs-last-match-slide>.cs-combined-match{display:flex;flex-direction:column;}
.cs-last-match-slide>.cs-combined-match>.cs-last-match-card{flex:1;}
.cs-last-match-controls{
 position:absolute;left:.65rem;right:.65rem;bottom:.45rem;
 display:grid;grid-template-columns:42px minmax(0,1fr) 42px;
 align-items:center;justify-content:center;gap:.25rem;margin:0;
 pointer-events:none;z-index:2;
}
.cs-last-match-controls>*{pointer-events:auto;}
.cs-last-match-controls button.cs-game-carousel-prev,.cs-last-match-controls button.cs-game-carousel-next{
 width:40px;min-width:40px;height:40px;min-height:40px;padding:0;
 border:1px solid var(--border,#899c8d);border-radius:999px;
 background:var(--surface,#fff)!important;color:var(--text,#202a22)!important;
 font:inherit;font-size:1.45rem;line-height:1;cursor:pointer;
}
.cs-last-match-controls button:disabled{opacity:.4;cursor:default;}
.cs-game-carousel-dots{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;justify-content:center;}
.cs-game-carousel-dots .cs-game-carousel-dot{
 width:13px;min-width:13px;height:13px;min-height:13px;
 padding:0;border-radius:50%;background:transparent;
 border:2px solid var(--accent,var(--theme-primary,#148438));
 cursor:pointer;
}
.cs-game-carousel-dots .cs-game-carousel-dot[aria-current="true"]{background:var(--accent,var(--theme-primary,#148438));}
.cs-last-match-controls .cs-last-match-count{
 position:absolute;width:1px;height:1px;padding:0;margin:-1px;
 overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.cs-game-score-center{display:flex;flex-direction:column;gap:.4rem;align-items:center;justify-content:center;min-width:0;}
.cs-game-countdown{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.2rem .35rem;max-width:100%;font-variant-numeric:tabular-nums;}
.cs-game-countdown-unit{display:flex;flex-direction:column;text-align:center;align-items:center;gap:.05rem;min-width:2.1rem;}
.cs-game-countdown-number{font-size:clamp(.84rem,1.75vw,1.1rem);line-height:1.15;color:var(--text,#1b2921);}
.cs-game-countdown-unit small{font-size:.62rem;color:var(--text,#1b2921);opacity:.8;}
.cs-next-match-card .cs-last-match-teams{grid-template-columns:minmax(0,1fr) minmax(95px,1.35fr) minmax(0,1fr);gap:.4rem;}
.cs-next-match-card .cs-game-score-center .cs-last-match-score{font-size:1.4rem;color:var(--text,#1b2921);}
.cs-last-match-meta[title]{cursor:help;text-decoration:underline dotted;text-underline-offset:.2rem;}
@media(max-width:560px){
 .cs-last-match-frame{min-height:275px;}
 .cs-last-match-slide>.cs-last-match-card,.cs-last-match-slide>.cs-combined-match>.cs-last-match-card{min-height:275px;padding-bottom:3.8rem;}
 .cs-next-match-card .cs-last-match-teams{grid-template-columns:minmax(0,1fr) minmax(92px,1.3fr) minmax(0,1fr);gap:.2rem;}
 .cs-game-countdown{gap:.12rem .2rem;}
 .cs-game-countdown-number{font-size:.8rem;}
 .cs-game-countdown-unit{min-width:1.55rem;}
 .cs-game-countdown-unit small{font-size:.54rem;}
}


/* Stretch both cards in the same grid row to precisely the same height. */
.cs-game-center-regions{align-items:stretch;}
.cs-game-center-regions>[data-game-center-region]:not([hidden]){height:100%;box-sizing:border-box;}
.cs-game-center-regions>[data-game-center-region]>.cs-last-match-frame{display:flex;flex-direction:column;}
.cs-game-center-regions>[data-game-center-region]>.cs-last-match-frame>.cs-last-match-slide{flex:1;display:flex;flex-direction:column;}
.cs-game-center-regions>[data-game-center-region]>.cs-last-match-frame>.cs-last-match-slide>.cs-last-match-card,
.cs-game-center-regions>[data-game-center-region]>.cs-last-match-frame>.cs-last-match-slide>.cs-combined-match{flex:1;}
@media(prefers-reduced-motion:reduce){.cs-game-countdown,.cs-game-carousel-dots{transition:none!important;}}

/* Keep the empty upcoming fixture as a full, centered card in both modes. */
.cs-next-match-empty-frame{
 display:flex;
 flex:1;
 min-height:270px;
}
.cs-next-match-empty-card{
 display:flex;
 flex:1;
 align-items:center;
 justify-content:center;
 min-height:270px;
 height:100%;
 box-sizing:border-box;
 padding:1.25rem;
 text-align:center;
}
.cs-next-match-empty-card .cs-last-match-empty{
 margin:0;
 color:var(--text,inherit);
 opacity:1;
}
@media(max-width:560px){
 .cs-next-match-empty-frame,.cs-next-match-empty-card{min-height:275px;}
}
