/* The Champions — theme overrides. Load after component styles.
 * Responsive overrides remain next to their component groups to preserve cascade order.
 */

/* 01. Design tokens */

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-ext-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-ext-500-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-500-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-ext-600-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-600-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-ext-700-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-ext-800-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-latin-800-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Champions Brand';
    src: url('../fonts/manrope-latin-800-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

:root {
    --background: #000044;
    --surface: #071355;
    --surface-raised: #10226d;
    --surface-inset: #030b39;
    --border: #2b3e8c;
    --text: #ffffff;
    --muted: #bbc8ef;
    --accent: #ffffff;
    --accent-strong: #ffffff;
    --accent-hover: #dce7ff;
    --font-body: 'Manrope', Arial, sans-serif;
    --font-display: 'Manrope', Arial, sans-serif;
    --font-brand: 'Champions Brand', Arial, sans-serif;
    --font-numeric: var(--font-display);
    --font-numeric-weight: 700;
    --site-hero-min-height: 420px;
    --success: #5ae98e;
    --success-ink: #12452a;
    --draw: #ffd568;
    --draw-ink: #543800;
    --loss: #f1828c;
    --loss-ink: #561a26;
}

/* 02. Page background and typography */

/* Paint the page canvas, including the reserved scrollbar gutter. */
html {
    min-height: 100%;
    background:
        radial-gradient(ellipse 820px 560px at 8% 0, #00117d99, transparent 78%),
        radial-gradient(ellipse 920px 720px at 92% 0, #0039efaa, transparent 80%),
        var(--background);
    background-repeat: no-repeat;
}

body {
    background: transparent;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
}

h1,
h2 {
    font-weight: 700;
    letter-spacing: -.035em;
}

h1 {
    text-transform: none;
}

button,
select {
    font-family: inherit;
}

button {
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

/* 03. Header, brand and navigation */

body > header {
    min-height: 72px;
    padding-top: 14px;
    padding-bottom: 14px;
    background: #03094c88;
    border-bottom-color: #8baaff22;
}

body > header > a {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.04em;
    text-transform: none;
}

body > header > a::before {
    content: none;
    display: none;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
}

.site-brand__logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-brand__name {
    font-family: var(--font-brand);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.1;
    white-space: nowrap;
}

.site-brand:hover,
.site-footer-brand:hover {
    color: var(--button-hover-background);
    text-decoration: none;
}

.site-brand:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 5px;
    border-radius: 8px;
}

@media (max-width: 576px) {
    .site-brand {
        gap: 8px;
    }

    .site-brand__logo {
        width: 38px;
        height: 38px;
    }

    .site-brand__name {
        font-size: 19px;
    }
}

body > header nav#site-navigation {
    align-items: center;
    gap: 8px;
}

body > header nav .site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: #e1eaff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

body > header nav .site-nav-link:hover {
    border-color: #718ed977;
    background: #ffffff16;
    color: #ffffff;
    text-decoration: none;
}

body > header nav .site-nav-link:focus-visible {
    outline: 2px solid #a6c9ff;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    body > header nav#site-navigation {
        gap: 8px;
    }

    body > header nav .site-nav-link {
        font-size: 15px;
    }
}

/* 04. Shared page layout and buttons */

body > main {
    padding-top: 28px;
}

body > footer {
    border-color: #8baaff22;
    font-size: 13px;
}

button,
body > main > section:first-child > a {
    border-radius: 999px;
    background: var(--accent-strong);
    color: #071452;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

button:hover:not(:disabled),
body > main > section:first-child > a:hover {
    background: var(--accent-hover);
}

button:disabled {
    background: #14205c;
    border-color: var(--border);
    color: #bbc8ef;
}

select {
    border-color: var(--border);
    background: var(--surface-inset);
}

body > main > section {
    border-color: var(--border);
    border-radius: 22px;
    box-shadow: 0 12px 36px #00000014;
}

body > main > section:first-child {
    background: linear-gradient(145deg, #0728ac, #071976 55%, #030747);
}

body > main > section:first-child h1 {
    font-size: clamp(38px, 7vw, 76px);
}

body > main > nav a {
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
}

/* 05. Draft header and formation controls */

.game-page-header {
    align-items: center;
    margin-bottom: 22px;
}

.game-page-header h1 {
    font-size: 34px;
    line-height: 1.05;
}

.game-stage {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.game-controls {
    position: relative;
    padding: 16px 18px;
    border-radius: 16px;
    border-color: #7094f566;
    background: linear-gradient(120deg, #1739a6, #0b2587 55%, #07145e);
    box-shadow: inset 0 1px 0 #ffffff0a;
}

.game-controls label {
    color: #f3f6ff;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
    text-transform: none;
}

#squad-count {
    padding: 4px 10px;
    border: 1px solid #ffffff15;
    border-radius: 999px;
    background: #01072d66;
    color: #e0e9ff;
    font-size: 13px;
}

#game .game-formation-choices {
    gap: 7px;
    margin-top: 0;
}

#game .game-formation-choice {
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    background: var(--surface-inset);
    color: #f3f6ff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
}

#game .game-formation-choice:hover:not(:disabled) {
    background: #1c3284;
}

#game .game-formation-choice.is-selected,
#game .game-formation-choice.is-selected:hover:not(:disabled) {
    background: linear-gradient(145deg, #ffec33, #ffd400);
    color: #14251d;
    font-weight: 700;
}

#game .game-formation-choice:focus-visible {
    outline-color: var(--accent);
}

#game .game-formation-choice:disabled {
    opacity: .55;
}

#game .game-formation-choice.is-selected:disabled {
    opacity: 1;
}

/* 06. Draw panel and selectable players */

.game-draw {
    padding: 18px;
    border-radius: 22px;
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 12px 30px #00000012;
}

.game-draw h2,
.game-competition-squad-header h2 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.03em;
    text-transform: none;
}

.game-draw h2 {
    margin-bottom: 12px;
}

.game-competition-squad-header h2 {
    margin: 0;
}

.game-draw .game-draw-hint {
    font-size: 13px;
}

#game-status:not([hidden]),
.game-competition-status {
    color: #d1ddff;
}

.game-team-header {
    border-color: var(--border);
}

.game-team-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.game-team-header > span {
    font-size: 13px;
}

.game-team-player,
.game-team-player:disabled {
    border: 0;
    border-radius: 10px;
    background: var(--surface-raised);
}

.game-team-player {
    padding: 10px 11px;
    font-family: var(--font-body);
    letter-spacing: 0;
}

.game-team-player small {
    font-size: 13px;
    line-height: 1.4;
}

.game-team-player strong {
    font-size: 13px;
    font-weight: 500;
}

.game-team-player:hover:not(:disabled) {
    padding: 8px 9px;
    border: 2px solid #ffffff;
    background: #1c3284;
}

.game-team-player.is-selected {
    background: #24439e;
}

.game-player-rating {
    min-width: 30px;
    padding: 3px 5px;
    border-radius: 8px;
    background: #030b3966;
    color: var(--accent);
    font-size: 17px;
    font-weight: var(--font-numeric-weight);
    text-align: center;
}

.game-team-player:disabled {
    opacity: .48;
}

/* 07. Team ratings and pitch */

#draft-ratings[hidden] { display: none; }

.game-ratings {
    gap: 0;
    padding: 11px 0;
    border: 1px solid #7094f566;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: inset 0 1px 0 #ffffff0a;
}

.game-rating-card {
    padding: 0 11px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.game-rating-card + .game-rating-card {
    border-left: 1px solid #ffffff26;
}

.game-rating-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.game-rating-value {
    color: var(--accent);
    font-size: 29px;
    font-weight: var(--font-numeric-weight);
}

.game-rating-note {
    margin-bottom: 12px;
    font-size: 13px;
}

.game-pitch {
    border-color: #4a8863;
    border-radius: 22px;
    background: repeating-linear-gradient(to bottom, #174b34 0, #174b34 70px, #1e5a3e 70px, #1e5a3e 140px);
    box-shadow: inset 0 0 70px #002b1933;
}

.game-pitch::before {
    border: 2px solid #d5f0de66;
    width: 112px;
    height: 112px;
}

.game-pitch::after {
    border-top: 2px solid #d5f0de66;
}

.game-slot,
.game-slot:disabled {
    max-width: 124px;
    min-height: 94px;
    padding: 12px 6px;
    border-width: 1.5px;
    border-color: #709d8670;
    border-radius: 16px;
    background: #092019d9;
    font-family: var(--font-body);
    letter-spacing: 0;
    box-shadow: none;
}

.game-slot:not(.is-filled) {
    border-width: 2px;
    border-style: dashed;
}

.game-slot:not(.is-filled) .game-slot-position {
    font-size: 14px;
}

.game-slot-position {
    color: #a0bfaf;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
}

.game-slot.is-filled,
.game-slot.is-filled:disabled {
    cursor: pointer;
    background: linear-gradient(145deg, #ffffff 0%, #eaf3ff 56%, #c9dfff 100%);
    box-shadow: inset 0 1px 0 #ffffff, 0 6px 18px #00000036;
}

.game-slot.is-filled[data-position="GK"],
.game-slot.is-filled[data-position="GK"]:disabled {
    border-color: #ffe453;
    background: linear-gradient(145deg, #fff16a 0%, #ffdc12 58%, #efbf00 100%);
}

.game-slot.is-filled .game-slot-position {
    color: #35527c;
}

.game-slot.is-filled .game-slot-player {
    color: #102c5b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.game-slot.is-filled .game-slot-rating {
    color: #173b77;
    font-family: var(--font-numeric);
    font-size: 17px;
    font-weight: var(--font-numeric-weight);
}

.game-slot.is-filled[data-position="GK"] .game-slot-position,
.game-slot.is-filled[data-position="GK"] .game-slot-player,
.game-slot.is-filled[data-position="GK"] .game-slot-rating {
    color: #48390c;
}

.game-slot.is-compatible {
    border-style: solid;
    border-color: #8cdebc;
    background: #315d49;
    box-shadow: 0 0 0 2px #55d3b344;
}

.game-slot.is-compatible:hover:not(:disabled) {
    background: #3a7057;
    border-color: #c1f0d7;
}

#game .game-pitch-hint {
    max-width: 32ch;
    color: #ffffff;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.5;
    opacity: 1;
    text-wrap: balance;
    text-shadow: 0 2px 12px #00000040;
}

.spin-reel {
    padding: 16px 12px;
    border: 0;
    border-radius: 10px;
    background: var(--surface-raised);
}

.spin-reel-window {
    border: 0;
    border-block: 1px solid var(--border);
    background: transparent;
}

.spin-reel-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.spin-reel-team strong {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

/* 08. Competition cards and actions */

.game-competition {
    padding: 20px;
    border-color: var(--border);
    border-radius: 22px;
    background: var(--surface);
}

.game-competition-header {
    margin-bottom: 18px;
}

.game-competition-header h2 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.03em;
    text-transform: none;
}

.game-competition-header p {
    font-size: 13px;
}

.game-competition-badge {
    padding: 5px 10px;
    border: 0;
    background: var(--surface-inset);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.game-competition-ratings > div {
    padding: 6px;
    border-radius: 9px;
    background: var(--surface-raised);
}

.game-competition-ratings span {
    font-size: 12px;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.game-competition-ratings strong {
    font-size: 22px;
    font-weight: var(--font-numeric-weight);
    color: var(--accent);
}

.game-competition-actions button {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
}

.game-competition-actions .button-secondary {
    border-color: #7da2f5;
    background: #132c78;
    color: #f3f6ff;
}

.game-competition-actions .button-secondary:hover:not(:disabled) {
    background: #234592;
}

.game-competition-actions .button-secondary:disabled {
    border-color: var(--border);
    background: #14205c;
    color: #bbc8ef;
}

.game-competition-player {
    padding: 7px 0;
    border-color: #ffffff0d;
}

.game-competition-position {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
}

.game-competition-player-info strong {
    font-weight: 500;
}

.game-competition-player-info small {
    font-size: 12px;
    color: #bac9f0;
}

.game-competition-player-rating {
    color: #e0e9ff;
    font-size: 14px;
    font-weight: var(--font-numeric-weight);
}

.game-competition-stat {
    padding: 12px 14px;
    border: 1px solid #ffffff05;
    border-radius: 16px;
    background: var(--surface-raised);
}

.game-competition-stat > span {
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.game-competition-stat > strong {
    font-size: 26px;
    font-weight: var(--font-numeric-weight);
}

.game-competition-stat > small {
    font-size: 12px;
}

/* 09. Fixtures, scores and scorers */

.game-competition-fixtures {
    grid-template-columns: minmax(0, 1fr);
}

.game-fixture {
    scroll-margin-block: 24px;
    padding: 16px;
    border: 0;
    border-radius: 18px;
    background: var(--surface-raised);
    color: #ffffff;
}

.game-fixture.is-next {
    border: 2px solid #ffffff;
}

.game-fixture-header {
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.game-fixture-info {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
    align-items: center;
    gap: 8px 14px;
}

.game-fixture-info .game-fixture-opponent {
    flex: 1 1 220px;
}

.game-fixture-meta {
    display: inline-flex;
    flex-shrink: 0;
    padding: 4px 9px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-inset);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.game-fixture-opponent strong {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
}

.game-fixture-season {
    white-space: nowrap;
    font: inherit;
}

.game-fixture-score {
    display: grid;
    flex-shrink: 0;
    min-width: 84px;
    align-content: center;
    justify-items: end;
    text-align: right;
    gap: 4px;
}

.game-fixture-score strong {
    padding: 1px 8px;
    border-radius: 7px;
    color: #ffffff;
    font-size: 26px;
    font-weight: var(--font-numeric-weight);
    line-height: 1.2;
}

.game-fixture-score small {
    margin-top: 3px;
    color: #d5e2fa;
    font-size: 12px;
}

.game-fixture.is-win .game-fixture-score strong {
    background: var(--success);
    color: var(--success-ink);
}

.game-fixture.is-draw .game-fixture-score strong {
    background: var(--draw);
    color: var(--draw-ink);
}

.game-fixture.is-loss .game-fixture-score strong {
    background: var(--loss);
    color: var(--loss-ink);
}

.game-fixture.is-win .game-fixture-score strong,
.game-fixture.is-draw .game-fixture-score strong,
.game-fixture.is-loss .game-fixture-score strong {
    padding: 3px 10px;
    font-weight: var(--font-numeric-weight);
    box-shadow: none;
}

.game-fixture-scorers {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding-top: 7px;
    border-color: #ffffff33;
    font-size: 12px;
    line-height: 1.7;
}

.game-scorer-column {
    display: block;
    min-width: 0;
}

.game-scorer-label {
    display: inline;
    margin-right: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: inherit;
    white-space: nowrap;
}

/* Read the score's existing accessible label: no JavaScript change needed. */

.game-fixture:has(.game-fixture-score[aria-label^="Your team 0, "]) .game-fixture-scorers > .game-scorer-column:first-child {
    display: none;
}

.game-fixture:has(.game-fixture-score[aria-label$=" 0"]) .game-fixture-scorers > .game-scorer-column:last-child {
    display: none;
}

.game-fixture:has(.game-fixture-score[aria-label^="Your team 0, "][aria-label$=" 0"]) .game-fixture-scorers::after {
    content: "No Goals";
    color: #eef3ff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
}

.game-scorer-list {
    display: inline;
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.game-scorer-entry {
    display: inline;
}

.game-scorer-empty {
    font-size: 12px;
    line-height: 1.45;
}

.game-scorer-name {
    color: #eef3ff;
}

.game-scorer-minutes {
    margin-left: 0;
    color: #d5e2fa;
}

.game-scorer-empty {
    color: #d5e2fa;
}

/* 10. Qualification verdicts */

.game-competition-complete,
.game-competition-complete:is(.is-direct, .is-playoff, .is-eliminated) {
    --verdict-color: var(--muted);
    margin: 18px 0 0;
    padding: 20px 22px;
    border: 0;
    border-radius: 16px;
    background: var(--verdict-color);
    color: var(--verdict-ink, var(--surface-inset));
    scroll-margin-block: 24px;
}

.game-competition-complete.is-direct {
    --verdict-color: var(--success);
    --verdict-ink: var(--success-ink);
}

.game-competition-complete.is-playoff {
    --verdict-color: var(--success);
    --verdict-ink: var(--success-ink);
}

.game-competition-complete.is-eliminated {
    --verdict-color: var(--loss);
    --verdict-ink: var(--loss-ink);
}

.game-competition-complete .game-qualification-title {
    color: inherit;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.03em;
}

.game-competition-complete .game-qualification-detail {
    color: inherit;
    font-size: 13px;
}

.game-qualification-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 24px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid currentColor;
    border-top-color: color-mix(in srgb, currentColor 20%, transparent);
}
.game-qualification-metrics:not(:has(.game-qualification-score)) { grid-template-columns: minmax(0, 1fr); }
.game-qualification-record,
.game-qualification-score { display: contents; }
.game-qualification-metric-label { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
.game-qualification-record > span { grid-column: 1; grid-row: 1; }
.game-qualification-score > span { grid-column: 2; grid-row: 1; text-align: right; }
.game-qualification-record > strong,
.game-qualification-score > strong { display: block; grid-row: 2; margin: 0; color: inherit; font-family: var(--font-numeric); font-size: 14px; font-variant-numeric: tabular-nums; font-weight: var(--font-numeric-weight); line-height: 1.5; }
.game-qualification-record > strong { grid-column: 1; }
.game-qualification-score > strong { grid-column: 2; text-align: right; }

@media (max-width: 991.98px) {
    .game-qualification-metrics { grid-template-columns: minmax(0, 1fr); }
    .game-qualification-score > span { grid-column: 1; grid-row: 3; margin-top: 12px; text-align: left; }
    .game-qualification-score > strong { grid-column: 1; grid-row: 4; text-align: left; }
}

@media (max-width: 760px) {
    .game-draw {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    body > header {
        min-height: 62px;
        padding: 14px 16px;
        gap: 10px;
    }

    body > header > a {
        font-size: 18px;
    }

    body > header nav {
        gap: 0;
    }

    body > header nav a {
        padding: 5px 9px;
        font-size: 13px;
    }

    .game-page-header h1 {
        font-size: 27px;
    }

    .game-stage {
        font-size: 12px;
        letter-spacing: .04em;
    }

    .game-controls {
        padding: 14px;
    }

    #game .game-formation-choice {
        padding: 7px 12px;
    }

    .game-pitch {
        padding: 16px 6px;
    }

    .game-pitch-row {
        gap: 3px;
    }

    .game-slot,
    .game-slot:disabled {
        padding: 10px 1px;
    }

    .game-slot-position {
        font-size: 12px;
    }

    .game-slot:not(.is-filled) .game-slot-position {
        font-size: 13px;
    }

    .game-slot.is-filled .game-slot-player {
        font-size: 14px;
    }

    .game-slot.is-filled .game-slot-rating {
        font-size: 16px;
    }

    .game-competition {
        padding: 16px;
    }

    .game-competition-summary {
        grid-template-columns: 1fr 1.4fr 1fr;
        gap: 6px;
    }

    .game-competition-stat {
        padding: 9px 7px;
    }

    .game-competition-stat > strong {
        font-size: 22px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .game-competition-stat:nth-child(2) > strong {
        font-size: clamp(12px, 3.6vw, 16px);
        white-space: nowrap;
    }

    .game-fixture {
        padding: 12px;
    }

    .game-scorer-column {
        grid-template-columns: minmax(0, 95px) minmax(0, 1fr);
        gap: 10px;
    }

    .game-competition-complete {
        padding: 16px;
    }

    .game-fixture-opponent strong {
        font-size: 18px;
    }

    .game-fixture-score strong {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    button {
        transition: none;
    }
}

/* 11. Campaign view and squad content */

.game-campaign-view {
    display: block;
}

.game-campaign {
    padding: 24px;
}

.game-campaign-squad-content .game-competition-ratings {
    width: 100%;
    max-width: 360px;
    margin: 0 0 14px;
}

.game-mobile-label {
    display: none;
}

.game-campaign-squad-content {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #071355;
}

.game-campaign-squad-content .game-competition-lineup {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
}

.game-campaign .game-competition-actions:has(#play-remaining-button[hidden]) {
    grid-template-columns: minmax(0, 1fr);
}

.game-campaign #play-remaining-button[hidden] {
    display: none;
}

.game-campaign-round-title {
    margin: 24px 0 12px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.game-campaign-aggregate {
    margin: -4px 0 12px;
    color: #d2dffc;
    font-size: 13px;
}

.game-campaign-advance {
    --banner-color: var(--success);
    display: grid;
    gap: 4px;
    margin: 18px 0;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--banner-color);
    color: var(--success-ink);
    scroll-margin-block: 24px;
}

.game-campaign-advance.is-playoff {
    --banner-color: var(--success);
}

.game-campaign-advance strong {
    color: inherit;
    font-size: 15px;
    font-weight: 700;
}

.game-campaign-advance span {
    font-size: 13px;
}

.game-match-detail {
    justify-self: end;
    margin: 0;
    text-align: right;
    color: #d5e2fa;
    font-size: 12px;
}

.game-match-penalties {
    justify-self: end;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 5px 10px;
    border: 0;
    border-radius: 8px;
    background: var(--success);
    color: var(--success-ink);
    font-size: 13px;
    font-weight: 700;
}

.game-match-penalties.is-loss {
    background: var(--loss);
    color: var(--loss-ink);
}

@media (max-width: 760px) {
    .game-desktop-label {
        display: none;
    }

    .game-mobile-label {
        display: inline;
    }
}

@media (max-width: 600px) {
    .game-campaign {
        padding: 16px;
    }

    .game-campaign-squad-content .game-competition-lineup {
        grid-template-columns: minmax(0, 1fr);
    }

    .game-campaign-squad-content .game-competition-ratings {
        max-width: none;
    }

    .game-campaign-round-title {
        font-size: 18px;
    }
}

/* 12. Campaign layout, sticky controls and squad dialog */

html:has(#game.is-campaign) {
    scrollbar-gutter: stable;
}

html:has(#competition-squad[open]) {
    overflow: hidden;
}

body:has(#game.is-campaign) > header {
    flex: 0 0 auto;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
}

body:has(#game.is-campaign) > main {
    padding: 18px 0;
}

#game.is-campaign .game-page-header {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

#game.is-campaign #competition-view {
    display: block;
    padding: 0;
}

#game.is-campaign #competition-panel {
    display: grid;
    align-items: start;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.game-campaign-sidebar {
    position: sticky;
    top: 16px;
    z-index: 30;
    align-self: start;
    max-height: calc(100dvh - 32px);
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    scrollbar-width: thin;
}

#competition-sidebar .game-competition-header {
    flex: 0 0 auto;
    margin: 0;
}

#competition-sidebar .game-competition-header h2 {
    font-size: 21px;
}

.game-campaign-sidebar-tools {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.game-campaign-progress {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

#view-xi-button {
    width: 100%;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 11px;
    border-color: #718ed0;
    background: #10226d;
    color: #ffffff;
    font-size: 13px;
}

#view-xi-button:hover:not(:disabled) {
    background: #1d3987;
}

#competition-sidebar .game-competition-toolbar {
    position: static;
    flex: 0 0 auto;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

#competition-sidebar .game-competition-toolbar:has(.game-competition-actions[hidden]):has(.game-competition-status[hidden]) {
    display: none;
}

#competition-sidebar .game-competition-actions {
    position: static;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
}

#competition-sidebar .game-competition-actions[hidden] {
    display: none;
}

#competition-sidebar .game-competition-actions button {
    width: 100%;
    line-height: 1.35;
}

#competition-sidebar .game-competition-status {
    margin: 8px 0 0;
    font-size: 13px;
}

#competition-sidebar .game-competition-summary {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 0;
}

#competition-sidebar .game-competition-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    padding: 10px 12px;
}

#competition-sidebar .game-competition-stat > span {
    grid-column: 1;
    font-size: 12px;
}

#competition-sidebar .game-competition-stat > small {
    grid-column: 1;
    margin-top: 3px;
    font-size: 12px;
}

#competition-sidebar .game-competition-stat > strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
    white-space: nowrap;
    overflow-wrap: normal;
}

#competition-sidebar .game-competition-stat:nth-child(2) > strong {
    font-size: 15px;
}

.game-campaign-results {
    min-width: 0;
    overflow: visible;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.game-campaign-results:focus-visible {
    outline-offset: -3px;
}

.game-campaign-results .game-campaign-round-title:first-child {
    margin-top: 0;
}

#competition-ending {
    scroll-margin: 16px;
}

.game-squad-dialog {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #718ed0;
    border-radius: 20px;
    background: #071355;
    color: var(--text);
    box-shadow: 0 24px 100px #000025bb;
}

.game-squad-dialog::backdrop {
    background: #000025bb;
    backdrop-filter: blur(4px);
}

.game-squad-dialog-header {
    position: sticky;
    top: -20px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 12px;
    background: #071355;
}

.game-squad-dialog-header h2 {
    margin: 0;
    font-size: 22px;
}

#close-xi-button {
    min-height: 40px;
    padding: 7px 14px;
    border-color: #718ed0;
    background: #10226d;
    color: #ffffff;
}

#close-xi-button:hover {
    background: #1d3987;
}

.game-squad-dialog .game-campaign-squad-content {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

.game-squad-dialog .game-competition-squad-header {
    margin-bottom: 12px;
}

.game-squad-dialog .game-competition-ratings {
    max-width: none;
}

.game-squad-dialog .game-competition-lineup {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

@media (max-width: 1000px) and (min-width: 768px) {
    #game.is-campaign #competition-panel {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 14px;
    }

    .game-campaign-sidebar {
        padding: 14px;
    }
}

@media (min-width: 761px) and (max-height: 800px) {
    .game-campaign-sidebar {
        gap: 10px;
        padding: 14px;
    }

    #competition-sidebar .game-competition-header p {
        display: none;
    }

    #competition-sidebar .game-competition-stat {
        padding: 8px 10px;
    }
}

@media (max-width: 767.98px) {
    body:has(#game.is-campaign) > header {
        min-height: 52px;
        padding: 8px 12px;
        gap: 8px;
    }

    body:has(#game.is-campaign) > header > a {
        font-size: 18px;
    }

    body:has(#game.is-campaign) > header nav .site-nav-link {
        padding: 9px 12px;
        font-size: 15px;
    }

    body:has(#game.is-campaign) > main {
        width: calc(100% - 20px);
        padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    }

    #game.is-campaign .game-page-header {
        margin-bottom: 12px;
    }

    #game.is-campaign .game-page-header h1 {
        font-size: 25px;
    }

    #game.is-campaign .game-stage {
        margin-bottom: 4px;
        font-size: 12px;
    }

    #game.is-campaign #competition-panel {
        display: block;
    }

    .game-campaign-sidebar {
        top: 8px;
        max-height: calc(100dvh - 16px);
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 16px;
        gap: 10px;
        box-shadow: 0 8px 24px #00002555;
    }

    #competition-sidebar .game-competition-header {
        display: none;
    }

    .game-campaign-results {
        padding: 14px 12px;
        border-radius: 16px;
    }

    .game-squad-dialog {
        width: min(440px, calc(100vw - 24px));
        max-height: calc(100dvh - 24px);
        padding: 16px;
    }

    .game-squad-dialog-header {
        top: -16px;
    }
}

@media (min-width: 768px) and (max-height: 620px) {
    #competition-sidebar .game-competition-summary {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr) minmax(0, 1fr);
        gap: 6px;
    }

    #competition-sidebar .game-competition-stat {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 3px;
        padding: 8px;
    }

    #competition-sidebar .game-competition-stat > span {
        font-size: 12px;
        line-height: 1.25;
    }

    #competition-sidebar .game-competition-stat > small {
        display: none;
    }

    #competition-sidebar .game-competition-stat > strong {
        align-self: flex-start;
        font-size: 19px;
    }

    #competition-sidebar .game-competition-stat:nth-child(2) > strong {
        font-size: 14px;
    }
}

@media (max-height: 620px) {
    body:has(#game.is-campaign) > header {
        min-height: 48px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    body:has(#game.is-campaign) > main {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    #game.is-campaign .game-page-header {
        margin-bottom: 10px;
    }

    #game.is-campaign .game-page-header h1 {
        font-size: 23px;
    }

    #game.is-campaign .game-stage {
        display: none;
    }

    #competition-sidebar .game-competition-header {
        display: none;
    }

    .game-campaign-sidebar {
        gap: 8px;
        padding: 10px;
    }
}

/* 13. End-of-game actions */

.game-end-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
}

.game-end-actions[hidden] {
    display: none;
}

.game-end-actions button {
    min-width: 190px;
}

@media (max-width: 600px) {
    .game-end-actions {
        flex-direction: column;
    }

    .game-end-actions button {
        width: 100%;
        min-width: 0;
    }
}

/* 14. Homepage hero */

body > main > section.home-hero:first-child {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: var(--site-hero-min-height);
    padding: 64px 48px;
    background: #05104c;
    text-align: left;
}

.home-hero-art {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 64% center;
    pointer-events: none;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, #030b39f5 0%, #04104de8 30%, #061458b8 45%, #06145836 68%, #02072b26 100%),
        linear-gradient(0deg, #030b398c, transparent 60%);
    pointer-events: none;
}

.home-hero-content {
    width: 52%;
    max-width: 540px;
}

body > main > section.home-hero:first-child h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 5.2vw, 64px);
    line-height: 1.08;
    letter-spacing: -.045em;
    text-wrap: balance;
}

body > main > section.home-hero:first-child p {
    margin: 18px 0 0;
    color: #e6edff;
    font-size: 16px;
    line-height: 1.65;
    text-wrap: pretty;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.home-hero-actions .site-button {
    min-width: 112px;
    --button-padding: 12px clamp(16px, 2.4vw, 28px);
}

@media (max-width: 760px) {
    body > main > section.home-hero:first-child {
        min-height: 0;
        padding: 260px 24px 32px;
        text-align: center;
    }

    .home-hero-art {
        height: 340px;
        object-position: 65% top;
    }

    .home-hero::before {
        background: linear-gradient(180deg, #030b391a 0, #05104c26 140px, #05104cdd 270px, #05104c 340px);
    }

    .home-hero-content {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
    }

    body > main > section.home-hero:first-child h1 {
        font-size: clamp(36px, 7vw, 48px);
        line-height: 1.12;
    }

    body > main > section.home-hero:first-child p {
        margin-top: 15px;
        font-size: 15px;
    }

    .home-hero-actions {
        justify-content: center;
        margin-top: 24px;
    }
}

/* Alignement commun : navbar, draft et campagne */
:root {
    --site-content-width: 1200px;
    --site-gutter: clamp(16px, 3vw, 24px);
}

/* Évite un décalage horizontal entre les étapes */
html {
    scrollbar-gutter: stable;
}

body > header,
body:has(#game.is-campaign) > header {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    padding-inline: max(
        var(--site-gutter),
        calc((100% - var(--site-content-width)) / 2)
    );
}

body > main,
body:has(#game.is-campaign) > main {
    box-sizing: border-box;
    width: calc(100% - 2 * var(--site-gutter));
    max-width: var(--site-content-width);
    min-width: 0;
    margin-inline: auto;
    padding-inline: 0;
}

#game,
#game.is-campaign {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 0;
}

#game .game-layout,
#game #draft-view,
#game #competition-view {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
}

#game .game-layout > *,
#game #competition-panel,
#game #competition-panel > * {
    box-sizing: border-box;
    min-width: 0;
}

/* 16. Shared data typography across draft, campaign and exported card.
 * Text and headings use Manrope; highlighted numeric values also share weight 700.
 * Tabular figures keep ratings, scores and records aligned as their values change.
 */
.game-rating-value,
.game-player-rating,
.game-slot-rating,
.game-competition-ratings strong,
.game-competition-player-rating,
.game-competition-stat > strong,
.game-fixture-score strong,
.game-scorer-minutes,
.game-campaign-aggregate,
.game-match-detail,
.game-match-penalties,
.game-qualification-record,
.game-formation-choice,
#competition-formation,
.final-card-stat strong,
.final-card-rating strong,
.final-card-player-rating,
.final-card-top-scorer,
.final-card [data-card="formation"] {
    font-family: var(--font-numeric);
    font-variant-numeric: tabular-nums;
}

.page-loader-brand {
    font-family: var(--font-brand);
}

/* Rotate the draw icon only while a team draw is running. */
#spin-button.is-spinning .game-spin-icon {
    transform-box: fill-box;
    transform-origin: center;
    animation: champions-spin-icon 750ms linear infinite;
}
@keyframes champions-spin-icon {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    #spin-button.is-spinning .game-spin-icon { animation: none; }
}

/* Draft commands share the left column; the ratings and pitch stay on the right. */
#draft-view > .game-layout { margin-top: 16px; }
.game-draft-sidebar { display: grid; gap: 16px; min-width: 0; }
#game .game-draft-sidebar .game-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: none;
}
#game .game-draft-sidebar .game-formation-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}
#game .game-draft-sidebar .game-formation-choice {
    min-width: 0;
    width: 100%;
    padding: 7px 4px;
    font-size: 12px;
}

/* Plain draft progress, aligned with the ratings instead of the commands. */
#game #squad-count {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

@media (max-width: 600px) {
    .game-ratings { gap: 0; padding: 10px 0; }
    .game-rating-card { padding: 0 6px; }
}

/* Leave a little space above mobile auto-scroll targets. */
@media (max-width: 767.98px) {
    #pitch, #draft-view .game-draw {
        scroll-margin-top: 16px;
    }
}
