.sustt-player-stats {
    --ps-win: #197ad2;
    --ps-loss: #ed763d;
    --ps-positive: #147849;
    --ps-negative: #c33649;
    max-width: 1120px;
    margin: 30px auto 70px;
    padding: 0 20px;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
html.dark .sustt-player-stats { --ps-win: #54adfa; --ps-loss: #ff9460; --ps-positive: #74ddb1; --ps-negative: #ff8592; }
.sustt-player-stats h1, .sustt-player-stats h2, .sustt-player-stats h3, .sustt-player-stats p, .sustt-player-stats figure, .sustt-player-stats dl { margin: 0; }
.sustt-player-stats h1, .sustt-player-stats h2, .sustt-player-stats h3 { font-family: var(--sustt-font); letter-spacing: 0; }
.sustt-player-stats h1 { font-size: 26px; line-height: 1.3; font-weight: 750; }
.sustt-player-stats h2 { font-size: 24px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.sustt-player-stats h3 { font-size: 15px; line-height: 1.4; font-weight: 650; }
.ps-page-heading, .ps-player-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ps-eyebrow { color: var(--sustt-text-muted); font-size: 12px; padding-bottom: 4px; }
.ps-source, .ps-updated { color: var(--sustt-text-muted); font-size: 12px; }
.ps-filters { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(150px, .8fr) minmax(220px, 1.4fr); align-items: start; gap: 18px; margin: 26px 0; }
.ps-filters > div { min-width: 0; }
.ps-filters label { display: block; font-size: 12px; font-weight: 650; color: var(--sustt-text-soft); margin-bottom: 7px; }
.ps-filters input, .ps-filters select {
    width: 100%; min-width: 0; height: 44px; padding: 9px 12px; margin: 0;
    background: var(--sustt-bg-soft); color: var(--sustt-text-main);
    border: 1px solid var(--sustt-border-main); border-radius: 6px; font: inherit; font-size: 14px;
}
.ps-filters input:focus, .ps-filters select:focus { outline: 2px solid var(--sustt-primary); outline-offset: 2px; }
.ps-updated { grid-column: 1 / -1; white-space: nowrap; }
.ps-player-picker { position: relative; min-width: 0; }
.ps-player-options {
    position: absolute; top: calc(100% + 5px); left: 0; right: 0; max-height: 280px; overflow: auto;
    background: var(--sustt-bg-soft); color: var(--sustt-text-main); border: 1px solid var(--sustt-border-main);
    border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, .15); z-index: 30;
}
.ps-player-options[hidden] { display: none; }
.ps-player-options [role="option"] { padding: 11px 13px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ps-player-options [role="option"] span { overflow-wrap: anywhere; }
.ps-player-options small { color: var(--sustt-text-muted); font-size: 11px; align-self: center; }
.ps-player-options [role="option"] > div { min-width: 0; }
.ps-player-options [role="option"] small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.ps-picker-status { display: block; margin-top: 5px; color: var(--sustt-text-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.ps-picker-status:empty { display: none; }
.ps-player-options [role="option"]:hover, .ps-player-options .is-focused { background: var(--sustt-bg-table-alt); }
.ps-player-options [aria-selected="true"] { border-left: 3px solid var(--ps-win); }
.ps-no-option { padding: 14px; color: var(--sustt-text-muted); font-size: 13px; }
.ps-feedback { font-size: 13px; color: var(--sustt-text-soft); line-height: 1.6; }
.ps-feedback:not(:empty) { border-left: 3px solid var(--ps-loss); padding: 10px 14px; margin-bottom: 22px; background: var(--sustt-bg-soft); }
.ps-player-heading { margin-top: 10px; padding-bottom: 22px; }
.ps-player-heading p { font-size: 12px; color: var(--sustt-text-soft); margin-top: 6px; line-height: 1.7; }
.ps-player-heading p span { color: var(--sustt-text-muted); margin-left: 12px; white-space: normal; }
.ps-season { font-size: 13px; color: var(--sustt-text-muted); }
.ps-points-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--sustt-border-main); border-bottom: 1px solid var(--sustt-border-main); padding: 20px 0; }
.ps-points-band > div { padding: 0 18px; min-width: 0; border-right: 1px solid var(--sustt-border-main); }
.ps-points-band > div:first-child { padding-left: 0; }
.ps-points-band > div:last-child { border: 0; }
.ps-points-band dt { font-size: 12px; line-height: 1.5; color: var(--sustt-text-soft); }
.ps-points-band dd { font-size: 27px; line-height: 1.5; margin: 7px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.ps-virtual-caption { display: block; color: var(--sustt-text-muted); font-size: 11px; line-height: 1.5; font-weight: 400; margin-top: 3px; }
.ps-positive { color: var(--ps-positive); }
.ps-negative { color: var(--ps-negative); }
.ps-unknown { color: var(--sustt-text-muted); }
.ps-overview { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; padding: 32px 0; border-bottom: 1px solid var(--sustt-border-main); }
.ps-chart { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.ps-donut { width: 194px; height: 194px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ps-win) 0deg var(--ps-win-angle), var(--ps-loss) var(--ps-win-angle) 360deg); }
.ps-donut-empty { background: var(--sustt-border-main); }
.ps-donut > div { width: 140px; height: 140px; border-radius: 50%; background: var(--sustt-bg-main); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ps-donut strong { font-size: 32px; line-height: 1.25; }
.ps-donut span { color: var(--sustt-text-soft); font-size: 14px; }
.ps-chart figcaption { width: 100%; max-width: 235px; display: grid; gap: 9px; font-size: 13px; }
.ps-chart figcaption > span { display: flex; align-items: center; gap: 6px; }
.ps-chart figcaption b { margin-left: auto; }
.ps-chart figcaption small { min-width: 45px; text-align: right; color: var(--sustt-text-muted); font-size: 12px; }
.ps-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ps-dot-win { background: var(--ps-win); }
.ps-dot-loss { background: var(--ps-loss); }
.ps-results-breakdown { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 22px 28px; }
.ps-result-column { min-width: 0; }
.ps-result-column > strong { font-size: 37px; line-height: 1.1; }
.ps-win > strong, .ps-win dd { color: var(--ps-win); }
.ps-loss > strong, .ps-loss dd { color: var(--ps-loss); }
.ps-result-column h3 { margin: 7px 0 18px; }
.ps-result-column dl > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.4; }
.ps-result-column dt { color: var(--sustt-text-soft); }
.ps-result-column dd { margin: 0; white-space: nowrap; font-weight: 700; }
.ps-result-column dd span { font-size: 11px; margin-left: 5px; font-weight: 450; }
.ps-best { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; padding-top: 18px; border-top: 1px solid var(--sustt-border-main); gap: 5px 20px; }
.ps-best h3 { color: var(--sustt-text-soft); font-size: 13px; }
.ps-best > strong { grid-column: 2; grid-row: 1 / 4; font-size: 26px; color: var(--ps-positive); }
.ps-best strong small { font-size: 12px; }
.ps-best p { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ps-best > span { font-size: 12px; color: var(--sustt-text-muted); }
.ps-best > .ps-no-best { font-size: 20px; color: var(--sustt-text-muted); }
.ps-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); padding: 28px 0; border-bottom: 1px solid var(--sustt-border-main); }
.ps-detail-grid > section { min-width: 0; }
.sustt-player-stats section > h3 { margin-bottom: 16px; }
.ps-empty { color: var(--sustt-text-muted); font-size: 13px; line-height: 1.6; padding: 18px 0; }
.ps-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.sustt-player-stats table { width: 100%; margin: 0; border-collapse: collapse; border: 0; border-radius: 0; font-size: 13px; background: transparent; }
.sustt-player-stats th, .sustt-player-stats td { padding: 11px 10px; text-align: right; line-height: 1.5; border: 0; border-bottom: 1px solid var(--sustt-border-main); vertical-align: middle; background: transparent; }
.sustt-player-stats th { font-weight: 550; }
.sustt-player-stats th:first-child, .sustt-player-stats td:first-child { text-align: left; }
.sustt-player-stats thead th { font-size: 11px; color: var(--sustt-text-soft); background: var(--sustt-bg-soft); font-weight: 650; white-space: nowrap; }
.sustt-player-stats tfoot { font-weight: 700; }
.sustt-player-stats tfoot th, .sustt-player-stats tfoot td { border-bottom: 0; }
.ps-data-note { color: var(--sustt-text-muted); font-size: 11px; font-weight: 450; }
.ps-data-note:not(span) { margin-top: 10px !important; }
.ps-data-note:is(span) { display: block; white-space: nowrap; }
.ps-match-history { padding-top: 28px; }
.ps-match-history > h3 span { font-size: 12px; margin-left: 7px; color: var(--sustt-text-muted); }
.ps-match-history table { min-width: 620px; }
.ps-match-history th:nth-child(2) { text-align: left; width: 40%; }
.ps-match-history td:first-child { white-space: nowrap; }
.ps-competition { display: block; font-size: 11px; font-weight: 400; color: var(--sustt-text-muted); margin-top: 3px; overflow-wrap: anywhere; }
.ps-result { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ps-result-win { color: var(--ps-win); }
.ps-result-loss { color: var(--ps-loss); }
.ps-status { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--sustt-text-soft); font-size: 14px; text-align: center; line-height: 1.6; flex-wrap: wrap; }
.ps-loader { width: 22px; height: 22px; border: 2px solid var(--sustt-border-main); border-top-color: var(--ps-win); border-radius: 50%; animation: ps-spin 1s linear infinite; }
@keyframes ps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ps-loader { animation: none; } }
.ps-error { flex-direction: column; color: var(--ps-negative); }
.ps-error button { background: var(--sustt-primary); color: white; padding: 8px 16px; border: 0; border-radius: 6px; font: inherit; cursor: pointer; }
.ps-view-tabs { display: flex; gap: 24px; margin-top: 24px; border-bottom: 1px solid var(--sustt-border-main); }
.ps-view-tabs a { padding: 9px 2px 12px; color: var(--sustt-text-soft); font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; }
.ps-view-tabs a[aria-current="page"] { border-color: var(--ps-win); color: var(--sustt-text-main); font-weight: 650; }
.cs-load-status { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; color: var(--sustt-text-soft); font-size: 12px; min-height: 28px; }
.cs-load-content { flex: 1; min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.cs-activity { flex: 0 0 18px; width: 18px; height: 18px; }
.cs-activity[hidden], .cs-preparation-progress[hidden] { display: none; }
.cs-load-status.is-preparing, .cs-load-status.is-error { padding: 18px 20px; background: var(--sustt-bg-soft); border-left: 4px solid var(--ps-win); }
.cs-load-status.is-preparing { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.cs-load-status.is-preparing .cs-activity { width: 24px; height: 24px; margin-top: 1px; }
.cs-load-status.is-preparing #cs-progress { color: var(--sustt-text-main); font-size: 15px; font-weight: 650; }
.cs-load-status.is-error { border-left-color: var(--ps-loss); }
.cs-preparation-progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; min-height: 20px; }
.cs-preparation-progress progress { display: block; flex: 1; width: 100%; min-width: 0; height: 8px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--sustt-border-main); color: var(--ps-win); }
.cs-preparation-progress progress::-webkit-progress-bar { background: var(--sustt-border-main); border-radius: 4px; }
.cs-preparation-progress progress::-webkit-progress-value { background: var(--ps-win); border-radius: 4px; }
.cs-preparation-progress progress::-moz-progress-bar { background: var(--ps-win); border-radius: 4px; }
.cs-preparation-progress > span { flex: 0 0 46px; text-align: right; font-size: 12px; font-weight: 650; color: var(--sustt-text-main); }
.cs-load-status button { border: 1px solid var(--sustt-border-main); border-radius: 6px; padding: 7px 12px; font: inherit; color: var(--sustt-text-main); background: var(--sustt-bg-soft); cursor: pointer; }
.cs-load-status button[hidden] { display: none; }
.cs-load-actions { display: flex; gap: 8px; }
.cs-load-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; }
.cs-load-actions .dashicons { width: 16px; height: 16px; font-size: 16px; }
.cs-load-actions button:disabled { opacity: .6; cursor: wait; }
.cs-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cs-section-heading h2 { font-size: 19px; }
.cs-section-heading > span { color: var(--sustt-text-muted); font-size: 12px; }
.cs-hall { padding-bottom: 28px; border-bottom: 1px solid var(--sustt-border-main); margin-bottom: 28px; }
.cs-hall-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cs-hall-columns section { min-width: 0; }
.cs-hall ol { list-style: none; padding: 0; margin: 0; }
.cs-hall li { display: flex; align-items: center; gap: 13px; min-height: 72px; padding: 10px 0; border-bottom: 1px solid var(--sustt-border-main); }
.cs-hall li:last-child { border-bottom: 0; }
.cs-hall li > div { flex: 1; min-width: 0; }
.cs-hall li a, .cs-table a { color: var(--sustt-text-main); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.cs-hall li a:hover, .cs-table a:hover { color: var(--ps-win); text-decoration: underline; }
.cs-hall li small { display: block; color: var(--sustt-text-muted); font-size: 11px; font-weight: 400; line-height: 1.5; margin-top: 4px; }
.cs-hall li > strong { text-align: right; font-size: 20px; min-width: 75px; flex-shrink: 0; }
.cs-hall li > strong small { margin-top: 0; }
.cs-hall .cs-podium-place { padding: 12px 10px; gap: 12px; border-left: 3px solid var(--cs-medal-edge); }
.cs-podium-place-1 { --cs-medal-bg: #f6d365; --cs-medal-edge: #c39728; --cs-medal-ink: #503b0b; background: rgba(224, 179, 53, .09); }
.cs-podium-place-2 { --cs-medal-bg: #dfe7ed; --cs-medal-edge: #99aab7; --cs-medal-ink: #354550; }
.cs-podium-place-3 { --cs-medal-bg: #daa985; --cs-medal-edge: #b5794d; --cs-medal-ink: #512f1b; }
.cs-rank { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
    border: 2px solid var(--cs-medal-edge); box-shadow: inset 0 0 0 2px var(--sustt-bg-main); background: var(--cs-medal-bg);
    color: var(--cs-medal-ink); font-size: 20px; font-weight: 750; line-height: 1; }
.cs-hall .cs-podium-place-1 a { font-weight: 750; }
.cs-roster .ps-table-scroll { max-height: 720px; }
.sustt-club-stats .cs-table { min-width: 950px; }
.cs-table thead { position: sticky; top: 0; z-index: 1; }
.cs-table thead button { background: transparent; color: inherit; font: inherit; padding: 0; border: 0; cursor: pointer; text-align: inherit; white-space: nowrap; }
.cs-table thead button span { color: var(--ps-win); margin-left: 3px; }
.cs-table th:first-child { width: 200px; }
.cs-table td { white-space: nowrap; }
.cs-table .cs-pending { text-align: left; color: var(--sustt-text-muted); }
.sustt-club-stats .ps-table-scroll:focus-visible { outline: 2px solid var(--ps-win); outline-offset: 3px; }
@media (max-width: 960px) {
    .ps-filters { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .ps-updated { grid-column: 1 / -1; padding: 0; }
    .ps-competition-picker { grid-column: 1 / -1; }
    .ps-overview { grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 650px) {
    .sustt-player-stats { padding: 0 14px; margin: 20px auto 90px; }
    .ps-page-heading { gap: 8px; }
    .sustt-player-stats h1 { font-size: 22px; }
    .sustt-player-stats h2 { font-size: 22px; }
    .ps-source { font-size: 11px; }
    .ps-filters { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 20px 0; }
    .ps-points-band { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
    .ps-points-band > div { padding-left: 12px; }
    .ps-points-band > div:nth-child(odd) { padding-left: 0; }
    .ps-points-band > div:nth-child(even) { border: 0; }
    .ps-points-band dd { font-size: 25px; }
    .ps-player-heading p span { display: block; margin-left: 0; }
    .ps-overview { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 26px 0; }
    .ps-results-breakdown { gap: 22px 18px; }
    .ps-result-column dl > div { flex-wrap: wrap; }
    .sustt-player-stats th, .sustt-player-stats td { padding: 9px 7px; font-size: 12px; }
    .ps-detail-grid table { min-width: 320px; }
    .cs-hall-columns { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .cs-load-status.is-preparing { grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 16px; }
    .cs-load-status.is-preparing .cs-load-actions { grid-column: 2; flex-wrap: wrap; }
    .cs-load-status.is-preparing #cs-progress { font-size: 14px; }
    .cs-hall .cs-podium-place { gap: 9px; padding: 12px 7px; }
    .cs-rank { width: 34px; height: 34px; flex-basis: 34px; font-size: 18px; }
    .cs-hall li > strong { min-width: 62px; font-size: 18px; }
    .cs-roster .ps-table-scroll { max-height: 600px; }
}
