.sp-team-page {
    --team-primary: var(--ui-primary, #0c8a61);
    --team-primary-hover: var(--ui-primary-dark, #086447);
    --team-ink: var(--ui-text, #172a34);
    --team-muted: var(--ui-muted, #647780);
    --team-line: var(--ui-line, #dbe6e1);
    --team-soft: var(--ui-canvas, #f4f7f5);
    background: #f2f5f8;
    color: var(--team-ink);
    padding-bottom: 40px;
}

.sp-team-page,
.sp-team-page *,
.sp-team-container {
    box-sizing: border-box;
}

.sp-team-container {
    width: min(1200px, calc(100% - 28px));
    margin: 0 auto;
    max-width: 100%;
}

.sp-team-empty {
    margin: 36px 0;
    padding: 34px;
    border: 1px solid var(--team-line);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    color: var(--team-muted);
}

.sp-team-hero {
    position: relative;
    padding: 22px 0 24px;
    background: #111a2a;
    overflow: hidden;
}

.sp-team-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 118, 110, .2), transparent 44%),
        radial-gradient(circle at 82% 20%, rgba(29, 78, 216, .22), transparent 32%);
    pointer-events: none;
}

.sp-team-page.sp-team-basket .sp-team-hero::before {
    background:
        linear-gradient(120deg, rgba(15, 118, 110, .2), transparent 44%),
        radial-gradient(circle at 82% 20%, rgba(15, 118, 110, .25), transparent 32%);
}

.sp-team-crumb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #b8c3d2;
    font-size: 12px;
    white-space: nowrap;
    overflow-x: auto;
}

.sp-team-crumb a,
.sp-team-crumb span {
    color: #b8c3d2;
}

.sp-team-crumb span::before {
    content: "/";
    margin-right: 8px;
    color: #6c7a8f;
}

.sp-team-board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.sp-team-profile,
.sp-team-summary {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
}

.sp-team-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
}

.sp-team-avatar {
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.sp-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-team-meta {
    min-width: 0;
}

.sp-team-meta h1 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 950;
}

.sp-team-meta p {
    margin: 6px 0 12px;
    color: #d2dbe6;
    font-size: 14px;
}

.sp-team-rankline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sp-team-rankline strong,
.sp-team-rankline span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .22);
    color: #eef4fb;
    font-size: 12px;
    font-weight: 800;
}

.sp-team-summary {
    padding: 18px 20px;
    color: #d5dfeb;
    font-size: 14px;
    line-height: 1.85;
}

.sp-team-card {
    margin-bottom: 14px;
    border: 1px solid var(--team-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .035);
    overflow: hidden;
}

.sp-team-head {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #edf1f6;
}

.sp-team-head h2 {
    position: relative;
    margin: 0;
    padding-left: 10px;
    color: #182234;
    font-size: 16px;
    font-weight: 950;
}

.sp-team-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 3px;
    height: 18px;
    background: var(--team-primary);
}

.sp-team-match-list,
.sp-team-result-list {
    padding: 6px 14px 10px;
}

.sp-team-match-list a,
.sp-team-result-list a {
    display: grid;
    align-items: center;
    min-height: 46px;
    border-bottom: 1px dashed #e8edf3;
    color: #334155;
    font-size: 13px;
    gap: 8px;
}

.sp-team-match-list a {
    grid-template-columns: 80px minmax(0, 1fr) 34px 26px 34px minmax(0, 1fr);
}

.sp-team-result-list a {
    grid-template-columns: 28px 52px minmax(0, 1fr) 56px minmax(0, 1fr);
}

.sp-team-match-list a:last-child,
.sp-team-result-list a:last-child {
    border-bottom: 0;
}

.sp-team-match-list time,
.sp-team-result-list time {
    color: #7b8797;
    font-size: 12px;
}

.sp-team-match-list span.team,
.sp-team-result-list span.team {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-team-match-list span.home { text-align: right; }
.sp-team-match-list span.away { text-align: left; }

.sp-team-match-list img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.sp-team-match-list b {
    text-align: center;
    color: #a3acb8;
    font-size: 11px;
}

.sp-team-result-list .badge {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.sp-team-result-list .badge.is-win { background: #0f9f7a; }
.sp-team-result-list .badge.is-draw { background: #94a3b8; }
.sp-team-result-list .badge.is-lose { background: #ef4444; }

.sp-team-result-list b {
    color: #172033;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.sp-team-empty-row {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b8797;
    font-size: 13px;
}

.sp-player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 14px;
    padding: 16px;
}

.sp-player-grid a {
    min-width: 0;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    background: #fbfcfe;
    padding: 10px 8px;
    text-align: center;
}

.sp-player-grid a:hover {
    border-color: var(--team-primary);
    background: #fff5f7;
}

.sp-player-grid .avatar {
    width: 68px;
    height: 68px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e8edf3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sp-player-grid .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-player-grid strong {
    display: block;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-player-grid em {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-style: normal;
}

.sp-team-article {
    padding: 18px;
    color: #3f4b5d;
    font-size: 15px;
    line-height: 1.9;
}

.sp-team-article p {
    margin: 0 0 12px;
}

.sp-team-article p:last-child {
    margin-bottom: 0;
}

.sp-team-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.sp-team-topics a {
    max-width: 100%;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #e4eaf0;
    border-radius: 999px;
    background: #f8fafc;
    color: #445163;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-team-topics a:hover {
    border-color: var(--team-primary);
    background: #fff1f3;
    color: var(--team-primary-hover);
}

@media (max-width: 992px) {
    .sp-team-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sp-team-container {
        width: calc(100% - 20px);
    }

    .sp-team-hero {
        padding: 10px 0 12px;
    }

    .sp-team-profile {
        flex-direction: column;
        text-align: center;
        padding: 14px 12px;
    }

    .sp-team-avatar {
        width: 72px;
        height: 72px;
        padding: 10px;
    }

    .sp-team-meta h1 {
        font-size: 22px;
    }

    .sp-team-rankline {
        justify-content: center;
    }

    .sp-team-summary {
        padding: 14px 12px;
        font-size: 13px;
    }

    .sp-team-card {
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .sp-team-head {
        min-height: 44px;
        padding: 0 12px;
    }

    .sp-team-head h2 {
        font-size: 15px;
    }

    .sp-team-match-list,
    .sp-team-result-list {
        padding: 4px 10px 8px;
    }

    .sp-team-match-list a {
        grid-template-columns: 64px minmax(0, 1fr) 20px 18px 20px minmax(0, 1fr);
        font-size: 12px;
    }

    .sp-team-result-list a {
        grid-template-columns: 24px 44px minmax(0, 1fr) 48px minmax(0, 1fr);
        font-size: 12px;
    }

    .sp-team-match-list img {
        width: 20px;
        height: 20px;
    }

    .sp-player-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .sp-player-grid .avatar {
        width: 56px;
        height: 56px;
    }

    .sp-player-grid strong {
        font-size: 12px;
    }

    .sp-team-article,
    .sp-team-topics {
        padding: 14px 12px;
    }
}

@media (max-width: 420px) {
    .sp-team-container {
        width: calc(100% - 16px);
    }
    .sp-player-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phase 3: optional football content pack */
.sp-content-pack-card{overflow:hidden}.sp-content-pack-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px 18px 0}.sp-content-pack-block{padding:16px 18px;border-top:1px solid #edf0f5}.sp-content-pack-grid .sp-content-pack-block{padding:14px;border:1px solid #edf0f5;border-radius:8px;background:#fafbfc}.sp-content-pack-block h3{margin:0 0 12px;font-size:15px;color:#202633}.sp-coach-row{display:flex;align-items:center;gap:12px}.sp-coach-row+.sp-coach-row{margin-top:10px}.sp-coach-row img{width:58px;height:58px;border-radius:50%;object-fit:cover;background:#eef1f5}.sp-coach-row strong,.sp-coach-row span{display:block}.sp-coach-row span{margin-top:4px;color:#7b8494;font-size:12px}.sp-compact-data-list{list-style:none;margin:0;padding:0}.sp-compact-data-list li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px dashed #e5e8ed;font-size:13px}.sp-compact-data-list li:last-child{border-bottom:0}.sp-compact-data-list a{font-weight:600;color:#273142;text-decoration:none}.sp-compact-data-list span{min-width:0;color:#7b8494;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-transfer-list{overflow-x:auto}.sp-transfer-row{display:grid;grid-template-columns:92px minmax(100px,1.2fr) 46px minmax(100px,1fr) minmax(60px,.7fr);align-items:center;gap:10px;min-width:620px;padding:9px 4px;border-bottom:1px solid #edf0f5;font-size:13px}.sp-transfer-row:last-child{border-bottom:0}.sp-transfer-row time{color:#7b8494}.sp-transfer-row a{color:#273142;font-weight:600;text-decoration:none}.sp-transfer-row em{color:#7b8494;font-style:normal;text-align:right}.sp-transfer-direction{display:inline-flex;justify-content:center;padding:2px 7px;border-radius:10px;font-size:11px}.sp-transfer-direction.is-in{color:#138a53;background:#eaf8f1}.sp-transfer-direction.is-out{color:#c94a4a;background:#fff0f0}.sp-player-transfer-row{grid-template-columns:92px minmax(120px,1fr) 24px minmax(120px,1fr) minmax(70px,.7fr)}.sp-player-transfer-row b{text-align:center;color:#98a0ad}.sp-honour-tags,.sp-player-ranking-list{display:flex;flex-wrap:wrap;gap:8px}.sp-honour-tags span,.sp-player-ranking-list span{display:flex;flex-direction:column;gap:3px;padding:8px 11px;border:1px solid #e4e8ee;border-radius:6px;background:#fff;color:#6f7887;font-size:12px}.sp-honour-tags strong,.sp-player-ranking-list strong{color:#273142;font-size:13px}
@media (max-width:700px){.sp-content-pack-grid{grid-template-columns:1fr;padding:12px 12px 0}.sp-content-pack-block{padding:14px 12px}.sp-transfer-row{min-width:560px}.sp-honour-tags span,.sp-player-ranking-list span{flex:1 1 140px}}

/* Team form: keep every score together, including three-digit basketball results. */
.sp-team-form-card{--form-ink:#102b46;--form-muted:#73869a;--form-line:#e7eef5;--form-accent:#126caa;overflow:hidden}
.sp-team-form-card .sp-team-form-head{padding:19px 20px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:0}
.sp-team-form-head>div{min-width:0}.sp-team-form-head h2{font-size:18px;line-height:1.4;margin:3px 0 0;color:var(--form-ink)}
.sp-team-form-eyebrow{display:block;font-size:10px;font-weight:700;letter-spacing:2px;color:var(--form-muted)}
.sp-team-form-count{flex:none;padding:5px 10px;border:1px solid var(--form-line);border-radius:6px;color:var(--form-muted);font-size:11px;white-space:nowrap}
.sp-team-form-overview{margin:0 20px 17px;padding:16px 18px;display:grid;grid-template-columns:1fr 1.1fr;gap:24px;align-items:center;background:#f5f9fc;border:1px solid #e7eff6;border-radius:10px}
.sp-team-form-metrics{display:flex;gap:30px}.sp-team-form-metrics>div{display:flex;flex-direction:column;gap:4px}
.sp-team-form-metrics strong{color:var(--form-ink);font-size:27px;line-height:1.1;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.8px}
.sp-team-form-metrics small{font-size:13px;margin-left:2px}.sp-team-form-metrics span{color:var(--form-muted);font-size:11px}
.sp-team-form-trend{border-left:1px solid #dde8f1;padding-left:22px;min-width:0}.sp-team-form-trend>span{display:flex;justify-content:space-between;gap:8px;color:#476178;font-size:11px;font-weight:600}
.sp-team-form-trend small{font-size:10px;color:#7d91a4;font-weight:400;white-space:nowrap}.sp-team-form-trend>div{display:flex;flex-wrap:wrap;gap:4px;margin-top:9px}
.sp-team-form-mark{display:inline-flex;justify-content:center;align-items:center;width:21px;height:23px;border-radius:4px;font-size:10px;font-weight:700}
.sp-team-form-mark.is-win,.sp-team-form-status.is-win{color:#087758;background:#e4f5ee}.sp-team-form-mark.is-lose,.sp-team-form-status.is-lose{color:#bc4356;background:#fcebee}.sp-team-form-mark.is-draw,.sp-team-form-status.is-draw{color:#66778b;background:#eaf0f5}
.sp-team-form-labels,.sp-team-form-row{display:grid;grid-template-columns:80px minmax(0,1fr) 112px minmax(0,1fr);align-items:center;column-gap:16px}
.sp-team-form-labels{padding:9px 20px;color:#8192a5;font-size:10px;border-top:1px solid var(--form-line);border-bottom:1px solid var(--form-line);background:#fcfdff}
.sp-team-form-labels>span:nth-child(2){text-align:right}.sp-team-form-labels>span:nth-child(3){text-align:center}
.sp-team-form-card .sp-team-form-row{margin:0 20px;padding:12px 0;min-height:57px;border-bottom:1px solid #edf2f7;color:var(--form-ink);text-decoration:none;transition:background-color .15s,color .15s}
.sp-team-form-card .sp-team-form-row:last-child{border-bottom:0}.sp-team-form-card .sp-team-form-row:hover{background:#f5f9fd;color:var(--form-accent)}.sp-team-form-row:focus-visible{outline:2px solid var(--form-accent);outline-offset:2px;border-radius:5px}
.sp-team-form-meta{display:flex;align-items:center;gap:9px;white-space:nowrap}.sp-team-form-meta time{color:var(--form-muted);font-size:11px;font-variant-numeric:tabular-nums}
.sp-team-form-status{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;font-size:10px;font-weight:700}
.sp-team-form-team{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.5;color:#597085}.sp-team-form-team.is-home{text-align:right}.sp-team-form-team.is-current{color:#183d5e;font-weight:700}
.sp-team-form-card .sp-team-form-score{display:inline-grid;grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr);align-items:baseline;width:100%;white-space:nowrap;color:#2b4053;line-height:1;font-variant-numeric:tabular-nums;font-size:17px;letter-spacing:-.3px}
.sp-team-form-score strong{white-space:nowrap;font-size:inherit;line-height:inherit;font-weight:700}.sp-team-form-score strong:first-child{text-align:right}.sp-team-form-score strong:last-child{text-align:left}.sp-team-form-score strong.is-current{color:#0c598e;font-weight:850}.sp-team-form-score i{font-size:12px;color:#9aaabc;font-style:normal;text-align:center}
@media(max-width:700px){
 .sp-team-form-card .sp-team-form-head{padding:16px 14px 13px}.sp-team-form-head h2{font-size:17px}.sp-team-form-eyebrow{font-size:9px;letter-spacing:1.5px}
 .sp-team-form-overview{margin:0 14px 13px;padding:14px;grid-template-columns:1fr;gap:14px}.sp-team-form-metrics{justify-content:space-between;gap:15px}.sp-team-form-metrics>div{min-width:50px}.sp-team-form-metrics strong{font-size:25px}
 .sp-team-form-trend{border-left:0;border-top:1px solid #dde8f1;padding:12px 0 0}.sp-team-form-trend>div{gap:5px;flex-wrap:nowrap;justify-content:space-between}.sp-team-form-mark{flex:1;max-width:24px;height:23px}
 .sp-team-form-labels,.sp-team-form-row{grid-template-columns:44px minmax(0,1fr) 82px minmax(0,1fr);column-gap:7px}.sp-team-form-labels{padding:8px 14px;font-size:9px}
 .sp-team-form-card .sp-team-form-row{margin:0 14px;padding:10px 0;min-height:58px}.sp-team-form-meta{flex-direction:column;gap:4px;align-items:flex-start}.sp-team-form-meta time{font-size:10px}.sp-team-form-status{height:17px;width:25px;font-size:9px;border-radius:4px}
 .sp-team-form-team{font-size:12px}.sp-team-form-card .sp-team-form-score{font-size:15px;grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr)}
}
@media(max-width:360px){.sp-team-form-labels,.sp-team-form-row{grid-template-columns:38px minmax(0,1fr) 76px minmax(0,1fr);column-gap:5px}.sp-team-form-card .sp-team-form-row{margin:0 11px}.sp-team-form-labels{padding-right:11px;padding-left:11px}.sp-team-form-team{font-size:11px}}


/* Readable player names: preserve the complete Chinese name. */
.sp-team-page .sp-player-grid strong{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.5;min-height:39px;display:flex;align-items:center;justify-content:center;text-overflow:clip;font-size:13px}
.sp-team-page .sp-side-players a{min-height:56px;align-items:center}.sp-team-page .sp-side-players span{white-space:normal;overflow-wrap:anywhere;line-height:1.55;text-overflow:clip}.sp-team-page .sp-side-players img{flex:none}
