/* ======================================================
   SIXSTATS TEAM PROFILE
   Matches the player-profile visual system.
   Load after styling2.1.css.
====================================================== */

.teamProfilePage {
    width: 70vw !important;
    max-width: 72.92vw !important;
    margin: 2vw auto 4vw !important;
    padding: 1.4vw !important;

    background: rgba(255,255,255,0.025) !important;
    border: 0.052vw solid rgba(255,255,255,0.10) !important;
    border-radius: 1vw !important;
    box-shadow: 0 0.8vw 2.2vw rgba(0,0,0,0.32) !important;
}

.teamProfilePage button,
.teamProfilePage select {
    font-family: "Oswald", system-ui, sans-serif;
}

/* ======================================================
   TEAM HERO
====================================================== */

#teamProfileHero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.2vw;

    background:
        radial-gradient(
            circle at 12% 10%,
            rgba(135,206,250,0.18),
            transparent 28vw
        ),
        linear-gradient(
            135deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-card);

    border: 0.052vw solid rgba(135,206,250,0.20);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

#teamHeroTopBar {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1vw 1.2vw 0;
}

#teamProfileHero #backButton {
    width: 2.7vw;
    height: 2.7vw;
    min-width: 2.19vw;
    min-height: 2.19vw;
    margin: 0;

    color: var(--accent);
    background: rgba(135,206,250,0.12);
    border: 0.052vw solid rgba(135,206,250,0.28);
    border-radius: 50vw;

    font-size: 0.9vw;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

#teamProfileHero #backButton:hover {
    transform: translateY(-0.12vw);
    background: rgba(135,206,250,0.20);
    border-color: rgba(135,206,250,0.50);
}

#teamProfileType {
    display: inline-flex;
    align-items: center;
    gap: 0.5vw;
    padding: 0.45vw 0.7vw;

    color: var(--text-muted);
    background: rgba(15,17,21,0.55);
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.7vw;
    letter-spacing: 0.04vw;
    text-transform: uppercase;
}

#teamProfileStatusDot {
    width: 0.48vw;
    height: 0.48vw;
    min-width: 0.365vw;
    min-height: 0.365vw;

    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0.22vw rgba(74,222,128,0.12);
}

#teamHeroLayout {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: minmax(17vw, 0.72fr) minmax(0, 1.28fr);
    gap: 2vw;
    align-items: stretch;

    padding: 1vw 1.4vw 1.4vw;
}

/* ======================================================
   TEAM LOGO
====================================================== */

#teamHeroLogoPanel {
    min-width: 0;
}

.teamProfilePage #teamimagecontainer {
    position: relative;
    width: 19vw;
    height: 19vw;
    min-height: 17.71vw;
    overflow: hidden;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(135,206,250,0.16),
            transparent 55%
        ),
        linear-gradient(
            150deg,
            rgba(135,206,250,0.08),
            rgba(15,17,21,0.75)
        ),
        var(--bg-secondary);

    border: 0.052vw solid rgba(255,255,255,0.10);
    border-radius: var(--radius);
    box-shadow: 0 1vw 2vw rgba(0,0,0,0.32);
}

.teamProfilePage #teamimage {
    width: 13vw !important;
    height: 13vw !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0.8vw 1.2vw rgba(0,0,0,0.38));
}

/* ======================================================
   TEAM IDENTITY
====================================================== */

#teamHeroDetails {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 1vw 0;
}

.teamProfileEyebrow {
    margin: 0 0 0.45vw;

    color: var(--accent);
    font-size: 0.7vw;
    font-weight: 600;
    letter-spacing: 0.12vw;
    text-transform: uppercase;
}

#teamProfileTitle {
    overflow: visible;
    margin: 0;
    padding-bottom: 0.08vw;

    color: var(--text-main);
    font-size: 3vw;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.08vw;
    text-align: left;

    text-overflow: ellipsis;
    white-space: nowrap;
}

#teamProfileSlug {
    margin-top: 0.65vw;
    color: var(--text-muted);
    font-size: 1.05vw;
}

#teamHeroInfoGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7vw;

    width: 100%;
    margin: 1.5vw 0 0;
}

.teamHeroInfoItem {
    min-width: 0;
    padding: 0.85vw;

    background: rgba(15,17,21,0.48);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.teamHeroInfoItemAccent {
    border-color: rgba(135,206,250,0.20);
    background:
        linear-gradient(
            135deg,
            rgba(135,206,250,0.08),
            transparent
        ),
        rgba(15,17,21,0.48);
}

.teamHeroInfoItem > span {
    display: block;
    margin-bottom: 0.45vw;

    color: var(--text-muted);
    font-size: 0.62vw;
    letter-spacing: 0.05vw;
    text-transform: uppercase;
}

.teamHeroInfoItem > strong {
    display: block;
    overflow: visible;
    max-width: 100%;
    padding-bottom: 0.08vw;

    color: var(--text-main);
    font-size: 1.35vw;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.teamHeroInfoItem > small {
    display: block;
    overflow: visible;
    margin-top: 0.3vw;
    padding-bottom: 0.08vw;

    color: var(--text-muted);
    font-size: 0.58vw;
    line-height: 1.2;
    white-space: nowrap;
}

.teamHeroInfoItemAccent > strong,
.teamProfilePage #teamTotalEarnings {
    color: var(--accent);
}

#teamProfileActions {
    display: flex;
    gap: 0.7vw;
    margin-top: 1vw;
}

.teamProfileAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45vw;

    min-height: 2.6vw;
    padding: 0.55vw 0.9vw;

    color: var(--text-main);
    background: rgba(255,255,255,0.04);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);

    font-size: 0.78vw;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.teamProfileAction:hover {
    transform: translateY(-0.1vw);
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(135,206,250,0.38);
}

/* ======================================================
   ACTIVE ROSTER
====================================================== */

.teamProfilePage #activeRosterDiv {
    width: 100%;
    max-width: none;
    margin: 1.2vw auto;
    padding: 1.2vw;

    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.teamSectionHeading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1vw;
    margin-bottom: 1vw;
}

.teamProfilePage #activeRosterHeader,
.teamProfilePage #playerAwardsTitle {
    margin: 0.25vw 0 0;
    color: var(--text-main);
    font-size: 1.45vw;
    text-align: left;
}

.teamSectionCount {
    padding: 0.4vw 0.7vw;

    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.68vw;
    white-space: nowrap;
}

#teamRosterGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65vw;
}

.teamRosterCard {
    display: grid;
    grid-template-columns: 4.6vw minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    min-height: 5.6vw;
    padding: 0.7vw;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-secondary);

    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.teamRosterCard:hover {
    transform: translateY(-0.15vw);
    background:
        linear-gradient(
            145deg,
            rgba(135,206,250,0.10),
            rgba(135,206,250,0.02)
        ),
        var(--bg-secondary);
    border-color: rgba(135,206,250,0.35);
}

.teamRosterHeadshotWrap {
    width: 4.6vw;
    height: 4.6vw;
    overflow: hidden;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(135,206,250,0.16),
            transparent 58%
        ),
        rgba(15,17,21,0.55);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.teamRosterHeadshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 0.35vw 0.55vw rgba(0,0,0,0.34));
}

.teamRosterInfo {
    min-width: 0;
    padding: 0 0.7vw;
}

.teamRosterInfo h3 {
    overflow: hidden;
    margin: 0;
    padding-bottom: 0.05vw;

    color: var(--text-main);
    font-size: 1vw;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teamRosterInfo > p {
    overflow: hidden;
    margin-top: 0.12vw;

    color: var(--text-muted);
    font-size: 0.67vw;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teamRosterCountry {
    display: flex;
    align-items: center;
    gap: 0.35vw;
    margin-top: 0.35vw;

    color: var(--text-muted);
    font-size: 0.6vw;
}

.teamRosterCountry img {
    width: 1vw;
    height: 1vw;
    object-fit: contain;
}

.teamRosterArrow {
    color: var(--accent);
    font-size: 1vw;
    opacity: 0.65;
}

.teamProfileEmptyMessage {
    padding: 1vw;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 0.052vw dashed var(--border-soft);
    border-radius: var(--radius-sm);
    font-size: 0.78vw;
    text-align: center;
}

/* ======================================================
   AD SPACING
====================================================== */

.teamProfilePage #eventTabsAdDiv {
    width: 100%;
    margin: 1.3vw auto;
}

/* ======================================================
   TEAM DATA TABS
====================================================== */

.teamProfilePage #teamStatsDiv {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.teamProfilePage #teamStatsDiv > .tab {
    position: sticky;
    z-index: 20;
    top: 0.7vw;

    display: flex;
    justify-content: flex-start;
    gap: 0.55vw;
    overflow-x: auto;

    margin: 1.2vw 0;
    padding: 0.7vw;

    background: rgba(28,34,48,0.94);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: 0 0.7vw 1.6vw rgba(0,0,0,0.25);
    backdrop-filter: blur(0.625vw);
}

.teamProfilePage .tablinks {
    flex: 0 0 auto;
    padding: 0.55vw 0.95vw;

    color: var(--text-main);
    background: transparent;
    border: 0.052vw solid var(--border-soft);
    border-radius: 50vw;

    font-size: 0.78vw;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.teamProfilePage .tablinks:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(135,206,250,0.35);
}

.teamProfilePage .tablinks.active {
    color: #000;
    background: var(--accent);
    border-color: var(--accent);
}

.teamProfilePage .tabcontent {
    width: 100%;
    max-width: none;
    margin: 0 0 1.2vw;
    padding: 1.2vw;

    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.teamProfilePage .tabcontent > #activeRosterHeader,
.teamProfilePage .tabcontent > #playerAwardsTitle {
    margin: 0 0 1vw;
    font-size: 1.4vw;
}

/* ======================================================
   TEAM TABLES
====================================================== */

.teamProfilePage #recentPlacingsTable,
.teamProfilePage #statstable,
.teamProfilePage #TeamMapStatstable {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    margin: 0;

    background: transparent;
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.teamProfilePage #statstable + #statstable {
    margin-top: 1vw;
}

.teamProfilePage #recentPlacingsTable th,
.teamProfilePage #statstable th,
.teamProfilePage #TeamMapStatstable th {
    padding: 0.8vw;

    color: var(--text-main);
    background: var(--bg-secondary);
    border-bottom: 0.052vw solid var(--border-soft);

    font-size: 0.78vw;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.teamProfilePage #recentPlacingsTable td,
.teamProfilePage #statstable td,
.teamProfilePage #TeamMapStatstable td {
    padding: 0.78vw;

    color: var(--text-muted);
    border-bottom: 0.052vw solid rgba(255,255,255,0.055);

    font-size: 0.76vw;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.teamProfilePage #recentPlacingsTable tbody tr,
.teamProfilePage #statstable tbody tr,
.teamProfilePage #TeamMapStatstable tbody tr {
    transition: background 0.15s ease;
}

.teamProfilePage #recentPlacingsTable tbody tr:hover,
.teamProfilePage #statstable tbody tr:hover,
.teamProfilePage #TeamMapStatstable tbody tr:hover {
    background: rgba(135,206,250,0.055);
}

.teamProfilePage #statstable caption {
    padding: 0.8vw;
    color: var(--text-main);
    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.88vw;
    text-align: left;
}

.teamProfilePage #tableCaptionLink {
    display: inline-flex;
    align-items: center;
    gap: 0.45vw;
    color: var(--text-main);
}

.teamProfilePage #tableCaptionLink:hover,
.teamProfilePage .qualifiesToLink:hover,
.teamProfilePage #playerprofilelink:hover {
    color: var(--accent);
}

.teamProfilePage #recentPlacingsTable td:nth-child(2) {
    text-align: center;
}

.teamProfilePage #teamsSortedLogo,
.teamProfilePage #qualifiesToLogo {
    display: inline-block;
    width: 1.8vw;
    height: 1.8vw;
    min-width: 1.25vw;
    min-height: 1.25vw;
    margin: 0 0 0 0.4vw;

    object-fit: contain;
    vertical-align: middle;
    transition: transform 0.18s ease;
}

.teamProfilePage #teamsSortedLogo:hover,
.teamProfilePage #qualifiesToLogo:hover {
    transform: translateY(-0.12vw) scale(1.05);
}

.teamProfilePage .teamPlacingCell {
    color: white !important;
    font-weight: 700;
}

.teamProfilePage .ratingnumber,
.teamProfilePage .kostnumber,
.teamProfilePage .kddiff {
    font-variant-numeric: tabular-nums;
}

.teamProfilePage .teamStatPlayerIdentity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4vw;
}

.teamProfilePage .teamStatCountryFlag {
    width: 1.1vw;
    height: 1.1vw;
    flex-shrink: 0;
    object-fit: contain;
}

.teamProfilePage #recentPlacingsTable {
    table-layout: auto;
}

.teamProfilePage #recentPlacingsTable th:first-child,
.teamProfilePage #recentPlacingsTable td:first-child {
    width: 1%;
    white-space: nowrap;
    padding-left: 0.45vw;
    padding-right: 0.45vw;
}
/* ======================================================
   MAP FILTER + MAP CELLS
====================================================== */

.teamProfilePage #operatorsDisclaimer {
    margin: -0.5vw 0 1vw;
    color: #fca5a5;
    font-size: 0.67vw;
    text-align: left;
}

.teamProfilePage #mapDateFilter {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7vw;

    width: 100%;
    max-width: none;
    margin: 0 0 1vw;
    padding: 0.8vw;

    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.teamProfilePage #mapDateFilter .statFormLabel {
    display: flex;
    align-items: center;
    gap: 0.7vw;
    color: var(--text-muted);
    font-size: 0.78vw;
}

.teamProfilePage #date_range {
    min-width: 8vw;
    height: 2.3vw;
    min-height: 1.875vw;
    padding: 0 0.65vw;

    color: var(--text-main);
    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.76vw;
}

.teamProfilePage #date_range:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.18vw var(--accent-soft);
}

.teamProfilePage #mapDateFilterBtn {
    height: 2.3vw;
    padding: 0 0.9vw;
    margin-top: 1.9vw;
    color: #000;
    background: var(--accent);
    border: 0.052vw solid var(--accent);
    border-radius: var(--radius-sm);

    font-size: 0.76vw;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.teamProfilePage #mapDateFilterBtn:hover {
    transform: translateY(-0.1vw);
    opacity: 0.9;
}

.teamProfilePage td.mapCell {
    position: relative;
    min-width: 8vw;
    height: 4.5vw;
    overflow: hidden;

    color: var(--text-main);
    background-color: rgba(0,0,0,0.48);
    background-blend-mode: multiply;
    background-position: center;
    background-size: cover;
    font-weight: 600;
    text-shadow: 0 0.1vw 0.3vw rgba(0,0,0,0.95);
}

.teamProfilePage td.mapCell::before {
    display: none;
}

.teamProfilePage td.mapCell span {
    position: relative;
    z-index: 1;
    color: white;
}

.teamProfilePage #TeamMapStatstable th[data-sort] {
    position: relative;
    padding-right: 1.3vw;
    cursor: pointer;
    user-select: none;
}

.teamProfilePage #TeamMapStatstable th[data-sort]::after {
    position: absolute;
    right: 0.35vw;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    font-size: 0.55vw;
}

.teamProfilePage #TeamMapStatstable th.sorted-asc::after {
    content: "▲";
    opacity: 1;
}

.teamProfilePage #TeamMapStatstable th.sorted-desc::after {
    content: "▼";
    opacity: 1;
}

.siteCell {
    color: lightgray !important;
}

/* ======================================================
   HEAD-TO-HEAD FILTERS
====================================================== */

.teamProfilePage #mapResultsWrapper,
.teamProfilePage #mapResultsInner {
    width: 100%;
    max-width: none;
}

.teamProfilePage #mapResultsWrapper {
    display: block;
}

.teamProfilePage .mapResultsFilters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7vw;

    margin: 0 0 1vw;
    padding: 0.8vw;

    background: var(--bg-secondary);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.teamProfilePage .mapFilterGroup {
    display: flex;
    align-items: center;
    gap: 0.55vw;
}

.teamProfilePage .mapResultsFilters select {
    min-width: 8vw;
    height: 2.3vw;
    padding: 0 0.65vw;

    color: var(--text-main);
    background: var(--bg-card);
    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.76vw;
}

.teamProfilePage .mapResultsFilters select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.18vw var(--accent-soft);
}

.teamProfilePage .mapResultsFilters button {
    height: 2.3vw;
    padding: 0 0.9vw;

    color: #000;
    background: var(--accent);
    border: 0.052vw solid var(--accent);
    border-radius: var(--radius-sm);

    font-size: 0.76vw;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.teamProfilePage .mapResultsFilters button:hover {
    transform: translateY(-0.1vw);
    opacity: 0.9;
}

.teamProfilePage .mapResultsFilters .secondaryBtn {
    color: var(--text-main);
    background: transparent;
    border-color: var(--border-soft);
}

/* ======================================================
   HEAD-TO-HEAD RESULTS
====================================================== */

.teamProfilePage #mapResultsList {
    display: flex;
    flex-direction: column;
    gap: 0.8vw;
}

.teamProfilePage .matchCard {
    padding: 1vw;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.015)
        ),
        var(--bg-secondary);

    border: 0.052vw solid var(--border-soft);
    border-radius: var(--radius-sm);
    box-shadow: none;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.teamProfilePage .matchCard:hover {
    transform: translateY(-0.15vw);
    border-color: rgba(135,206,250,0.35);
    box-shadow: 0 0.8vw 1.8vw rgba(0,0,0,0.25);
}

.teamProfilePage .matchHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1vw;
    margin-bottom: 0.75vw;
}

.teamProfilePage .matchTitle {
    color: var(--text-main);
    font-size: 1vw;
}

.teamProfilePage .matchDate {
    color: var(--text-main) !important;
    font-size: 0.9vw;
}

.teamProfilePage .headtoheadOppLogo,
.teamProfilePage .matchEventLogo {
    object-fit: contain;
    vertical-align: middle;
}

.teamProfilePage .headtoheadOppLogo {
    width: 1.8vw;
    height: 1.8vw;
    margin-left: 0.4vw;
}

.teamProfilePage .matchEventLogo {
    width: 1.4vw;
    height: 1.4vw;
    margin-left: 0.35vw;
}

.teamProfilePage .mapResultRow {
    display: flex;
    gap: 0.85vw;
    padding: 0.8vw 0;
    border-top: 0.052vw solid rgba(255,255,255,0.06);
}

.teamProfilePage .mapResultRow:first-child {
    border-top: 0;
}

.teamProfilePage .mapThumb {
    width: 7.5vw;
    height: 4.8vw;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background-position: center;
    background-size: cover;
}

.teamProfilePage .mapMeta {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.teamProfilePage .mapTopLine {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7vw;
}

.teamProfilePage .mapName {
    color: var(--text-main);
    font-size: 1vw;
    font-weight: 600;
}

.teamProfilePage .mapBadges {
    display: flex;
    gap: 0.6vw;
    margin-right: 1vw;
}

.teamProfilePage .resultBadge,
.teamProfilePage .scoreBadge {
    padding: 0.38vw 0.65vw;
    border-radius: 50vw;
    font-size: 1.2vw;
    font-weight: 600;
}

.teamProfilePage .badgeWin {
    color: #4ade80;
    background: rgba(74,222,128,0.10);
    border: 0.052vw solid rgba(74,222,128,0.28);
}

.teamProfilePage .badgeLoss {
    color: #fca5a5;
    background: rgba(252,165,165,0.08);
    border: 0.052vw solid rgba(252,165,165,0.22);
}

.teamProfilePage .scoreBadge {
    color: var(--text-main);
    background: rgba(255,255,255,0.035);
    border: 0.052vw solid var(--border-soft);
}

.teamProfilePage .mapSubLine {
    margin-top: 0.4vw;
    color: var(--text-muted);
    font-size: 0.8vw;
}

/* ======================================================
   RESPONSIVE — TABLET
====================================================== */

@media (max-width: 1150px) {
    .teamProfilePage {
        width: 92vw !important;
        max-width: 92vw !important;
    }

    #teamHeroLayout {
        grid-template-columns: minmax(22.61vw, 0.75fr) 1.25fr;
    }

    #teamHeroInfoGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #teamRosterGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ======================================================
   RESPONSIVE — MOBILE
====================================================== */

@media (max-width: 768px) {
    .teamProfilePage {
        width: 94vw !important;
        max-width: 94vw !important;
        margin: 14px auto 24px !important;
        padding: 10px !important;
        border-radius: 14px !important;
    }

    #teamProfileHero {
        border-radius: 14px;
    }

    #teamHeroTopBar {
        padding: 12px 12px 0;
    }

    #teamProfileHero #backButton {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        font-size: 14px;
    }

    #teamProfileType {
        gap: 7px;
        padding: 7px 10px;
        font-size: 10px;
    }

    #teamProfileStatusDot {
        width: 7px;
        height: 7px;
        min-width: 7px;
        min-height: 7px;
    }

    #teamHeroLayout {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 12px;
    }

    .teamProfilePage #teamimagecontainer {
        width: 100%;
        height: 260px;
        min-height: 0;
        border-radius: 14px;
    }

    .teamProfilePage #teamimage {
        width: 170px !important;
        height: 170px !important;
    }

    #teamHeroDetails {
        padding: 4px 0 0;
    }

    .teamProfileEyebrow {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    #teamProfileTitle {
        font-size: 36px;
        letter-spacing: -0.5px;
        white-space: normal;
    }

    #teamProfileSlug {
        margin-top: 7px;
        font-size: 14px;
    }

    #teamHeroInfoGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
    }

    .teamHeroInfoItem {
        padding: 11px;
        border-radius: 10px;
    }

    .teamHeroInfoItem > span {
        margin-bottom: 6px;
        font-size: 10px;
        letter-spacing: 0.6px;
    }

    .teamHeroInfoItem > strong {
        font-size: 22px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .teamHeroInfoItem > small {
        margin-top: 5px;
        font-size: 10px;
    }

    #teamProfileActions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .teamProfileAction {
        min-height: 42px;
        padding: 9px 12px;
        border-radius: 10px;
        font-size: 13px;
    }

    .teamProfilePage #activeRosterDiv {
        margin: 12px auto;
        padding: 12px;
        border-radius: 14px;
    }

    .teamSectionHeading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .teamProfilePage #activeRosterHeader,
    .teamProfilePage #playerAwardsTitle {
        margin-top: 3px;
        font-size: 19px;
    }

    .teamSectionCount {
        padding: 6px 9px;
        font-size: 11px;
    }

    #teamRosterGrid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .teamRosterCard {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        min-height: 88px;
        padding: 8px;
        border-radius: 10px;
    }

    .teamRosterHeadshotWrap {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .teamRosterInfo {
        padding: 0 10px;
    }

    .teamRosterInfo h3 {
        font-size: 17px;
    }

    .teamRosterInfo > p {
        margin-top: 2px;
        font-size: 11px;
    }

    .teamRosterCountry {
        gap: 5px;
        margin-top: 5px;
        font-size: 10px;
    }

    .teamRosterCountry img {
        width: 16px;
        height: 16px;
    }

    .teamRosterArrow {
        font-size: 16px;
    }

    .teamProfileEmptyMessage {
        padding: 12px;
        border-radius: 10px;
        font-size: 12px;
    }

    .teamProfilePage #eventTabsAdDiv {
        margin: 12px auto;
    }

    .teamProfilePage #teamStatsDiv > .tab {
        position: static;
        gap: 7px;
        margin: 12px 0;
        padding: 9px;
        border-radius: 14px;
    }

    .teamProfilePage .tablinks {
        padding: 8px 11px;
        font-size: 12px;
    }

    .teamProfilePage .tabcontent {
        margin-bottom: 12px;
        padding: 12px;
        overflow: hidden;
        border-radius: 14px;
    }

    .teamProfilePage .tabcontent > #activeRosterHeader,
    .teamProfilePage .tabcontent > #playerAwardsTitle {
        margin-bottom: 12px;
        font-size: 18px;
    }

    .teamProfilePage #recentPlacingsTable,
    .teamProfilePage #statstable,
    .teamProfilePage #TeamMapStatstable {
        display: block;
        width: 100%;
        overflow-x: auto;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .teamProfilePage #recentPlacingsTable th,
    .teamProfilePage #recentPlacingsTable td,
    .teamProfilePage #statstable th,
    .teamProfilePage #statstable td,
    .teamProfilePage #TeamMapStatstable th,
    .teamProfilePage #TeamMapStatstable td {
        padding: 10px;
        font-size: 12px;
    }

    .teamProfilePage #statstable + #statstable {
        margin-top: 12px;
    }

    .teamProfilePage #statstable caption {
        padding: 10px;
        font-size: 14px;
    }

    .teamProfilePage #teamsSortedLogo,
    .teamProfilePage #qualifiesToLogo {
        width: 26px;
        height: 26px;
        margin-left: 6px;
    }

    .teamProfilePage .teamStatPlayerIdentity {
        gap: 6px;
    }

    .teamProfilePage .teamStatCountryFlag {
        width: 18px;
        height: 18px;
    }

    .teamProfilePage #operatorsDisclaimer {
        margin: -4px 0 10px;
        font-size: 11px;
    }

    .teamProfilePage #mapDateFilter {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
        padding: 10px;
        border-radius: 10px;
    }

    .teamProfilePage #mapDateFilter .statFormLabel {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
        font-size: 12px;
    }

    .teamProfilePage #date_range,
    .teamProfilePage #mapDateFilterBtn {
        width: 100%;
        height: 42px;
        min-height: 42px;
        padding: 0 10px;
        border-radius: 9px;
        font-size: 14px;
    }

    .teamProfilePage td.mapCell {
        min-width: 150px;
        height: 76px;
    }

    .teamProfilePage #TeamMapStatstable th[data-sort] {
        padding-right: 24px;
    }

    .teamProfilePage #TeamMapStatstable th[data-sort]::after {
        right: 7px;
        font-size: 9px;
    }

    .teamProfilePage .mapResultsFilters {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        border-radius: 10px;
    }

    .teamProfilePage .mapFilterGroup {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .teamProfilePage .mapResultsFilters select,
    .teamProfilePage .mapResultsFilters button {
        width: 100%;
        min-width: 0;
        height: 42px;
        padding: 0 8px;
        border-radius: 9px;
        font-size: 12px;
    }

    .teamProfilePage #mapResultsList {
        gap: 10px;
    }

    .teamProfilePage .matchCard {
        padding: 12px;
        border-radius: 10px;
    }

    .teamProfilePage .matchHeader {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 8px;
    }

    .teamProfilePage .matchTitle {
        font-size: 16px;
    }

    .teamProfilePage .matchDate {
        font-size: 12px;
    }

    .teamProfilePage .headtoheadOppLogo {
        width: 24px;
        height: 24px;
        margin-left: 6px;
    }

    .teamProfilePage .matchEventLogo {
        width: 20px;
        height: 20px;
        margin-left: 5px;
    }

    .teamProfilePage .mapResultRow {
        flex-direction: column;
        gap: 10px;
        padding: 12px 0;
    }

    .teamProfilePage .mapThumb {
        width: 100%;
        height: 120px;
        border-radius: 10px;
    }

    .teamProfilePage .mapTopLine {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .teamProfilePage .mapName {
        font-size: 15px;
    }

    .teamProfilePage .mapBadges {
        gap: 7px;
    }

    .teamProfilePage .resultBadge,
    .teamProfilePage .scoreBadge {
        padding: 5px 9px;
        font-size: 12px;
    }

    .teamProfilePage .mapSubLine {
        margin-top: 6px;
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .teamProfilePage #teamimagecontainer {
        height: 230px;
    }

    .teamProfilePage #teamimage {
        width: 150px !important;
        height: 150px !important;
    }

    #teamProfileTitle {
        font-size: 31px;
    }

    #teamHeroInfoGrid {
        grid-template-columns: 1fr 1fr;
    }

    #teamProfileActions {
        grid-template-columns: 1fr;
    }
}

/* Prevent Oswald descenders from being clipped. */
#teamProfileTitle,
.teamHeroInfoItem > strong,
.teamHeroInfoItem > small,
.teamRosterInfo h3,
.teamRosterInfo > p,
.teamProfilePage td,
.teamProfilePage th {
    line-height: 1.25;
}

#teamProfileTitle,
.teamHeroInfoItem > strong,
.teamHeroInfoItem > small {
    overflow: visible;
    padding-bottom: 0.08vw;
}