/* =====================================================
   TOPLYGA FANTASY
   TEAM PAGE ("Mano komanda")
   ===================================================== */

/*
   Antraštė, dviejų dalių išdėstymas, aikštė, žaidėjų kortelės ir
   suolas imami iš dashboard.css, todėl abu puslapiai atrodo vienodai.
   Čia yra tik tai, ko komandos sudarymo puslapyje nėra.
*/


/* =====================================================
   HEADER NAV
   ===================================================== */

.header-left {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 32px;
}

.top-nav {
    display: flex;
    gap: 6px;
}

.top-nav a {
    padding: 9px 14px;

    border-radius: 7px;

    color: #9aa3ac;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.top-nav a:hover {
    background: #20252a;
    color: #ffffff;
}

.top-nav a.active {
    background: #ffffff;
    color: #111111;
}


/* =====================================================
   LEFT PANEL (suvestinė)
   ===================================================== */

.team-side {
    gap: 14px;

    overflow-y: auto;
}

.side-card {
    flex-shrink: 0;

    padding: 18px;

    background: #14243b;

    border-radius: 14px;
}

.side-card h2 {
    margin-bottom: 12px;

    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.side-duo {
    flex-shrink: 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}


/* =====================================================
   TURO SUVESTINĖ
   ===================================================== */

.gw-summary {
    flex-shrink: 0;

    padding: 22px 22px 20px;

    background: #14243b;

    border-radius: 14px;
}

.gw-team-name {
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;

    overflow-wrap: anywhere;
}

.gw-info {
    margin-top: 6px;

    color: #8fa0b8;
    font-size: 12px;
}

.team-chip-status {
    position: absolute;
    z-index: 6;
    top: 12px;
    right: 12px;
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #343b42;
    border-radius: 999px;
    background: #20252a;
    color: #aeb7bf;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.team-chip-status[hidden] {
    display: none;
}

.team-chip-status.is-used {
    border-color: rgba(120, 214, 158, 0.35);
    background: rgba(34, 112, 72, 0.2);
    color: #8be0ac;
}


/* Turo naršymas */

.gw-nav {
    margin-top: 18px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.gw-arrow {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: #1f3556;
    color: #ffffff;

    cursor: pointer;

    transition: background .15s ease;
}

.gw-arrow:hover:not(:disabled) {
    background: #2b4b78;
}

.gw-arrow:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.gw-title {
    min-width: 120px;

    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    text-align: center;
}


/* Skaičiai */

.gw-stats {
    margin-top: 18px;

    display: grid;
    grid-template-columns: 1fr 1fr 1.55fr 1.1fr 1.15fr;
    align-items: center;
    gap: 6px;
}

.gw-stat {
    min-width: 0;

    color: #ffffff;
    text-align: center;
}

.gw-stat strong {
    display: block;

    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;

    font-variant-numeric: tabular-nums;
}

.gw-stat span {
    display: block;

    margin-top: 8px;

    color: #aebbd0;
    font-size: 10.5px;
    font-weight: 600;
}

.gw-link:hover span {
    color: #ffffff;
}

.gw-link[aria-disabled="true"] {
    pointer-events: none;
    text-decoration: none;
}

#highestTeamLink:not([aria-disabled="true"]) {
    cursor: pointer;
}

.gw-points-card {
    overflow: hidden;

    border-radius: 16px;

    background: #ffffff;
}

.gw-points-main {
    padding: 14px 6px 12px;

    background: linear-gradient(135deg, #5ce6b5 0%, #4da3ff 100%);

    color: #0f2138;
    text-align: center;
}

.gw-points-main strong {
    display: block;

    font-size: 46px;
    font-weight: 900;
    line-height: 1;
}

.gw-points-main span {
    display: block;

    margin-top: 6px;

    font-size: 12px;
    font-weight: 700;
}

.gw-refresh {
    width: 100%;
    height: 32px;

    border: 0;

    background: #ffffff;
    color: #0f2138;

    font-size: 19px;
    font-weight: 900;
    line-height: 1;

    cursor: pointer;
}

.gw-refresh:hover {
    background: #eef2f7;
}


/* Captain / vice */

.special-player {
    min-height: 57px;

    display: flex;
    align-items: center;

    padding: 9px 11px;

    background: #f5f7fa;

    border-radius: 10px;

    color: #172033;
    font-size: 13px;
    font-weight: 800;
}

.special-player::before {
    width: 28px;
    height: 28px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    border-radius: 50%;

    font-size: 11px;
    font-weight: 900;
}

.captain-special::before {
    content: "C";

    background: #f2bd32;
    color: #1f1f1f;
}

.vice-special::before {
    content: "V";

    background: #7857e8;
    color: #ffffff;
}

.special-player-info {
    min-width: 0;
}

.special-player-info strong {
    display: block;

    overflow: hidden;

    font-size: 13px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.special-player-info span {
    display: block;

    margin-top: 2px;

    color: #7b8594;
    font-size: 11px;
    font-weight: 600;
}


/* =====================================================
   PITCH (šiame puslapyje kortelės nespaudžiamos)
   ===================================================== */

.pitch-player,
.bench-player {
    cursor: default;
}

.pitch-line .pitch-player:hover {
    transform: none;

    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

.bench-player:hover {
    background: #f5f7fa;
}

.pitch-loading {
    position: absolute;
    inset: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(13, 92, 44, .55);

    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.pitch-loading.hidden {
    display: none;
}

/* Pranešimas ant aikštės (nėra komandos / klaida) */

.football-pitch .empty-pitch-message {
    padding: 10px 20px;

    border-radius: 999px;

    background: rgba(0, 0, 0, .45);

    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.bench-players .empty-message {
    grid-column: 1 / -1;

    padding: 0;

    align-self: center;
}

.bench-players .empty-message a {
    color: #ffffff;
    font-weight: 700;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1250px) {

    .gw-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .gw-points-card {
        grid-column: 1 / -1;
        grid-row: 1;

        margin-bottom: 8px;
    }
}

/* Siaurame ekrane didelis "turo vieta" skaičius nebetelpa
   4 stulpeliuose - pereiname prie 2x2 tinklelio */

@media (max-width: 560px) {

    .gw-stats {
        grid-template-columns: 1fr 1fr;
        row-gap: 16px;
    }

    .gw-stat strong {
        font-size: 22px;
    }
}

@media (max-width: 900px) {

    .team-side {
        height: auto;

        overflow: visible;
    }

    .header-left {
        width: 100%;

        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 600px) {

    .side-duo {
        grid-template-columns: 1fr;
    }
}

/* Turo suvestinės savitas, grafiką pirmame plane laikantis maketas. */
body[data-mode="team"] {
    --gw-card: #18212a;
    --gw-card-raised: #202b35;
    --gw-border: #35424e;
    --gw-text: #f2f5f7;
    --gw-muted: #a4b0bc;
    --gw-accent: #39d39a;
    --gw-accent-strong: #20b980;
    --gw-positive: #39d39a;
    --gw-negative: #ff786f;
    --gw-track: #35434f;
}

body[data-mode="team"][data-theme="light"] {
    --gw-card: #ffffff;
    --gw-card-raised: #f1f5f7;
    --gw-border: #c7d1d8;
    --gw-text: #17232c;
    --gw-muted: #526371;
    --gw-accent: #087b56;
    --gw-accent-strong: #066849;
    --gw-positive: #087b56;
    --gw-negative: #b52e28;
    --gw-track: #d1dbe1;
}

body[data-mode="team"] .gw-summary {
    flex-shrink: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--gw-border);
    border-radius: 16px;
    background: var(--gw-card);
    color: var(--gw-text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

body[data-mode="team"] .gw-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gw-border);
}

body[data-mode="team"] .gw-heading-copy { min-width: 0; }
body[data-mode="team"] .gw-team-name {
    color: var(--gw-text);
    font-size: clamp(22px, 2.3vw, 30px);
    line-height: 1.1;
    letter-spacing: -.035em;
}
body[data-mode="team"] .gw-info {
    margin-top: 5px;
    color: var(--gw-muted);
    font-size: 13px;
}

body[data-mode="team"] .gw-transfers-button {
    min-height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--gw-accent);
    border-radius: 999px;
    color: var(--gw-accent);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
body[data-mode="team"] .gw-transfers-button strong { font-variant-numeric: tabular-nums; }
body[data-mode="team"] .gw-transfers-button:hover {
    color: #071b13;
    background: var(--gw-accent);
    transform: translateY(-1px);
}
body[data-mode="team"] .gw-transfers-button:focus-visible,
body[data-mode="team"] .gw-chart-bar:focus-visible,
body[data-mode="team"] .gw-arrow:focus-visible,
body[data-mode="team"] .gw-refresh:focus-visible,
body[data-mode="team"] .gw-error-state button:focus-visible {
    outline: 3px solid var(--gw-accent);
    outline-offset: 3px;
}

body[data-mode="team"] .gw-content { display: block; }
body[data-mode="team"] .gw-content[hidden],
body[data-mode="team"] .gw-loading-state[hidden],
body[data-mode="team"] .gw-error-state[hidden],
body[data-mode="team"] .gw-comparison[hidden],
body[data-mode="team"] .gw-rank-row[hidden],
body[data-mode="team"] .gw-status[hidden],
body[data-mode="team"] .gw-no-score[hidden],
body[data-mode="team"] .gw-compare[hidden] { display: none !important; }

body[data-mode="team"] .gw-score-row {
    display: grid;
    grid-template-columns: minmax(112px, .34fr) minmax(0, 1fr);
    align-items: end;
    gap: 20px;
    padding-top: 16px;
}
body[data-mode="team"] .gw-score-block { position: relative; min-width: 0; padding: 0 0 20px; }
body[data-mode="team"] .gw-score-heading { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
body[data-mode="team"] .gw-score-heading > div { display: flex; flex-direction: column; align-items: flex-start; }
body[data-mode="team"] .gw-score-heading > div > strong {
    color: var(--gw-text);
    font-size: clamp(48px, 6vw, 78px);
    font-weight: 900;
    line-height: .94;
    letter-spacing: -.06em;
    font-variant-numeric: tabular-nums;
}
body[data-mode="team"] .gw-score-heading > div > span {
    margin-top: 7px;
    color: var(--gw-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: lowercase;
}
body[data-mode="team"] .gw-status {
    margin-top: 3px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 193, 87, .42);
    border-radius: 999px;
    color: #ffd27c;
    background: rgba(116, 76, 16, .18);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
body[data-mode="team"] .gw-compare {
    max-width: 180px;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.35;
}
body[data-mode="team"] .gw-compare.is-positive { color: var(--gw-positive); }
body[data-mode="team"] .gw-compare.is-negative { color: var(--gw-negative); }
body[data-mode="team"] .gw-compare.is-even { color: var(--gw-muted); }
body[data-mode="team"] .gw-no-score {
    max-width: 190px;
    margin-top: 12px;
    color: var(--gw-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
body[data-mode="team"] .gw-refresh {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 27px;
    height: 27px;
    border: 1px solid var(--gw-border);
    border-radius: 50%;
    color: var(--gw-muted);
    background: var(--gw-card-raised);
    cursor: pointer;
}

body[data-mode="team"] .gw-chart-section { min-width: 0; overflow: hidden; }
body[data-mode="team"] .gw-chart-heading {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
body[data-mode="team"] .gw-chart-heading h2 {
    color: var(--gw-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body[data-mode="team"] .gw-chart-nav { display: flex; align-items: center; gap: 7px; }
body[data-mode="team"] .gw-title { min-width: 70px; color: var(--gw-muted); font-size: 11px; font-weight: 700; text-align: center; }
body[data-mode="team"] .gw-title strong { color: var(--gw-text); font-variant-numeric: tabular-nums; }
body[data-mode="team"] .gw-arrow {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gw-border);
    border-radius: 7px;
    color: var(--gw-muted);
    background: var(--gw-card-raised);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
body[data-mode="team"] .gw-arrow:disabled { opacity: .35; cursor: not-allowed; }
body[data-mode="team"] .gw-chart-track {
    display: grid;
    grid-template-columns: repeat(36, minmax(0, 1fr));
    align-items: stretch;
    gap: 3px;
    width: 100%;
    min-width: 0;
    height: 176px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 5px 2px 0;
    border-bottom: 1px solid var(--gw-border);
    scrollbar-color: var(--gw-border) transparent;
}
body[data-mode="team"] .gw-chart-bar {
    min-width: 0;
    min-height: 44px;
    display: grid;
    grid-template-rows: 16px minmax(0, 1fr) 17px;
    align-items: end;
    justify-items: center;
    padding: 0 0 2px;
    border: 0;
    border-radius: 5px 5px 0 0;
    color: var(--gw-muted);
    background: transparent;
    cursor: pointer;
}
body[data-mode="team"] .gw-bar-value { color: var(--gw-muted); font-size: 8px; font-variant-numeric: tabular-nums; }
body[data-mode="team"] .gw-bar-column {
    width: min(100%, 15px);
    min-height: 3px;
    align-self: end;
    border-radius: 4px 4px 1px 1px;
    background: var(--gw-track);
    height: var(--bar-height, 0%);
    transition: height .25s ease, background .15s ease;
}
body[data-mode="team"] .gw-chart-bar.is-empty .gw-bar-column { border: 1px dashed var(--gw-border); background: transparent; }
body[data-mode="team"] .gw-chart-bar.is-future { cursor: not-allowed; opacity: .55; }
body[data-mode="team"] .gw-chart-bar.is-selected { color: var(--gw-text); background: color-mix(in srgb, var(--gw-accent) 12%, transparent); }
body[data-mode="team"] .gw-chart-bar.is-selected .gw-bar-column { background: var(--gw-accent); }
body[data-mode="team"] .gw-chart-bar.is-selected .gw-bar-value { color: var(--gw-accent); font-weight: 900; }
body[data-mode="team"] .gw-bar-label { align-self: end; padding-top: 3px; font-size: 8px; font-variant-numeric: tabular-nums; }

body[data-mode="team"] .gw-comparison { margin-top: 19px; }
body[data-mode="team"] .gw-scale {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--gw-track);
}
body[data-mode="team"] .gw-scale-fill {
    position: absolute;
    inset: 0 auto 0 0;
    max-width: 100%;
    border-radius: inherit;
    background: var(--gw-accent);
}
body[data-mode="team"] .gw-scale-marker {
    position: absolute;
    z-index: 1;
    top: -5px;
    width: 2px;
    height: 20px;
    transform: translateX(-50%);
    background: var(--gw-text);
}
body[data-mode="team"] .gw-scale-marker.is-own { width: 4px; background: var(--gw-accent); }
body[data-mode="team"] .gw-scale-marker.is-average { background: var(--gw-muted); }
body[data-mode="team"] .gw-scale-marker.is-highest { background: var(--gw-text); }
body[data-mode="team"] .gw-scale-legend {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 19px;
}
body[data-mode="team"] .gw-scale-legend > span,
body[data-mode="team"] .gw-scale-legend > a {
    min-width: 0;
    display: grid;
    grid-template-columns: 8px minmax(0, auto);
    align-items: center;
    column-gap: 5px;
    color: var(--gw-muted);
    font-size: 10px;
    text-decoration: none;
}
body[data-mode="team"] .gw-scale-legend > a { cursor: pointer; }
body[data-mode="team"] .gw-scale-legend > a:hover { color: var(--gw-text); }
body[data-mode="team"] .gw-scale-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--gw-accent); }
body[data-mode="team"] .gw-scale-legend i.is-average { background: var(--gw-muted); }
body[data-mode="team"] .gw-scale-legend i.is-highest { background: var(--gw-text); }
body[data-mode="team"] .gw-scale-legend b { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
body[data-mode="team"] .gw-scale-legend strong { grid-column: 2; color: var(--gw-text); font-size: 12px; font-variant-numeric: tabular-nums; }
body[data-mode="team"] .gw-scale-legend .gw-scale-zero { position: absolute; top: 0; left: 0; display: block; padding: 0; font-variant-numeric: tabular-nums; }
body[data-mode="team"] .gw-scale-legend > a[aria-disabled="true"] { pointer-events: none; }

body[data-mode="team"] .gw-rank-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--gw-border);
}
body[data-mode="team"] .gw-rank-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
body[data-mode="team"] .gw-rank-title strong { color: var(--gw-text); font-size: 25px; font-weight: 900; letter-spacing: -.035em; }
body[data-mode="team"] .gw-rank-title span,
body[data-mode="team"] .gw-rank-row p { color: var(--gw-muted); font-size: 11px; }
body[data-mode="team"] .gw-rank-row p { display: flex; align-items: baseline; gap: 5px; text-align: right; }
body[data-mode="team"] .gw-rank-row p strong { color: var(--gw-text); font-size: 13px; font-variant-numeric: tabular-nums; }

body[data-mode="team"] .gw-loading-state { display: grid; gap: 14px; padding-top: 22px; }
body[data-mode="team"] .gw-skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--gw-card-raised), color-mix(in srgb, var(--gw-card-raised) 55%, var(--gw-border)), var(--gw-card-raised)); background-size: 200% 100%; animation: gw-skeleton-shimmer 1.2s linear infinite; }
body[data-mode="team"] .gw-skeleton-score { width: 36%; height: 76px; }
body[data-mode="team"] .gw-skeleton-chart { width: 100%; height: 120px; }
body[data-mode="team"] .gw-skeleton-line { width: 70%; height: 26px; }
@keyframes gw-skeleton-shimmer { to { background-position: -200% 0; } }
body[data-mode="team"] .gw-error-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 22px; color: var(--gw-negative); }
body[data-mode="team"] .gw-error-state p { font-size: 13px; font-weight: 700; }
body[data-mode="team"] .gw-error-state button { padding: 9px 12px; border: 0; border-radius: 8px; color: #082017; background: var(--gw-accent); font-size: 12px; font-weight: 850; cursor: pointer; }

@media (max-width: 600px) {
    body[data-mode="team"] .gw-summary { padding: 14px; border-radius: 13px; }
    body[data-mode="team"] .gw-summary-header { gap: 8px; padding-bottom: 12px; }
    body[data-mode="team"] .gw-team-name { font-size: 22px; }
    body[data-mode="team"] .gw-info { font-size: 11px; }
    body[data-mode="team"] .gw-transfers-button { min-height: 36px; gap: 5px; padding: 0 9px; font-size: 10px; }
    body[data-mode="team"] .gw-score-row { grid-template-columns: minmax(74px, .27fr) minmax(0, 1fr); gap: 10px; padding-top: 13px; }
    body[data-mode="team"] .gw-score-block { padding-bottom: 0; }
    body[data-mode="team"] .gw-score-heading { gap: 5px; }
    body[data-mode="team"] .gw-score-heading > div > strong { font-size: clamp(40px, 12vw, 58px); }
    body[data-mode="team"] .gw-score-heading > div > span { margin-top: 4px; font-size: 12px; }
    body[data-mode="team"] .gw-status { padding: 4px 6px; font-size: 8px; }
    body[data-mode="team"] .gw-compare { margin-top: 10px; font-size: 12px; }
    body[data-mode="team"] .gw-no-score { margin-top: 9px; font-size: 11px; }
    body[data-mode="team"] .gw-chart-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    body[data-mode="team"] .gw-chart-nav { align-self: flex-end; margin-top: -25px; }
    body[data-mode="team"] .gw-chart-track { grid-template-columns: repeat(36, 24px); gap: 3px; min-width: 0; height: 154px; margin-right: -14px; padding-right: 14px; }
    body[data-mode="team"] .gw-chart-bar { min-width: 24px; min-height: 44px; }
    body[data-mode="team"] .gw-bar-value { font-size: 8px; }
    body[data-mode="team"] .gw-bar-label { font-size: 9px; }
    body[data-mode="team"] .gw-comparison { margin-top: 15px; }
    body[data-mode="team"] .gw-scale-legend { gap: 4px; }
    body[data-mode="team"] .gw-scale-legend > span,
    body[data-mode="team"] .gw-scale-legend > a { grid-template-columns: 7px minmax(0, auto); column-gap: 3px; font-size: 9px; }
    body[data-mode="team"] .gw-scale-legend strong { font-size: 11px; }
    body[data-mode="team"] .gw-rank-row { align-items: flex-start; flex-direction: column; gap: 3px; margin-top: 11px; }
    body[data-mode="team"] .gw-rank-title strong { font-size: 22px; }
    body[data-mode="team"] .gw-rank-row p { text-align: left; }
}

/* Automatinio keitimo žyma GW komandos vaizde */
.autosub-badge {
    margin: calc(var(--u) * .25) 0;
    padding: calc(var(--u) * .35) calc(var(--u) * .75);
    border-radius: 999px;
    background: #d9f8e9;
    color: #137447;
    font-size: calc(var(--u) * .8);
    font-weight: 900;
    letter-spacing: .04em;
}

.team-player-clickable { cursor: pointer; }
.team-player-clickable:focus-visible { outline: 2px solid #8bd6ae; outline-offset: 3px; }
.team-player-modal-content { width: min(680px, 100%); }
.team-player-modal-content .player-modal-avatar { overflow: hidden; }
.team-player-modal-content .player-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-player-card, .team-player-list > div { padding: 12px 14px; border: 1px solid #30363d; border-radius: 9px; background: #20252a; }
.team-player-card + .team-player-card, .team-player-list > div + div { margin-top: 8px; }
.team-player-card > strong { display: block; padding-right: 15px; }
.team-player-card small { display: block; margin-top: 5px; color: #9aa3ab; font-size: 12px; }
.team-player-card p { margin: 9px 0 0; color: #c7cdd2; font-size: 13px; line-height: 1.5; }
.team-player-card .team-player-points { color: #a9e8c2; font-weight: 700; }
.team-player-list > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13px; }
.team-player-list > div span { color: #aeb6bd; }
.team-player-empty { margin: 0; color: #9aa3ab; font-size: 13px; }
.team-results-card, .team-league-card { background: #171a1e; border: 1px solid #2b3036; }
.team-results-card .section-heading { margin: 0 0 10px; }
.team-results-card .section-heading h2 { margin: 0; color: #fff; font-size: 16px; }
.gameweek-results { display: grid; gap: 7px; }
.gameweek-result { padding: 9px 10px 10px; border: 1px solid #2e353c; border-radius: 9px; background: linear-gradient(115deg, #20252a, #1b1f23); }
.gameweek-result-meta { display: flex; justify-content: center; min-height: 15px; margin-bottom: 7px; }
.result-status { padding: 3px 7px; border-radius: 999px; color: #aab3bb; background: #2c3238; font-size: 8px; font-weight: 800; letter-spacing: .06em; line-height: 1; }
.result-status.is-finished { color: #a4adb5; background: #2b3035; }
.result-status.is-live { color: #a8f0be; background: #16432d; box-shadow: 0 0 12px rgba(54, 204, 112, .13); }
.result-status.is-scheduled { color: #b8c2ca; background: #292e34; font-weight: 700; letter-spacing: 0; }
.gameweek-result-clubs { display: grid; grid-template-columns: minmax(0,1fr) 58px minmax(0,1fr); align-items: center; gap: 8px; color: #e8ecef; }
.result-club { min-width: 0; display: flex; align-items: center; gap: 7px; }
.result-club.is-away { justify-content: flex-end; text-align: right; }
.result-club strong { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.result-club-mark { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border: 1px solid #394149; border-radius: 50%; background: #2a3036; color: #c7d0d7; font-size: 8px; font-weight: 900; }
.result-score { min-width: 58px; min-height: 31px; display: grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: 5px; padding: 0 5px; border: 1px solid #343c43; border-radius: 7px; background: #14181b; color: #f4f6f7; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.result-score.has-score { border-color: #31533f; background: #18251e; color: #d8f7e2; }
.result-score > span:not(.gameweek-result-vs) { color: #768079; font-size: 12px; }
.result-score .gameweek-result-vs { color: #8d979f; font-size: 9px; letter-spacing: .12em; }
.team-league-card h2 { margin: 0; color: #fff; font-size: 16px; }
.team-league-card .league-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.team-league-card .league-stat { min-height: 70px; padding: 10px; background: #11171c; }
.team-league-card .league-stat span, .team-league-card .league-stat small { font-size: 10px; }
.team-league-card .league-stat strong { font-size: 13px; }

/* Shared dark visual language used by Sudėtis and Keitimai. */
body[data-mode="team"] .fantasy-layout {
    grid-template-columns: minmax(380px, 40fr) minmax(520px, 60fr);
}

body[data-mode="team"] .team-side {
    gap: 12px;
    padding: 16px;
    background: #14171a;
}

body[data-mode="team"] .gw-summary,
body[data-mode="team"] .side-card {
    border: 1px solid #2d343b;
    border-radius: 10px;
    background: #171a1e;
}

body[data-mode="team"] .gw-summary {
    padding: 14px;
}

body[data-mode="team"] .gw-info,
body[data-mode="team"] .gw-stat span {
    color: #929ba4;
}

body[data-mode="team"] .gw-arrow {
    background: #242a30;
    border: 1px solid #343b42;
}

body[data-mode="team"] .gw-arrow:hover:not(:disabled) {
    background: #30373e;
}

body[data-mode="team"] .gw-points-card {
    border: 1px solid #313940;
    border-radius: 9px;
    background: #20252a;
}

body[data-mode="team"] .gw-points-main {
    background: linear-gradient(135deg, #17583d, #183e39);
    color: #f1fff5;
}

body[data-mode="team"] .gw-refresh {
    position: static;
    left: auto;
    bottom: auto;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    background: #20252a;
    color: #cbd2d7;
    font-size: 15px;
    line-height: 1;
}

body[data-mode="team"] .gw-refresh:hover {
    background: #292f35;
}

/* Keep the summary compact and align refresh with the gameweek controls. */
body[data-mode="team"] .gw-summary-header { padding-bottom: 12px; }
body[data-mode="team"] .gw-score-row { gap: 14px; padding-top: 10px; }
body[data-mode="team"] .gw-score-block { padding-bottom: 0; }
body[data-mode="team"] .gw-score-heading > div > strong { font-size: clamp(46px, 5vw, 66px); }
body[data-mode="team"] .gw-compare { margin-top: 9px; font-size: 13px; }
body[data-mode="team"] .gw-no-score { margin-top: 8px; }
body[data-mode="team"] .gw-chart-track { height: 142px; }
body[data-mode="team"] .gw-chart-nav { gap: 6px; }

body[data-mode="team"] .lineup-leagues-card.team-league-card {
    min-height: 120px;
    border-color: #2d343b;
    border-radius: 10px;
    background: #171a1e;
}

body[data-mode="team"] .team-results-card .section-heading h2 {
    font-size: 17px;
}

@media (max-width: 1100px) {
    body[data-mode="team"] .fantasy-layout {
        grid-template-columns: minmax(330px, 44fr) minmax(450px, 56fr);
    }
}

@media (max-width: 900px) {
    body[data-mode="team"] .fantasy-layout {
        display: flex;
        flex-direction: column;
    }
}

/* Team score pitch uses a tighter card scale so all four formation rows stay separated. */
body[data-mode="team"] .pitch-players {
    --u: clamp(6px, min(1.2vh, 1.7vw), 11.7px);
}

/* Vienuolikės turo suvestinė telefonui: kompaktiška rezultatų lenta, ne FPL kopija. */
@media (max-width: 600px) {
    body[data-mode="team"] .gw-summary {
        position: relative;
        overflow: hidden;
        padding: 15px 14px 13px;
        border: 1px solid #315242;
        border-left: 3px solid #83d9a2;
        border-radius: 12px;
        background:
            radial-gradient(ellipse at 100% 0%, rgba(38, 111, 71, .23), transparent 48%),
            linear-gradient(145deg, #191f1d, #15191b 64%);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    }

    body[data-mode="team"] .gw-team-name {
        font-size: 22px;
        letter-spacing: -.03em;
    }

    body[data-mode="team"] .gw-info {
        margin-top: 4px;
        font-size: 11px;
    }

    body[data-mode="team"] .gw-nav {
        justify-content: flex-start;
        gap: 10px;
        margin-top: 12px;
    }

    body[data-mode="team"] .gw-arrow {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        border-radius: 8px;
        color: #bfe8ce;
    }

    body[data-mode="team"] .gw-title {
        min-width: 0;
        font-size: 15px;
        letter-spacing: .01em;
    }

    body[data-mode="team"] .gw-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 12px;
    }

    body[data-mode="team"] .gw-points-card {
        position: relative;
        display: flex;
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 68px;
        margin: 0 0 2px;
        border: 1px solid #35654a;
        border-radius: 10px;
        background: linear-gradient(110deg, #163b2b, #1b3028);
    }

    body[data-mode="team"] .gw-points-main {
        display: flex;
        flex: 1;
        align-items: baseline;
        gap: 9px;
        padding: 10px 48px 10px 14px;
        background: transparent;
        text-align: left;
    }

    body[data-mode="team"] .gw-points-main strong {
        font-size: 36px;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    body[data-mode="team"] .gw-points-main span {
        margin: 0;
        color: #a5d7b7;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    body[data-mode="team"] .gw-refresh {
        position: static;
        top: auto;
        right: auto;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        transform: none;
        border: 1px solid #343b42;
        border-radius: 8px;
        background: #242a30;
        color: #bfe8ce;
        font-size: 16px;
    }

    body[data-mode="team"] .gw-stat {
        min-height: 55px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 8px 10px;
        border: 1px solid #2b3435;
        border-radius: 9px;
        background: #191e20;
        text-align: left;
    }

    body[data-mode="team"] .gw-stat strong {
        font-size: 19px;
    }

    body[data-mode="team"] .gw-stat span {
        margin-top: 3px;
        font-size: 9px;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    body[data-mode="team"] .team-chip-status {
        top: 8px;
        right: auto;
        left: 8px;
        max-width: 58%;
        padding: 4px 7px;
        font-size: 9px;
        line-height: 1.25;
    }
}
