.prediction-stats { color: #1e293b; text-align: left; min-width: 0; }
.prediction-stats h2 { font-size: 1.35rem; font-weight: 700; }
.prediction-stats .ps-muted { color: #64748b; font-size: .8rem; line-height: 1.6; margin: .65rem 0; }
.prediction-stats .ps-views { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.prediction-stats .ps-views button { background: #fff; border: 1px solid #cbd5e1; color: #334155; border-radius: .5rem; padding: .5rem .75rem; font-size: .85rem; }
.prediction-stats .ps-views button[aria-pressed="true"] { background: #0f766e; border-color: #0f766e; color: #fff; }
.prediction-stats .ps-controls { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.prediction-stats .ps-controls label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; }
.prediction-stats .ps-controls [hidden] { display: none !important; }
.prediction-stats .ps-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: .5rem; }
.prediction-stats .ps-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; background: #fff; color: #334155; }
.prediction-stats .ps-table th, .prediction-stats .ps-table td { padding: .65rem .75rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.prediction-stats .ps-table thead th { background: #f1f5f9; font-size: .8rem; }
.prediction-stats .ps-table tbody tr:last-child > * { border-bottom: 0; }
.prediction-stats .ps-table tbody th { font-weight: 600; width: 30%; }
.prediction-stats .ps-table tbody tr:nth-child(even) { background: #f8fafc; }
.prediction-stats.ps-comparison { margin: .65rem 0; border: 1px solid #cbd5e1; border-radius: .5rem; background: #fff; }
.prediction-stats.ps-comparison > summary { padding: .6rem .8rem; color: #0f766e; font-size: .85rem; font-weight: 600; cursor: pointer; }
.prediction-stats [data-ps-comparison-content] { padding: 0 .8rem .6rem; }
.prediction-stats :is(button,select,input,summary,a):focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 575.98px) {
    .prediction-stats .ps-controls label { flex: 1 1 45%; min-width: 0; }
    .prediction-stats .ps-table { font-size: .76rem; }
    .prediction-stats .ps-table th, .prediction-stats .ps-table td { padding: .5rem .4rem; overflow-wrap: anywhere; }
    .prediction-stats .ps-views button { min-height: 44px; }
    .prediction-stats [data-ps-comparison-content] { padding: 0 .4rem .5rem; }
}
/* Expanded statistics share the same match sample across all visible columns. */
.prediction-stats .ps-patterns-table > table { min-width: 970px; }
.prediction-stats .ps-streaks-table > table { min-width: 850px; }
.prediction-stats :is(.ps-patterns-table,.ps-streaks-table) > table > tbody > tr > th { width: 175px; min-width: 150px; position: sticky; left: 0; z-index: 1; background: #f8fafc; }
.prediction-stats .ps-patterns-table > table > thead > tr > th:first-child,
.prediction-stats .ps-streaks-table > table > thead > tr > th:first-child { position: sticky; left: 0; z-index: 2; }
.prediction-stats .ps-patterns-table > table > tbody > tr > td { min-width: 140px; }
.prediction-stats .ps-patterns-table > table > tbody > tr > td:nth-child(2) { min-width: 55px; }
.prediction-stats .ps-team-name { display: block; }
.prediction-stats .ps-pattern-value > strong { display: block; white-space: nowrap; font-size: .8rem; margin-bottom: .4rem; }
.prediction-stats .ps-match-strip { display: flex; flex-wrap: wrap; gap: 3px; max-width: 160px; }
.prediction-stats .ps-match-marker { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 22px; border-radius: 4px; font-size: .75rem; font-weight: 700; cursor: help; }
.prediction-stats .ps-met { background: #ccfbf1; color: #115e59; }
.prediction-stats .ps-not-met { background: #e2e8f0; color: #64748b; }
.prediction-stats .ps-match-tooltip { display: none; position: absolute; top: 100%; left: 0; z-index: 5; width: 225px; padding: .55rem; background: #0f172a; color: #fff; border-radius: .4rem; font-size: .75rem; line-height: 1.5; font-weight: 400; pointer-events: none; }
.prediction-stats .ps-match-marker:is(:hover,:focus) { outline: 2px solid #0f766e; outline-offset: 1px; z-index: 3; }
.prediction-stats .ps-match-marker:is(:hover,:focus) .ps-match-tooltip { display: block; }
.prediction-stats .ps-show-matches { margin-top: .4rem; border: 0; padding: .25rem 0; background: transparent; color: #0f766e; text-decoration: underline; font-size: .78rem; }
.prediction-stats .ps-match-detail-row[hidden] { display: none; }
.prediction-stats .ps-match-detail-row > td { padding: 1rem; background: #f0fdfa; }
.prediction-stats .ps-ledger > table { min-width: 900px; }
.prediction-stats .ps-ledger .ps-table th, .prediction-stats .ps-ledger .ps-table td { white-space: nowrap; font-size: .78rem; }
.prediction-stats .ps-result { display: inline-flex; justify-content: center; min-width: 24px; padding: .15rem .3rem; border-radius: 4px; font-weight: 700; }
.prediction-stats .ps-result-w { color: #166534; background: #dcfce7; }
.prediction-stats .ps-result-d { color: #334155; background: #e2e8f0; }
.prediction-stats .ps-result-l { color: #991b1b; background: #fee2e2; }
.prediction-stats .ps-score-bars { display: grid; gap: .65rem; min-width: 180px; width: 100%; }
.prediction-stats .ps-score-bar-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; }
.prediction-stats .ps-score-progress { display: block; width: 100%; height: 9px; margin-top: .25rem; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #e2e8f0; }
.prediction-stats .ps-score-progress::-webkit-progress-bar { background: #e2e8f0; border-radius: 999px; }
.prediction-stats .ps-score-progress::-webkit-progress-value { background: var(--ps-bar-colour); border-radius: 999px; }
.prediction-stats .ps-score-progress::-moz-progress-bar { background: var(--ps-bar-colour); border-radius: 999px; }
.prediction-stats .ps-score-colour-0 { --ps-bar-colour: #0f766e; accent-color: #0f766e; }
.prediction-stats .ps-score-colour-1 { --ps-bar-colour: #2563eb; accent-color: #2563eb; }
.prediction-stats .ps-score-colour-2 { --ps-bar-colour: #7c3aed; accent-color: #7c3aed; }
.prediction-stats .ps-streak-count { display: inline-block; min-width: 28px; text-align: center; padding: .25rem .4rem; border-radius: 5px; background: #f1f5f9; color: #64748b; font-weight: 650; }
.prediction-stats .ps-streak-active { background: #ccfbf1; color: #115e59; }
@media (max-width: 575.98px) {
    .prediction-stats :is(.ps-patterns-table,.ps-streaks-table) > table > tbody > tr > th { width: 130px; min-width: 120px; }
    .prediction-stats .ps-scorelines-table > table > tbody > tr > th { width: 28%; }
    .prediction-stats .ps-score-bars { min-width: 145px; }
    .prediction-stats .ps-show-matches { min-height: 44px; }
}
/* Keep fixture content and controls in separate columns on desktop. */
.authenticated-site .ps-prediction-row .fixture-row { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: .5rem; width: 100%; }
.authenticated-site .ps-prediction-row .fixture-meta { width: 100%; min-width: 0; flex-wrap: wrap; gap: .3rem .6rem; }
.authenticated-site .ps-prediction-row .fixture-center-block { width: 100%; min-width: 0; flex-basis: auto !important; }
.authenticated-site .ps-prediction-row .fixture-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .6rem; width: 100%; }
.authenticated-site .ps-prediction-row .fixture-team { min-width: 0; overflow: hidden; }
.authenticated-site .ps-prediction-row .fixture-team .team { max-width: 100%; min-width: 0; }
.authenticated-site .ps-prediction-row .fixture-team .team-name { min-width: 0; }
.authenticated-site .ps-prediction-row .fixture-team .team-link-text { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.authenticated-site .ps-prediction-row .fixture-actions { width: 100%; min-width: 0; flex-direction: row !important; justify-content: flex-end; align-items: center !important; flex-wrap: wrap; gap: .4rem; padding-top: .45rem; border-top: 1px solid rgb(255 255 255 / 10%); }
.authenticated-site .ps-prediction-row .fixture-actions > * { flex: 0 0 auto; width: auto; margin: 0 !important; }
.authenticated-site .ps-prediction-row .ps-stats-trigger { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .45rem .6rem; min-height: 34px; width: auto; color: #fff; background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 8%); border-radius: .6rem; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.authenticated-site .ps-prediction-row .ps-stats-trigger i { color: #ffc107; font-size: 1rem; }
.authenticated-site .ps-prediction-row .ps-stats-trigger:hover { background: rgb(255 255 255 / 10%); }
.authenticated-site .ps-prediction-row .ps-stats-trigger:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.ps-stats-panel { --bs-offcanvas-width: min(740px, 100vw); color: #1e293b; background: #fff; }
.ps-stats-panel .offcanvas-header { border-bottom: 1px solid #e2e8f0; background: #f8fafc; align-items: start; }
.ps-stats-panel .offcanvas-title { color: #0f172a; }
.ps-stats-panel .ps-panel-fixture { color: #475569; font-size: .85rem; margin-top: .35rem; overflow-wrap: anywhere; }
.ps-stats-panel .offcanvas-body { background: #fff; }
.ps-stats-panel .offcanvas-body [data-ps-comparison-content] { padding: 0; }
@media (max-width: 575.98px) {
    .authenticated-site .ps-prediction-row .fixture-line { gap: .3rem; }
    .authenticated-site .ps-prediction-row .fixture-actions { justify-content: center; }
    .authenticated-site .ps-prediction-row .ps-stats-trigger,
    .authenticated-site .ps-prediction-row .fixture-actions :is(.joker-content,.lock-content) { min-height: 44px; }
}

@media (min-width: 992px) {
    .authenticated-site .ps-prediction-row .fixture-row { grid-template-columns: minmax(90px, 125px) minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
    .authenticated-site .ps-prediction-row .fixture-actions { width: auto; flex-wrap: nowrap; padding-top: 0; border-top: 0; }
    .authenticated-site .ps-prediction-row .fixture-actions .ps-stats-trigger { min-height: 44px; }
}

.ps-stats-panel .ps-panel-fixture { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
.ps-stats-panel .ps-panel-team { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; }
.ps-stats-panel .ps-panel-team img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.ps-stats-panel .ps-panel-team img[hidden] { display: none; }
.ps-stats-panel .ps-panel-versus { color: #64748b; font-size: .75rem; }
.prediction-stats .ps-history-competition { display: block; color: #64748b; font-size: .72rem; margin-top: .2rem; }
/* Match-insights drawer: a focused, premium surface without altering fixture rows. */
.ps-stats-panel { border-left: 1px solid #d2dfe5; box-shadow: -18px 0 70px rgb(15 23 42 / 24%); }
.ps-stats-panel .offcanvas-header { position: relative; display: block; padding: 24px 28px 26px; border: 0; background: radial-gradient(ellipse at 90% 0%, rgb(20 184 166 / 19%), transparent 65%), linear-gradient(135deg, #132638, #1d3446); color: #fff; }
.ps-stats-panel .offcanvas-header::after { content: ''; position: absolute; bottom: 0; left: 28px; right: 28px; height: 2px; background: linear-gradient(90deg, #62c9b0, rgb(98 201 176 / 5%)); }
.ps-stats-panel .ps-panel-header-content { width: 100%; min-width: 0; }
.ps-stats-panel .ps-panel-eyebrow { display: flex; align-items: center; gap: .45rem; color: #9dd8cd; font-size: .62rem; letter-spacing: .13em; font-weight: 700; padding-right: 30px; }
.ps-stats-panel .offcanvas-title { margin: .5rem 0 1.25rem; color: #fff; font-size: 1.65rem; font-weight: 650; letter-spacing: -.025em; }
.ps-stats-panel .offcanvas-header > .btn-close { position: absolute; right: 22px; top: 22px; opacity: .85; padding: .6rem; border-radius: 50%; background-color: rgb(255 255 255 / 8%); }
.ps-stats-panel .ps-panel-fixture { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); gap: .8rem; margin: 0; color: #fff; text-align: center; align-items: center; }
.ps-stats-panel .ps-panel-team { display: flex; flex-direction: column; gap: .5rem; font-size: .98rem; font-weight: 600; line-height: 1.3; }
.ps-stats-panel .ps-panel-role { font-size: .58rem; letter-spacing: .15em; color: #a9bfca; font-weight: 650; }
.ps-stats-panel .ps-panel-team img { width: 52px; height: 52px; box-sizing: content-box; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgb(0 0 0 / 13%); }
.ps-stats-panel .ps-panel-versus { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; justify-self: center; border: 1px solid rgb(255 255 255 / 14%); background: rgb(255 255 255 / 5%); border-radius: 50%; color: #c4d7df; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.ps-stats-panel .offcanvas-body { padding: 24px 26px 30px; background: #f3f6f9; }
.ps-stats-panel .ps-panel-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 1.65rem 0 .85rem; }
.ps-stats-panel .ps-panel-section-heading:first-child { margin-top: 0; }
.ps-stats-panel .ps-panel-section-kicker { display: block; color: #0f766e; font-size: .59rem; font-weight: 750; letter-spacing: .12em; margin-bottom: .25rem; }
.ps-stats-panel .ps-panel-section-heading h3 { margin: 0; color: #172d3e; font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.ps-stats-panel .ps-panel-count { min-width: 30px; padding: .3rem .55rem; background: #e3eeed; border: 1px solid #cee2df; border-radius: 8px; color: #23574f; font-size: .75rem; font-weight: 700; text-align: center; }
.ps-stats-panel .ps-panel-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ps-stats-panel .ps-panel-team-card { padding: 16px; background: #fff; border: 1px solid #dce6eb; border-radius: 13px; box-shadow: 0 3px 9px rgb(15 23 42 / 3%); }
.ps-stats-panel .ps-panel-card-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem; color: #52716f; font-size: .68rem; font-weight: 600; }
.ps-stats-panel .ps-panel-sample { color: #64748b; font-weight: 400; }
.ps-stats-panel .ps-panel-team-card h4 { margin: .6rem 0 .7rem; font-size: .85rem; line-height: 1.4; font-weight: 650; color: #334155; }
.ps-stats-panel .ps-panel-value { display: flex; flex-direction: column; gap: .1rem; }
.ps-stats-panel .ps-panel-value strong { color: #0f766e; font-size: 2.15rem; line-height: 1.1; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ps-stats-panel .ps-panel-value > span { color: #64748b; font-size: .7rem; }
.ps-stats-panel .ps-panel-form-label { margin: 1rem 0 .4rem; color: #64748b; font-size: .62rem; }
.ps-stats-panel .ps-panel-form { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ps-stats-panel .ps-panel-form .ps-result { width: 25px; height: 25px; padding: 0; align-items: center; font-size: .7rem; border-radius: 6px; }
.ps-stats-panel .ps-panel-comparison-table { border-color: #dce6eb; border-radius: 12px; box-shadow: 0 3px 9px rgb(15 23 42 / 3%); }
.ps-stats-panel .ps-panel-comparison-table .ps-table { font-size: .79rem; }
.ps-stats-panel .ps-panel-comparison-table .ps-table thead th { color: #4d6474; background: #eaf0f4; padding: .85rem .75rem; font-size: .7rem; }
.ps-stats-panel .ps-panel-comparison-table .ps-table td { text-align: center; color: #244453; font-weight: 600; }
.ps-stats-panel .ps-panel-comparison-table .ps-table thead th:not(:first-child) { text-align: center; }
.ps-stats-panel .ps-panel-comparison-table .ps-table tbody th { font-weight: 500; color: #64748b; }
.ps-stats-panel .ps-panel-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ps-stats-panel .ps-panel-history > li { padding: 13px 15px; background: #fff; border: 1px solid #dce6eb; border-radius: 11px; }
.ps-stats-panel .ps-panel-history-meta { display: flex; justify-content: space-between; gap: .7rem; color: #64748b; font-size: .65rem; padding-bottom: .65rem; margin-bottom: .65rem; border-bottom: 1px solid #edf2f6; }
.ps-stats-panel .ps-panel-history-meta > span:last-child { text-align: right; }
.ps-stats-panel .ps-panel-history-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, .65fr) minmax(0, 1fr); align-items: center; gap: .7rem; font-size: .8rem; font-weight: 550; color: #334155; }
.ps-stats-panel .ps-panel-history-home { text-align: right; }
.ps-stats-panel .ps-panel-history-score { text-align: center; padding: .5rem .35rem; background: #edf5f3; border: 1px solid #dfede8; border-radius: 8px; color: #23574f; font-size: .9rem; font-variant-numeric: tabular-nums; }
.ps-stats-panel .ps-panel-method { padding: 1rem 0; margin-top: 1rem; }
.ps-stats-panel .ps-panel-method > summary { cursor: pointer; color: #64748b; font-size: .75rem; }
.ps-stats-panel .ps-panel-explore { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .9rem 1rem; border-radius: 10px; color: #fff; background: linear-gradient(110deg, #176e63, #205f61); text-decoration: none; font-size: .8rem; font-weight: 600; box-shadow: 0 4px 12px rgb(15 118 110 / 12%); }
.ps-stats-panel .ps-panel-explore:hover { background: #185b52; color: #fff; }
.ps-stats-panel .ps-panel-loading { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-stats-panel .ps-panel-loading > div { height: 165px; border: 1px solid #dce6eb; border-radius: 13px; background: linear-gradient(145deg, #fff, #e7eef3); }
@media (max-width: 575.98px) {
    .ps-stats-panel .offcanvas-header { padding: 20px 16px 22px; }
    .ps-stats-panel .offcanvas-header::after { left: 16px; right: 16px; }
    .ps-stats-panel .offcanvas-title { font-size: 1.4rem; }
    .ps-stats-panel .ps-panel-team { font-size: .85rem; }
    .ps-stats-panel .ps-panel-team img { width: 42px; height: 42px; padding: 7px; border-radius: 13px; }
    .ps-stats-panel .offcanvas-body { padding: 20px 14px 24px; }
    .ps-stats-panel .ps-panel-team-card { padding: 12px; }
    .ps-stats-panel .ps-panel-value strong { font-size: 1.85rem; }
    .ps-stats-panel .ps-panel-form .ps-result { width: 22px; min-width: 22px; height: 24px; }
    .ps-stats-panel .ps-panel-history > li { padding: 12px; }
    .ps-stats-panel .ps-panel-history-line { gap: .4rem; font-size: .75rem; }
    .ps-stats-panel .ps-panel-history-score { font-size: .8rem; }
}

.prediction-stats .ps-h2h-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: .8rem 0; }
.prediction-stats .ps-h2h-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 15px 10px; border: 1px solid #dce6eb; border-radius: 12px; background: #fff; text-align: center; }
.prediction-stats .ps-h2h-card strong { font-size: 1.9rem; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; }
.prediction-stats .ps-h2h-card span { font-size: .72rem; color: #475569; line-height: 1.4; }
.prediction-stats .ps-h2h-home { background: #edf8f4; border-color: #d4e9df; color: #176b58; }
.prediction-stats .ps-h2h-draw { background: #f0f3f7; color: #526477; }
.prediction-stats .ps-h2h-away { background: #edf3fc; border-color: #d9e4f4; color: #2b5c9f; }
@media (max-width: 575.98px) {
    .prediction-stats .ps-h2h-summary { gap: 7px; }
    .prediction-stats .ps-h2h-card { padding: 12px 6px; }
    .prediction-stats .ps-h2h-card strong { font-size: 1.6rem; }
    .prediction-stats .ps-h2h-card span { font-size: .68rem; }
}
