:root {
    --brand-primary: #e31b2b;
    --brand-primary-hover: #c91020;
    --brand-primary-active: #aa0d19;
    --brand-primary-rgb: 227, 27, 43;
    --brand-primary-soft: rgba(227, 27, 43, 0.12);
    --brand-text-on-primary: #ffffff;

    --app-bg: #f4f5f7;
    --app-surface: #ffffff;
    --app-surface-muted: #eef0f3;
    --app-text: #17191c;
    --app-text-muted: #454a51;
    --app-border: #d9dde3;
    --app-danger: #c92a3a;
    --app-header-height: 76px;
    --app-content-width: 1100px;
    --app-radius: 6px;

    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-primary-hover);
    --bs-body-color: var(--app-text);
    --bs-body-bg: var(--app-bg);
    --bs-border-color: var(--app-border);
    --bs-border-radius: var(--app-radius);
    --bs-border-radius-sm: 4px;
    --bs-border-radius-lg: 8px;
}

/* Install app */

.install-app-page {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

[data-pwa-entry][hidden],
[data-pwa-install][hidden],
[data-pwa-installed][hidden] {
    display: none !important;
}

.install-app-back {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    width: fit-content;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.install-app-back:hover,
.install-app-back:focus-visible {
    color: var(--brand-primary);
}

.install-app-back svg {
    width: 19px;
    height: 19px;
}

.install-app-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    min-height: 260px;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    overflow: hidden;
    background: #111214;
    color: #ffffff;
}

.install-app-hero span,
.install-app-option header > div > span {
    display: block;
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 850;
    text-transform: uppercase;
}

.install-app-hero h1,
.install-app-option h2,
.install-help-modal h2 {
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-weight: 850;
    line-height: 0.95;
    text-transform: uppercase;
}

.install-app-hero h1 {
    margin: 0.35rem 0 0;
    color: #ffffff;
    font-size: clamp(3.3rem, 8vw, 6rem);
}

.install-app-hero p {
    max-width: 620px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
}

.install-app-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.install-app-option {
    display: flex;
    min-width: 0;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    flex-direction: column;
}

.install-app-option > header {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.install-app-platform-icon {
    display: grid;
    width: 58px;
    height: 58px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    place-items: center;
}

.install-app-platform-icon svg {
    width: 28px;
    height: 28px;
}

.install-app-option h2 {
    margin: 0 0 0.25rem;
    color: var(--app-text);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.install-app-steps {
    display: grid;
    margin: 1.75rem 0;
    padding: 0;
    list-style: none;
}

.install-app-steps li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    min-height: 66px;
    padding: 0.7rem 0;
    border-top: 1px solid var(--app-border);
}

.install-app-steps li:last-child {
    border-bottom: 1px solid var(--app-border);
}

.install-app-steps li > strong {
    display: grid;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111214;
    color: #ffffff;
    place-items: center;
}

.install-app-steps li > span {
    color: var(--app-text);
}

.install-app-steps li svg {
    width: 19px;
    height: 19px;
    margin: 0 0.15rem;
    vertical-align: -0.28rem;
}

.install-app-button {
    align-self: flex-start;
    width: 100%;
    margin-top: auto;
}

.install-app-installed,
.install-app-ios-note {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin-top: auto;
    padding: 1rem;
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
}

.install-app-installed {
    color: #187447;
    font-weight: 750;
}

.install-app-installed svg,
.install-app-ios-note svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.install-help-dialog {
    max-width: 460px;
}

.install-help-modal {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 2rem;
    border: 0;
    border-radius: 6px;
    text-align: center;
}

.install-help-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--app-text);
    place-items: center;
}

.install-help-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    place-items: center;
}

.install-help-modal h2,
.install-help-modal p {
    margin: 0;
}

.install-help-modal h2 {
    font-size: 2.5rem;
}

@media (max-width: 767.98px) {
    .install-app-hero {
        min-height: 220px;
    }

    .install-app-options {
        grid-template-columns: 1fr;
    }
}

/* Shared modal */

.app-modal-dialog {
    width: min(590px, calc(100% - 1.5rem));
    margin-right: auto;
    margin-left: auto;
}

.app-modal-content {
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 28px 80px rgba(12, 14, 18, 0.3);
    text-align: left;
}

.app-modal-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 6px solid var(--brand-primary);
    background: #111214;
    color: #ffffff;
}

.app-modal-icon {
    display: grid;
    width: 52px;
    height: 52px;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    place-items: center;
}

.app-modal-icon svg {
    width: 25px;
    height: 25px;
}

.app-modal-header span {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
}

.app-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.app-modal-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    place-items: center;
}

.app-modal-close:hover,
.app-modal-close:focus-visible {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.app-modal-close svg {
    width: 20px;
    height: 20px;
}

.app-modal-body {
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem 1.25rem;
}

.app-modal-body > p {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 1.05rem;
}

.app-modal-body > p strong {
    color: var(--app-text);
}

.app-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.5rem 1.75rem;
}

.app-modal-actions form {
    margin: 0;
}

@media (max-width: 575.98px) {
    .app-modal-header {
        gap: 0.75rem;
        padding: 1.1rem;
    }

    .app-modal-icon {
        width: 44px;
        height: 44px;
    }

    .app-modal-header h2 {
        font-size: 1.65rem;
    }

    .app-modal-body {
        padding: 1.35rem 1.1rem 1rem;
    }

    .app-modal-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 1.1rem 1.35rem;
    }

    .app-modal-actions:has(> .btn:only-child) {
        grid-template-columns: 1fr;
    }

    .app-modal-actions .btn,
    .app-modal-actions form,
    .app-modal-actions form .btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 479.98px) {
    .install-app-option {
        margin-right: -0.75rem;
        margin-left: -0.75rem;
        border-right: 0;
        border-left: 0;
    }
}

/* First-time welcome */

.welcome-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding-bottom: 2rem;
}

.welcome-hero {
    position: relative;
    min-height: 330px;
    padding: clamp(2rem, 6vw, 4.5rem);
    overflow: hidden;
    background: #111214;
    color: #ffffff;
}

.welcome-hero::after {
    position: absolute;
    top: 0;
    right: -8%;
    bottom: 0;
    width: 52%;
    background: var(--brand-primary);
    content: "";
    opacity: 0.94;
    transform: skewX(-18deg);
}

.welcome-hero > * {
    position: relative;
    z-index: 1;
}

.welcome-hero > span,
.welcome-section-heading > span,
.welcome-league-actions > div > span,
.welcome-finish span {
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 850;
    text-transform: uppercase;
}

.welcome-hero h1,
.welcome-section-heading h2,
.welcome-league-actions h3,
.welcome-league-confirmation h3,
.welcome-finish h2 {
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-weight: 850;
    line-height: 0.95;
    text-transform: uppercase;
}

.welcome-hero h1 {
    max-width: 760px;
    margin: 0.5rem 0 0;
    color: #ffffff;
    font-size: clamp(3.8rem, 9vw, 7.4rem);
}

.welcome-hero p {
    max-width: 610px;
    margin: 1.25rem 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.08rem;
}

.welcome-section {
    display: grid;
    gap: 1.25rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--app-surface);
}

.welcome-section-heading {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.welcome-section-heading > span {
    display: grid;
    gap: 0.4rem;
    padding-top: 0;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    line-height: 0.95;
}

.welcome-section-heading > span b {
    width: fit-content;
    padding: 0.32rem 0.45rem;
    background: var(--brand-primary-soft);
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0;
}

.welcome-section-heading h2 {
    margin: 0;
    font-size: clamp(2.7rem, 6vw, 4.5rem);
}

.welcome-section-heading p {
    max-width: 650px;
    margin: 0.7rem 0 0;
    color: var(--app-text-muted);
    font-size: 1.05rem;
}

.welcome-section .install-app-options {
    margin-top: 0.5rem;
}

.welcome-league-section {
    background: #111214;
    color: #ffffff;
}

.welcome-league-section .welcome-section-heading h2 {
    color: #ffffff;
}

.welcome-league-section .welcome-section-heading p {
    color: rgba(255, 255, 255, 0.7);
}

.welcome-league-actions,
.welcome-league-confirmation {
    display: grid;
    gap: 1rem;
    align-items: center;
    margin-left: 115px;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.welcome-league-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
    border: 0;
}

.welcome-league-actions h3,
.welcome-league-confirmation h3 {
    margin: 0.3rem 0 0;
    color: #ffffff;
    font-size: 2.3rem;
}

.welcome-league-actions p,
.welcome-league-confirmation p {
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.welcome-league-confirmation {
    grid-template-columns: 62px minmax(0, 1fr) auto;
}

.welcome-league-confirmation-icon {
    display: grid;
    width: 58px;
    height: 58px;
    background: #197849;
    color: #ffffff;
    place-items: center;
}

.welcome-league-confirmation-icon svg {
    width: 30px;
    height: 30px;
}

.welcome-league-confirmation > a {
    color: #ffffff;
    font-weight: 750;
    text-underline-offset: 0.28rem;
}

.welcome-finish {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    min-height: 170px;
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.welcome-finish h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(2.7rem, 6vw, 4.4rem);
}

.welcome-finish-actions {
    display: grid;
    gap: 0.8rem;
    min-width: 340px;
    justify-items: center;
}

.welcome-finish-actions .btn {
    width: 100%;
}

.welcome-finish-links {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    color: var(--app-text-muted);
}

.welcome-finish-links a {
    color: var(--app-text);
    font-weight: 750;
    white-space: nowrap;
    text-underline-offset: 0.25rem;
}

.welcome-finish-links a:hover,
.welcome-finish-links a:focus-visible {
    color: var(--brand-primary);
}

@media (max-width: 991.98px) {
    .welcome-league-actions {
        grid-template-columns: 1fr 1fr;
    }

    .welcome-league-actions > div {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .welcome-hero {
        min-height: 280px;
    }

    .welcome-hero::after {
        right: -30%;
        width: 65%;
    }

    .welcome-section-heading {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 0.85rem;
    }

    .welcome-league-actions,
    .welcome-league-confirmation {
        margin-left: 0;
    }

    .welcome-league-confirmation {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .welcome-league-confirmation-icon {
        width: 50px;
        height: 50px;
    }

    .welcome-league-confirmation > a {
        grid-column: 2;
    }

    .welcome-finish {
        align-items: stretch;
        flex-direction: column;
    }

    .welcome-finish-actions {
        min-width: 0;
        justify-items: stretch;
    }
}

@media (max-width: 575.98px) {
    .welcome-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .welcome-page > *,
    .welcome-section,
    .welcome-section > *,
    .install-app-options,
    .install-app-option {
        min-width: 0;
    }

    .welcome-hero h1 {
        overflow-wrap: normal;
        font-size: 3rem;
        word-break: normal;
    }

    .welcome-section {
        margin-right: -0.75rem;
        margin-left: -0.75rem;
    }

    .welcome-section-heading {
        grid-template-columns: 1fr;
    }

    .welcome-section-heading > span {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .welcome-league-actions {
        grid-template-columns: 1fr;
    }

    .welcome-league-actions > div {
        grid-column: auto;
    }

    .welcome-league-actions .btn,
    .welcome-finish .btn {
        width: 100%;
    }
}

/* Shared account form states */

.form-field .form-control[readonly] {
    background: transparent;
    color: var(--app-text);
}

.account-recovery-state {
    display: grid;
    gap: 1.5rem;
}

.account-recovery-state .account-form-heading {
    margin: 0;
}

.account-recovery-icon {
    display: grid;
    width: 72px;
    height: 72px;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    place-items: center;
}

.account-recovery-icon.is-error {
    background: #111214;
    color: #ffffff;
}

.account-recovery-icon svg {
    width: 34px;
    height: 34px;
}

.account-recovery-back {
    width: fit-content;
    margin: 0 auto;
    color: var(--app-text-muted);
    font-weight: 750;
    text-underline-offset: 0.25rem;
}

/* Error pages */

.error-body {
    min-height: 100vh;
    background: #111214;
    font-family: "Google Sans Flex", Arial, sans-serif;
}

.error-page {
    display: grid;
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 3rem);
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.08) 50%, transparent 50.2%),
        #111214;
    place-items: center;
}

.error-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: end;
    overflow: hidden;
    width: min(1120px, 100%);
    min-height: min(700px, calc(100vh - 2rem));
    padding: clamp(2rem, 6vw, 5rem);
    background: #f4f2ed;
    color: #111214;
}

.error-panel::after {
    position: absolute;
    top: -10%;
    right: -7%;
    width: 32%;
    height: 120%;
    background: #e31b2b;
    content: "";
    opacity: 0.1;
    transform: skewX(-12deg);
}

.error-code {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #111214;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(5rem, 14vw, 11rem);
    font-weight: 950;
    line-height: 0.76;
    text-transform: uppercase;
}

.error-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.error-copy > span {
    display: block;
    margin-bottom: 0.65rem;
    color: #e31b2b;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.error-copy p {
    max-width: 460px;
    margin: 0;
    color: #5d626a;
    font-size: 1.05rem;
}

.error-actions {
    position: relative;
    z-index: 1;
    grid-column: 2;
    display: flex;
    align-items: center;
}

@media (max-width: 767.98px) {
    .error-page {
        padding: 0;
    }

    .error-panel {
        grid-template-columns: 1fr;
        gap: 2rem;
        align-content: center;
        min-height: 100vh;
        padding: 6rem 1.5rem 2.5rem;
    }

    .error-code {
        font-size: clamp(4.5rem, 21vw, 7rem);
    }

    .error-copy {
        align-self: auto;
    }

    .error-actions {
        grid-column: 1;
        align-items: stretch;
        flex-direction: column;
    }

}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 450;
    line-height: 1.5;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

a {
    color: var(--brand-primary);
}

a:hover,
a:focus {
    color: var(--brand-primary-hover);
}

.container-lg {
    max-width: var(--app-content-width);
}

.app-body {
    padding-bottom: env(safe-area-inset-bottom);
}

.app-content {
    min-height: calc(100vh - var(--app-header-height));
    padding: 1.25rem 0 2.5rem;
}

.text-error:empty,
.validation-summary-valid {
    display: none;
}

.text-error:not(:empty),
.validation-summary-errors {
    display: block;
    margin: 0.45rem 0 0;
    padding: 0.65rem 0.8rem;
    border-left: 4px solid var(--app-danger);
    background: color-mix(in srgb, var(--app-danger) 10%, var(--app-surface));
    color: var(--app-danger);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.validation-summary-errors {
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.form-control.input-validation-error,
.form-select.input-validation-error,
.form-check-input.input-validation-error {
    border-color: var(--app-danger);
}

.text-brand-primary,
.link-brand-primary {
    color: var(--brand-primary) !important;
}

.link-brand-primary:hover,
.link-brand-primary:focus {
    color: var(--brand-primary-hover) !important;
}

.text-gray-800,
.text-gray-900 {
    color: var(--app-text) !important;
}

/* Score badges */

.badge-danger {
    background: #dc3545;
    color: #ffffff;
}

.badge-primary {
    background: #0d6efd;
    color: #ffffff;
}

.badge-success {
    background: #198754;
    color: #ffffff;
}

.badge-info {
    background: #0dcaf0;
    color: #071216;
}

.badge-secondary {
    background: #6c757d;
    color: #ffffff;
}

/* Buttons */

.btn {
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: 0.55rem;
    --bs-btn-font-weight: 700;
    border-radius: var(--app-radius);
}

.btn-primary {
    --bs-btn-color: var(--brand-text-on-primary);
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: var(--brand-text-on-primary);
    --bs-btn-hover-bg: var(--brand-primary-hover);
    --bs-btn-hover-border-color: var(--brand-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--brand-primary-rgb);
    --bs-btn-active-color: var(--brand-text-on-primary);
    --bs-btn-active-bg: var(--brand-primary-active);
    --bs-btn-active-border-color: var(--brand-primary-active);
    --bs-btn-disabled-color: var(--brand-text-on-primary);
    --bs-btn-disabled-bg: var(--brand-primary);
    --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: var(--brand-text-on-primary);
    --bs-btn-hover-bg: var(--brand-primary-hover);
    --bs-btn-hover-border-color: var(--brand-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--brand-primary-rgb);
    --bs-btn-active-color: var(--brand-text-on-primary);
    --bs-btn-active-bg: var(--brand-primary-active);
    --bs-btn-active-border-color: var(--brand-primary-active);
    --bs-btn-disabled-color: var(--brand-primary);
    --bs-btn-disabled-border-color: var(--brand-primary);
    --bs-btn-disabled-bg: transparent;
}

/* Cards and forms */

.card {
    border-color: var(--app-border);
    border-radius: var(--app-radius);
}

.card-header {
    min-height: 0;
    padding: 0.9rem 1.25rem;
    background: var(--app-surface);
}

.card-body {
    padding: 1.1rem 1.25rem;
}

.card-footer {
    padding: 0.8rem 1.25rem;
    background: var(--app-surface);
}

.card-no-divider .card-header,
.card-no-divider .card-footer {
    border: 0;
}

.card-hover-bg {
    transition: background-color 150ms ease;
}

.card-hover-bg:hover {
    background: var(--brand-primary-soft);
}

.card-border {
    border-color: #bec3ca !important;
}

.form-control,
.form-select,
.form-check-input,
.input-group-text {
    border-color: #aeb5bf;
    color: var(--app-text);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft);
}

.form-check-input:checked {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
}

.form-label {
    margin-bottom: 0.3rem;
}

.form-control + small,
.form-select + small,
textarea.form-control + small {
    display: block;
    margin-top: 0.45rem;
    color: var(--app-text-muted);
    line-height: 1.35;
}

.accordion-button {
    color: var(--app-text);
    background: var(--app-surface-muted);
}

.accordion-button:not(.collapsed) {
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft);
}

.accordion-item {
    margin-bottom: 1rem;
    border-radius: var(--app-radius) !important;
    overflow: hidden;
}

/* Application header */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--app-header-height);
    border-bottom: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.app-header-inner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: var(--app-header-height);
}

.app-icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--brand-primary);
}

.app-icon-button:hover,
.app-icon-button:focus-visible {
    border-color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.app-icon-button svg {
    width: 22px;
    height: 22px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-width: 0;
    color: var(--app-text);
    text-decoration: none;
}

.app-brand > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 850;
    line-height: 0.95;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-brand:hover,
.app-brand:focus-visible {
    color: var(--app-text);
    text-decoration: none;
}

.account-brand-fallback {
    display: none;
    color: var(--app-text);
    font-weight: 850;
}

.brand-logo-missing > img {
    display: none;
}

.brand-logo-missing > .account-brand-fallback {
    display: block;
}

.app-primary-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.app-primary-nav a {
    padding: 0.7rem 1rem;
    border-radius: var(--app-radius);
    background: #111214;
    color: #ffffff;
    font-weight: 750;
    text-decoration: none;
}

.app-primary-nav a:hover,
.app-primary-nav a:focus-visible {
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

/* Menu */

.app-menu {
    --bs-offcanvas-width: min(390px, 92vw);
    border: 0;
}

.app-menu-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 1rem;
    align-items: center;
    min-height: 118px;
    padding: 1.5rem;
    background: #111214;
    color: #ffffff;
}

.app-menu-head > div {
    min-width: 0;
}

.app-menu-player {
    display: block;
    overflow-wrap: anywhere;
}

.app-menu-player {
    font-size: 1.35rem;
    line-height: 1.2;
}

.app-menu-close {
    display: grid;
    justify-self: end;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
}

.app-menu-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-menu-links a {
    display: grid;
    place-items: center;
    gap: 0.75rem;
    min-height: 128px;
    padding: 1.2rem;
    border-right: 1px solid var(--app-border);
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

.app-menu-links a:nth-child(2n) {
    border-right: 0;
}

.app-menu-links a:hover,
.app-menu-links a:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--brand-primary);
}

.app-menu-links svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
}

.app-menu-footer {
    padding: 1rem;
    border-top: 1px solid var(--app-border);
}

.mobile-bottom-toolbar {
    display: none;
}

/* Account screens */

.account-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.25rem;
    background: var(--app-surface-muted);
}

.account-page {
    width: 100%;
}

.account-shell {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
    width: min(1180px, 100%);
    min-height: min(820px, calc(100vh - 2.5rem));
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 24px 70px rgba(23, 25, 28, 0.14);
}

.account-shell-register {
    grid-template-columns: minmax(0, 1fr);
    width: min(1040px, 100%);
}

.account-shell-password {
    grid-template-columns: minmax(0, 1fr);
    width: min(720px, 100%);
}

.account-context {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.account-context .account-brand {
    margin-bottom: clamp(3rem, 8vh, 6rem);
    text-align: left;
}

.account-context .account-logo {
    max-width: min(280px, 100%);
    margin: 0;
}

.account-context .account-brand-fallback {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 800;
}

.account-context h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(3rem, 5vw, 5.5rem);
    font-weight: 800;
    line-height: 0.95;
}

.account-context > p:last-child {
    max-width: 430px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.account-kicker,
.account-step {
    margin-bottom: 0.75rem;
    color: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-panel {
    width: min(600px, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 5vw, 3rem);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
}

.account-shell .account-panel {
    width: 100%;
    margin: 0;
    padding: clamp(2rem, 5vw, 4.75rem);
    border: 0;
    border-radius: 0;
}

.account-form-panel {
    align-self: stretch;
}

.account-form-heading {
    margin-bottom: 2.25rem;
}

.account-form-heading h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.1rem, 3.4vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
}

.account-form-heading > p:last-child {
    margin-bottom: 0;
    color: var(--app-text-muted);
}

.account-step {
    color: var(--brand-primary);
}

.account-form .form-control,
.account-form .form-select {
    min-height: 56px;
    border-width: 1px;
}

.account-form .form-control[readonly] {
    background: transparent;
    color: var(--app-text);
}

.account-form small {
    display: block;
    margin-top: 0.45rem;
    color: var(--app-text-muted);
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.account-password-help {
    margin-top: -0.75rem !important;
    margin-bottom: 1.5rem;
}

.account-reminder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--app-border);
    cursor: pointer;
}

.account-reminder .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
}

.account-reminder strong,
.account-reminder small {
    display: block;
}

.account-reminder small {
    margin-top: 0.2rem;
}

.account-submit {
    min-height: 60px;
    font-size: 1.1rem;
}

.account-context-copy {
    margin-block: auto;
}

.account-context-link {
    width: fit-content;
    margin-top: 2.5rem;
    color: inherit;
    font-weight: 700;
    text-underline-offset: 0.25rem;
}

.account-context-link:hover {
    color: inherit;
}

.account-login-heading {
    margin-bottom: 2rem;
}

.account-found-message {
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--brand-primary);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-weight: 650;
}

.account-login-form {
    display: grid;
    gap: 1.15rem;
}

.account-field-group > .text-error:not(:empty),
fieldset > .text-error:not(:empty),
.fixture-import-file-group > .text-error:not(:empty) {
    margin-top: 0.55rem;
}

.form-field {
    padding: 0.8rem 1rem 0.65rem;
    border: 2px solid var(--app-text);
    background: var(--app-surface);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 5px 5px 0 var(--brand-primary);
}

.form-field:has(.input-validation-error) {
    border-color: var(--app-danger);
}

.form-field .form-label {
    display: block;
    margin: 0 0 0.1rem;
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.form-field .form-control,
.form-field .form-select {
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 1.15rem;
    font-weight: 650;
    box-shadow: none;
}

.form-field .form-control:focus,
.form-field .form-select:focus {
    background: transparent;
    box-shadow: none;
}

.form-field .form-select {
    padding-right: 2rem;
    background-color: transparent;
}

.form-field .form-control::placeholder {
    color: color-mix(in srgb, var(--app-text-muted) 72%, transparent);
    opacity: 1;
}

.account-login-form .account-submit {
    margin-top: 0.35rem;
}

.account-secondary-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.5rem;
    justify-content: center;
    margin-top: -0.15rem;
}

.account-secondary-links a {
    color: var(--app-text);
    font-weight: 750;
    text-underline-offset: 0.25rem;
}

.account-register-form {
    display: grid;
    gap: 1rem;
}

.account-register-grid > .account-field-group:only-child {
    grid-column: 1 / -1;
}

.account-field-group {
    min-width: 0;
}

.account-field-group > .text-error:not(:empty) + small {
    margin-top: 0.45rem;
}

.account-register-form .account-password-help {
    margin: -0.35rem 0 0.25rem !important;
}

.account-register-form .account-reminder {
    margin-bottom: 0;
}

.account-side-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.account-side-picker legend {
    margin: 0 0 0.15rem;
    color: var(--app-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.account-side-picker > p {
    margin: 0 0 0.8rem;
    color: var(--app-text-muted);
}

.account-side-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.account-side-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.account-side-option-content {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 22px;
    gap: 0.9rem;
    align-items: center;
    min-height: 92px;
    padding: 0.9rem 1rem;
    border: 2px solid var(--app-text);
    background: var(--app-surface);
    transition: border-color 150ms ease, background-color 150ms ease;
}

.account-side-option img,
.account-side-badge-fallback {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    object-fit: contain;
}

.account-side-badge-fallback {
    border: 2px solid currentColor;
    border-radius: 50%;
    font-weight: 800;
}

.account-side-option strong {
    min-width: 0;
    font-size: 1.08rem;
}

.account-side-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--app-text-muted);
    border-radius: 50%;
}

.account-side-option:has(input:checked) .account-side-option-content {
    border-color: var(--brand-primary);
    background: color-mix(in srgb, var(--brand-primary) 8%, var(--app-surface));
}

.account-side-option:has(input:checked) .account-side-check {
    border: 5px solid var(--brand-primary);
}

.account-side-option:has(input:focus-visible) .account-side-option-content {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
    outline-offset: 3px;
}

.account-league-picker {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--app-border);
}

.account-league-picker legend {
    float: none;
    width: auto;
    margin: 0 0 0.15rem;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.account-league-picker > p {
    margin: 0 0 0.8rem;
    color: var(--app-text-muted);
}

.account-league-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
}

.account-league-option {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    cursor: pointer;
}

.account-league-option .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

/* Profile */

.profile-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    margin: 0 auto;
}

.profile-heading {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    justify-content: space-between;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0 0;
}

.profile-heading h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 850;
    line-height: 0.95;
}

.profile-heading p,
.profile-panel-heading p {
    margin: 0.55rem 0 0;
    color: var(--app-text-muted);
}

.profile-back-link {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    padding-bottom: 0.3rem;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.profile-back-link svg {
    width: 18px;
    height: 18px;
}

.profile-panel {
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.profile-panel-heading {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

.profile-panel-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 850;
}

.profile-actions {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

@media (max-width: 575.98px) {
    .profile-heading {
        align-items: start;
        flex-direction: column-reverse;
    }

    .profile-panel {
        margin-inline: -0.75rem;
        padding: 1.25rem;
        border-right: 0;
        border-left: 0;
    }

    .profile-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .profile-actions > a {
        text-align: center;
    }
}

/* Settings */

.settings-page {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
    margin: 0 auto;
}

.settings-heading {
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.settings-heading h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 850;
    line-height: 0.95;
}

.settings-heading p {
    margin: 0.6rem 0 0;
    color: var(--app-text-muted);
}

.settings-group {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.settings-group > header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

.settings-group > header > span {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--brand-primary);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
}

.settings-group h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 850;
}

.settings-links {
    display: grid;
}

.settings-link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    gap: 1rem;
    align-items: center;
    width: 100%;
    min-height: 78px;
    padding: 1rem 1.25rem;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    background: transparent;
    color: var(--app-text);
    text-align: left;
    text-decoration: none;
}

.settings-link:last-child {
    border-bottom: 0;
}

.settings-link:hover,
.settings-link:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.settings-link > svg:first-child {
    width: 28px;
    height: 28px;
    color: var(--brand-primary);
}

.settings-link > svg:last-child {
    width: 20px;
    color: var(--app-text-muted);
}

.settings-link strong,
.settings-link small {
    display: block;
}

.settings-link strong {
    font-size: 1.02rem;
}

.settings-link small {
    margin-top: 0.15rem;
    color: var(--app-text-muted);
}

@media (max-width: 575.98px) {
    .settings-group {
        margin-inline: -0.75rem;
        border-right: 0;
        border-left: 0;
    }

    .settings-link {
        grid-template-columns: 32px minmax(0, 1fr) 18px;
        gap: 0.75rem;
        min-height: 74px;
        padding: 0.9rem 1rem;
    }

    .settings-link > svg:first-child {
        width: 25px;
        height: 25px;
    }
}

/* Player admin */

/* Competition stats */

.competition-stats-page {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    width: 100%;
}

.competition-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.competition-stats-summary > div {
    display: flex;
    min-height: 138px;
    padding: 1.25rem;
    border-right: 1px solid var(--app-border);
    flex-direction: column;
    justify-content: space-between;
}

.competition-stats-summary > div:last-child {
    border-right: 0;
}

.competition-stats-summary span,
.competition-side-stat > span {
    color: var(--app-text-muted);
    font-weight: 700;
}

.competition-stats-summary strong {
    color: var(--app-text);
    font-family: var(--app-display-font);
    font-size: clamp(2.75rem, 5vw, 4.25rem);
    line-height: 0.9;
}

.competition-stats-summary .competition-stat-primary {
    background: var(--app-text);
}

.competition-stats-summary .competition-stat-primary span {
    color: rgba(255, 255, 255, 0.72);
}

.competition-stats-summary .competition-stat-primary strong {
    color: #fff;
}

.competition-stats-section {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.competition-stats-section > header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

.competition-stats-section > header h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 850;
}

.competition-stats-section > header p {
    margin: 0.35rem 0 0;
    color: var(--app-text-muted);
}

.competition-side-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.competition-side-stat {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 100px;
    padding: 1.1rem 1.25rem;
    border-right: 1px solid var(--app-border);
}

.competition-side-stat:last-child {
    border-right: 0;
}

.competition-side-stat img,
.competition-side-stat > svg {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.competition-side-stat > svg {
    padding: 0.65rem;
    color: var(--app-text-muted);
}

.competition-side-stat strong {
    color: var(--app-text);
    font-family: var(--app-display-font);
    font-size: 2.5rem;
    line-height: 1;
}

.competition-recent-header,
.competition-recent-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 20px;
    gap: 1rem;
    align-items: center;
}

.competition-recent-list.is-rivalry .competition-recent-header,
.competition-recent-list.is-rivalry .competition-recent-player {
    grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.75fr) 150px 20px;
}

.competition-recent-header {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
    font-weight: 800;
    text-transform: uppercase;
}

.competition-recent-player {
    min-height: 80px;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

.competition-recent-player:last-child {
    border-bottom: 0;
}

.competition-recent-player:hover,
.competition-recent-player:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.competition-recent-person,
.competition-recent-player time {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.competition-recent-person strong {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.competition-recent-person small,
.competition-recent-player time small {
    color: var(--app-text-muted);
}

.competition-recent-side {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.competition-recent-side img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.competition-recent-player > svg {
    width: 20px;
    color: var(--app-text-muted);
}

.competition-stats-empty {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 190px;
    padding: 2rem;
    color: var(--app-text-muted);
    text-align: center;
    flex-direction: column;
    justify-content: center;
}

.competition-stats-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.4rem;
}

.competition-stats-empty strong {
    color: var(--app-text);
}

@media (max-width: 767.98px) {
    .competition-stats-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .competition-stats-summary > div {
        min-height: 120px;
        border-right: 0;
        border-bottom: 1px solid var(--app-border);
    }

    .competition-stats-summary > div:nth-child(odd) {
        border-right: 1px solid var(--app-border);
    }

    .competition-stats-summary > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }

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

    .competition-side-stat {
        border-right: 0;
        border-bottom: 1px solid var(--app-border);
    }

    .competition-side-stat:last-child {
        border-bottom: 0;
    }

    .competition-recent-header {
        display: none;
    }

    .competition-recent-player {
        grid-template-columns: minmax(0, 1fr) auto 18px;
        gap: 0.75rem;
    }

    .competition-recent-list.is-rivalry .competition-recent-player {
        grid-template-columns: minmax(0, 1fr) auto 18px;
    }

    .competition-recent-side {
        grid-column: 1;
        font-size: 0.95rem;
    }

    .competition-recent-player time {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-items: flex-end;
        text-align: right;
    }

    .competition-recent-player > svg {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 419.98px) {
    .competition-stats-summary {
        grid-template-columns: 1fr;
    }

    .competition-stats-summary > div,
    .competition-stats-summary > div:nth-child(odd),
    .competition-stats-summary > div:last-child:nth-child(odd) {
        grid-column: auto;
        min-height: 104px;
        border-right: 0;
        border-bottom: 1px solid var(--app-border);
    }

    .competition-stats-summary > div:last-child {
        border-bottom: 0;
    }
}

.player-admin-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    margin: 0 auto;
}

.player-admin-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.player-admin-search {
    position: relative;
    display: block;
    width: min(520px, 100%);
    margin: 0;
}

.player-admin-search svg {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    width: 20px;
    height: 20px;
    color: var(--app-text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.player-admin-search input {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.9rem 0.65rem 2.8rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-weight: 650;
    outline: 0;
}

.player-admin-search input:focus {
    border-color: var(--app-text);
    background: var(--app-surface);
}

.player-admin-search input::placeholder {
    color: var(--app-text-muted);
    opacity: 1;
}

.player-admin-total {
    color: var(--app-text-muted);
    white-space: nowrap;
}

.player-admin-list {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.player-admin-table-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 130px 130px 20px;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 1.15rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 1.05rem;
    font-weight: 750;
}

.player-admin-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 130px 130px 20px;
    gap: 1rem;
    align-items: center;
    min-height: 82px;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

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

.player-admin-row:hover,
.player-admin-row:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.player-admin-icon {
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
    place-items: center;
}

.player-admin-icon svg {
    width: 21px;
    height: 21px;
}

.player-admin-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 400;
}

.player-admin-stat,
.player-admin-joined {
    display: block;
}

.player-admin-stat strong,
.player-admin-stat span,
.player-admin-joined strong,
.player-admin-joined span {
    display: block;
}

.player-admin-stat strong {
    font-size: 1.05rem;
}

.player-admin-stat.is-empty strong {
    color: var(--app-text-muted);
}

.player-admin-joined strong {
    font-size: 1.05rem;
    font-weight: 500;
}

.player-admin-chevron {
    width: 20px;
    color: var(--app-text-muted);
}

.player-admin-no-results {
    display: grid;
    gap: 0.3rem;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text-muted);
    text-align: center;
    place-items: center;
}

.player-admin-no-results svg {
    width: 34px;
    height: 34px;
    margin-bottom: 0.35rem;
}

.player-admin-no-results strong {
    color: var(--app-text);
    font-size: 1.1rem;
}

@media (max-width: 767.98px) {
    .player-admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .player-admin-total {
        padding-inline: 0.15rem;
    }

    .player-admin-row {
        grid-template-columns: 42px minmax(0, 1fr) auto 18px;
        gap: 0.75rem;
        min-height: 72px;
        padding: 0.8rem;
    }

    .player-admin-table-header {
        grid-template-columns: 42px minmax(0, 1fr) auto 18px;
        gap: 0.75rem;
        padding: 0.7rem 0.8rem;
    }

    .player-admin-header-joined {
        display: none;
    }

    .player-admin-name {
        grid-column: 2;
    }

    .player-admin-stat {
        grid-column: 3;
    }

    .player-admin-joined {
        display: none;
    }

    .player-admin-stat strong {
        font-size: 1.05rem;
    }

    .player-admin-icon {
        grid-column: 1;
    }

    .player-admin-chevron {
        grid-column: 4;
    }
}

/* League editor */

.league-change-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    margin: 0 auto;
}

.league-change-panel {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.league-change-form {
    display: grid;
    gap: 1.75rem;
}

.league-change-section {
    display: grid;
    gap: 1rem;
}

.league-change-section + .league-change-section {
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

.league-change-section-heading {
    margin-bottom: 0.25rem;
}

.league-change-section-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 850;
}

.league-change-section-heading p {
    max-width: 680px;
    margin: 0.4rem 0 0;
    color: var(--app-text-muted);
}

.league-change-form .form-field:focus-within {
    border-color: var(--app-text);
    box-shadow: none;
}

.league-summary-field textarea.form-control {
    min-height: 126px;
    padding-top: 0.45rem;
    resize: vertical;
}

.league-privacy-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.league-privacy-picker legend {
    margin: 0 0 0.15rem;
    color: var(--app-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.league-privacy-picker > p {
    margin: 0 0 0.8rem;
    color: var(--app-text-muted);
}

.league-privacy-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.league-privacy-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.league-privacy-option-content {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 22px;
    gap: 0.85rem;
    align-items: center;
    min-height: 90px;
    padding: 0.9rem 1rem;
    border: 2px solid var(--app-text);
    background: var(--app-surface);
}

.league-privacy-icon {
    display: grid;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--app-surface-muted);
    color: var(--app-text);
    place-items: center;
}

.league-privacy-icon svg {
    width: 23px;
    height: 23px;
}

.league-privacy-option strong,
.league-privacy-option small {
    display: block;
}

.league-privacy-option strong {
    font-size: 1.05rem;
}

.league-privacy-option small {
    margin-top: 0.15rem;
    color: var(--app-text-muted);
}

.league-privacy-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--app-text-muted);
    border-radius: 50%;
}

.league-privacy-option:has(input:checked) .league-privacy-option-content {
    border-color: var(--brand-primary);
    background: color-mix(in srgb, var(--brand-primary) 8%, var(--app-surface));
}

.league-privacy-option:has(input:checked) .league-privacy-icon {
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.league-privacy-option:has(input:checked) .league-privacy-check {
    border: 5px solid var(--brand-primary);
}

.league-privacy-option:has(input:focus-visible) .league-privacy-option-content {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
    outline-offset: 3px;
}

.league-nickname-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    cursor: pointer;
}

.league-nickname-option .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
}

.league-nickname-option strong,
.league-nickname-option small {
    display: block;
}

.league-nickname-option small {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
}

.league-invite-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
    gap: 1rem;
}

.league-copy-field > label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.league-copy-field > div {
    display: flex;
    min-width: 0;
    border: 2px solid var(--app-text);
    background: var(--app-surface);
}

.league-copy-field input {
    min-width: 0;
    min-height: 56px;
    flex: 1 1 auto;
    padding: 0.75rem 1rem;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--app-text);
    font-weight: 700;
    text-overflow: ellipsis;
    outline: 0;
}

.league-copy-field .btn {
    min-width: 92px;
    border: 0;
    border-left: 1px solid var(--app-border);
    border-radius: 0;
}

.league-change-actions {
    margin-top: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

@media (max-width: 767.98px) {
    .league-invite-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .league-change-panel {
        margin-inline: -0.75rem;
        padding: 1.25rem;
        border-right: 0;
        border-left: 0;
    }

    .league-change-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .league-change-actions .btn {
        width: 100%;
    }

    .league-privacy-options {
        grid-template-columns: 1fr;
    }
}

/* Fixture admin */

.fixture-admin-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    margin: 0 auto;
}

.fixture-admin-heading {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    justify-content: space-between;
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.fixture-admin-heading h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 850;
    line-height: 0.95;
}

.fixture-admin-heading p {
    margin: 0.6rem 0 0;
    color: var(--app-text-muted);
}

.fixture-admin-back {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    padding-bottom: 0.3rem;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.fixture-admin-back svg {
    width: 18px;
    height: 18px;
}

.fixture-admin-toolbar {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.15rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.fixture-admin-actions {
    display: flex;
    align-items: center;
}

.fixture-admin-section {
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.fixture-admin-section-heading {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--app-border);
}

.fixture-admin-section-heading span,
.fixture-admin-section-heading h2 {
    display: block;
}

.fixture-admin-section-heading h2,
.fixture-admin-section-toggle strong {
    margin: 0;
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 850;
}

.fixture-admin-section-heading .fixture-admin-section-title {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.fixture-admin-count {
    display: grid;
    min-width: 32px;
    height: 26px;
    padding-inline: 0.45rem;
    transform: translateY(2px);
    border-radius: 999px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    place-items: center;
}

.fixture-admin-list {
    display: grid;
}

.fixture-admin-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(150px, auto);
    gap: 1rem;
    align-items: center;
    min-height: 88px;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

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

.fixture-admin-row:hover,
.fixture-admin-row:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.fixture-admin-date {
    padding-right: 1rem;
    border-right: 1px solid var(--app-border);
    text-align: center;
}

.fixture-admin-date strong,
.fixture-admin-date span,
.fixture-admin-date b {
    display: block;
}

.fixture-admin-date strong {
    color: var(--app-text);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.fixture-admin-date span {
    color: var(--brand-primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fixture-admin-date b {
    color: var(--app-text-muted);
    font-size: 0.9rem;
}

.fixture-admin-match {
    min-width: 0;
}

.fixture-admin-teams {
    display: grid;
    grid-template-columns: fit-content(45%) auto fit-content(45%);
    gap: 0.7rem;
    align-items: center;
    justify-content: center;
}

.fixture-admin-teams > strong:first-child {
    text-align: right;
}

.fixture-admin-teams > strong:last-child {
    text-align: left;
}

.fixture-admin-teams strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
}

.fixture-admin-versus {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fixture-admin-result {
    min-width: 58px;
    padding: 0.25rem 0.45rem;
    background: #111214;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 850;
    text-align: center;
}

.fixture-admin-sponsor {
    display: block;
    margin-top: 0.35rem;
    color: var(--app-text-muted);
    text-align: center;
}

.fixture-admin-status {
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--app-border);
    color: var(--app-text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.fixture-admin-row-end {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.fixture-admin-predictions {
    color: var(--app-text-muted);
    font-size: 1rem;
    white-space: nowrap;
}

.fixture-admin-status.is-overdue {
    border-color: color-mix(in srgb, var(--app-danger) 42%, var(--app-border));
    background: color-mix(in srgb, var(--app-danger) 8%, var(--app-surface));
    color: var(--app-danger);
}

.fixture-admin-status.is-complete {
    border-color: #b8ddc5;
    background: #edf8f1;
    color: #176536;
}

.fixture-admin-chevron {
    width: 20px;
    color: var(--app-text-muted);
}

.fixture-admin-section-toggle {
    width: 100%;
    border: 0;
    border-bottom: 0;
    background: transparent;
    text-align: left;
}

.fixture-admin-toggle-end {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.fixture-admin-toggle-end svg {
    width: 20px;
    transition: transform 160ms ease;
}

.fixture-admin-section-toggle[aria-expanded="true"] .fixture-admin-toggle-end svg {
    transform: rotate(180deg);
}

.fixture-admin-section-empty {
    padding: 1.25rem;
    color: var(--app-text-muted);
}

.fixture-admin-empty {
    padding: clamp(2rem, 7vw, 5rem) 1.5rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    text-align: center;
}

.fixture-admin-empty > svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--brand-primary);
}

.fixture-admin-empty h2 {
    margin-bottom: 0.45rem;
    color: var(--app-text);
}

.fixture-admin-empty p {
    max-width: 520px;
    margin: 0 auto 1.35rem;
    color: var(--app-text-muted);
}

@media (max-width: 767.98px) {
    .fixture-admin-heading {
        align-items: start;
        flex-direction: column-reverse;
    }

    .fixture-admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .fixture-admin-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fixture-admin-row {
        position: relative;
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.85rem 2.5rem 0.85rem 0.8rem;
    }

    .fixture-admin-row-end {
        grid-column: 2;
        grid-row: 2;
        flex-wrap: wrap;
        width: fit-content;
        margin-top: -0.35rem;
    }

    .fixture-admin-row-end .fixture-admin-chevron {
        position: absolute;
        right: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .fixture-admin-date {
        grid-row: 1 / span 2;
        padding-right: 0.7rem;
    }

    .fixture-admin-teams {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .fixture-admin-teams > strong:first-child,
    .fixture-admin-teams > strong:last-child {
        text-align: left;
    }

    .fixture-admin-versus {
        display: none;
    }

    .fixture-admin-result {
        width: fit-content;
        min-width: 50px;
        grid-row: 1 / span 2;
        grid-column: 2;
    }

    .fixture-admin-match:has(.fixture-admin-result) .fixture-admin-teams {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .fixture-admin-match:has(.fixture-admin-result) .fixture-admin-teams > strong:last-child {
        grid-row: 2;
    }

    .fixture-admin-sponsor {
        text-align: left;
    }
}

/* Fixture import */

.fixture-import-form {
    width: 100%;
}

.fixture-import-panel,
.fixture-import-review {
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.fixture-import-review-heading {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    justify-content: space-between;
}

.fixture-import-review-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 850;
}

.fixture-import-review-heading p {
    max-width: 650px;
    margin: 0.45rem 0 0;
    color: var(--app-text-muted);
}

.fixture-import-template-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.fixture-import-template-row .btn {
    white-space: nowrap;
}

.fixture-import-file-group {
    position: relative;
}

.fixture-import-upload-control {
    position: relative;
}

.fixture-import-file-input {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.fixture-import-dropzone {
    display: grid;
    justify-items: center;
    min-height: 230px;
    padding: 2rem 1.25rem;
    border: 2px dashed #9ca3ad;
    background: color-mix(in srgb, var(--app-surface-muted) 55%, var(--app-surface));
    cursor: pointer;
    text-align: center;
    place-content: center;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.fixture-import-dropzone:hover,
.fixture-import-file-input:hover + .fixture-import-dropzone,
.fixture-import-file-input:focus-visible + .fixture-import-dropzone,
.fixture-import-upload-control.is-dragging .fixture-import-dropzone {
    border-color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.fixture-import-file-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 0.9rem;
    border-radius: 50%;
    background: #111214;
    color: #ffffff;
    place-items: center;
}

.fixture-import-file-icon svg {
    width: 29px;
    height: 29px;
}

.fixture-import-dropzone strong,
.fixture-import-dropzone > span:not(.fixture-import-file-icon),
.fixture-import-dropzone > b {
    display: block;
}

.fixture-import-dropzone strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 1.25rem;
    font-weight: 850;
}

.fixture-import-dropzone > span:not(.fixture-import-file-icon) {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
}

.fixture-import-dropzone > b {
    margin-top: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: var(--app-surface);
    color: var(--app-text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.fixture-import-actions {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--app-border);
}

.fixture-import-review {
    padding: 0;
}

.fixture-import-review-heading {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.fixture-import-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    align-self: stretch;
}

.fixture-import-summary > div {
    display: grid;
    align-content: center;
    min-width: 88px;
    padding: 0.4rem 1.1rem;
    border-left: 1px solid var(--app-border);
    text-align: center;
}

.fixture-import-summary strong,
.fixture-import-summary span {
    display: block;
}

.fixture-import-summary strong {
    color: var(--app-text);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.fixture-import-summary span {
    margin-top: 0.3rem;
    color: var(--app-text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fixture-import-summary .is-valid strong {
    color: #176536;
}

.fixture-import-summary .is-error strong {
    color: var(--app-danger);
}

.fixture-import-warning {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    margin: 0 2rem 1.25rem;
    padding: 0.9rem 1rem;
    border-left: 4px solid var(--app-danger);
    background: color-mix(in srgb, var(--app-danger) 9%, var(--app-surface));
    color: color-mix(in srgb, var(--app-danger) 82%, #000000);
}

.fixture-import-warning svg {
    width: 21px;
    height: 21px;
    margin-top: 0.1rem;
}

.fixture-import-warning p {
    margin: 0;
}

.fixture-import-list {
    border-top: 1px solid var(--app-border);
}

.fixture-import-list-heading,
.fixture-import-row {
    display: grid;
    grid-template-columns: 112px 82px minmax(150px, 1fr) minmax(150px, 1fr) minmax(180px, 0.9fr);
    gap: 0.75rem;
    align-items: center;
}

.fixture-import-list-heading {
    min-height: 46px;
    padding: 0.65rem 1.25rem;
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
    font-size: 1.05rem;
    font-weight: 850;
    text-transform: uppercase;
}

.fixture-import-row {
    min-height: 72px;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid var(--app-border);
}

.fixture-import-list-heading + .fixture-import-row {
    border-top: 0;
}

.fixture-import-row.has-error {
    background: color-mix(in srgb, var(--app-danger) 4%, var(--app-surface));
}

.fixture-import-row small {
    display: none;
    color: var(--app-text-muted);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fixture-import-value {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 400;
}

.fixture-import-date,
.fixture-import-time {
    white-space: nowrap;
}

.fixture-import-value.is-missing-team {
    color: var(--app-danger);
    font-weight: 800;
}

.fixture-import-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 400;
}

.fixture-import-status svg {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
}

.fixture-import-status span {
    overflow-wrap: anywhere;
}

.fixture-import-status.is-valid {
    color: #176536;
}

.fixture-import-status.is-error {
    color: var(--app-danger);
}

.fixture-import-review-actions {
    margin: 0;
    padding: 1.25rem 2rem;
}

@media (max-width: 767.98px) {
    .fixture-import-review-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .fixture-import-summary {
        align-self: auto;
    }

    .fixture-import-summary > div:first-child {
        border-left: 0;
    }

    .fixture-import-warning {
        margin-right: 1.25rem;
        margin-left: 1.25rem;
    }

    .fixture-import-list-heading {
        display: none;
    }

    .fixture-import-row,
    .fixture-import-list-heading + .fixture-import-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem 1rem;
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--app-border);
    }

    .fixture-import-row small {
        display: block;
        margin-bottom: 0.12rem;
    }

    .fixture-import-team,
    .fixture-import-status {
        grid-column: 1 / -1;
    }

    .fixture-import-home-team {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--app-border);
    }

    .fixture-import-status {
        padding-top: 0.35rem;
    }
}

@media (max-width: 575.98px) {
    .fixture-import-panel,
    .fixture-import-review {
        margin-inline: -0.75rem;
        border-right: 0;
        border-left: 0;
    }

    .fixture-import-panel {
        padding: 1.25rem;
    }

    .fixture-import-dropzone {
        min-height: 210px;
    }

    .fixture-import-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fixture-import-actions .btn {
        width: 100%;
    }

    .fixture-import-review-heading {
        padding: 1.25rem;
    }

    .fixture-import-summary > div {
        min-width: 0;
        padding: 0.55rem;
    }

    .fixture-import-summary strong {
        font-size: 1.65rem;
    }

    .fixture-import-review-actions {
        padding: 1.25rem;
    }
}

/* Fixture editor */

.fixture-change-panel {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.fixture-change-form {
    display: grid;
    gap: 1.75rem;
}

.fixture-change-section {
    display: grid;
    gap: 1rem;
}

.fixture-change-section + .fixture-change-section {
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

.fixture-change-section-heading {
    margin-bottom: 0.25rem;
}

.fixture-change-section-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 850;
}

.fixture-change-section-heading p {
    max-width: 650px;
    margin: 0.4rem 0 0;
    color: var(--app-text-muted);
}

.fixture-change-form .form-field {
    position: relative;
}

.fixture-change-form .form-field:focus-within {
    border-color: var(--app-text);
    box-shadow: none;
}

.fixture-change-form .form-field .form-control[readonly] {
    background: transparent;
    color: var(--app-text);
}

.fixture-change-form .fixture-date-field > svg {
    position: absolute;
    right: 1rem;
    bottom: 1.25rem;
    width: 20px;
    height: 20px;
    color: var(--app-text-muted);
    pointer-events: none;
}

.fixture-date-field .form-control {
    padding-right: 2.25rem;
    cursor: pointer;
}

.fixture-date-field:hover > svg,
.fixture-date-field:focus-within > svg {
    color: var(--brand-primary);
}

.fixture-time-field .form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.fixture-change-form .select2-container {
    display: block;
    width: 100% !important;
}

.fixture-change-form .select2-container .select2-selection--single {
    height: 40px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.fixture-change-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 2rem 0 0;
    color: var(--app-text);
    font-size: 1.15rem;
    font-weight: 650;
    line-height: 40px;
}

.fixture-change-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 0;
}

.fixture-change-form .select2-container--default.select2-container--focus .select2-selection--single,
.fixture-change-form .select2-container--default.select2-container--open .select2-selection--single {
    border: 0;
    box-shadow: none;
}

.fixture-team-dropdown.select2-dropdown {
    border: 2px solid var(--app-text);
    border-radius: 0;
    box-shadow: 0 12px 24px rgba(17, 18, 20, 0.14);
}

.fixture-team-dropdown .select2-search--dropdown {
    padding: 0.65rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-muted);
}

.fixture-team-dropdown .select2-search__field {
    min-height: 44px;
    padding: 0.55rem 0.7rem !important;
    border: 2px solid var(--app-text) !important;
    border-radius: 0;
    background: var(--app-surface);
    color: var(--app-text);
    font-family: inherit;
    font-size: 1rem;
}

.fixture-team-dropdown .select2-results__option {
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
}

.fixture-team-dropdown .select2-results__options[aria-expanded="true"] {
    max-height: min(420px, 55vh);
}

.fixture-team-dropdown .select2-results__group {
    padding: 0.75rem 0.75rem 0.4rem;
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 800;
}

.select2-container--default .fixture-team-dropdown .select2-results__option--selected {
    background: var(--app-surface-muted);
}

.select2-container--default .fixture-team-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--app-text);
    color: #ffffff;
}

.fixture-result-grid {
    max-width: 620px;
}

.fixture-calculate-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    cursor: pointer;
}

.fixture-calculate-option .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
}

.fixture-calculate-option strong,
.fixture-calculate-option small {
    display: block;
}

.fixture-calculate-option small {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
}

.fixture-calculated-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border-left: 4px solid #198754;
    background: #edf8f1;
    color: #176536;
}

.fixture-calculated-note svg {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
}

.fixture-calculated-note p {
    margin: 0;
}

.fixture-sponsor-field {
    max-width: 620px;
}

.fixture-change-actions {
    margin-top: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

.fixture-delete-link {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--app-danger);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.fixture-delete-link:hover,
.fixture-delete-link:focus-visible {
    color: color-mix(in srgb, var(--app-danger) 78%, #000000);
}

@media (max-width: 575.98px) {
    .fixture-change-panel {
        margin-inline: -0.75rem;
        padding: 1.25rem;
        border-right: 0;
        border-left: 0;
    }

    .fixture-change-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fixture-change-actions .btn {
        width: 100%;
    }

    .fixture-delete-link {
        order: 3;
        margin-left: 0;
        text-align: center;
    }
}

.account-status-page {
    display: grid;
    width: 100%;
    min-height: 100vh;
    padding: 1.25rem;
    place-items: center;
}

.account-status-panel {
    width: min(720px, 100%);
    padding: clamp(2rem, 6vw, 4.5rem);
    background: var(--app-surface);
}

.account-status-code {
    margin: 0 0 0.65rem;
    color: var(--brand-primary);
    font-weight: 800;
    text-transform: uppercase;
}

.account-status-panel h1 {
    margin: 0 0 1rem;
}

.account-status-panel > p:last-of-type {
    max-width: 540px;
    margin-bottom: 2rem;
    color: var(--app-text-muted);
}

.account-mobile-back {
    display: none;
}

.login-title-mobile {
    display: none;
}

.account-brand {
    margin-bottom: 1.5rem;
    text-align: center;
}

.account-logo {
    display: block;
    width: auto;
    max-width: min(270px, 70vw);
    max-height: 92px;
    margin: 0 auto;
    object-fit: contain;
}

.account-brand-fallback {
    font-size: 1.25rem;
}

/* Prediction cards */

.player-stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.player-stat-card .card-body {
    padding: 0;
    background: transparent;
}

.player-stat-bg {
    background-image: url("/images/player.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    background-size: auto 100%;
}

.player-stat-content {
    width: 65%;
    padding: 1.5rem;
}

.prediction-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--brand-primary);
    border-radius: var(--app-radius);
    background: transparent;
    color: var(--brand-primary);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.score-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid var(--brand-primary);
    border-radius: var(--app-radius);
    background: transparent;
    color: var(--brand-primary);
    font-weight: 650;
    white-space: nowrap;
}

.score-btn:hover,
.score-btn.selected {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.prediction-trigger,
.card-clickable {
    cursor: pointer;
}

.prediction-box.locked {
    border-color: #a9a9a9;
    color: #717171;
}

.prediction-trigger.disabled {
    cursor: default;
}

.prediction-trigger.disabled * {
    pointer-events: none;
}

.bg-locked {
    cursor: not-allowed;
}

.team-name {
    line-height: 1.2;
}

.fixture-view {
    padding-top: 1.5rem !important;
    padding-bottom: 0.7rem !important;
}

/* My leagues */

.league-my-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    padding-bottom: 2rem;
}

.league-my-list {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-my-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 100px 20px;
    gap: 1rem;
    align-items: center;
    min-height: 108px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

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

.league-my-row:hover,
.league-my-row:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.league-my-icon {
    display: grid;
    width: 50px;
    height: 50px;
    border: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--brand-primary);
    place-items: center;
}

.league-my-icon svg {
    width: 25px;
    height: 25px;
}

.league-my-copy {
    min-width: 0;
}

.league-my-copy > strong,
.league-my-copy > .league-row-summary {
    display: block;
}

.league-my-copy > strong {
    overflow-wrap: anywhere;
    font-size: 1.12rem;
}

.league-my-copy > .league-row-summary {
    max-width: 760px;
    margin-top: 0.2rem;
    color: var(--app-text-muted);
    font-size: 1.05rem;
}

.league-my-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    margin-top: 0.55rem;
    color: var(--app-text-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.league-my-meta > span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.league-my-meta svg {
    width: 15px;
    height: 15px;
}

.league-my-players {
    text-align: center;
}

.league-my-players strong,
.league-my-players small {
    display: block;
}

.league-my-players strong {
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}

.league-my-players small {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.league-my-chevron {
    width: 20px;
    color: var(--app-text-muted);
}

.league-page-link {
    color: var(--app-text);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.league-page-link:hover,
.league-page-link:focus-visible {
    color: var(--brand-primary);
}

@media (max-width: 575.98px) {
    .league-my-page {
        gap: 1rem;
    }

    .league-my-list {
        margin-inline: -0.75rem;
        border-right: 0;
        border-left: 0;
    }

    .league-my-row {
        grid-template-columns: 44px minmax(0, 1fr) 18px;
        gap: 0.75rem;
        min-height: 112px;
        padding: 0.9rem 1rem;
    }

    .league-my-icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 44px;
        height: 44px;
    }

    .league-my-icon svg {
        width: 22px;
        height: 22px;
    }

    .league-my-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .league-my-meta {
        gap: 0.35rem 0.75rem;
        margin-top: 0.45rem;
    }

    .league-my-players {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        gap: 0.35rem;
        align-items: baseline;
        text-align: left;
    }

    .league-my-players strong,
    .league-my-players small {
        display: inline;
        margin: 0;
        font-size: 0.78rem;
    }

    .league-my-chevron {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

/* League view */

.league-view-page {
    display: grid;
    gap: 1rem;
    padding-bottom: 2rem;
}

.league-view-back {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    width: fit-content;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.league-view-back:hover,
.league-view-back:focus-visible {
    color: var(--brand-primary);
}

.league-view-back svg {
    width: 19px;
    height: 19px;
}

.league-view-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem clamp(1.5rem, 5vw, 4rem);
    align-items: end;
    padding: clamp(1.5rem, 5vw, 3.25rem);
    overflow: hidden;
    border-radius: 8px;
    background: #111214;
    color: #ffffff;
}

.league-view-hero-copy {
    grid-column: 1 / -1;
    min-width: 0;
}

.league-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--brand-primary);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-view-meta span {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.league-view-meta svg {
    width: 17px;
    height: 17px;
}

.league-view-hero h1 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.96;
}

.league-view-hero-copy > p {
    max-width: 680px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1.05rem;
}

.league-view-actions {
    display: flex;
    grid-column: 1;
    flex-wrap: wrap;
    align-self: center;
}

.league-invite-panel {
    padding: clamp(1.25rem, 4vw, 2.25rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-invite-heading {
    display: flex;
    gap: 1rem;
    align-items: start;
    justify-content: space-between;
}

.league-invite-heading span {
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-invite-heading h2 {
    margin: 0.1rem 0 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
}

.league-invite-close {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    place-items: center;
}

.league-invite-close svg {
    width: 20px;
    height: 20px;
}

.league-invite-panel > p {
    max-width: 680px;
    margin: 0.65rem 0 1.25rem;
    color: var(--app-text-muted);
}

.league-invite-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 1rem;
}

.league-invite-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-invite-field .form-control {
    min-height: 50px;
}

.league-standings-panel {
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-standings-table {
    width: 100%;
    min-width: 620px;
    table-layout: fixed;
}

.league-standings-table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    border-bottom-color: var(--app-border);
    vertical-align: middle;
}

.league-standings-table thead th {
    border-bottom-width: 1px;
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-standings-table tbody tr:last-child > * {
    border-bottom: 0;
}

.league-standings-table tbody tr {
    transition: background-color 150ms ease;
}

.league-standings-table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-primary) 5%, var(--app-surface));
}

.league-standings-table .league-current-player {
    background: var(--brand-primary-soft);
    box-shadow: inset 4px 0 0 var(--brand-primary);
}

.league-standings-pagination {
    padding: 1rem;
    border-top: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-standings-pagination .pagination {
    --bs-pagination-color: var(--app-text);
    --bs-pagination-hover-color: var(--brand-primary-hover);
    --bs-pagination-focus-color: var(--brand-primary-hover);
    --bs-pagination-active-color: var(--brand-text-on-primary);
    --bs-pagination-active-bg: var(--brand-primary);
    --bs-pagination-active-border-color: var(--brand-primary);
    --bs-pagination-disabled-color: var(--app-text-muted);
    --bs-pagination-disabled-bg: var(--app-surface-muted);
    --bs-pagination-disabled-border-color: var(--app-border);
}

.league-standings-pagination .page-link {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    font-weight: 700;
    place-items: center;
}

.league-pagination-mobile {
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.league-pagination-mobile .btn {
    min-width: 94px;
}

.league-pagination-mobile span {
    color: var(--app-text-muted);
    font-weight: 700;
    text-align: center;
}

.league-position-column {
    width: 86px;
    text-align: center;
}

.league-form-column {
    width: 225px;
}

.league-points-column {
    width: 110px;
    text-align: right;
}

.league-position {
    display: inline-grid;
    width: 40px;
    height: 40px;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    background: var(--app-surface);
    font-weight: 850;
    place-items: center;
}

.league-current-player .league-position {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.league-player {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    min-width: 0;
}

.league-player-badge {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

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

.league-player-name-text {
    display: inline;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 400;
}

.league-current-player .league-player-name-text {
    font-weight: 700;
}

.league-you-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.42rem;
    background: var(--league-you-background, var(--brand-primary));
    color: var(--league-you-color, var(--brand-text-on-primary));
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
    vertical-align: 0.12rem;
}

.league-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.league-form .badge {
    display: inline-grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 850;
    place-items: center;
}

.league-form-mobile {
    display: none;
}

.league-points-column strong {
    font-size: 1.35rem;
    font-weight: 900;
}

.league-empty-state {
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    text-align: center;
}

.league-empty-state svg {
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    color: var(--brand-primary);
}

.league-empty-state h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 850;
}

.league-empty-state p {
    margin: 0.4rem 0 0;
    color: var(--app-text-muted);
}

.league-leave-link {
    padding-top: 0.25rem;
    text-align: center;
}

.league-leave-link button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--app-text-muted);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.league-leave-link button:hover,
.league-leave-link button:focus-visible {
    color: var(--app-danger);
}

.league-confirm-dialog {
    width: min(540px, calc(100% - 1.5rem));
    margin-right: auto;
    margin-left: auto;
}

.league-confirm-modal {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 28px 80px rgba(12, 14, 18, 0.3);
}

.league-confirm-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 6px solid var(--brand-primary);
    background: #111214;
    color: #ffffff;
}

.league-confirm-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.league-confirm-icon svg {
    width: 25px;
    height: 25px;
}

.league-confirm-header span {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--brand-primary);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-confirm-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.league-confirm-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
}

.league-confirm-close:hover,
.league-confirm-close:focus-visible {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.league-confirm-close svg {
    width: 20px;
    height: 20px;
}

.league-confirm-body {
    padding: 1.75rem 1.5rem 1.25rem;
}

.league-confirm-body > p {
    margin: 0;
    font-size: 1.05rem;
}

.league-confirm-body > p strong {
    overflow-wrap: anywhere;
}

.league-confirm-reassurance {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.25rem;
    padding: 1rem;
    border-left: 4px solid var(--brand-primary);
    background: var(--brand-primary-soft);
    font-weight: 700;
}

.league-confirm-reassurance svg {
    width: 23px;
    height: 23px;
    color: var(--brand-primary);
}

@media (max-width: 767.98px) {
    .league-view-hero {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: 0;
    }

    .league-view-meta {
        display: none;
    }

    .league-invite-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 575.98px) {
    .league-view-page {
        gap: 0.8rem;
    }

    .league-view-hero h1 {
        font-size: 2.8rem;
    }

    .league-view-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .league-confirm-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.8rem;
        padding: 1.2rem;
    }

    .league-confirm-icon {
        width: 46px;
        height: 46px;
    }

    .league-confirm-header h2 {
        font-size: 1.75rem;
    }

    .league-confirm-body {
        padding: 1.4rem 1.2rem 1rem;
    }

    .league-invite-link .input-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .league-invite-link .form-control {
        min-width: 0;
    }

    .league-standings-scroll {
        overflow: visible;
    }

    .league-standings-table {
        min-width: 0;
    }

    .league-standings-table > :not(caption) > * > * {
        padding: 0.75rem 0.55rem;
    }

    .league-position-column {
        width: 58px;
    }

    .league-points-column {
        width: 72px;
    }

    .league-form-column {
        display: none;
    }

    .league-position {
        width: 34px;
        height: 34px;
    }

    .league-player {
        gap: 0.6rem;
    }

    .league-player-badge {
        width: 36px;
        height: 36px;
    }

    .league-player-name-text {
        font-size: 0.98rem;
    }

    .league-form-mobile {
        display: flex;
        gap: 0.22rem;
        margin-top: 0.35rem;
    }

    .league-form-mobile .badge {
        flex-basis: 23px;
        width: 23px;
        height: 23px;
        font-size: 0.66rem;
    }

    .league-points-column strong {
        font-size: 1.15rem;
    }
}

/* Home and authenticated utility pages */

.home-page {
    padding-bottom: 2rem;
}

.home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: 8px;
    background: #111214;
    color: #ffffff;
}

.home-kicker {
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 850;
}

.home-rank-pill {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-action,
.home-rivalry-panel,
.home-league-item {
    display: block;
    border-radius: 8px;
    text-decoration: none;
}

.home-action {
    min-height: 132px;
    padding: 1.25rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
}

.home-action-primary {
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.home-action span,
.home-rivalry-panel span {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.home-action strong,
.home-rivalry-panel strong {
    display: block;
    max-width: 12rem;
    font-size: 1.6rem;
    line-height: 1.05;
}

.home-rivalry-panel {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #151515;
    color: #ffffff;
}

.home-rivalry-panel small {
    display: block;
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
}

.home-section {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
}

.home-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-section-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 850;
}

.home-section-head div,
.home-utility-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.home-section-head a,
.home-utility-links a,
.home-utility-links button {
    border: 0;
    background: transparent;
    color: var(--brand-primary);
    font-weight: 750;
    text-decoration: none;
}

.home-league-list {
    display: grid;
    gap: 0.65rem;
}

.home-league-item {
    padding: 0.9rem 1rem;
    border: 1px solid #eceff3;
    color: var(--app-text);
}

.home-league-item span {
    display: block;
    margin-top: 0.15rem;
    color: var(--app-text-muted);
}

.home-utility-links {
    margin-top: 1.25rem;
}

/* Player dashboard */

.dashboard-page {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

.dashboard-page h1,
.dashboard-page h2,
.dashboard-page h3,
.dashboard-page p {
    margin-top: 0;
}

.dashboard-page h2,
.dashboard-page h3 {
    color: var(--app-text);
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--brand-primary);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    min-height: 210px;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    border-radius: var(--app-radius);
    background: #111214;
    color: #ffffff;
}

.dashboard-player {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    min-width: 0;
}

.dashboard-avatar {
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    border: 3px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-avatar-fallback {
    display: grid;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    font-size: 1.7rem;
    font-weight: 850;
    place-items: center;
}

.dashboard-player-copy {
    min-width: 0;
}

.dashboard-player-copy h1 {
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 4.75rem);
    font-weight: 850;
    line-height: 0.95;
}

.dashboard-summary {
    display: grid;
    grid-auto-columns: minmax(105px, 1fr);
    grid-auto-flow: column;
    align-items: stretch;
}

.dashboard-summary-item {
    display: grid;
    grid-template-rows: auto auto;
    min-width: 105px;
    padding: 0.35rem 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    align-content: center;
}

.dashboard-summary-item strong {
    color: #ffffff;
    font-size: clamp(2.3rem, 4vw, 4rem);
    font-weight: 850;
    line-height: 0.9;
}

.dashboard-summary-item > span {
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-summary-item small {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-top: 0.35rem;
    color: #82d99a;
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-summary-item small svg {
    width: 14px;
    height: 14px;
}

.dashboard-notice {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-left: 5px solid #198754;
    background: #eaf7ef;
    color: #103c22;
}

.dashboard-notice > svg {
    flex: 0 0 auto;
    width: 24px;
}

.dashboard-notice strong,
.dashboard-notice span {
    display: block;
}

.dashboard-deadline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    min-height: 170px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--app-border);
    border-left: 8px solid var(--brand-primary);
    background: var(--app-surface);
}

.dashboard-deadline h2 {
    max-width: 700px;
    margin-bottom: 0.35rem;
    font-size: clamp(1.7rem, 3.2vw, 2.8rem);
    font-weight: 850;
    line-height: 1.02;
}

.dashboard-deadline p {
    margin-bottom: 0;
    color: var(--app-text-muted);
}

.dashboard-fixture-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.dashboard-panel,
.dashboard-league-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
}

.dashboard-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.dashboard-panel-heading,
.dashboard-section-heading,
.dashboard-battle-heading {
    display: flex;
    gap: 1.25rem;
    align-items: flex-end;
    justify-content: space-between;
}

.dashboard-panel-heading {
    margin-bottom: 1.25rem;
}

.dashboard-panel-heading h2,
.dashboard-section-heading h2,
.dashboard-battle-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    font-weight: 850;
    line-height: 1;
}

.dashboard-panel-heading a,
.dashboard-section-heading > a,
.dashboard-battle-heading > a {
    flex: 0 0 auto;
    color: var(--brand-primary);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-prediction-list,
.dashboard-result-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-prediction-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 82px;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

.dashboard-prediction-row:hover,
.dashboard-prediction-row:focus-visible {
    border-color: var(--brand-primary);
    color: var(--app-text);
}

.dashboard-fixture-date {
    text-align: center;
}

.dashboard-fixture-date strong,
.dashboard-fixture-date span,
.dashboard-fixture-date b,
.dashboard-fixture-teams span {
    display: block;
}

.dashboard-fixture-date strong {
    font-size: 0.82rem;
    text-transform: uppercase;
}

.dashboard-fixture-date span,
.dashboard-fixture-date b {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

.dashboard-fixture-date b {
    font-weight: 700;
}

.dashboard-fixture-teams {
    min-width: 0;
    font-weight: 750;
}

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

.dashboard-entered-score {
    display: grid;
    grid-template-columns: 38px 12px 38px;
    gap: 0.25rem;
    align-items: center;
    text-align: center;
}

.dashboard-entered-score strong {
    display: grid;
    width: 38px;
    height: 42px;
    border: 2px solid var(--app-text);
    background: var(--app-surface-muted);
    font-size: 1.25rem;
    place-items: center;
}

.dashboard-entered-score span {
    color: var(--app-text-muted);
    font-weight: 800;
}

.dashboard-prediction-missing {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, var(--app-border));
    background: var(--brand-primary-soft);
}

.dashboard-score-needed {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-score-needed svg {
    width: 16px;
}

.dashboard-panel-empty {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-height: 82px;
    padding: 1rem;
    border: 1px dashed var(--app-border);
    color: var(--app-text-muted);
}

.dashboard-panel-empty svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: var(--brand-primary);
}

.dashboard-result-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--app-border);
}

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

.dashboard-result-row strong,
.dashboard-result-row span {
    display: block;
}

.dashboard-result-row > div > span {
    margin-top: 0.15rem;
    color: var(--app-text-muted);
    font-size: 0.85rem;
}

.dashboard-points-badge {
    display: grid !important;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 850;
    place-items: center;
}

.dashboard-points-result {
    background: #dbeafe;
    color: #174ea6;
}

.dashboard-points-exact {
    background: #dff4e5;
    color: #116329;
}

.dashboard-points-none {
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
}

.dashboard-battle {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    background: linear-gradient(105deg, #080809 0 50%, #b3081a 50% 100%);
    color: #ffffff;
}

.dashboard-battle::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 47px);
    content: "";
}

.dashboard-battle .dashboard-eyebrow,
.dashboard-battle-heading > a {
    color: #ffffff;
}

.dashboard-battle-heading {
    align-items: flex-start;
}

.dashboard-battle-heading h2 {
    color: #ffffff;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.dashboard-battle-heading p {
    max-width: 620px;
    margin: 0.6rem 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-battle-heading > a {
    padding-top: 0.35rem;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.dashboard-battle-scores {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin: clamp(2rem, 5vw, 3.5rem) 0 1.25rem;
}

.dashboard-battle-side {
    display: flex;
    gap: 1.15rem;
    align-items: center;
}

.dashboard-battle-side img {
    width: clamp(58px, 8vw, 92px);
    height: clamp(58px, 8vw, 92px);
    object-fit: contain;
}

.dashboard-battle-side strong,
.dashboard-battle-side span {
    display: block;
}

.dashboard-battle-side strong {
    color: #ffffff;
    font-size: clamp(3.6rem, 8vw, 7.5rem);
    font-weight: 900;
    line-height: 0.8;
}

.dashboard-battle-side span {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-battle-mackems {
    justify-content: flex-end;
    text-align: right;
}

.dashboard-battle-vs {
    display: grid;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    color: #111214;
    font-weight: 900;
    place-items: center;
}

.dashboard-battle-track {
    display: flex;
    width: 100%;
    height: 58px;
    overflow: hidden;
    border: 3px solid #ffffff;
    background: #ffffff;
}

.dashboard-battle-progress {
    display: flex;
    align-items: center;
    min-width: 70px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.dashboard-battle-progress-mags {
    justify-content: flex-end;
    padding-right: 1rem;
    background: repeating-linear-gradient(135deg, #09090a 0 12px, #1d1d20 12px 24px);
}

.dashboard-battle-progress-mackems {
    justify-content: flex-start;
    padding-left: 1rem;
    background: repeating-linear-gradient(135deg, #d81430 0 12px, #be1028 12px 24px);
}

.dashboard-contribution {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.dashboard-contribution span,
.dashboard-contribution strong {
    display: block;
}

.dashboard-contribution span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-contribution strong {
    color: #ffffff;
    font-size: 1.75rem;
}

.dashboard-contribution p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
}

.dashboard-leagues {
    padding: clamp(1rem, 3vw, 1.75rem) 0 0;
}

.dashboard-section-heading {
    margin-bottom: 1.25rem;
}

.dashboard-section-heading p {
    margin: 0.45rem 0 0;
    color: var(--app-text-muted);
}

.dashboard-league-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-league-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-league-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-league-card {
    min-width: 0;
    overflow: hidden;
}

.dashboard-league-card > header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 96px;
    padding: 1.15rem;
    border-bottom: 3px solid var(--app-text);
}

.dashboard-league-card > header span,
.dashboard-league-card > header h3 {
    display: block;
}

.dashboard-league-card > header span {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-league-card > header h3 {
    margin: 0.15rem 0 0;
    font-size: 1.65rem;
    font-weight: 850;
}

.dashboard-league-card > header h3 a {
    color: inherit;
    text-decoration: none;
}

.dashboard-league-card > header h3 a:hover {
    color: var(--brand-primary);
}

.dashboard-league-card > header > strong {
    color: var(--brand-primary);
    font-size: 2rem;
    line-height: 1;
}

.dashboard-mini-table {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-mini-table li,
.dashboard-you-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    min-height: 45px;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.dashboard-mini-table li > span,
.dashboard-you-row > span {
    color: var(--app-text-muted);
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
}

.dashboard-mini-table li > strong,
.dashboard-you-row > strong {
    overflow: hidden;
    font-size: 1.05rem;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-mini-table li > b,
.dashboard-you-row > b {
    font-size: 1.05rem;
}

.dashboard-mini-table .is-player,
.dashboard-you-row {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.dashboard-you-row {
    border-top: 3px solid var(--brand-primary);
    border-bottom: 0;
}

.dashboard-trend {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.dashboard-trend-current {
    flex: 0 0 auto;
    text-align: right;
}

.dashboard-trend-current strong,
.dashboard-trend-current span {
    display: block;
}

.dashboard-trend-current strong {
    color: var(--brand-primary);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 0.9;
}

.dashboard-trend-current span {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin-top: 0.5rem;
    color: #198754;
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-trend-current svg {
    width: 16px;
}

.dashboard-chart {
    position: relative;
    height: 280px;
    margin-top: 1.5rem;
}

.dashboard-chart-plot {
    position: relative;
    height: 250px;
}

.dashboard-chart svg {
    display: block;
    width: 100%;
    height: 250px;
    overflow: visible;
}

.dashboard-chart-grid line {
    stroke: var(--app-border);
    stroke-width: 1;
}

.dashboard-chart-labels text {
    fill: var(--app-text-muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-chart-area {
    fill: var(--brand-primary-soft);
}

.dashboard-chart-line {
    fill: none;
    stroke: var(--brand-primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
    vector-effect: non-scaling-stroke;
}

.dashboard-chart-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border: 4px solid var(--brand-primary);
    border-radius: 50%;
    background: var(--app-surface);
}

.dashboard-chart-axis {
    display: flex;
    justify-content: space-between;
    padding-left: 58px;
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-utilities {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-utility-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    gap: 1rem;
    align-items: center;
    min-height: 94px;
    padding: 1.1rem 1.25rem;
    border: 1px solid #111214;
    background: #111214;
    color: #ffffff;
    text-decoration: none;
}

.dashboard-utility-card:hover,
.dashboard-utility-card:focus-visible {
    border-color: var(--brand-primary);
    background: #1b1c1f;
    color: #ffffff;
}

.dashboard-utility-card > svg:first-child {
    width: 36px;
    height: 36px;
    color: var(--brand-primary);
}

.dashboard-utility-card > svg:last-child {
    width: 22px;
    color: rgba(255, 255, 255, 0.58);
}

.dashboard-utility-card strong,
.dashboard-utility-card small {
    display: block;
}

.dashboard-utility-card strong {
    font-size: 1.05rem;
}

.dashboard-utility-card small {
    overflow: hidden;
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.68);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-secondary-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0 1rem;
}

.dashboard-secondary-links a,
.dashboard-secondary-links button {
    border: 0;
    background: transparent;
    color: var(--app-text-muted);
    font-size: 0.85rem;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

@media (max-width: 991.98px) {
    .dashboard-identity {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .dashboard-summary {
        width: 100%;
    }

    .dashboard-summary-item:first-child {
        border-left: 0;
    }

    .dashboard-league-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-league-grid-3 .dashboard-league-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .dashboard-page {
        gap: 1rem;
    }

    .dashboard-identity {
        min-height: 0;
        padding: 1.35rem 1.15rem 1.5rem;
    }

    .dashboard-avatar {
        width: 66px;
        height: 66px;
    }

    .dashboard-avatar-fallback {
        font-size: 1.3rem;
    }

    .dashboard-player-copy h1 {
        font-size: clamp(2.4rem, 13vw, 3.4rem);
    }

    .dashboard-summary-item {
        min-width: 0;
        padding: 0.25rem 0.8rem;
    }

    .dashboard-summary-item strong {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .dashboard-summary-item > span,
    .dashboard-summary-item small {
        font-size: 0.68rem;
    }

    .dashboard-deadline,
    .dashboard-fixture-grid,
    .dashboard-league-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-deadline {
        gap: 1.25rem;
        min-height: 0;
        padding: 1.35rem 1.15rem;
    }

    .dashboard-deadline-button {
        width: 100%;
    }

    .dashboard-panel {
        padding: 1.15rem;
    }

    .dashboard-league-grid-3 .dashboard-league-card:first-child {
        grid-column: auto;
    }

    .dashboard-battle {
        padding: 1.4rem 1rem;
    }

    .dashboard-battle-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-battle-heading h2 {
        font-size: clamp(2.7rem, 15vw, 4rem);
    }

    .dashboard-battle-scores {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        gap: 0.5rem;
    }

    .dashboard-battle-side {
        gap: 0.5rem;
    }

    .dashboard-battle-side img {
        width: 44px;
        height: 44px;
    }

    .dashboard-battle-side strong {
        font-size: clamp(2.25rem, 12vw, 3.5rem);
    }

    .dashboard-battle-vs {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .dashboard-battle-track {
        height: 48px;
    }

    .dashboard-battle-progress {
        font-size: 0.92rem;
    }

    .dashboard-contribution {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dashboard-section-heading {
        align-items: flex-start;
    }

    .dashboard-trend .dashboard-section-heading {
        flex-direction: column;
    }

    .dashboard-trend-current {
        display: flex;
        gap: 0.75rem;
        align-items: baseline;
        text-align: left;
    }

    .dashboard-chart {
        height: 225px;
        margin-top: 0.75rem;
    }

    .dashboard-chart svg {
        height: 200px;
    }

    .dashboard-chart-plot {
        height: 200px;
    }

    .dashboard-utilities {
        gap: 0.75rem;
    }

    .dashboard-utility-card {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0.65rem;
        min-height: 100px;
        padding: 0.9rem;
    }

    .dashboard-utility-card > svg:first-child {
        width: 30px;
        height: 30px;
    }

    .dashboard-utility-card > svg:last-child,
    .dashboard-utility-card small {
        display: none;
    }
}

@media (max-width: 420px) {
    .dashboard-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-page > *,
    .dashboard-identity,
    .dashboard-player,
    .dashboard-summary {
        min-width: 0;
    }

    .dashboard-player {
        gap: 0.85rem;
    }

    .dashboard-avatar {
        width: 58px;
        height: 58px;
    }

    .dashboard-summary-item {
        padding-right: 0.55rem;
        padding-left: 0.55rem;
    }

    .dashboard-summary {
        grid-auto-columns: minmax(0, 1fr);
    }

    .dashboard-prediction-row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 0.6rem;
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .dashboard-entered-score {
        grid-template-columns: 32px 8px 32px;
    }

    .dashboard-entered-score strong {
        width: 32px;
        height: 38px;
    }

    .dashboard-score-needed span {
        display: none;
    }

    .dashboard-battle-side img {
        display: none;
    }
}

/* Sponsor admin */

.sponsor-admin-list {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.sponsor-admin-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 20px;
    gap: 1rem;
    align-items: center;
    min-height: 92px;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

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

.sponsor-admin-row:hover,
.sponsor-admin-row:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.sponsor-admin-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
}

.sponsor-admin-mark svg {
    width: 23px;
    height: 23px;
}

.sponsor-admin-copy {
    min-width: 0;
}

.sponsor-admin-copy strong,
.sponsor-admin-copy small,
.sponsor-admin-copy > span {
    display: block;
}

.sponsor-admin-copy strong {
    font-size: 1.08rem;
}

.sponsor-admin-copy small {
    margin-top: 0.15rem;
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

.sponsor-admin-copy > span {
    max-width: 650px;
    margin-top: 0.25rem;
    overflow: hidden;
    color: var(--app-text-muted);
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sponsor-admin-stats {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.sponsor-admin-stat {
    min-width: 64px;
    text-align: center;
}

.sponsor-admin-stat strong,
.sponsor-admin-stat small {
    display: block;
}

.sponsor-admin-stat strong {
    font-size: 1.1rem;
}

.sponsor-admin-stat small {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

.sponsor-admin-chevron {
    width: 20px;
    color: var(--app-text-muted);
}

.sponsor-change-panel {
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.sponsor-change-form {
    display: grid;
    gap: 1.75rem;
}

.sponsor-change-section {
    display: grid;
    gap: 1rem;
}

.sponsor-change-section + .sponsor-change-section {
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

.sponsor-change-section-heading {
    margin-bottom: 0.25rem;
}

.sponsor-change-section-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 850;
}

.sponsor-change-section-heading p {
    max-width: 650px;
    margin: 0.4rem 0 0;
    color: var(--app-text-muted);
}

.sponsor-change-form .form-field:focus-within {
    border-color: var(--app-text);
    box-shadow: none;
}

.sponsor-colour-picker,
.sponsor-weight-picker {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.sponsor-colour-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.sponsor-colour-option {
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.sponsor-colour-option-content {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    gap: 0.65rem;
    align-items: center;
    min-height: 56px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.sponsor-colour-swatch {
    width: 28px;
    height: 28px;
    border: 1px solid currentColor;
}

.sponsor-colour-option strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sponsor-colour-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--app-text-muted);
    border-radius: 50%;
}

.sponsor-colour-option:has(input:checked) .sponsor-colour-option-content {
    border: 2px solid var(--app-text);
    padding: calc(0.65rem - 1px) calc(0.75rem - 1px);
}

.sponsor-colour-option:has(input:checked) .sponsor-colour-check {
    border: 5px solid var(--brand-primary);
}

.sponsor-colour-option:has(input:focus-visible) .sponsor-colour-option-content {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
    outline-offset: 2px;
}

.sponsor-weight-picker {
    margin-top: 0.35rem;
}

.sponsor-weight-picker legend {
    margin-bottom: 0.15rem;
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
}

.sponsor-weight-picker > p {
    margin: 0 0 0.75rem;
    color: var(--app-text-muted);
}

.sponsor-weight-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(52px, 76px));
    gap: 0.55rem;
}

.sponsor-weight-option {
    margin: 0;
    cursor: pointer;
}

.sponsor-weight-option > span {
    display: grid;
    min-height: 50px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    font-weight: 800;
    place-items: center;
}

.sponsor-weight-option:has(input:checked) > span {
    border-color: var(--app-text);
    background: var(--app-text);
    color: var(--app-surface);
}

.sponsor-weight-option:has(input:focus-visible) > span {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
    outline-offset: 2px;
}

.sponsor-change-actions {
    margin-top: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--app-border);
}

@media (max-width: 991.98px) {
    .sponsor-colour-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .sponsor-colour-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .sponsor-admin-row {
        grid-template-columns: 46px minmax(0, 1fr) 18px;
        gap: 0.75rem;
        min-height: 104px;
        padding: 0.85rem 0.8rem;
    }

    .sponsor-admin-mark {
        grid-row: 1 / span 2;
    }

    .sponsor-admin-copy > span {
        display: none;
    }

    .sponsor-admin-stats {
        grid-column: 2;
        grid-row: 2;
        gap: 1.25rem;
        justify-content: flex-start;
    }

    .sponsor-admin-stat {
        min-width: 0;
        text-align: left;
    }

    .sponsor-admin-stat strong,
    .sponsor-admin-stat small {
        display: inline;
        font-size: 0.8rem;
    }

    .sponsor-admin-chevron {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .sponsor-change-panel {
        margin-inline: -0.75rem;
        padding: 1.25rem;
        border-right: 0;
        border-left: 0;
    }

    .sponsor-colour-option-content {
        grid-template-columns: 24px minmax(0, 1fr) 18px;
        gap: 0.5rem;
        padding: 0.6rem;
    }

    .sponsor-colour-option:has(input:checked) .sponsor-colour-option-content {
        padding: calc(0.6rem - 1px);
    }

    .sponsor-colour-swatch {
        width: 24px;
        height: 24px;
    }

    .sponsor-change-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sponsor-change-actions .btn {
        width: 100%;
    }

    .sponsor-change-actions .fixture-delete-link {
        order: 3;
        margin-left: 0;
        text-align: center;
    }
}

/* Sponsor colours */

.sponsor-blue { background: rgba(13, 110, 253, 0.15) !important; color: #223fb3 !important; }
.sponsor-bluelight { background: rgba(13, 110, 253, 0.08) !important; color: #4a6cff !important; }
.sponsor-green { background: rgba(25, 135, 84, 0.15) !important; color: #198754 !important; }
.sponsor-greenlight { background: rgba(126, 217, 87, 0.2) !important; color: #4f9f37 !important; }
.sponsor-red { background: rgba(220, 53, 69, 0.15) !important; color: #b02a37 !important; }
.sponsor-yellow { background: rgba(255, 193, 7, 0.2) !important; color: #856404 !important; }
.sponsor-teal { background: rgba(32, 201, 151, 0.15) !important; color: #0f5132 !important; }
.sponsor-purple { background: rgba(111, 66, 193, 0.15) !important; color: #6f42c1 !important; }
.sponsor-black { background: rgba(0, 0, 0, 0.1) !important; color: #000000 !important; }
.sponsor-orange { background: rgba(253, 126, 20, 0.15) !important; color: #c85e05 !important; }
.sponsor-pink { background: rgba(232, 62, 140, 0.15) !important; color: #b72d6c !important; }
.sponsor-brown { background: rgba(139, 69, 19, 0.15) !important; color: #8b4513 !important; }

/* Predictions */

.prediction-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    padding-bottom: 2rem;
}

.prediction-page-heading {
    display: flex;
    gap: 2rem;
    align-items: end;
    justify-content: space-between;
    padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.prediction-page-eyebrow {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 850;
    text-transform: uppercase;
}

.prediction-page-heading h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    font-weight: 900;
    line-height: 0.95;
}

.prediction-page-heading p {
    margin: 0.65rem 0 0;
    color: var(--app-text-muted);
    font-size: 1.05rem;
}

.prediction-empty-state {
    padding: clamp(2.5rem, 8vw, 6rem) 1.5rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    text-align: center;
}

.prediction-empty-state > svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--brand-primary);
}

.prediction-empty-state h2 {
    margin-bottom: 0.35rem;
}

.prediction-empty-state p {
    margin: 0;
    color: var(--app-text-muted);
}

.prediction-accordion {
    display: grid;
    gap: 1rem;
}

.prediction-section {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.prediction-section-toggle {
    display: flex;
    gap: 1rem;
    min-height: 66px;
    padding: 1rem 1.2rem;
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: none !important;
}

.prediction-section-toggle:not(.collapsed) {
    background: var(--app-surface);
    color: var(--app-text);
}

.prediction-section-title {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
}

.prediction-section-title strong {
    font-size: 1.35rem;
    font-weight: 900;
}

.prediction-section-count {
    display: grid;
    min-width: 32px;
    height: 27px;
    padding-inline: 0.5rem;
    border-radius: 999px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1;
    place-items: center;
}

.prediction-section-body {
    padding: 0;
    border-top: 0;
    background: transparent;
}

.prediction-fixture-list {
    display: grid;
    gap: 0.65rem;
}

.prediction-fixture {
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    transition: border-color 150ms ease, transform 150ms ease;
}

.prediction-fixture-main {
    cursor: pointer;
    outline: none;
}

.prediction-fixture-main:hover,
.prediction-fixture-main:focus-visible {
    background: color-mix(in srgb, var(--brand-primary) 4%, var(--app-surface));
}

.prediction-fixture-main:focus-visible {
    box-shadow: inset 0 0 0 2px var(--brand-primary);
}

.prediction-view {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
}

.prediction-fixture-date {
    display: grid;
    align-content: center;
    padding: 0.7rem 0.85rem;
    border-right: 1px solid var(--app-border);
    text-align: center;
}

.prediction-fixture-date span,
.prediction-fixture-date strong,
.prediction-fixture-date b {
    display: block;
    font-size: 1.05rem;
    font-style: normal;
    line-height: 1.35;
}

.prediction-fixture-date span {
    color: var(--app-text);
    font-weight: 700;
}

.prediction-fixture-date strong {
    color: var(--brand-primary);
    font-weight: 850;
}

.prediction-fixture-date b {
    color: var(--app-text-muted);
}

.prediction-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 0.65rem clamp(0.85rem, 2vw, 1.4rem);
    align-items: center;
    min-width: 0;
    padding: 0.85rem clamp(0.85rem, 2vw, 1.4rem);
}

.prediction-team {
    min-width: 0;
}

.prediction-team strong {
    display: block;
}

.prediction-team strong {
    overflow-wrap: anywhere;
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 780;
    line-height: 1.2;
}

.prediction-team-home {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
}

.prediction-team-away {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
}

.prediction-scoreline {
    display: grid;
    grid-template-columns: 44px 10px 44px;
    gap: 0.3rem;
    align-items: center;
    grid-column: 2;
    grid-row: 1;
    justify-content: center;
}

.prediction-score-separator,
.prediction-result-separator {
    display: grid;
    height: 100%;
    color: var(--app-text-muted);
    font-weight: 850;
    line-height: 1;
    place-items: center;
    text-align: center;
}

.prediction-actual-box {
    display: grid;
    width: 44px;
    height: 48px;
    border: 1px solid var(--app-text-muted);
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1;
    place-items: center;
}

.prediction-result-summary {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
}

.prediction-result-label::after {
    content: ":";
}

.prediction-result-label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    color: var(--app-text-muted);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(1px);
    text-transform: uppercase;
}

.prediction-result-scoreline {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 0.3rem;
    align-items: center;
    min-height: 30px;
    line-height: 1;
}

.prediction-result-summary .prediction-actual-box {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    font-size: 1rem;
}

.prediction-points-earned {
    min-width: 76px;
    text-align: left;
}

.prediction-points-earned .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.prediction-points-earned .badge-danger {
    background: #e4e6ea;
    color: #3f454d;
}

.prediction-fixture .prediction-box {
    display: grid;
    width: 44px;
    height: 48px;
    border: 2px solid var(--app-text);
    border-radius: 0;
    background: var(--app-surface);
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1;
    place-items: center;
}

.prediction-edit {
    padding: 1.25rem;
    background: var(--app-surface);
}

.prediction-edit-heading {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--app-border);
}

.prediction-edit-heading span,
.prediction-edit-heading strong {
    display: block;
}

.prediction-edit-heading span {
    color: var(--app-text-muted);
    font-size: 1rem;
}

.prediction-edit-heading strong {
    color: var(--app-text);
    font-size: 1.35rem;
}

.prediction-edit-close {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    background: transparent;
    color: var(--app-text);
    place-items: center;
}

.prediction-edit-close:hover,
.prediction-edit-close:focus-visible {
    border-color: var(--app-text);
}

.prediction-edit-close svg {
    width: 19px;
    height: 19px;
}

.prediction-score-picker {
    display: grid;
    gap: 0.8rem;
}

.prediction-score-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
    gap: 1rem;
    align-items: center;
}

.prediction-score-row > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
}

.prediction-score-options {
    display: grid;
    grid-template-columns: repeat(11, minmax(34px, 1fr));
    gap: 0.35rem;
}

.prediction-fixture .score-btn {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 1px solid var(--app-border);
    border-radius: 0;
    background: var(--app-surface);
    color: var(--app-text);
    font-weight: 800;
}

.prediction-fixture .score-btn:hover,
.prediction-fixture .score-btn:focus-visible {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.prediction-fixture .score-btn.selected {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.prediction-edit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--app-border);
}

.prediction-sponsor {
    border-top: 0;
    font-size: 1.05rem;
    text-align: center;
}

.prediction-sponsor a,
.prediction-sponsor > div {
    display: flex;
    gap: 0.3rem 0.7rem;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    color: inherit;
    text-decoration: none;
}

.prediction-sponsor span,
.prediction-sponsor small {
    display: block;
}

.prediction-sponsor small {
    font-size: 1.05rem;
}

.prediction-sponsor-available {
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
}

@media (max-width: 767.98px) {
    .prediction-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .prediction-page > *,
    .prediction-accordion,
    .prediction-section,
    .prediction-fixture-list,
    .prediction-fixture {
        min-width: 0;
    }

    .prediction-page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

    .prediction-view {
        grid-template-columns: 1fr;
    }

    .prediction-fixture-date {
        display: flex;
        gap: 0.35rem;
        align-items: baseline;
        padding: 0.55rem 0.75rem;
        border-right: 0;
        border-bottom: 1px solid var(--app-border);
        text-align: left;
    }

    .prediction-fixture-date span,
    .prediction-fixture-date strong,
    .prediction-fixture-date b {
        display: inline;
        font-size: 1.05rem;
    }

    .prediction-fixture-date strong {
        font-size: 1.05rem;
    }

    .prediction-fixture-date b {
        margin-left: auto;
    }

    .prediction-matchup {
        grid-template-columns: minmax(0, 1fr) 52px 52px;
        grid-template-rows: auto auto auto auto;
        gap: 0.55rem 0.8rem;
        padding: 0.8rem 0.75rem;
    }

    .prediction-team-home,
    .prediction-team-away {
        grid-column: 1;
        text-align: left;
    }

    .prediction-team-home {
        grid-row: 2;
    }

    .prediction-team-away {
        grid-row: 3;
    }

    .prediction-team strong {
        font-size: 1rem;
    }

    .prediction-scoreline,
    .prediction-result-summary,
    .prediction-result-scoreline {
        display: contents;
    }

    .prediction-result-label {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        font-size: 0.7rem;
        text-align: center;
    }

    .prediction-result-label::after {
        content: "";
    }

    .prediction-actual-box {
        box-sizing: border-box;
        width: 52px;
        height: 52px;
        font-size: 1.15rem;
    }

    .prediction-result-summary .prediction-actual-box {
        box-sizing: border-box;
        width: 52px;
        height: 52px;
        border: 1px solid var(--app-text-muted);
        background: var(--app-surface-muted);
        font-size: 1.15rem;
    }

    .prediction-fixture .prediction-box {
        box-sizing: border-box;
        width: 52px;
        height: 52px;
    }

    .prediction-actual-home {
        grid-column: 2;
        grid-row: 2;
    }

    .prediction-actual-away {
        grid-column: 2;
        grid-row: 3;
    }

    .prediction-pick-home {
        grid-column: 3;
        grid-row: 2;
    }

    .prediction-pick-away {
        grid-column: 3;
        grid-row: 3;
    }

    .prediction-score-separator,
    .prediction-result-separator {
        display: none;
    }

    .prediction-points-earned {
        grid-column: 1 / -1;
        grid-row: 4;
        min-width: 0;
        min-height: 0;
        padding-top: 0.25rem;
        text-align: right;
    }

    .prediction-points-earned .badge {
        min-height: 28px;
        font-size: 0.78rem;
    }

    .prediction-score-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .prediction-score-options {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .prediction-page-heading h1 {
        font-size: 3.35rem;
    }

    .prediction-section-toggle {
        padding: 0.85rem;
    }

    .prediction-section-body {
        padding: 0;
    }

    .prediction-edit {
        padding: 1rem 0.75rem;
    }

    .prediction-edit-heading strong {
        font-size: 1.2rem;
    }

    .prediction-edit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .prediction-sponsor a,
    .prediction-sponsor > div {
        align-items: center;
        flex-direction: column;
        gap: 0;
    }
}

/* Prediction detail */

.prediction-detail-page {
    display: grid;
    gap: 1rem;
    width: 100%;
    padding-bottom: 2rem;
}

.prediction-detail-back {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    width: fit-content;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.prediction-detail-back:hover,
.prediction-detail-back:focus-visible {
    color: var(--brand-primary);
}

.prediction-detail-back svg {
    width: 19px;
    height: 19px;
}

.prediction-detail-fixture {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background: #111214;
    color: #ffffff;
}

.prediction-detail-fixture > time {
    display: block;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 750;
    text-align: center;
}

.prediction-detail-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: clamp(0.8rem, 3vw, 2rem);
    align-items: center;
}

.prediction-detail-team {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    line-height: 1.15;
}

.prediction-detail-home {
    text-align: right;
}

.prediction-detail-away {
    text-align: left;
}

.prediction-detail-result {
    display: grid;
    grid-template-columns: 58px 12px 58px;
    gap: 0.4rem;
    align-items: center;
    text-align: center;
}

.prediction-detail-result span {
    display: grid;
    width: 58px;
    height: 62px;
    border: 2px solid #ffffff;
    background: #ffffff;
    color: #111214;
    font-size: 1.75rem;
    font-weight: 900;
    place-items: center;
}

.prediction-detail-result.is-pending span {
    border-color: rgba(255, 255, 255, 0.38);
    background: transparent;
    color: #ffffff;
}

.prediction-detail-result b {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

.prediction-detail-result-state {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.prediction-detail-result-state svg {
    width: 17px;
    height: 17px;
    color: var(--brand-primary);
}

.prediction-detail-sponsor {
    margin: 1.5rem calc(clamp(1.5rem, 4vw, 2.75rem) * -1) calc(clamp(1.5rem, 4vw, 2.75rem) * -1);
    font-size: 0.82rem;
    text-align: center;
}

.prediction-detail-sponsor a,
.prediction-detail-sponsor > div {
    display: flex;
    gap: 0.3rem 0.8rem;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.4rem 0.8rem;
    color: inherit;
    text-decoration: none;
}

.prediction-detail-sponsor small {
    font-size: 0.78rem;
}

.prediction-player-panel {
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.prediction-player-heading {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    justify-content: space-between;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--app-border);
}

.prediction-player-heading span {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.prediction-player-heading h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    line-height: 1;
}

.prediction-player-heading > strong {
    color: var(--app-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.prediction-player-columns,
.prediction-player-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 1rem;
    align-items: center;
}

.prediction-player-panel.has-points .prediction-player-columns,
.prediction-player-panel.has-points .prediction-player-row {
    grid-template-columns: minmax(0, 1fr) 120px 90px;
}

.prediction-player-columns {
    min-height: 42px;
    padding: 0.55rem 1.25rem;
    background: var(--app-surface-muted);
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.prediction-player-columns span:not(:first-child) {
    text-align: center;
}

.prediction-player-row {
    min-height: 68px;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}

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

.prediction-player-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--app-text);
    font-size: 1rem;
}

.prediction-player-score {
    display: grid;
    grid-template-columns: 40px 10px 40px;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

.prediction-player-score span {
    display: grid;
    width: 40px;
    height: 42px;
    border: 1px solid var(--app-text);
    background: var(--app-surface);
    color: var(--app-text);
    font-size: 1.15rem;
    font-weight: 850;
    place-items: center;
}

.prediction-player-score b {
    color: var(--app-text-muted);
    text-align: center;
}

.prediction-player-missing {
    color: var(--app-text-muted);
    font-size: 0.88rem;
    text-align: center;
}

.prediction-detail-points {
    text-align: center;
}

.prediction-detail-points .badge {
    min-width: 68px;
    padding: 0.4rem 0.55rem;
    font-size: 0.76rem;
}

.prediction-detail-points .badge-danger {
    background: #e4e6ea;
    color: #3f454d;
}

@media (max-width: 575.98px) {
    .prediction-detail-fixture {
        padding: 1.35rem 1rem;
    }

    .prediction-detail-fixture > time {
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }

    .prediction-detail-match {
        grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
        gap: 0.65rem;
    }

    .prediction-detail-team {
        font-size: 1rem;
    }

    .prediction-detail-result {
        grid-template-columns: 42px 8px 42px;
        gap: 0.2rem;
    }

    .prediction-detail-result span {
        width: 42px;
        height: 46px;
        font-size: 1.3rem;
    }

    .prediction-detail-sponsor {
        margin: 1.25rem -1rem -1.35rem;
    }

    .prediction-detail-sponsor a,
    .prediction-detail-sponsor > div {
        align-items: center;
        flex-direction: column;
        gap: 0;
    }

    .prediction-player-heading {
        align-items: start;
        padding: 1.1rem 0.85rem;
    }

    .prediction-player-heading h1 {
        font-size: 1.8rem;
    }

    .prediction-player-columns,
    .prediction-player-row {
        grid-template-columns: minmax(0, 1fr) 92px;
        gap: 0.55rem;
    }

    .prediction-player-panel.has-points .prediction-player-columns,
    .prediction-player-panel.has-points .prediction-player-row {
        grid-template-columns: minmax(0, 1fr) 92px 62px;
    }

    .prediction-player-columns,
    .prediction-player-row {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .prediction-player-score {
        grid-template-columns: 34px 8px 34px;
    }

    .prediction-player-score span {
        width: 34px;
        height: 38px;
    }

    .prediction-detail-points .badge {
        min-width: 0;
        padding: 0.35rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 420px) {
    .prediction-player-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
}
.sponsor-grey { background: rgba(108, 117, 125, 0.15) !important; color: #495057 !important; }

/* Join a league */

.league-join-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    width: 100%;
    padding-bottom: 2rem;
}

.league-code-callout {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    overflow: hidden;
    min-height: 180px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 7px solid var(--brand-primary);
    background: #111214;
    color: #ffffff;
}

.league-code-callout::after {
    position: absolute;
    top: -80px;
    right: 10%;
    width: 210px;
    height: 320px;
    background: var(--brand-primary);
    content: "";
    opacity: 0.08;
    transform: rotate(24deg);
}

.league-code-callout > * {
    position: relative;
    z-index: 1;
}

.league-code-callout-icon {
    display: grid;
    width: 72px;
    height: 72px;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    place-items: center;
}

.league-code-callout-icon svg {
    width: 34px;
    height: 34px;
}

.league-code-callout-copy span {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-code-callout-copy h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    line-height: 0.95;
}

.league-code-callout-copy p {
    max-width: 620px;
    margin: 0.65rem 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1rem;
}

.league-code-callout-button {
    white-space: nowrap;
}

.league-browse-section {
    display: grid;
    gap: 1rem;
}

.league-browse-heading {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

.league-browse-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 900;
}

.league-browse-heading p {
    margin: 0.25rem 0 0;
    color: var(--app-text-muted);
}

.league-browse-heading > span {
    color: var(--app-text-muted);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.league-join-list {
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-join-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 100px 20px;
    gap: 1rem;
    align-items: center;
    min-height: 108px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

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

.league-join-row:hover,
.league-join-row:focus-visible {
    background: var(--brand-primary-soft);
    color: var(--app-text);
}

.league-join-icon {
    display: grid;
    width: 50px;
    height: 50px;
    border: 1px solid var(--app-border);
    background: var(--app-surface-muted);
    color: var(--brand-primary);
    place-items: center;
}

.league-join-icon svg {
    width: 25px;
    height: 25px;
}

.league-join-copy {
    min-width: 0;
}

.league-join-copy > strong,
.league-join-copy > .league-row-summary {
    display: block;
}

.league-join-copy > strong {
    overflow-wrap: anywhere;
    font-size: 1.12rem;
}

.league-join-copy > .league-row-summary {
    max-width: 760px;
    margin-top: 0.2rem;
    color: var(--app-text-muted);
    font-size: 1.05rem;
}

.league-join-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.55rem;
    color: var(--app-text-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.league-join-meta > span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.league-join-meta svg {
    width: 15px;
    height: 15px;
}

.league-join-meta .league-join-status {
    color: var(--brand-primary);
}

.league-join-players {
    text-align: center;
}

.league-join-players strong,
.league-join-players small {
    display: block;
}

.league-join-players strong {
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}

.league-join-players small {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.league-join-chevron {
    width: 20px;
    color: var(--app-text-muted);
}

.league-join-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.league-join-empty > svg {
    width: 34px;
    height: 34px;
    color: var(--brand-primary);
}

.league-join-empty h3,
.league-join-empty p {
    margin: 0;
}

.league-join-empty h3 {
    font-size: 1.2rem;
    font-weight: 850;
}

.league-join-empty p {
    margin-top: 0.15rem;
    color: var(--app-text-muted);
}

.league-code-dialog {
    width: min(590px, calc(100% - 1.5rem));
    margin-right: auto;
    margin-left: auto;
}

.league-code-modal {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 28px 80px rgba(12, 14, 18, 0.3);
}

.league-code-modal-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 6px solid var(--brand-primary);
    background: #111214;
    color: #ffffff;
}

.league-code-modal-icon {
    display: grid;
    width: 52px;
    height: 52px;
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
    place-items: center;
}

.league-code-modal-icon svg {
    width: 25px;
    height: 25px;
}

.league-code-modal-header span {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-code-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.league-code-modal-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    place-items: center;
}

.league-code-modal-close:hover,
.league-code-modal-close:focus-visible {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.league-code-modal-close svg {
    width: 20px;
    height: 20px;
}

.league-code-modal-body {
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem 1.25rem;
}

.league-code-modal-body > p {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 1rem;
}

.league-code-field {
    padding: 1rem 1.1rem;
    border: 2px solid var(--app-text);
    background: #ffffff;
}

.league-code-field label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.league-code-field .form-control {
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: none;
}

.league-code-field .form-control::placeholder {
    color: #9aa0aa;
    text-transform: none;
}

.league-code-error {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--app-danger);
    background: rgba(220, 53, 69, 0.1);
    color: var(--app-danger);
    font-weight: 750;
}

.league-code-error svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 767.98px) {
    .league-code-callout {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 1rem;
        min-height: 0;
        padding: 1.25rem;
    }

    .league-code-callout-icon {
        width: 56px;
        height: 56px;
    }

    .league-code-callout-icon svg {
        width: 27px;
        height: 27px;
    }

    .league-code-callout-copy h2 {
        font-size: 2rem;
    }

    .league-code-callout-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .league-join-empty {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .league-join-empty .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .league-join-page {
        gap: 1rem;
    }

    .league-browse-heading {
        align-items: start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .league-join-list {
        margin-inline: -0.75rem;
        border-right: 0;
        border-left: 0;
    }

    .league-join-row {
        grid-template-columns: 44px minmax(0, 1fr) 18px;
        gap: 0.75rem;
        min-height: 112px;
        padding: 0.9rem 1rem;
    }

    .league-join-icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 44px;
        height: 44px;
    }

    .league-join-icon svg {
        width: 22px;
        height: 22px;
    }

    .league-join-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .league-join-players {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        gap: 0.35rem;
        align-items: baseline;
        text-align: left;
    }

    .league-join-players strong,
    .league-join-players small {
        display: inline;
        margin: 0;
        font-size: 0.78rem;
    }

    .league-join-chevron {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .league-code-modal-header {
        gap: 0.75rem;
        padding: 1.1rem;
    }

    .league-code-modal-icon {
        width: 44px;
        height: 44px;
    }

    .league-code-modal-header h2 {
        font-size: 1.65rem;
    }

    .league-code-modal-body {
        padding: 1.35rem 1.1rem 1rem;
    }

}

/* Rules */

.rules-page {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    padding-bottom: 2rem;
}

.rules-back {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    width: fit-content;
    color: var(--app-text);
    font-weight: 750;
    text-decoration: none;
}

.rules-back:hover,
.rules-back:focus-visible {
    color: var(--brand-primary);
}

.rules-back svg {
    width: 19px;
    height: 19px;
}

.rules-document {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.rules-section {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    border-bottom: 1px solid var(--app-border);
}

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

.rules-section-number {
    display: grid;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
    padding-top: calc(clamp(1.5rem, 4vw, 2.5rem) + 0.3rem);
    border-right: 1px solid var(--app-border);
    color: var(--brand-primary);
    font-family: inherit;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    align-items: start;
    justify-items: center;
}

.rules-section-content {
    max-width: 860px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.rules-section-content > h2 {
    margin: 0 0 0.75rem;
    color: var(--app-text);
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 900;
}

.rules-section-content > p {
    max-width: 760px;
    margin: 0 0 0.75rem;
    color: var(--app-text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.rules-section-content > p:last-child {
    margin-bottom: 0;
}

.rules-score-list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--app-border);
}

.rules-score-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--app-border);
}

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

.rules-score-points {
    display: grid;
    width: 50px;
    height: 50px;
    border: 2px solid var(--app-text);
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 900;
    place-items: center;
}

.rules-score-points svg {
    width: 22px;
    height: 22px;
}

.rules-score-row h3,
.rules-score-row p,
.rules-score-row small {
    margin: 0;
}

.rules-score-row h3 {
    color: var(--app-text);
    font-size: 1.12rem;
    font-weight: 850;
}

.rules-score-row p {
    margin-top: 0.2rem;
    color: var(--app-text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.rules-score-row small {
    display: block;
    margin-top: 0.45rem;
    color: var(--app-text-muted);
    font-size: 0.86rem;
    font-style: italic;
}

.rules-score-bonus .rules-score-points {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--brand-text-on-primary);
}

.rules-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    max-width: 760px;
    margin-top: 1.25rem;
    padding: 1rem;
    border-left: 4px solid var(--brand-primary);
    background: var(--brand-primary-soft);
    color: var(--app-text);
    font-weight: 700;
}

.rules-note svg {
    width: 22px;
    height: 22px;
    color: var(--brand-primary);
}

@media (max-width: 575.98px) {
    .rules-page {
        gap: 1rem;
    }

    .rules-document {
        margin-inline: -0.75rem;
        border-right: 0;
        border-left: 0;
    }

    .rules-section {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rules-section-number {
        padding: 1.5rem 0.5rem;
        padding-top: 1.8rem;
    }

    .rules-section-content {
        padding: 1.5rem 1rem;
    }

    .rules-score-row {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 0.8rem;
    }

    .rules-score-points {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }
}

/* Select2 */

.select2-container .select2-selection--single {
    height: 48px;
    border-color: #aeb5bf;
    border-radius: var(--app-radius);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0.65rem 2.25rem 0.65rem 0.75rem;
    color: var(--app-text);
    line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft);
}

@media (max-width: 991.98px) {
    .app-header-inner,
    .app-content > .container-lg {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .player-stat-bg {
        background-image: none;
    }

    .player-stat-content {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .app-header-inner {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .app-primary-nav {
        display: none;
    }

    .app-brand > span {
        max-width: 68vw;
        font-size: 1.6rem;
    }

    .app-body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .app-content {
        padding-bottom: 1.5rem;
    }

    .mobile-bottom-toolbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1035;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        padding-bottom: env(safe-area-inset-bottom);
        border: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 0;
        background: #111214;
        box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.18);
    }

    .mobile-bottom-toolbar-link {
        display: flex;
        gap: 0.55rem;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 58px;
        padding: 0.65rem;
        border: 0;
        background: transparent;
        color: #ffffff !important;
        font-size: 0.9rem;
        font-weight: 750;
        text-decoration: none;
    }

    .mobile-bottom-toolbar-link + .mobile-bottom-toolbar-link {
        border-left: 1px solid rgba(255, 255, 255, 0.14);
    }

    .mobile-bottom-toolbar-link:hover,
    .mobile-bottom-toolbar-link:focus {
        background: var(--brand-primary);
        color: var(--brand-text-on-primary) !important;
    }

    .mobile-bottom-toolbar-link svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .account-page,
    .account-status-page {
        min-width: 0;
    }

    .account-status-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-status-panel h1 {
        overflow-wrap: normal;
        font-size: 3rem;
        word-break: normal;
    }

    .app-body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .app-content {
        padding-top: 0.8rem;
        padding-bottom: 1rem;
    }

    .mobile-bottom-toolbar {
        right: 0;
        bottom: 0;
        left: 0;
        border: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 0;
        box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.18);
    }

    .mobile-bottom-toolbar-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        min-width: 0;
        min-height: 56px;
        padding: 0.65rem;
        border: 0;
        background: transparent;
        color: #ffffff !important;
        font-size: 0.85rem;
        font-weight: 750;
        text-decoration: none;
    }

    .mobile-bottom-toolbar-link + .mobile-bottom-toolbar-link {
        border-left: 1px solid rgba(255, 255, 255, 0.14);
    }

    .mobile-bottom-toolbar-link:hover,
    .mobile-bottom-toolbar-link:focus {
        background: var(--brand-primary);
        color: var(--brand-text-on-primary) !important;
    }

    .mobile-bottom-toolbar-link svg {
        width: 19px;
        height: 19px;
    }

    .account-body {
        align-items: start;
        padding: 0;
        background: var(--app-surface);
    }

    .account-panel {
        min-height: 100vh;
        padding: 1.25rem;
        border: 0;
        border-radius: 0;
    }

    .account-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .account-context {
        min-height: 42svh;
        padding: 2.5rem 1.5rem;
    }

    .account-context .account-brand {
        margin-bottom: 3rem;
    }

    .account-context h1 {
        font-size: clamp(3.2rem, 15vw, 5rem);
    }

    .account-shell .account-panel {
        min-height: auto;
        padding: 2.25rem 1.25rem 3rem;
    }

    .account-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-actions {
        grid-template-columns: 1fr;
    }

    .home-section-head {
        flex-direction: column;
    }

    .prediction-view .row.align-items-center {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .prediction-view .team-name {
        font-size: 1rem;
        text-align: center !important;
        white-space: normal;
    }

    .prediction-view .col-auto {
        display: flex;
        justify-content: center;
        width: 100%;
    }

.prediction-view:not([data-fixture-id]) .prediction-box {
        width: 48px;
        height: 48px;
    }

}

/* Rivalry */
.rivalry-page {
    display: grid;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.rivalry-hero {
    overflow: hidden;
    padding: clamp(1.5rem, 5vw, 4rem);
    background: linear-gradient(105deg, #080809 0 50%, #b3081a 50% 100%);
    color: #fff;
}

.rivalry-heading {
    max-width: 720px;
}

.rivalry-heading h1,
.rivalry-impact h2,
.rivalry-history h2,
.rivalry-leaders h2,
.rivalry-overall h2 {
    margin: 0;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-weight: 800;
    line-height: 0.92;
    text-transform: uppercase;
}

.rivalry-heading h1 {
    color: #fff;
    font-size: clamp(4rem, 10vw, 8rem);
}

.rivalry-heading p {
    max-width: 660px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.76);
}

.rivalry-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-top: clamp(2.5rem, 7vw, 5rem);
}

.rivalry-score-side {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    align-items: center;
}

.rivalry-score-side-right {
    justify-content: flex-end;
    text-align: right;
}

.rivalry-score-side img {
    width: clamp(58px, 8vw, 100px);
    height: clamp(58px, 8vw, 100px);
    object-fit: contain;
}

.rivalry-score-side strong,
.rivalry-score-side span {
    display: block;
}

.rivalry-score-side strong {
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(3.6rem, 9vw, 8rem);
    font-weight: 800;
    line-height: 0.78;
}

.rivalry-score-side span {
    margin-top: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.rivalry-versus {
    display: grid;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: #111214;
    font-weight: 900;
    place-items: center;
}

.rivalry-battle-track {
    display: flex;
    height: 64px;
    margin-top: 1.5rem;
    overflow: hidden;
    border: 3px solid #fff;
    background: #fff;
}

.rivalry-battle-progress {
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    white-space: nowrap;
}

.rivalry-battle-progress-one {
    justify-content: flex-end;
    padding-right: 1rem;
    background: repeating-linear-gradient(135deg, #09090a 0 12px, #1d1d20 12px 24px);
}

.rivalry-battle-progress-two {
    justify-content: flex-start;
    padding-left: 1rem;
    background: repeating-linear-gradient(135deg, #d81430 0 12px, #be1028 12px 24px);
}

.rivalry-impact {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.rivalry-impact h2,
.rivalry-history h2,
.rivalry-leaders h2,
.rivalry-overall h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.rivalry-impact p {
    max-width: 520px;
    margin: 0.8rem 0 0;
    color: var(--app-text-muted);
}

.rivalry-impact-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rivalry-impact-stats > div {
    min-width: 0;
    padding: 0.4rem 1.25rem;
    border-left: 1px solid var(--app-border);
}

.rivalry-impact-stats strong,
.rivalry-impact-stats span {
    display: block;
}

.rivalry-impact-stats strong {
    color: var(--brand-primary);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    line-height: 0.9;
}

.rivalry-impact-stats span {
    margin-top: 0.55rem;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rivalry-history,
.rivalry-overall {
    padding: clamp(1.5rem, 4vw, 3rem);
}

.rivalry-chart {
    min-height: 300px;
    padding-top: 1rem;
}

.rivalry-chart svg {
    display: block;
    width: 100%;
    height: 260px;
    overflow: visible;
}

.rivalry-chart-grid line {
    stroke: var(--app-border);
    stroke-width: 1;
}

.rivalry-chart-labels {
    fill: var(--app-text-muted);
    font-size: 12px;
    font-weight: 750;
}

.rivalry-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 6;
    vector-effect: non-scaling-stroke;
}

.rivalry-chart-line-one {
    stroke: #111214;
}

.rivalry-chart-line-two {
    stroke: var(--brand-primary);
}

.rivalry-chart-axis {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    color: var(--app-text-muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.rivalry-chart-axis > span:last-child,
.rivalry-podium b {
    text-align: right;
}

.rivalry-chart-axis > div {
    display: flex;
    gap: 1rem;
}

.rivalry-chart-key::before {
    display: inline-block;
    width: 20px;
    height: 4px;
    margin-right: 0.4rem;
    content: "";
    vertical-align: middle;
}

.rivalry-chart-key-one::before {
    background: #111214;
}

.rivalry-chart-key-two::before {
    background: var(--brand-primary);
}

.rivalry-leaders {
    padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.rivalry-leader-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rivalry-leader-card {
    min-width: 0;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: #101113;
    color: #fff;
}

.rivalry-leader-card:nth-child(even) {
    background: #c81028;
}

.rivalry-leader-card header {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.rivalry-leader-card header img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.rivalry-leader-card header span {
    font-weight: 850;
    text-transform: uppercase;
}

.rivalry-leader-card h3 {
    margin: clamp(2rem, 5vw, 4rem) 0 1.5rem;
    color: #fff;
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    font-weight: 800;
    line-height: 0.86;
    text-transform: uppercase;
}

.rivalry-leader-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.rivalry-leader-card dl > div {
    min-width: 0;
    padding: 0.5rem 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.rivalry-leader-card dt {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rivalry-leader-card dd {
    margin: 0.3rem 0 0;
    font-size: 1.6rem;
    font-weight: 900;
}

.rivalry-podium {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rivalry-podium li {
    display: grid;
    grid-template-columns: 48px 48px minmax(0, 1fr) minmax(100px, 0.45fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 76px;
    border-top: 1px solid var(--app-border);
}

.rivalry-podium li > span {
    color: var(--brand-primary);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    text-align: center;
}

.rivalry-podium img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.rivalry-podium strong,
.rivalry-podium small,
.rivalry-podium b {
    min-width: 0;
}

.rivalry-podium small {
    color: var(--app-text-muted);
}

@media (max-width: 991.98px) {
    .rivalry-impact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .rivalry-page {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .rivalry-page > *,
    .rivalry-history,
    .rivalry-chart {
        min-width: 0;
    }

    .rivalry-hero,
    .rivalry-impact,
    .rivalry-history,
    .rivalry-overall {
        padding: 1.35rem 1rem;
    }

    .rivalry-scoreboard {
        grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
        gap: 0.4rem;
    }

    .rivalry-score-side {
        display: grid;
        justify-items: start;
        gap: 0.65rem;
    }

    .rivalry-score-side-right {
        justify-items: end;
    }

    .rivalry-score-side-right > div {
        order: 2;
    }

    .rivalry-score-side img {
        width: 52px;
        height: 52px;
    }

    .rivalry-score-side strong {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .rivalry-score-side span {
        overflow-wrap: anywhere;
        font-size: 0.72rem;
    }

    .rivalry-versus {
        width: 36px;
        height: 36px;
    }

    .rivalry-battle-track {
        height: 52px;
    }

    .rivalry-battle-progress {
        font-size: 0.92rem;
    }

    .rivalry-impact-stats,
    .rivalry-leader-grid,
    .rivalry-leader-card dl {
        grid-template-columns: 1fr;
    }

    .rivalry-impact-stats > div,
    .rivalry-leader-card dl > div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        padding: 0.8rem 0;
        border-top: 1px solid var(--app-border);
        border-left: 0;
    }

    .rivalry-leader-card dl > div {
        border-color: rgba(255, 255, 255, 0.25);
    }

    .rivalry-impact-stats span {
        text-align: right;
    }

    .rivalry-chart {
        min-height: 240px;
        overflow-x: auto;
    }

    .rivalry-chart svg {
        min-width: 620px;
        height: 220px;
    }

    .rivalry-chart-axis {
        min-width: 620px;
    }

    .rivalry-leader-card {
        padding: 1.5rem 1rem;
    }

    .rivalry-podium li {
        grid-template-columns: 36px 38px minmax(0, 1fr) auto;
        gap: 0.65rem;
        padding: 0.65rem 0;
    }

    .rivalry-podium small {
        display: none;
    }
}

@media (max-width: 420px) {
    .rivalry-heading h1 {
        overflow-wrap: normal;
        font-size: 3.55rem;
        word-break: normal;
    }

    .rivalry-leader-card h3 {
        overflow-wrap: anywhere;
        font-size: 3rem;
    }
}

/* Template brand account screens */
.account-body-template {
    background-color: #070a08;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.58)),
        var(--account-hero-image);
    background-position: center;
    background-size: cover;
    font-family: "Google Sans Flex", Arial, sans-serif;
}

.account-body-template .account-shell-login-only {
    width: min(720px, 100%);
    min-height: min(700px, calc(100vh - 2.5rem));
    grid-template-columns: minmax(0, 1fr);
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.account-body-template .account-shell-login .account-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    border-top: 8px solid var(--brand-primary);
    background: var(--standard-paper, #f3f4f1);
    box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.78);
}

.account-body-template .account-form-heading h2,
.account-body-template .account-submit {
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
}

.account-body-template .account-form-heading h2 {
    font-size: 5.5rem;
    line-height: 0.86;
}

.account-body-template .account-form-heading > p:last-child {
    max-width: 430px;
    font-size: 1.08rem;
}

.account-body-template .form-field {
    border-color: var(--standard-dark, #070a08);
    background: #ffffff;
}

.account-body-template .form-field:focus-within {
    border-color: var(--brand-primary);
    box-shadow: none;
}

.account-body-template .form-field .form-label {
    color: var(--standard-ink-muted, #505a54);
    font-family: "Google Sans Flex", Arial, sans-serif;
}

.account-body-template .form-field .form-control,
.account-body-template .form-field .form-select {
    font-family: "Google Sans Flex", Arial, sans-serif;
    font-size: 1.18rem;
    font-weight: 680;
}

.account-body-template .account-submit {
    min-height: 68px;
    border-radius: 0;
    font-size: 2rem;
}

.account-body-template .account-found-message {
    border-left-color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

@media (max-width: 576px) {
    .account-body-template {
        align-items: start;
        min-height: 100svh;
        padding: 24px 14px;
        background-image:
            linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.76)),
            var(--account-hero-image);
    }

    .account-body-template .account-shell-login-only {
        min-height: 0;
    }

    .account-body-template .account-shell-login .account-form-panel {
        min-height: calc(100svh - 48px);
        padding: 32px 20px;
        box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.78);
    }

    .account-body-template .account-form-heading h2 {
        font-size: 4rem;
    }
}

@media (max-width: 360px) {
    .account-body-template .account-form-heading h2 {
        font-size: 3.45rem;
    }
}

/* Brand mailer */
.mailer-panel {
    max-width: none;
}

.mailer-form {
    display: grid;
    gap: 1.5rem;
}

.mailer-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--app-border);
}

.mailer-heading h2 {
    margin: 0 0 0.35rem;
}

.mailer-heading p,
.mailer-audience-count span {
    margin: 0;
    color: var(--app-text-muted);
}

.mailer-audience-count {
    display: grid;
    min-width: 190px;
    text-align: right;
}

.mailer-audience-count strong {
    color: var(--brand-primary);
    font-family: "Barlow Condensed", Arial, sans-serif;
    font-size: 3.5rem;
    line-height: 0.85;
}

.mailer-audience {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    gap: 1rem;
    align-items: start;
}

.mailer-all-players {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 105px;
    padding: 1.25rem;
    border: 2px solid var(--app-text);
    background: var(--app-surface-muted);
    cursor: pointer;
}

.mailer-all-players .form-check-input {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
}

.mailer-all-players span {
    display: grid;
    gap: 0.2rem;
}

.mailer-all-players small,
.mailer-audience .account-field-group > small {
    color: var(--app-text-muted);
}

.mailer-message-field textarea {
    min-height: 280px;
    resize: vertical;
}

.mailer-button-fields {
    display: grid;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--app-border);
}

.mailer-button-fields h3 {
    margin: 0 0 0.25rem;
    color: var(--app-text);
    font-size: 1.5rem;
    font-weight: 850;
}

.mailer-button-fields p {
    margin: 0;
    color: var(--app-text-muted);
}

.mailer-button-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.mailer-result {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-left: 5px solid var(--brand-primary);
    background: var(--brand-primary-soft);
}

.mailer-result-warning {
    border-left-color: #b7791f;
    background: #fff7df;
}

@media (max-width: 767.98px) {
    .mailer-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .mailer-audience-count {
        min-width: 0;
        text-align: left;
    }

    .mailer-audience {
        grid-template-columns: 1fr;
    }

    .mailer-button-grid {
        grid-template-columns: 1fr;
    }
}
