* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: #f5f7fa;
    color: #172033;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    padding-bottom: 86px;
}

button,
select {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

#app {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
}

.section {
    padding: 18px 16px 0;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 12px;
}

h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -.3px;
}

h3 {
    margin: 0 0 4px;
    font-size: 12px;
}

p {
    margin: 4px 0 0;
    color: #737d8d;
    font-size: 10px;
    line-height: 1.45;
}

.eyebrow {
    display: block;
    margin-bottom: 6px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a94a6;
}

.eyebrow.light {
    color: #aeb6c3;
}

.page-title {
    margin-bottom: 14px;
}

.page-controls {
    margin-top: 14px;
}

.page-controls label:first-child {
    margin-top: 0;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);

    z-index: 100;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    width: calc(100% - 24px);
    max-width: 496px;

    padding: 5px;

    background: rgba(255,255,255,.96);
    border: 1px solid #e3e7ec;
    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(15,23,42,.10);

    backdrop-filter: blur(12px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    min-height: 48px;

    border: 0;
    border-radius: 13px;

    background: transparent;
    color: #9ca3af;

    font-size: 9px;
    font-weight: 800;

    cursor: pointer;
}

.nav-item span:first-child {
    font-size: 17px;
    line-height: 1;
}

.nav-item.active {
    background: #111827;
    color: white;
}


.app-title-banner {
    margin: 0 16px;
    padding: 18px 16px;
    background: #111827;
    border-radius: 0 0 16px 16px;
    color: white;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.2px;
    text-align: center;
    box-shadow: 0 7px 20px rgba(15,23,42,.10);
}

/* HOME */

.home-leader-section {
    padding-top: 18px;
    margin-bottom: 0;
}

.home-leader-title {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-bottom: 8px;

    font-size: 18px;
    line-height: 1.2;

    font-weight: 900;
    letter-spacing: .2px;

    color: #111827;
}

.home-leader-title-emoji {
    font-size: 17px;
    line-height: 1;
}

.leader-card {
    display: grid;

    grid-template-columns:
        40px
        1fr
        auto;

    align-items: center;

    width: 100%;
    gap: 11px;

    padding: 15px;
    margin-top: 8px;

    background: #111827;

    border: 0;
    border-radius: 17px;

    color: white;

    text-align: left;

    cursor: pointer;

    box-shadow:
        0 7px 20px rgba(15,23,42,.12);
}

.leader-badge {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border-radius: 12px;

    background: rgba(255,255,255,.1);

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

.leader-main {
    min-width: 0;
}

.leader-main strong {
    display: block;
    font-size: 14px;
}

.leader-main span {
    display: block;

    margin-top: 4px;

    overflow: hidden;

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

    font-size: 9px;
    color: #aeb6c3;
}

.leader-stats {
    text-align: right;
}

.leader-stats strong {
    display: block;
    font-size: 19px;
}

.leader-stats small {
    display: block;

    margin-top: 2px;

    font-size: 9px;
    color: #aeb6c3;
}

.update-card {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 13px;
    margin-bottom: 8px;

    background: white;

    border: 1px solid #e7e9ed;
    border-radius: 14px;

    cursor: default !important;

    transform: none !important;
    transition: none !important;
}

.update-card:hover,
.update-card:active,
.update-card:focus {
    transform: none !important;
}

.update-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    background: #f3f4f6;

    border-radius: 11px;

    font-size: 18px;
}

.update-card strong {
    display: block;
    font-size: 12px;
}

.award-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 14px 15px;
    margin-bottom: 8px;

    background: white;

    border: 1px solid #e7e9ed;
    border-radius: 14px;
}

.award-card strong {
    font-size: 12px;
}

.award-card span {
    font-size: 10px;
    color: #6b7280;
    text-align: right;
}


/* CONTROLS */

label {
    display: block;

    margin: 13px 0 6px;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .7px;

    color: #8a94a6;
}

.dropdown {
    width: 100%;

    padding: 12px 13px;
    margin-bottom: 3px;

    background: white;

    border: 1px solid #e1e5ea;
    border-radius: 11px;

    outline: none;

    font-size: 12px;
    color: #111827;
}


/* LEAGUE */

.league-list {
    padding: 12px 16px 0;
}

.league-row {
    display: grid;

    grid-template-columns:
        34px
        1fr
        64px;

    align-items: center;

    width: 100%;
    min-height: 82px;

    padding: 10px 18px;

    background: white;

    border: 0;
    border-bottom: 1px solid #edf0f3;

    text-align: left;

    cursor: pointer;
}

.league-row:first-child {
    border-radius: 14px 14px 0 0;
}

.league-row:last-child {
    border-radius: 0 0 14px 14px;
    border-bottom: 0;
}

.league-row.selected-player {
    background: #eef2f5;
}

.league-row.selected-player .position {
    color: #111827;
}

.position {
    font-size: 11px;
    font-weight: 800;
    color: #8a94a6;
    padding-left: 2px;
}

.league-player {
    min-width: 0;
}

.league-player > strong {
    display: block;
    font-size: 14px;
}

.league-player > small {
    display: block;

    margin-top: 4px;

    overflow: hidden;

    font-size: 10px;
    color: #8a94a6;
}

.two-line-teams {
    display: flex !important;
    flex-direction: column;
    gap: 2px;

    line-height: 1.2;

    white-space: normal !important;
    text-overflow: clip !important;
}

.two-line-teams span {
    display: block;
}

.league-record {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-top: 8px;

    font-size: 10px;
    font-weight: 700;

    color: #737d8d;
}

.movement {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    min-width: 36px;
    margin-right: 7px;

    font-weight: 900;
}

.movement-arrow {
    font-size: 17px;
    line-height: 10px;
    font-weight: 1000;
}

.movement.up {
    color: #16a34a;
}

.movement.down {
    color: #dc2626;
}

.movement.same {
    color: #9ca3af;
}

.record-stat {
    white-space: nowrap;
}

.league-stats {
    padding-right: 10px;
    text-align: right;
}

.league-stats strong {
    display: block;
    font-size: 18px;
}

.league-stats small {
    display: block;

    margin-top: 3px;

    font-size: 9px;
    color: #8a94a6;
}


/* FIXTURES / RESULTS MATCHUP */

.fixture-matchup,
.result-matchup {
    display: grid;

    grid-template-columns:
        1fr
        28px
        1fr;

    align-items: center;

    gap: 8px;

    margin-top: 0;
    margin-bottom: 14px;

    padding: 15px;

    background: #111827;

    border-radius: 16px;

    color: white;
}

.gameweek-header {
    margin-bottom: 12px;
}

.fixture-player {
    min-width: 0;
}

.fixture-player strong {
    display: block;
    font-size: 13px;
}

.fixture-player small {
    display: block;

    margin-top: 5px;

    overflow: hidden;

    font-size: 9px;
    color: #aeb6c3;
}

.fixture-player.opponent {
    text-align: right;
}

.fixture-vs,
.result-vs {
    font-size: 8px;
    font-weight: 900;

    text-align: center;

    color: #8d97a6;
}

.fixture-team-list {
    display: flex;

    flex-direction: column;

    gap: 2px;

    line-height: 1.2;
}

.fixture-team-list span {
    display: block;
}


.fixture-detail-section,
.result-detail-section {
    padding-top: 12px;
}

.fixture-detail-card,
.result-detail-card {
    padding: 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    box-shadow: 0 4px 14px rgba(15,23,42,.04);
}

.fixture-detail-card .fixture-matchup {
    margin-bottom: 12px;
}

/* FIXTURE COLUMNS */

.fixture-grid,
.result-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;
}

.fixture-column {
    min-width: 0;
}

.fixture-column-title,
.result-column-title {
    display: block;

    margin-bottom: 6px;

    font-size: 8px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: .6px;

    color: #9ca3af;
}

.fixture-item {
    display: flex;

    flex-direction: column;

    gap: 3px;

    padding: 10px 9px;
    margin-bottom: 5px;

    border-radius: 9px;
}

.fixture-item strong {
    font-size: 10px;
}

.fixture-item span {
    font-size: 9px;
    color: #737d8d;
}

.fixture-item.my-team {
    background: #eef2f5;

    border-left:
        4px solid #111827;

    box-shadow:
        0 2px 8px rgba(15,23,42,.04);
}

.fixture-item.opponent-team {
    background: #f7f7f8;

    border-left:
        4px solid #c4c9d1;
}

.fixture-column .fixture-item {
    min-height: 42px;
}


/* EMPTY */

.empty-card {
    padding: 40px 15px;

    background: white;

    border-radius: 15px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


/* LOOK AHEAD */

.upcoming-section {
    padding-top: 28px;
}

.five-week-scroll {
    display: flex;

    gap: 12px;

    overflow-x: auto;

    padding: 3px 2px 14px;

    margin-right: -16px;

    scrollbar-width: none;

    scroll-snap-type: x mandatory;
}

.five-week-scroll::-webkit-scrollbar {
    display: none;
}

.lookahead-card {
    flex: 0 0 310px;

    padding: 16px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 17px;

    box-shadow:
        0 4px 14px rgba(15,23,42,.05);

    scroll-snap-align: start;
}

.lookahead-gw {
    margin-bottom: 10px;

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

    letter-spacing: .8px;

    color: #8a94a6;
}

.lookahead-names {
    display: grid;

    grid-template-columns:
        1fr
        20px
        1fr;

    align-items: center;

    gap: 5px;

    padding-bottom: 14px;

    border-bottom:
        1px solid #edf0f3;

    text-align: center;
}

.lookahead-names strong {
    font-size: 12px;
}

.lookahead-names span {
    font-size: 9px;
    color: #9ca3af;
}

.lookahead-side {
    margin-top: 13px;
}

.lookahead-label {
    display: block;

    margin-bottom: 6px;

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .7px;
    text-transform: uppercase;

    color: #9ca3af;
}

.lookahead-fixture {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 8px;

    padding: 8px 9px;
    margin-bottom: 5px;

    border-radius: 8px;
}

.lookahead-fixture strong {
    font-size: 10px;
}

.lookahead-fixture small {
    font-size: 9px;

    color: #737d8d;

    text-align: right;
}

.lookahead-fixture.my-team {
    background: #f1f5f9;

    border-left:
        3px solid #111827;
}

.opponent-lookahead {
    margin-top: 15px;
}

.lookahead-fixture.opponent-team {
    background: #fafafa;

    border-left:
        3px solid #d1d5db;
}

.opponent-team strong {
    color: #5f6877;
}


/* RESULTS */

.result-matchup {
    margin-top: 0;
}

.result-matchup .eyebrow {
    color: #aeb6c3;
}

.opponent-name {
    text-align: right;
}

.result-column-title {
    margin-bottom: 7px;
}

.result-team {
    padding: 10px;
    margin-bottom: 6px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 10px;

    transition: none;
}

.result-team-header {
    display: flex;

    flex-direction: column;

    gap: 3px;
}

.result-team-header strong {
    font-size: 10px;
}

.result-team-header small {
    font-size: 8px;
    color: #8a94a6;
}

.result-score {
    margin-top: 7px;

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

.result-stats {
    margin-top: 5px;

    font-size: 9px;

    color: #737d8d;
}

.result-stats span {
    margin-left: 2px;
}

.result-team.result-w {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.result-team.result-l {
    background: #fef2f2;
    border-color: #fecaca;
}

.result-team.result-d {
    background: #fffbeb;
    border-color: #fde68a;
}


/* IMPACT */

.impact-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;

    margin-top: 10px;
}

.impact-card {
    padding: 13px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 13px;
}

.impact-card span {
    display: block;

    margin-bottom: 7px;

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .7px;

    color: #9ca3af;
}

.impact-card strong {
    display: block;

    font-size: 10px;

    line-height: 1.4;
}

.result-impact-card {
    position: relative;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #111827 0%,
            #1f2937 100%
        );

    border-color: #111827;

    color: white;

    box-shadow:
        0 5px 16px rgba(15,23,42,.12);
}

.result-impact-card::after {
    content: "↗";

    position: absolute;

    top: 9px;
    right: 11px;

    font-size: 18px;
    font-weight: 900;

    color: rgba(255,255,255,.18);
}

.result-impact-card span {
    color: #aeb6c3;
}

.result-impact-card strong {
    color: white;
    font-size: 12px;
}


/* PLAYER PROFILE */

.back-button {
    margin: 18px 16px 0;

    padding: 0;

    border: 0;

    background: none;

    color: #737d8d;

    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}

.player-header {
    margin-top: 14px;

    padding: 22px 16px 20px;

    background: #111827;

    color: white;
}

.player-header h2 {
    font-size: 24px;
}

.player-summary {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;

    margin-top: 18px;
}

.player-summary > div {
    padding: 11px;

    background:
        rgba(255,255,255,.07);

    border-radius: 11px;
}

.player-summary strong {
    display: block;
    font-size: 17px;
}

.player-summary small {
    display: block;

    margin-top: 3px;

    font-size: 8px;

    color: #aeb6c3;
}

.profile-fixture-card {
    padding: 14px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 16px;

    box-shadow:
        0 4px 14px rgba(15,23,42,.05);
}

.profile-fixture-meta {
    margin-bottom: 8px;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: .8px;

    color: #8a94a6;
}

.profile-fixture-card .fixture-matchup {
    margin-bottom: 12px;
}

.profile-last-result {
    padding: 14px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 15px;

    box-shadow:
        0 4px 14px rgba(15,23,42,.04);
}

.profile-last-result-heading strong {
    display: block;

    margin-top: 4px;

    font-size: 13px;
}

.profile-last-result .impact-grid {
    margin-top: 12px;
}

.profile-five-week-scroll {
    margin-right: -16px;
}

.team-list {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;

    margin-top: 10px;
}

.team-card {
    padding: 13px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

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

.stat-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 8px;

    margin-top: 10px;
}

.stat-card {
    padding: 14px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 13px;
}

.stat-card strong {
    display: block;

    font-size: 20px;
}

.stat-card span {
    display: block;

    margin-top: 4px;

    font-size: 8px;

    color: #8a94a6;
}


/* POSITION CHART */

.line-chart {
    margin-top: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.position-chart-wrap {
    width: 100%;
}

.position-chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #eef0f3;
}

.position-chart-scroll::-webkit-scrollbar {
    height: 8px;
}

.position-chart-scroll::-webkit-scrollbar-track {
    background: #eef0f3;
    border-radius: 8px;
}

.position-chart-scroll::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 8px;
}

.position-svg {
    display: block;
    width: auto;
    min-width: 500px;
    height: 210px;
}

.chart-grid {
    stroke: #edf0f3;
    stroke-width: 1;
}

.chart-axis {
    fill: #9ca3af;
    font-size: 9px;
}

.chart-line {
    fill: none;
    stroke: #111827;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-point {
    fill: #111827;
    cursor: pointer;
    outline: none;
}

.chart-point:focus {
    stroke: #111827;
    stroke-width: 2;
    stroke-opacity: .35;
}

.chart-tooltip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 30px;
    margin-top: 5px;
    padding: 7px 10px;
    border-radius: 9px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 9px;
    text-align: center;
}

.chart-tooltip strong {
    color: #111827;
    font-size: 10px;
}

.chart-tooltip.visible {
    background: #eef2f5;
}

.chart-empty {
    padding: 35px 10px;
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
}


/* MINI LEAGUE */

.card {
    margin-top: 10px;

    background: white;

    border:
        1px solid #e5e7eb;

    border-radius: 14px;

    overflow: hidden;
}

.mini-league-row {
    display: grid;

    grid-template-columns:
        30px
        1fr
        40px
        35px;

    align-items: center;

    width: 100%;

    padding: 11px 12px;

    border: 0;

    border-bottom:
        1px solid #edf0f3;

    background: white;

    text-align: left;

    cursor: pointer;
}

.mini-league-row:last-child {
    border-bottom: 0;
}

.mini-position {
    font-size: 9px;

    color: #9ca3af;

    font-weight: 800;
}

.mini-league-row strong {
    font-size: 10px;
}

.mini-record {
    font-size: 8px;

    color: #8a94a6;
}

.mini-points {
    text-align: right;

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

.mini-league-row.current-player {
    background: #eef2f5;
}

.mini-league-row.current-player strong {
    color: #111827;
}


/* REMAINING FIXTURES */

.remaining-section {
    padding-top: 28px;
}

.remaining-list {
    margin-top: 12px;
    max-height: 286px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #eef0f3;
}

.remaining-list::-webkit-scrollbar {
    width: 8px;
}

.remaining-list::-webkit-scrollbar-track {
    background: #eef0f3;
    border-radius: 8px;
}

.remaining-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 8px;
}

.remaining-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    width: 100%;

    padding: 13px 14px;

    border: 0;

    border-bottom:
        1px solid #edf0f3;

    background: white;

    text-align: left;

    color: #172033;
}

.remaining-row:last-child {
    border-bottom: 0;
}

.remaining-row strong {
    min-width: 34px;

    font-size: 10px;

    color: #8a94a6;
}

.remaining-row span {
    flex: 1;

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

.remaining-row em {
    color: #9ca3af;

    font-style: normal;
    font-weight: 700;
}

.remaining-row:active {
    background: #f7f8fa;
}


/* SEASON RESULTS */

.season-results-list {
    margin-top: 12px;
    max-height: 286px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #eef0f3;
}

.season-results-list::-webkit-scrollbar {
    width: 8px;
}

.season-results-list::-webkit-scrollbar-track {
    background: #eef0f3;
    border-radius: 8px;
}

.season-results-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 8px;
}

.season-result-row {
    display: grid;

    grid-template-columns:
        38px
        1fr
        30px;

    gap: 3px 8px;

    width: 100%;

    padding: 12px 14px;

    border: 0;

    border-bottom:
        1px solid #edf0f3;

    background: white;

    text-align: left;
}

.season-result-row:last-child {
    border-bottom: 0;
}

.season-result-row span {
    grid-row: 1 / span 2;

    font-size: 9px;

    font-weight: 900;

    color: #9ca3af;
}

.season-result-row strong {
    font-size: 10px;
}

.season-result-row small {
    font-size: 9px;
    color: #737d8d;
}

.season-result-row.active {
    background: #eef2f5;
}

.season-result-row strong em {
    font-style: normal;
    color: #9ca3af;
    font-weight: 700;
}

.season-result-status {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    font-size: 8px !important;
    font-weight: 900 !important;
    color: #9ca3af !important;
}


/* GENERAL SPACING */

.section > h2 + .page-controls {
    margin-top: 14px;
}

.section > h2 + .dropdown {
    margin-top: 14px;
}

.section > h2 + .profile-fixture-card,
.section > h2 + .five-week-scroll,
.section > h2 + .profile-last-result,
.section > h2 + .team-list,
.section > h2 + .stat-grid,
.section > h2 + .line-chart,
.section > h2 + .card {
    margin-top: 12px;
}

.upcoming-section .five-week-scroll {
    margin-top: 12px;
}

.section > h2 + .dropdown,
.section > h2 + .page-controls,
.section > h2 + label {
    margin-top: 14px;
}


/* HOME PLAYER SELECTOR */

.home-player-selector {
    padding-bottom: 0;
}

.home-player-selector .home-leader-title {
    margin-bottom: 0;
    font-size: 18px;
}

.home-player-selector .dropdown {
    margin-top: 5px;
}


/* FINAL HEADING / SPACING ALIGNMENT */

.home-leader-section {
    margin-bottom: 0;
}

.home-leader-title {
    font-size: 18px;
    line-height: 1.2;
}

.home-leader-title-emoji {
    font-size: 17px;
}

.remaining-section h2,
.upcoming-section h2 {
    margin-bottom: 0;
}


/* MOBILE */

@media (max-width: 360px) {

    .league-row {
        grid-template-columns:
            30px
            1fr
            58px;

        padding-left: 14px;
        padding-right: 14px;
    }

    .league-record {
        gap: 8px;
    }

    .leader-card {
        grid-template-columns:
            36px
            1fr
            auto;

        padding: 13px;
    }

    .leader-badge {
        width: 36px;
        height: 36px;
    }

    .lookahead-card {
        flex-basis: 290px;
    }

}


/* LARGER PHONES */

@media (min-width: 390px) {

    .fixture-column .fixture-item {
        display: grid;

        grid-template-columns:
            1fr
            1fr;

        align-items: center;

        column-gap: 6px;
    }

    .fixture-column .fixture-item span {
        text-align: right;
    }

}


/* LATEST REQUESTS */

.home-player-selector .home-leader-title,
.home-leader-section .home-leader-title {
    font-weight: 900;
}

.leader-team-list {
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    line-height: 1.25;
}

.leader-team-list span {
    display: block;
}

.player-selector-info {
    margin: 8px 1px 0;
    font-size: 9px;
    line-height: 1.45;
    color: #8a94a6;
}

.home-player-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.home-player-summary > div {
    min-width: 0;
    text-align: center;
}

.home-player-summary strong {
    display: block;
    font-size: 15px;
    line-height: 1.15;
}

.home-player-summary span {
    display: block;
    margin-top: 4px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8a94a6;
}


/* SEASON AWARD DESCRIPTIONS */

.award-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.award-description {
    display: block;
    margin-top: 4px;
    font-size: 8px;
    line-height: 1.35;
    color: #9ca3af;
}

.award-card > span {
    flex-shrink: 0;
}


/* RESULTS TOTAL / LEAGUE IMPACT */

.result-impact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.result-total-card {
    min-width: 0;
}

.total-comparison {
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
    align-items: center;
    gap: 4px;
}

.total-comparison > div {
    min-width: 0;
}

.total-comparison strong {
    display: inline;
    font-size: 18px;
    line-height: 1;
}

.total-comparison small {
    display: inline;
    margin-left: 3px;
    font-size: 7px;
    font-weight: 900;
    color: #9ca3af;
}

.total-comparison em {
    display: block;
    margin-top: 5px;
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
    color: #737d8d;
}

.total-vs {
    text-align: center;
    font-size: 8px;
    font-weight: 900;
    color: #9ca3af;
}

.result-impact-grid .result-impact-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
}

.result-impact-grid .result-impact-card strong {
    font-size: 14px;
}


/* =========================================================
   STAGE UPDATE — RESULT / PROFILE / HOME POLISH
========================================================= */

/* Keep the This Week emoji optically centred inside its tile. */
.update-icon {
    align-self: center;
    line-height: 1;
    text-align: center;
}

/* Home player profile action. */
.profile-button {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 11px 13px;
    border: 1px solid #e1e5ea;
    border-radius: 11px;
    background: #111827;
    color: white;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.profile-button:active {
    transform: translateY(1px);
}

/* All eight result cards share identical dimensions. */
.result-grid > div {
    display: grid;
    grid-template-rows: auto repeat(4, minmax(74px, 1fr));
    gap: 6px;
    min-width: 0;
}

.result-grid .result-team {
    min-height: 74px;
    height: 100%;
    margin-bottom: 0;
}


.result-detail-card .result-grid {
    margin-top: 4px;
}

.result-detail-card .result-column-title {
    text-align: left;
}

.result-detail-card .result-opponent-column .result-column-title,
.result-detail-card .result-opponent-column .result-team {
    text-align: right;
}

.result-detail-card .result-opponent-column .result-team-header {
    text-align: right;
}

.result-detail-card .result-opponent-column .result-stats {
    justify-content: flex-end;
}

.result-total-opponent {
    text-align: right;
}

.result-detail-card .result-total-card {
    padding: 12px;
}

/* Two individual Total cards, followed by one full-width League Impact card. */
.result-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.result-summary-grid .result-total-card,
.profile-result-totals .impact-card {
    min-width: 0;
}

.result-total-card > span,
.profile-result-totals .impact-card > span {
    display: block;
    margin-bottom: 8px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .55px;
    color: #9ca3af;
}

.result-total-card > strong,
.profile-result-totals .impact-card > strong {
    display: block;
    font-size: 17px;
    line-height: 1.1;
}

.result-total-card > small,
.profile-result-totals .impact-card > small {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    font-weight: 800;
    color: #737d8d;
}

.result-impact-full {
    margin-top: 8px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.league-impact-result {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 0;
    margin-top: 5px;
    text-align: center;
}

.league-impact-result > strong {
    grid-column: auto;
}

.league-impact-values {
    display: contents;
}


.league-impact-result > strong {
    font-size: 18px !important;
    letter-spacing: .3px;
}

.league-impact-values span {
    color: white !important;
    font-size: 12px !important;
    font-weight: 900;
}

/* Player profile uses the same result-summary treatment. */
.profile-result-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.profile-last-result .result-impact-full {
    margin-top: 8px;
}

@media (max-width: 380px) {
    .league-impact-result {
        gap: 8px;
    }

    .league-impact-values {
        gap: 7px;
    }

    .league-impact-values span {
        font-size: 10px !important;
    }
}

/* =========================================================
   STAGE UPDATE — LEAGUE LAYOUT / GUIDANCE / PROFILE RETURN
========================================================= */

.page-info-text {
    margin: 6px 0 10px;
    font-size: 9px;
    line-height: 1.45;
    color: #8a94a6;
}

/* Keep the league row structure, but place the four clubs between
   the player block and the points block. */
.league-row {
    grid-template-columns: 34px minmax(118px, 1fr) minmax(132px, 1.15fr) 64px;
    column-gap: 10px;
}

.league-player {
    align-self: center;
}

.league-player > strong {
    display: block;
}

.league-record {
    margin-top: 8px;
    gap: 9px;
}

.league-teams {
    min-width: 0;
    align-self: center;
    margin: 0;
    overflow: visible;
    font-size: 9px;
    color: #8a94a6;
}

.league-teams span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The helper copy sits close to its heading, then leaves breathing
   room before the dropdown/list/card underneath. */
.section > h2 + .page-info-text {
    margin-top: 6px;
}

.page-info-text + .dropdown,
.page-info-text + .season-results-list,
.page-info-text + .remaining-list,
.page-info-text + .card {
    margin-top: 10px;
}

/* Coming Up Next uses the same section-heading rhythm as the other
   fixture sections while keeping the whole GW detail inside its box. */
.fixture-detail-section > h2 {
    margin-bottom: 12px;
}

/* League Impact is deliberately clean: no decorative corner arrow,
   no separate label above the three evenly-spaced values. */
.result-impact-card::after {
    content: none !important;
    display: none !important;
}

.result-impact-full .league-impact-result {
    margin-top: 0;
}

/* Make the profile back control generic because it can return to
   Home, League, Fixtures or Results. */
.back-button {
    min-height: 28px;
}

@media (max-width: 430px) {
    .league-row {
        grid-template-columns: 28px minmax(96px, 1fr) minmax(105px, 1.08fr) 52px;
        column-gap: 7px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .league-player > strong {
        font-size: 12px;
    }

    .league-record {
        gap: 6px;
        font-size: 9px;
    }

    .movement {
        min-width: 30px;
        margin-right: 2px;
    }

    .league-teams {
        font-size: 8px;
    }

    .league-stats strong {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .league-row {
        grid-template-columns: 25px minmax(90px, 1fr) minmax(93px, 1fr) 48px;
        column-gap: 5px;
    }

    .league-record {
        gap: 4px;
    }

    .record-stat {
        font-size: 8px;
    }
}


/* LEAGUE IMPACT — screenshot-style three-column layout */
.result-impact-full { min-height: 102px; }
.result-impact-full .league-impact-result {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center; width: 100%; margin: 0; text-align: center;
}
.result-impact-full .league-impact-stat {
    display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0;
}
.result-impact-full .league-impact-stat strong {
    display: block; margin: 0; color: #fff; font-size: 16px !important; font-weight: 900; line-height: 1.1; letter-spacing: 0;
}
.result-impact-full .league-impact-stat small {
    display: block; margin-top: 7px; color: #aeb6c3; font-size: 8px; font-weight: 900; line-height: 1; letter-spacing: .7px; text-transform: uppercase;
}


/* =========================================================
   STAGE UPDATE - RULES / SCROLLABLE LEAGUE / PROFILE LINKS
========================================================= */

.bottom-nav.standalone-hidden {
    display: none;
}

.rules-entry-wrap {
    margin: 8px 16px 0;
}

.rules-entry-button {
    margin-top: 0;
}

.rules-page {
    padding: 14px 16px 36px;
}

.rules-back-button {
    margin-bottom: 12px;
}

.rules-hero {
    padding: 22px 18px;
    margin-bottom: 12px;
    background: #111827;
    border-radius: 16px;
    color: white;
}

.rules-hero h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -.5px;
}

.rules-hero p {
    margin-top: 8px;
    color: #c7ced8;
    font-size: 11px;
}

.rules-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}

.rules-summary-card {
    padding: 12px 6px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: white;
    text-align: center;
}

.rules-summary-card strong {
    display: block;
    font-size: 15px;
    color: #111827;
}

.rules-summary-card span {
    display: block;
    margin-top: 3px;
    font-size: 8px;
    font-weight: 800;
    color: #8a94a6;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rules-section-card {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #e1e5ea;
    border-radius: 14px;
    background: white;
}

.rules-section-card h2 {
    margin-bottom: 8px;
}

.rules-section-card p {
    font-size: 10.5px;
}

.rules-score-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 12px 0;
}

.rules-score-strip > div {
    padding: 11px 8px;
    border-radius: 11px;
    background: #f5f7fa;
    text-align: center;
}

.rules-score-strip strong,
.rules-score-strip span {
    display: block;
}

.rules-score-strip strong {
    font-size: 17px;
}

.rules-score-strip span {
    margin-top: 2px;
    font-size: 8px;
    font-weight: 900;
    color: #8a94a6;
    text-transform: uppercase;
}

.rules-award-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f3;
}

.rules-award-row:last-child {
    border-bottom: 0;
}

.rules-award-row > div {
    min-width: 0;
}

.rules-award-row strong,
.rules-award-row span {
    display: block;
}

.rules-award-row strong {
    font-size: 11px;
}

.rules-award-row span {
    margin-top: 3px;
    color: #7d8796;
    font-size: 9px;
    line-height: 1.35;
}

.rules-award-row b {
    flex: 0 0 auto;
    font-size: 12px;
}

.rules-prize-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-top: 10px;
}

.rules-prize-grid > div {
    display: flex;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 9px;
    background: #f5f7fa;
    font-size: 10px;
}

.rules-prize-grid span {
    color: #737d8d;
    font-weight: 800;
}

.rules-note {
    margin-top: 10px !important;
    font-style: italic;
}

.faq-item {
    border-top: 1px solid #edf0f3;
}

.faq-item:first-of-type {
    margin-top: 8px;
}

.faq-item summary {
    padding: 12px 0;
    font-size: 10.5px;
    font-weight: 850;
    color: #172033;
    cursor: pointer;
}

.faq-item p {
    margin: -3px 0 12px;
}

/* Approximately six league rows visible at a time, with an explicit scrollbar. */
.league-scroll-list {
    margin: 12px 16px 0;
    padding: 0;
    max-height: 492px;
    overflow-y: scroll;
    overflow-x: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: white;
    scrollbar-width: auto;
    scrollbar-color: #9ca3af #eef0f3;
}

.league-scroll-list::-webkit-scrollbar {
    width: 9px;
}

.league-scroll-list::-webkit-scrollbar-track {
    background: #eef0f3;
}

.league-scroll-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 8px;
    border: 2px solid #eef0f3;
}

.league-scroll-list .league-row:last-child {
    border-bottom: 0;
}

/* Remaining fixtures: current position is secondary and right aligned. */
.remaining-row .remaining-player-name {
    flex: 1;
    min-width: 0;
}

.remaining-row .remaining-current-pos {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 9px;
    text-align: right;
    white-space: nowrap;
}

/* Right-aligned actions beside the profile section headings. */
.profile-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.profile-section-heading .eyebrow {
    margin-bottom: 6px;
}

.section-link-button {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid #e1e5ea;
    border-radius: 9px;
    background: white;
    color: #172033;
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.section-link-button:active {
    background: #f5f7fa;
}

/* =========================================================
   NEXT STAGE - FORM / HIGHLIGHTS / RULE DETAILS / JUMP
========================================================= */
.home-example-note {
    margin: 8px 2px 0;
    color: #7d8797;
    font-size: 9px;
    line-height: 1.45;
    text-align: center;
}

.form-stream {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #e4e8ed;
    border-radius: 14px;
    background: #fff;
}
.form-stream-label {
    color: #8a94a6;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .9px;
}
.form-stream-results {
    display: flex;
    gap: 7px;
}
.form-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(15,23,42,.12);
}
.form-w { background: #16a34a; }
.form-d { background: #94a3b8; }
.form-l { background: #dc2626; }
.form-stream-empty {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px dashed #d8dde5;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.result-impact-full {
    min-height: 76px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.result-impact-full .league-impact-stat small {
    margin-top: 5px !important;
}
.profile-last-result .result-impact-full {
    min-height: 76px !important;
}

.highlights-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 10px 0 8px;
    scroll-snap-type: x proximity;
}
.highlights-scroll::-webkit-scrollbar { height: 7px; }
.highlights-scroll::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 99px;
}
.highlight-result-card {
    flex: 0 0 94%;
    max-width: 455px;
    scroll-snap-align: start;
    padding: 14px;
    border: 1px solid #e2e7ed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15,23,42,.05);
}
.highlight-result-card.best { border-top: 3px solid #16a34a; }
.highlight-result-card.worst { border-top: 3px solid #dc2626; }
.highlight-card-top {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 10px;
}
.highlight-card-top > div {
    display: flex;
    flex-direction: column;
}
.highlight-impact-badge {
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
}
.impact-w { background: #16a34a; }
.impact-d { background: #94a3b8; }
.impact-l { background: #dc2626; }
.highlight-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 10px;
}
.highlight-matchup strong:last-child { text-align: right; }
.highlight-matchup span {
    color: #9ca3af;
    font-size: 8px;
    font-weight: 900;
}
.highlight-teams-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.highlight-team-row {
    min-height: 42px;
    margin-bottom: 5px;
    padding: 7px;
    border-radius: 10px;
    background: #f6f8fb;
}
.highlight-team-row > div {
    display: flex;
    flex-direction: column;
}
.highlight-team-row strong { font-size: 8px; }
.highlight-team-row small,
.highlight-team-row span,
.highlight-team-row b { font-size: 7px; }
.highlight-team-row span,
.highlight-team-row b {
    display: inline-block;
    margin-top: 3px;
}
.highlight-team-row.right { text-align: right; }
.highlight-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 7px;
}
.highlight-totals > div {
    display: grid;
    padding: 8px;
    border-radius: 10px;
    background: #eef2f7;
}
.highlight-totals > div:last-child { text-align: right; }
.highlight-totals span,
.highlight-totals small {
    color: #7c8798;
    font-size: 7px;
    font-weight: 800;
}
.highlight-totals strong { font-size: 11px; }
.highlight-impact-strip {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    margin-top: 8px;
    padding: 10px 8px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    text-align: center;
}
.highlight-impact-strip > div {
    display: flex;
    flex-direction: column;
}
.highlight-impact-strip strong { font-size: 11px; }
.highlight-impact-strip small {
    margin-top: 3px;
    color: #aeb6c3;
    font-size: 7px;
    font-weight: 900;
}
.highlight-tbc {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 900;
}

.league-jump-button { margin-top: 9px; }
.league-record {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 3px !important;
}
.league-movement-line,
.league-wdl-line {
    display: flex;
    align-items: center;
}
.league-wdl-line { gap: 8px; }
.jump-flash { animation: jumpFlash .9s ease; }
@keyframes jumpFlash {
    0%, 100% { box-shadow: none; }
    35% { box-shadow: inset 0 0 0 2px #111827; background: #eef2ff; }
}

.rules-form-button {
    display: block;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
}
.seeded-pots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}
.seeded-pot,
.small-print-details {
    border: 1px solid #e1e6ec;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
}
.seeded-pot summary,
.small-print-details summary {
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    font-size: 9px;
    font-weight: 900;
}
.seeded-pot summary::-webkit-details-marker,
.small-print-details summary::-webkit-details-marker { display: none; }
.seeded-pot summary::after,
.small-print-details summary::after {
    content: "＋";
    float: right;
    color: #8a94a6;
}
.seeded-pot[open] summary::after,
.small-print-details[open] summary::after { content: "−"; }
.seeded-pot-clubs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px 11px;
}
.seeded-pot-clubs span {
    padding-top: 6px;
    border-top: 1px solid #e8ecf1;
    color: #596477;
    font-size: 9px;
}
.small-print-details { margin-top: 12px; }
.small-print-body { padding: 0 12px 10px; }
.small-print-body p { margin-top: 6px; }
.awards-small-print { margin-top: 10px; }

@media (max-width: 390px) {
    .seeded-pots-grid { grid-template-columns: 1fr; }
    .highlight-result-card { flex-basis: 96%; }
}


/* === Stage: share cards and layout refinements === */
.page-profile-button,
.share-card-button { margin-top: 10px; }

/* League: position + movement together, W/D/L under name */
.league-position-block {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 62px;
}
.league-position-block .position { padding-left: 0; }
.league-position-movement .movement { margin: 0; gap: 2px; font-size: 8px; }
.league-position-movement .movement-arrow { font-size: 10px; }
.league-player .league-record { display:block !important; margin-top:6px; }
.league-wdl-line { display:flex !important; gap:10px; }
.league-row { grid-template-columns: 68px minmax(112px,1fr) minmax(120px,1.05fr) 58px !important; }

/* Player teams: subtle seeded-card colour */
.team-card-1 { background:#eef4ff !important; border-color:#d7e4ff !important; }
.team-card-2 { background:#edf9f1 !important; border-color:#d5efdc !important; }
.team-card-3 { background:#fff6e6 !important; border-color:#f5e4bf !important; }
.team-card-4 { background:#f5efff !important; border-color:#e5d9fa !important; }

/* Highlight cards behave like the Next 5 horizontal cards */
.highlights-scroll { gap:10px; scroll-snap-type:x mandatory; padding-right:16px; }
.highlight-result-card { flex:0 0 88%; max-width:none; scroll-snap-align:start; }
.highlight-team-row.result-w { background:#e9f8ef !important; border:1px solid #cbeed6; }
.highlight-team-row.result-d { background:#fff7df !important; border:1px solid #f4e6b4; }
.highlight-team-row.result-l { background:#fdecec !important; border:1px solid #f5cece; }

/* Current leader: three centred columns distributed evenly */
.leader-card {
    grid-template-columns: 1fr 2fr 1fr !important;
    text-align:center !important;
    gap:0 !important;
}
.leader-badge { width:auto !important; justify-self:center; }
.leader-main { text-align:center !important; align-items:center !important; }
.leader-team-list { align-items:center !important; }
.leader-stats { text-align:center !important; align-items:center !important; justify-self:center; }

@media (max-width: 430px) {
    .league-row { grid-template-columns: 62px minmax(105px,1fr) minmax(105px,1fr) 54px !important; padding-left:10px !important; padding-right:10px !important; }
    .league-wdl-line { gap:7px; }
    .highlight-result-card { flex-basis:92%; }
}


/* === Stage: final polish - seeded pairs, leader badge, league position === */
.seeded-pots-grid { align-items: start; }

/* Restore the leader position as a proper square while keeping the centred 3-column layout */
.leader-badge {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    border-radius: 12px;
    justify-self: center;
}

/* League: larger position with movement directly underneath */
.league-position-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 62px;
}
.league-position-block .position {
    padding-left: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
}
.league-position-movement {
    display: flex;
    justify-content: center;
    min-height: 12px;
}
.league-position-movement .movement {
    margin: 0 !important;
    gap: 2px !important;
    font-size: 8px !important;
    line-height: 1 !important;
}
.league-position-movement .movement-arrow { font-size: 9px !important; }
