:root {
    --green-900: #0e2f22;
    --green-700: #14452f;
    --green-600: #1c5b3e;
    --gold: #c9a227;
    --gold-strong: #b8901b;
    --gold-soft: #f6edd2;
    --gold-line: #e4cd86;
    --cream-bg: #f3efe6;
    --cream-tile: #efeadd;
    --ink: #16241c;
    --muted: #6b7669;
    --card: #fff;
    --line: #e7e2d6;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(14,47,34,.06), 0 2px 8px rgba(14,47,34,.05);
    --shadow-md: 0 6px 20px rgba(14,47,34,.10);
    --bs-link-color-rgb: 28,91,62;
    --bs-link-hover-color-rgb: 14,69,47;
}

body {
    background-color: var(--cream-bg);
    background-image: radial-gradient(rgba(14,47,34,.04) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { max-width: 100%; overflow-x: hidden; }

h1, h2, h3, h4, h5, h6,
.navbar-brand, .section-title, .stat-label, .table thead th {
    font-family: 'Oswald', 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: .045em;
}
h1, h2, h3 { font-weight: 600; }
.text-secondary { color: var(--muted) !important; }
a { color: var(--green-600); }
a:hover { color: var(--green-900); }

/* ---- Page shell ---- */
.page-shell { max-width: 1180px; }
.page-head {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--line);
}
.page-head::after {
    content: "";
    position: absolute; left: 0; bottom: -1px;
    width: 64px; height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-line));
}
.page-head .eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-bottom: .3rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .7rem;
    font-weight: 600;
    color: var(--gold-strong);
}
.page-head .eyebrow::before {
    content: "";
    width: 1.5rem; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-line));
}
.page-head h1 { color: var(--green-900); margin-bottom: .25rem; }
.page-head > div > p:last-child,
.page-head > p:last-child { color: var(--muted); margin-bottom: 0; }

/* ---- List filter pills ---- */
.list-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.list-filter-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .8rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .04em;
    font-size: .72rem; font-weight: 600; cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.list-filter-btn:hover { border-color: var(--green-600); }
.list-filter-btn.is-active {
    background: linear-gradient(180deg, var(--green-600), var(--green-700));
    border-color: var(--green-700); color: #fff; box-shadow: var(--shadow-sm);
}
.list-filter-btn .filter-count {
    font-size: .66rem; padding: .05rem .42rem; border-radius: 999px;
    background: var(--cream-tile); color: var(--muted); line-height: 1.5;
}
.list-filter-btn.is-active .filter-count { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Breadcrumbs ---- */
.page-breadcrumbs { margin-bottom: .55rem; }
.page-breadcrumbs ol {
    list-style: none; display: flex; flex-wrap: wrap; align-items: center;
    gap: .35rem; padding: 0; margin: 0;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .07em; font-size: .68rem; font-weight: 600;
}
.page-breadcrumbs li { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.page-breadcrumbs li + li::before {
    content: "›"; color: var(--gold-strong); font-size: .9rem; line-height: 1; font-weight: 700;
}
.page-breadcrumbs a { color: var(--muted); text-decoration: none; transition: color .12s ease; }
.page-breadcrumbs a:hover { color: var(--green-700); }
.page-breadcrumbs li[aria-current="page"] { color: var(--green-900); }

/* ---- Cards ---- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--card);
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--line);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    font-size: .9rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: relative;
}
.card-header::after {
    content: "";
    position: absolute; left: 0; bottom: -1px;
    width: 56px; height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-line));
}

/* ---- Buttons ---- */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary {
    --bs-btn-bg: var(--green-700);
    --bs-btn-border-color: var(--green-700);
    --bs-btn-hover-bg: var(--green-600);
    --bs-btn-hover-border-color: var(--green-600);
    --bs-btn-active-bg: var(--green-900);
    --bs-btn-active-border-color: var(--green-900);
    --bs-btn-disabled-bg: #9bb0a4;
    --bs-btn-disabled-border-color: #9bb0a4;
    background-image: linear-gradient(180deg, var(--green-600), var(--green-700));
    box-shadow: var(--shadow-sm);
}
.btn-outline-primary {
    --bs-btn-color: var(--green-700);
    --bs-btn-border-color: var(--green-600);
    --bs-btn-hover-bg: var(--green-700);
    --bs-btn-hover-border-color: var(--green-700);
    --bs-btn-active-bg: var(--green-900);
}
.btn-gold {
    --bs-btn-color: var(--green-900);
    background: linear-gradient(180deg, #e7c659, var(--gold));
    border: 1px solid var(--gold-strong);
    color: var(--green-900);
    box-shadow: var(--shadow-sm);
}
.btn-gold:hover { color: var(--green-900); filter: brightness(1.03); }

/* ---- Badges ---- */
.badge { border-radius: 999px; font-weight: 600; letter-spacing: .02em; padding: .4em .7em; }
.badge-open { background: rgba(28,91,62,.12); color: var(--green-700); }
.badge-settled { background: var(--gold-soft); color: var(--gold-strong); border: 1px solid var(--gold-line); }
.badge-locked { background: #ece8df; color: var(--muted); }

/* ---- Tables ---- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    padding-top: .9rem; padding-bottom: .9rem;
}
.table td, .table th { vertical-align: middle; border-color: var(--line); }
.table-hover tbody tr:hover > * { background-color: var(--cream-tile); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: rgba(14,47,34,.018); }
.table-legend {
    font-size: .68rem; color: var(--muted); line-height: 1.6;
    padding: .55rem .9rem .75rem;
}
.table-legend b { color: var(--green-700); font-weight: 700; }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--line);
    background-color: #fcfbf7;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(201,162,39,.2);
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--ink); }

/* ---- Navbar ---- */
.app-navbar {
    background: linear-gradient(180deg, var(--green-900), #0c2a1f);
    border-bottom: 2px solid var(--gold);
    box-shadow: var(--shadow-sm);
}
.app-navbar .navbar-brand {
    font-weight: 700; font-size: 1.15rem; color: #fff;
    display: flex; align-items: center; gap: .55rem;
}
.app-navbar .navbar-brand .brand-badge {
    display: inline-grid; place-items: center;
    width: 1.9rem; height: 1.9rem; border-radius: 9px;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900); font-size: 1rem; font-weight: 700;
}
.app-navbar .navbar-brand .brand-year { color: var(--gold); }
.app-navbar .nav-link {
    color: rgba(255,255,255,.72) !important;
    font-weight: 500; letter-spacing: .01em;
    border-bottom: 2px solid transparent;
    padding-top: .65rem; padding-bottom: .65rem;
}
.app-navbar .nav-link:hover { color: #fff !important; }
.app-navbar .nav-link.active {
    color: #fff !important;
    border-bottom-color: var(--gold);
}
.app-navbar .dropdown-menu {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}
.navbar-user { display: flex; align-items: center; gap: .6rem; color: #fff; }
.navbar-user .user-avatar {
    display: inline-grid; place-items: center;
    width: 2rem; height: 2rem; border-radius: 50%;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900); font-weight: 700; font-size: .9rem;
}
.navbar-user .user-name { font-weight: 600; font-size: .9rem; }

/* ---- PWA install shell ---- */
.app-open-banner {
    display: none;
    background: #f8fbf9;
    border-bottom: 1px solid var(--line);
}
.has-installed-pwa:not(.is-standalone-app) .app-open-banner {
    display: block;
}
.app-open-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: .65rem 0;
    color: var(--green-900);
    font-size: .85rem;
    font-weight: 600;
    text-align: center;
}
.app-install-banner {
    background: linear-gradient(180deg, #fffdf6, var(--gold-soft));
    border-bottom: 1px solid var(--gold-line);
    box-shadow: var(--shadow-sm);
}
.app-install-banner[hidden],
.is-standalone-app .app-install-banner {
    display: none !important;
}
.app-install-banner__inner {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: .75rem 0;
}
.app-install-banner__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .15rem;
    font-size: .82rem;
    line-height: 1.25;
    color: var(--ink);
}
.app-install-banner__copy strong {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--green-900);
    font-size: .82rem;
}
.app-install-banner__copy span {
    color: var(--muted);
}
.app-install-banner__actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.app-install-banner__actions .btn {
    white-space: nowrap;
}
.app-install-banner__close {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    color: var(--muted);
    line-height: 1;
}
.app-install-banner__close:hover {
    border-color: var(--gold-line);
    color: var(--green-900);
}
.app-install-steps ol {
    display: grid;
    gap: .55rem;
    margin: 0 0 1rem;
    padding-left: 1.3rem;
}
.app-install-steps li {
    padding-left: .15rem;
}

/* ---- Flash alerts ---- */
.alert {
    border: 1px solid var(--line); border-left-width: 4px;
    border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
    background: #fff;
}
.alert-success { border-left-color: var(--green-600); color: var(--green-700); }
.alert-danger  { border-left-color: #c0392b; }
.alert-secondary, .alert-info, .alert-warning { border-left-color: var(--gold); color: var(--ink); }

/* ---- Stat tiles (dashboard) ---- */
.dashboard-push-toggle {
    display: none;
    justify-content: flex-end;
    margin: -.35rem 0 .45rem;
}
.is-standalone-app .dashboard-push-toggle {
    display: flex;
}
.dashboard-push-toggle__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--muted);
    box-shadow: var(--shadow-sm);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1;
    padding: .3rem .55rem;
}
.dashboard-push-toggle__button:hover,
.dashboard-push-toggle__button:focus-visible {
    border-color: var(--gold-line);
    background: #fff;
    color: var(--green-700);
}
.dashboard-push-toggle__button.is-on {
    border-color: rgba(44,123,79,.35);
    background: rgba(236,247,239,.92);
    color: var(--green-700);
}
.dashboard-push-toggle__button:disabled {
    border-color: var(--line);
    background: rgba(255,255,255,.55);
    color: rgba(107,114,128,.55);
    box-shadow: none;
}
.stat-tile { position: relative; overflow: hidden; height: 100%; }
.stat-tile .stat-label {
    font-size: .72rem; color: var(--muted); letter-spacing: .08em;
}
.stat-tile .stat-value {
    font-family: 'Oswald', sans-serif; font-weight: 600;
    font-size: 1.9rem; line-height: 1.05; color: var(--green-900);
}
.stat-tile .stat-sub { font-size: .82rem; color: var(--muted); }
.stat-tile .stat-icon {
    position: absolute; top: 1rem; right: 1rem; z-index: 1;
    width: 2.2rem; height: 2.2rem; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.1rem;
    background: var(--gold-soft); color: var(--gold-strong);
}
.stat-tile .card-body { display: flex; flex-direction: column; min-height: 9rem; }
.stat-tile .stat-value { margin: .1rem 0 .3rem; }
.stat-foot { margin-top: auto; padding-top: .5rem; }
.stat-watermark {
    position: absolute; right: -.4rem; bottom: -1.4rem; z-index: 0;
    font-size: 6rem; line-height: 1; opacity: .05;
    pointer-events: none; user-select: none;
}
.stat-tile .stat-label, .stat-tile .stat-value,
.stat-tile .stat-sub, .stat-foot, .stat-leader { position: relative; z-index: 1; }
.stat-leader { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.stat-leader .stat-value {
    margin: 0; font-size: 1.45rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-avatar {
    flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900); font-family: 'Oswald', sans-serif;
    font-weight: 700; font-size: .95rem;
}
.stat-chip {
    display: inline-flex; align-items: center;
    padding: .25rem .6rem; border-radius: 999px;
    background: rgba(28,91,62,.1); color: var(--green-700);
    font-family: 'Oswald', sans-serif; font-weight: 600;
    font-size: .68rem; letter-spacing: .04em;
}
.stat-progress {
    height: 6px; border-radius: 999px; background: var(--cream-tile);
    overflow: hidden; margin: 0 0 .3rem;
}
.stat-progress span {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--green-600), var(--green-700));
}
.stat-link { display: inline-block; font-weight: 600; }

/* ---- Rank medals ---- */
.rank-medal {
    display: inline-grid; place-items: center;
    width: 1.9rem; height: 1.9rem; border-radius: 50%;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: .85rem;
    background: var(--cream-tile); color: var(--muted);
}
.rank-medal.is-1 { background: linear-gradient(180deg, #e7c659, var(--gold)); color: var(--green-900); }
.rank-medal.is-2 { background: #d9d9d4; color: #4a4a44; }
.rank-medal.is-3 { background: #e6c9a8; color: #7a5a36; }

/* ---- Mini vs card ---- */
.vs-card {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    text-align: center;
}
.vs-card .vs-team { font-weight: 600; }
.vs-card .vs-sep { color: var(--gold-strong); font-family: 'Oswald', sans-serif; }
.stat-tile .card-body { padding-right: 3.2rem; }
.stat-tile .vs-card { flex-wrap: wrap; column-gap: .4rem; }
.next-match-tile .card-body {
    padding-right: 1rem;
    display: flex; flex-direction: column; gap: .55rem;
}
.next-match-tile .match-vs { margin-top: .1rem; column-gap: .35rem; }
.next-match-tile .match-flag { width: 2.5rem; height: 1.65rem; }
.next-match-tile .match-vs-name { font-size: .72rem; }
.next-match-tile .match-vs-role { font-size: .54rem; letter-spacing: .1em; }
.next-match-tile .match-score { font-size: 1.35rem; }
.next-match-tile .match-score--pending { font-size: 1rem; }
.next-match-tile .match-score-label { font-size: .54rem; }
.next-match-tile .next-match-date { text-align: center; margin-top: auto; }

/* ---- Match (head-to-head) card ---- */
.match-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1rem 1.1rem 1.1rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.match-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold-line); }
.match-card-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem; flex-wrap: wrap;
}
.match-card-meta {
    display: flex; align-items: center; gap: .45rem;
    min-width: 0; flex-wrap: wrap;
    font-family: 'Oswald', sans-serif; font-size: .78rem;
    letter-spacing: .03em; color: var(--muted);
}
.match-card-id { font-weight: 700; color: var(--green-700); }
.match-card-stage { text-transform: uppercase; letter-spacing: .04em; }
.match-card-time {
    margin-top: -.35rem;
    font-size: .8rem; color: var(--muted);
}
.match-vs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        "homeFlag score awayFlag"
        "homeName score awayName"
        "homeRole score awayRole";
    align-items: start;
    column-gap: .6rem;
    row-gap: .45rem;
    text-align: center;
    padding: .35rem 0 .1rem;
}
.match-vs .mvs-home-flag { grid-area: homeFlag; }
.match-vs .mvs-away-flag { grid-area: awayFlag; }
.match-vs .mvs-home-name { grid-area: homeName; }
.match-vs .mvs-away-name { grid-area: awayName; }
.match-vs .mvs-home-role { grid-area: homeRole; }
.match-vs .mvs-away-role { grid-area: awayRole; }
.match-vs .match-flag { justify-self: center; }
.match-flag {
    width: 3.4rem; height: 2.25rem; border-radius: 6px;
    overflow: hidden; flex: 0 0 auto;
    background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--green-700);
    font-family: 'Oswald', sans-serif; font-size: .8rem; font-weight: 700;
}
.match-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.match-vs-name {
    align-self: center;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    font-weight: 600; font-size: .82rem; letter-spacing: .03em;
    line-height: 1.15; color: var(--ink); overflow-wrap: anywhere;
}
.match-vs-role {
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    font-size: .6rem; letter-spacing: .12em; color: var(--muted);
}
.match-vs-center {
    grid-area: score;
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    align-self: center; justify-self: center;
}
.match-score {
    font-family: 'Oswald', sans-serif; font-weight: 700;
    font-size: 1.9rem; line-height: 1; color: var(--green-900);
    white-space: nowrap;
}
.match-score .match-score-sep { margin: 0 .3rem; color: var(--gold-strong); }
.match-score--pending { font-size: 1.25rem; color: var(--muted); }
.match-score-label {
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    font-size: .6rem; letter-spacing: .12em; color: var(--muted);
}
.match-card-action { margin-top: auto; align-self: stretch; }
.stat-tile .vs-team { overflow-wrap: anywhere; min-width: 0; }

/* ---- Team identity ---- */
.team-identity {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    max-width: 100%;
    vertical-align: middle;
}
.team-identity--center { justify-content: center; text-align: center; }
.team-identity--end { justify-content: flex-end; text-align: right; }
.team-crest {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 1.55rem;
    border-radius: 4px;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--green-700);
    font-family: 'Oswald', sans-serif;
    font-size: .72rem;
    font-weight: 700;
}
.team-crest img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.team-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.1;
}
.team-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}
.team-tla {
    margin-top: .12rem;
    color: var(--muted);
    font-family: 'Oswald', sans-serif;
    font-size: .68rem;
    letter-spacing: .08em;
}
.team-identity--compact { gap: .4rem; }
.team-identity--compact .team-crest {
    width: 2rem;
    height: 1.3rem;
    font-size: .62rem;
}
.team-identity--compact .team-tla { display: none; }

/* ---- Rules / scoring ---- */
.rules-panel-head {
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .05em; font-weight: 600; font-size: .95rem;
    color: var(--green-900); margin-bottom: .85rem;
    padding-bottom: .4rem; border-bottom: 2px solid var(--gold-line);
}
.rules-check { list-style: none; padding: 0; margin: 0; }
.rules-check li {
    position: relative; padding: .45rem 0 .45rem 1.85rem;
    border-bottom: 1px solid var(--line); color: var(--ink); font-size: .92rem;
}
.rules-check li:last-child { border-bottom: 0; }
.rules-check li::before {
    content: "✓"; position: absolute; left: 0; top: .45rem;
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    display: grid; place-items: center; font-size: .72rem; font-weight: 700;
    background: rgba(28,91,62,.12); color: var(--green-700);
}
.score-tiers { display: flex; flex-direction: column; gap: .5rem; }
.score-tier {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .55rem .85rem; border-radius: 12px;
    background: var(--cream-tile); border: 1px solid transparent;
}
.score-tier .tier-label { font-weight: 500; color: var(--ink); }
.score-tier .tier-pts {
    flex: 0 0 auto; min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem;
    border-radius: 999px; display: grid; place-items: center;
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.1rem;
    background: var(--green-700); color: #fff;
}
.score-tier--top {
    background: #fff; border-color: var(--gold-line);
    box-shadow: var(--shadow-sm);
}
.score-tier .tier-pts--zero { background: #cdc8bb; color: #fff; }
.score-tier--joker { background: var(--gold-soft); border-color: var(--gold-line); }
.score-tier .tier-pts--gold { background: linear-gradient(180deg, #e7c659, var(--gold)); color: var(--green-900); }
.bonus-grid { display: flex; flex-wrap: wrap; gap: .65rem; }
.bonus-chip {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .8rem; border-radius: 12px;
    background: var(--cream-tile); border: 1px solid var(--line);
}
.bonus-chip .bonus-name { font-size: .9rem; color: var(--ink); }
.bonus-chip .bonus-pts {
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.05rem;
    color: var(--gold-strong);
}

.points-list { list-style: none; padding: 0; margin: 0; }
.points-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: .5rem .75rem; border-radius: 10px;
}
.points-list li:nth-child(odd) { background: var(--cream-tile); }
.points-list .points-value {
    font-family: 'Oswald', sans-serif; font-weight: 600; color: var(--green-700);
}
.points-list .points-value--gold { color: var(--gold-strong); }

/* ---- Lock pill ---- */
.lock-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .25rem .6rem; border-radius: 999px;
    background: rgba(28,91,62,.08); color: var(--green-700);
    font-size: .8rem; font-weight: 600;
}

/* ---- Match recap / feed ---- */
.recap { display: flex; flex-direction: column; gap: .8rem; }
.recap-section-label {
    display: block; margin: .1rem 0 -.1rem;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .06em; color: var(--green-900);
    font-size: .72rem; font-weight: 600;
}

/* Hero headline — the single most important story of the match */
.recap-headline {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem .6rem; border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fffdf4, var(--gold-soft));
    border: 1px solid var(--gold-line);
}
.recap-headline .recap-headline-ico {
    flex: 0 0 auto; width: 1.95rem; height: 1.95rem; border-radius: 9px;
    display: grid; place-items: center; font-size: 1rem;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900); box-shadow: var(--shadow-sm);
}
.recap-headline .recap-headline-text {
    min-width: 0; line-height: 1.2; font-size: .8rem; color: var(--ink);
}
.recap-headline .recap-headline-kicker {
    display: block; margin-bottom: .02rem;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .08em; font-size: .58rem; font-weight: 600;
    color: var(--gold-strong);
}
.recap-headline strong { color: var(--green-900); font-weight: 700; }

/* Secondary highlight chips */
.recap-highlights { display: flex; flex-wrap: wrap; gap: .4rem; }
.recap-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .32rem .6rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    color: var(--ink); font-size: .74rem; font-weight: 600; line-height: 1.25;
}
.recap-chip b { font-weight: 700; color: var(--green-900); }
.recap-chip-ico { font-size: .82rem; line-height: 1; }
.recap-chip--exact { background: rgba(28,91,62,.1); border-color: rgba(28,91,62,.22); color: var(--green-700); }
.recap-chip--exact b { color: var(--green-700); }
.recap-chip--joker { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-strong); }
.recap-chip--alert { background: #fdeee9; border-color: #f1c9bd; color: #b23a23; }
.recap-chip--alert b { color: #b23a23; }
.recap-chip--muted { color: var(--muted); }

/* Per-player breakdown (mirrors stats-breakdown rows) */
.recap-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .32rem; }
.recap-line {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    align-items: center; gap: .55rem;
    padding: .34rem .5rem; border-radius: 10px;
    background: var(--cream-tile); border: 1px solid transparent;
}
.recap-line.is-me { background: #fff; border-color: var(--gold-line); box-shadow: var(--shadow-sm); }
.recap-delta {
    text-align: center;
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: .78rem;
}
.recap-delta.up { color: var(--green-600); }
.recap-delta.down { color: #c0392b; }
.recap-delta.flat { color: #b7b0a0; font-weight: 600; }
.recap-line-main { min-width: 0; }
.recap-line-name {
    display: flex; align-items: center; gap: .4rem; min-width: 0;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: .9rem;
    letter-spacing: .02em; color: var(--green-900); line-height: 1.1;
}
.recap-line-name .recap-me-flag {
    display: inline-flex; align-items: center; line-height: 1;
    font-family: 'Inter', sans-serif; text-transform: none; letter-spacing: 0;
    font-size: .56rem; font-weight: 700; color: var(--gold-strong);
    background: var(--gold-soft); border: 1px solid var(--gold-line);
    padding: .14rem .35rem .12rem; border-radius: 999px;
}
.recap-line-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; margin-top: .2rem; }
.recap-tag {
    display: inline-flex; align-items: center;
    padding: .1rem .42rem; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    font-family: 'Oswald', sans-serif; letter-spacing: .02em;
    font-size: .64rem; font-weight: 600; color: var(--muted); line-height: 1.4;
}
.recap-tag--pick { color: var(--green-900); }
.recap-tag--exact { background: rgba(28,91,62,.12); border-color: rgba(28,91,62,.22); color: var(--green-700); }
.recap-tag--joker { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-strong); }
.recap-tag--muted { color: var(--muted); }
.recap-pts {
    flex: 0 0 auto; min-width: 2.4rem; height: 1.75rem; padding: 0 .5rem;
    border-radius: 999px; display: grid; place-items: center;
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: .95rem;
    background: linear-gradient(180deg, var(--green-600), var(--green-700));
    color: #fff; box-shadow: var(--shadow-sm);
}
.recap-pts.is-zero {
    background: #e3ddce; color: var(--muted); box-shadow: none;
}
.recap-pts.is-joker {
    background: linear-gradient(180deg, #e7c659, var(--gold)); color: var(--green-900);
}

/* Feed card meta strip */
.feed-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
    min-width: 0;
    font-family: 'Oswald', sans-serif; font-size: .78rem;
    letter-spacing: .03em; color: var(--muted);
}
.feed-meta .feed-id { font-weight: 700; color: var(--green-700); }
.feed-meta .feed-stage { text-transform: uppercase; letter-spacing: .04em; }
.recap-card-time { margin-top: -.35rem; font-size: .8rem; color: var(--muted); }
.recap-card-divider {
    height: 1px; margin: .2rem 0 .6rem;
    background: linear-gradient(90deg, var(--gold-line), transparent);
}

@media (max-width: 767.98px) {
    /* highlight chips become a horizontal slider, like .list-filter */
    .recap-highlights {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        --fade: 22px;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    }
    .recap-highlights.at-start {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
                mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
    }
    .recap-highlights.at-end {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
    }
    .recap-highlights.at-start.at-end { -webkit-mask-image: none; mask-image: none; }
    .recap-highlights::-webkit-scrollbar { display: none; }
    .recap-chip { flex: 0 0 auto; }
}

/* ============ PREDICTION PICKER ============ */
.prediction-card .prediction-form { display: flex; flex-direction: column; gap: .9rem; flex: 1 1 auto; }
.prediction-form .joker-toggle { margin-top: auto; }
.prediction-form .joker-toggle.d-none ~ .prediction-submit { margin-top: auto; }
.prediction-form .prediction-submit { margin-top: 0; }
.prediction-saved-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    background: var(--green-900); color: var(--gold);
    padding: .25em .55em; border-radius: 999px;
    font-family: 'Oswald', sans-serif; font-size: .6rem; letter-spacing: .06em;
    line-height: 1; white-space: nowrap;
}

.prediction-badges {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: .3rem;
}
.prediction-badges .badge { font-size: .6rem; padding: .25em .55em; }

.prediction-card { scroll-margin-top: 1.25rem; }
.prediction-card-flash {
    margin-bottom: .85rem;
}
.prediction-card-flash .app-flash {
    box-shadow: var(--shadow-sm);
}
.prediction-card .match-vs { column-gap: .5rem; }
.pred-inputs {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
}
.pred-inputs .match-score-sep {
    font-family: 'Oswald', sans-serif; font-weight: 700;
    font-size: 1.5rem; color: var(--gold-strong);
}

/* Each side is one attached unit: [ + ] / value / [ − ] */
.pred-control {
    display: inline-flex; flex-direction: column; width: 2.7rem;
    border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow-sm);
}
.pred-inputs .score-input {
    width: 100%; height: 2.6rem; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: #fff;
    text-align: center; line-height: 1;
    font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.7rem;
    color: var(--green-900);
    -moz-appearance: textfield; appearance: textfield;
}
.pred-inputs .score-input:focus { box-shadow: none; }
.pred-inputs .score-input::-webkit-outer-spin-button,
.pred-inputs .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* steppers appear only once JS enhances an editable (unlocked) card */
.score-step-btn {
    width: 100%; height: 1.5rem; border: 0;
    background: #fbfaf6; color: var(--green-700);
    font-size: 1.05rem; line-height: 1; font-weight: 700;
    place-items: center; cursor: pointer;
    display: none;
    transition: background .12s ease, color .12s ease;
}
.pred-control .score-step-btn[data-step="1"] { border-bottom: 1px solid var(--line); }
.pred-control .score-step-btn[data-step="-1"] { border-top: 1px solid var(--line); }
.prediction-card.is-enhanced .score-step-btn { display: grid; }
.score-step-btn:hover { background: var(--cream-tile); }
.score-step-btn:active { background: var(--green-700); color: #fff; }

/* ---- Joker toggle ---- */
.joker-toggle {
    display: flex; align-items: center; gap: .75rem;
    margin-top: 1rem; padding: .75rem .85rem;
    border: 1px solid var(--gold-line); border-radius: var(--radius-sm);
    background: var(--gold-soft);
}
.joker-toggle .joker-icon {
    flex: 0 0 auto;
    width: 2.4rem; height: 2.4rem; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.2rem;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900);
}
.joker-toggle .joker-text { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.joker-toggle .joker-title {
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    letter-spacing: .05em; font-weight: 600; color: var(--gold-strong);
}
.joker-toggle .joker-sub { font-size: .78rem; color: var(--muted); }
.joker-toggle .form-check { margin: 0; min-height: auto; padding-left: 0; }
.joker-toggle .form-check-input {
    width: 2.75rem; height: 1.5rem; margin: 0; cursor: pointer;
    background-color: #d9d3c4; border-color: #cdc6b5;
}
.joker-toggle .form-check-input:checked {
    background-color: var(--gold); border-color: var(--gold-strong);
}
.joker-toggle .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(201,162,39,.25); border-color: var(--gold);
}
.joker-toggle .form-check-label { display: none; }

.prediction-submit { margin-top: 1rem; }

.bonus-score-input { width: 5rem; text-align: center; }
.match-id { width: 5.5rem; font-weight: 700; color: var(--muted); font-family: 'Oswald', sans-serif; }
.status-badge { min-width: 6.5rem; }
.compact-form .form-check { margin-bottom: 0; }
.compact-form .form-check-label { white-space: nowrap; }
.mobile-match-title { line-height: 1.35; }
.mobile-card-meta { flex: 0 0 auto; }
@media (max-width: 767.98px) {
    .page-shell { padding-left: .85rem; padding-right: .85rem; }
    main.page-shell { padding-top: 1.25rem; }
    h1.h3 { font-size: 1.4rem; }
    .page-head { margin-bottom: 1.05rem; padding-bottom: .65rem; }
    .page-head::after { width: 48px; }
    .page-head h1.h3 { font-size: 1.25rem; }
    .page-head .eyebrow { font-size: .62rem; letter-spacing: .12em; margin-bottom: .15rem; }
    .page-head p { font-size: .82rem; }
    .page-breadcrumbs { margin-bottom: .35rem; font-size: .62rem; }
    .list-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: -.85rem; margin-right: -.85rem;
        padding-left: .85rem; padding-right: .85rem;
        --fade: 26px;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    }
    .list-filter.at-start {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
                mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
    }
    .list-filter.at-end {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
    }
    .list-filter.at-start.at-end {
        -webkit-mask-image: none; mask-image: none;
    }
    .list-filter::-webkit-scrollbar { display: none; }
    .list-filter-btn { flex: 0 0 auto; }
    .mobile-table-shell {
        background: transparent;
        border: 0;
        box-shadow: none !important;
    }
    .mobile-table-shell > .table-responsive { overflow: visible; }
    .mobile-card-table {
        border-collapse: separate;
        border-spacing: 0 .85rem;
    }
    .mobile-card-table thead { display: none; }
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }
    .mobile-card-table tr {
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }
    .mobile-card-table td {
        border: 0;
        padding: .7rem .9rem;
        background: transparent;
        box-shadow: none;
    }
    .mobile-card-table td + td { border-top: 1px solid var(--line); }
    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .2rem;
        color: var(--muted);
        font-family: 'Oswald', sans-serif;
        font-size: .68rem;
        letter-spacing: .06em;
        text-transform: uppercase;
        font-weight: 600;
    }
    .mobile-card-table .mobile-card-title {
        background: linear-gradient(180deg, #fbfaf6, #f4f1e9);
        color: var(--ink);
    }
    .mobile-card-table .mobile-card-title::before,
    .mobile-card-table .mobile-action::before { display: none; }
    .mobile-card-table .text-end { text-align: left !important; }
    .mobile-card-table .mobile-card-meta { text-align: right !important; }
    .mobile-card-table .status-badge { min-width: 0; }
    .mobile-status-badge {
        min-width: 0;
        margin-top: .25rem;
        font-size: .68rem;
    }
    .mobile-card-table .mobile-action .btn {
        width: 100%;
        min-height: 2.6rem;
    }
    .prediction-form-cell .compact-form {
        display: block !important;
    }
    .score-step-btn { height: 1.8rem; }
    .prediction-submit { width: 100%; min-height: 2.85rem; }
    .btn {
        min-height: 2.7rem;
        display: inline-flex; align-items: center; justify-content: center;
    }
    .ranking-table th, .ranking-table td {
        padding-left: .4rem; padding-right: .4rem;
        font-size: .82rem; white-space: nowrap;
    }
    .ranking-table thead th { font-size: .78rem; }
    .ranking-table td:first-child, .ranking-table th:first-child { padding-left: .9rem; }
    .ranking-table td:last-child, .ranking-table th:last-child { padding-right: .9rem; }
}

/* ---- App-like mobile baseline ---- */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    min-height: 100dvh;
}
.app-main {
    min-height: calc(100dvh - 4.2rem);
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1rem;
}
.app-flash {
    margin-bottom: 0;
    animation: flash-slide-down .2s ease-out both;
}
turbo-frame {
    display: block;
}
turbo-frame[busy] {
    opacity: .65;
    transition: opacity .16s ease;
}
turbo-frame.js-pred-item[busy] {
    opacity: 1;
}
turbo-frame.js-pred-item[busy] .prediction-submit {
    pointer-events: none;
}
.login-brand-badge {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900);
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}
.brand-year {
    color: var(--gold-strong);
}
.admin-link {
    position: relative;
    transition: transform .12s ease, box-shadow .12s ease;
}
.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-line);
}
.prediction-score-separator {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-strong);
}
.bonus-total-value {
    font-size: 1.5rem;
}
.ranking-place-cell {
    width: 5rem;
}

/* ---- Global Turbo loader ---- */
.app-loader {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, .94) 0, rgba(255, 255, 255, .82) 35%, rgba(243, 239, 230, .86) 100%),
        rgba(14, 47, 34, .12);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}
.app-loader.is-visible {
    opacity: 1;
    visibility: visible;
}
.app-loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 10rem;
    min-height: 10rem;
    transform: translateY(-.5rem);
}
.app-loader__logo {
    display: grid;
    place-items: center;
    width: clamp(4.25rem, 18vw, 5.75rem);
    height: clamp(4.25rem, 18vw, 5.75rem);
    border: 1px solid rgba(228, 205, 134, .9);
    border-radius: 20px;
    background: linear-gradient(180deg, #e7c659, var(--gold));
    color: var(--green-900);
    font-family: 'Oswald', 'Inter', sans-serif;
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 14px 32px rgba(14, 47, 34, .16);
}
.app-loader__name {
    margin: 1rem 0 .7rem;
    color: var(--green-900);
    font-family: 'Oswald', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}
.app-loader__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: .75rem;
}
.app-loader__dot {
    width: .52rem;
    height: .52rem;
    border-radius: 50%;
    background: var(--gold-strong);
    opacity: .35;
    animation: app-loader-dot 1s ease-in-out infinite;
}
.app-loader__dot:nth-child(2) {
    animation-delay: .15s;
}
.app-loader__dot:nth-child(3) {
    animation-delay: .3s;
}

@keyframes app-loader-dot {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: .35;
    }
    40% {
        transform: translateY(-.34rem);
        opacity: 1;
    }
}

@media (max-width: 767.98px) {
    .app-main {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
    .app-navbar .navbar-toggler {
        min-width: 2.75rem;
        min-height: 2.75rem;
        border-color: rgba(255, 255, 255, .26);
    }
    .app-navbar .navbar-collapse {
        padding-top: .75rem;
    }
    .app-navbar .nav-link {
        min-height: 2.75rem;
        display: flex;
        align-items: center;
        padding-left: .75rem;
        padding-right: .75rem;
        border-bottom: 0;
        border-radius: 10px;
    }
    .app-navbar .nav-link.active {
        background: rgba(255, 255, 255, .08);
    }
    .navbar-user {
        align-items: stretch;
        flex-wrap: wrap;
        gap: .75rem;
        padding-top: .85rem;
        margin-top: .35rem;
        border-top: 1px solid rgba(255, 255, 255, .14);
    }
    .navbar-user .btn {
        flex: 1 1 100%;
        width: auto;
    }
    .flash-stack:not(:empty) {
        position: fixed;
        top: max(.75rem, env(safe-area-inset-top));
        left: .85rem;
        right: .85rem;
        z-index: 1095;
        pointer-events: none;
    }
    .flash-stack .app-flash {
        pointer-events: auto;
        box-shadow: var(--shadow-md);
    }
    .prediction-card-flash .app-flash {
        margin-bottom: .85rem;
    }
    .form-control,
    .form-select {
        min-height: 2.75rem;
        font-size: 16px;
    }
    textarea.form-control {
        min-height: 6rem;
    }
    .app-loader__content {
        transform: translateY(-1rem);
    }
}

@keyframes flash-slide-down {
    from {
        opacity: 0;
        transform: translateY(-.65rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---- Dashboard view styles ---- */
.matchday-center .card-header .list-filter { margin-bottom: 0; }
.matchday-center .list-filter-btn { padding: .3rem .7rem; font-size: .68rem; }

.mc-summary {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem .9rem;
    padding-bottom: .7rem; margin-bottom: .7rem;
    border-bottom: 1px solid var(--line);
}
.mc-summary-main { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.mc-headline {
    font-family: 'Oswald', sans-serif; font-weight: 700;
    font-size: .98rem; line-height: 1.1; letter-spacing: .01em;
}
.mc-headline--alert { color: var(--green-900); }
.mc-headline--calm { color: var(--green-700); }
.mc-nextlock { display: inline-flex; align-items: center; gap: .4rem; }
.mc-nextlock-label {
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    font-size: .58rem; letter-spacing: .1em; color: var(--muted);
}

.mc-list { display: flex; flex-direction: column; gap: .4rem; }
.mc-row {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .6rem; border-radius: var(--radius-sm);
    background: rgba(201,162,39,.10); border: 0;
}
.mc-row--locked { opacity: .75; }

.mc-time {
    flex: 0 0 auto; width: 2.7rem; text-align: center;
    display: flex; flex-direction: column; line-height: 1;
}
.mc-hour { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1rem; color: var(--green-900); }
.mc-day {
    margin-top: .15rem; font-family: 'Oswald', sans-serif;
    font-size: .58rem; letter-spacing: .06em; color: var(--muted);
}

.mc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.mc-teams {
    display: flex; align-items: center; gap: .4rem;
    flex-wrap: nowrap; overflow-x: auto; min-width: 0;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    --fade: 16px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
.mc-teams::-webkit-scrollbar { display: none; }
.mc-teams.at-start {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
            mask-image: linear-gradient(to right, #000 calc(100% - var(--fade)), transparent 100%);
}
.mc-teams.at-end {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
}
.mc-teams.at-start.at-end { -webkit-mask-image: none; mask-image: none; }
.matchday-center .team-crest { flex: 0 0 auto; width: 1.9rem; height: 1.25rem; font-size: .56rem; border-radius: 4px; }
.mc-team {
    flex: 0 0 auto; white-space: nowrap;
    font-family: 'Oswald', sans-serif; text-transform: uppercase;
    font-weight: 600; font-size: .8rem; letter-spacing: .02em;
    color: var(--ink);
}
.mc-vs {
    flex: 0 0 auto;
    font-family: 'Oswald', sans-serif; font-weight: 700;
    font-size: .6rem; letter-spacing: .08em;
    color: var(--gold-strong); text-transform: uppercase;
}

.mc-meta { align-items: center; font-size: .72rem; color: var(--muted); }
.mc-pick {
    display: inline-flex; align-items: center;
    padding: .05rem .42rem; border-radius: 999px;
    background: rgba(28,91,62,.1); color: var(--green-700);
    font-family: 'Oswald', sans-serif; font-weight: 600;
    font-size: .68rem; letter-spacing: .02em;
}
.mc-warn { display: flex; align-items: center; gap: .22rem; color: #c1121f; font-weight: 600; }
.mc-warn-ico { font-size: .72em; line-height: 1; }
.mc-lock { display: block; font-size: .6rem; letter-spacing: .01em; color: var(--muted); }
.mc-meta .badge { font-size: .58rem; }

.mc-cta { flex: 0 0 auto; }
.mc-cta .btn {
    display: inline-flex; align-items: center; justify-content: center;
    --bs-btn-padding-y: .34rem; --bs-btn-padding-x: .55rem;
    font-size: .9rem; line-height: 1; border-radius: 9px;
}
.mc-empty-icon { font-size: 1.6rem; opacity: .5; margin-bottom: .25rem; }

@media (min-width: 768px) {
    .mc-row { padding: .6rem .8rem; gap: .9rem; }
    .mc-time { width: 3rem; }
    .mc-hour { font-size: 1.1rem; }
    .mc-team { font-size: .86rem; }
}


/* ---- Match predictions view styles ---- */
.prediction-outcome-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(201,162,39,.28);
    background: linear-gradient(180deg, #fff, #fbfaf6);
}
.match-center-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: .85rem;
}
.match-center-metrics:last-child {
    margin-bottom: 0;
}
.match-center-metric {
    min-width: 0;
    padding: .55rem .65rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfbf7;
}
.match-center-metric.is-primary {
    border-color: var(--gold-line);
    background: linear-gradient(180deg, #fff, #fffdf4);
}
.match-center-metric.is-wide {
    grid-column: 1 / -1;
}
.match-center-label {
    display: block;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-size: .62rem;
    font-weight: 600;
    line-height: 1.1;
}
.match-center-value {
    display: block;
    margin-top: .16rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-900);
    line-height: 1.05;
    overflow-wrap: anywhere;
}
.match-center-value.is-gold { color: var(--gold-strong); }
.match-center-value.is-muted { color: var(--muted); }

.prediction-outcome-card .card-body {
    position: relative;
    z-index: 1;
    padding: .65rem .75rem .7rem;
}
.prediction-outcome-card .card-header {
    padding-top: .65rem;
    padding-bottom: .65rem;
}
.prediction-outcome-grid {
    display: grid;
    gap: .65rem;
}
.prediction-outcome-chart {
    position: relative;
    width: 100%;
    min-height: 8.25rem;
    height: 8.25rem;
}
.prediction-outcome-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.prediction-outcome-list {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}
.prediction-outcome-item {
    display: grid;
    gap: .15rem;
    align-content: start;
    min-width: 0;
    min-height: 3.15rem;
    padding: .35rem .42rem;
    border-radius: 8px;
    background: var(--cream-tile);
}
.prediction-outcome-item > span:first-child { min-width: 0; }
.prediction-outcome-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    font-size: .72rem;
    line-height: 1.18;
}
.prediction-outcome-sub {
    display: block;
    color: var(--muted);
    font-size: .62rem;
    line-height: 1.1;
}
.prediction-outcome-value {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: var(--green-700);
    font-size: 1rem;
    line-height: 1;
}
.prediction-outcome-dot {
    display: inline-block;
    width: .45rem;
    height: .45rem;
    margin-right: .22rem;
    border-radius: 50%;
}
@media (min-width: 768px) {
    .match-center-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .match-center-metric.is-wide {
        grid-column: auto;
    }
    .prediction-outcome-card .card-body {
        padding: 1rem;
    }
    .prediction-outcome-grid {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, .72fr);
        align-items: center;
        gap: 1rem;
    }
    .prediction-outcome-chart {
        min-height: 11rem;
        height: 11rem;
    }
    .prediction-outcome-list {
        display: flex;
        flex-direction: column;
        gap: .35rem;
    }
    .prediction-outcome-item {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        min-height: 0;
        padding: .4rem .6rem;
    }
    .prediction-outcome-label {
        font-size: .84rem;
    }
    .prediction-outcome-sub {
        font-size: .68rem;
    }
    .prediction-outcome-dot {
        width: .55rem;
        height: .55rem;
        margin-right: .32rem;
    }
}


/* ---- Statistics view styles ---- */
.stats-summary .stat-tile .card-body { min-height: 8.2rem; }
.stats-summary .stat-value { font-size: 1.65rem; overflow-wrap: anywhere; }
.stats-summary .stat-tile {
    border-color: rgba(201,162,39,.34);
    background: linear-gradient(180deg, #fff, #fbfaf6);
}
.stats-summary .stat-tile .stat-icon {
    background: linear-gradient(180deg, #e7c659, var(--gold));
    border: 1px solid var(--gold-strong);
    color: var(--green-900);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
}
.stats-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(201,162,39,.26);
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.96)),
        linear-gradient(90deg, rgba(246,237,210,.55), rgba(255,255,255,0));
    box-shadow: var(--shadow-sm);
}
.stats-card::before {
    content: attr(data-stat-icon);
    position: absolute;
    right: -.25rem;
    bottom: -1.45rem;
    z-index: 0;
    color: var(--green-900);
    font-family: 'Oswald', sans-serif;
    font-size: 6.4rem;
    font-weight: 700;
    line-height: 1;
    opacity: .045;
    pointer-events: none;
    user-select: none;
}
.stats-card > .card-header,
.stats-card > .card-body {
    position: relative;
    z-index: 1;
}
.stats-card > .card-header {
    min-height: 3.55rem;
    padding-right: 3.6rem;
    background: linear-gradient(180deg, #fff, #fbfaf6) !important;
}
.stats-card > .card-header::before {
    content: attr(data-stat-icon);
    position: absolute;
    top: .8rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    color: var(--gold-strong);
    font-family: 'Oswald', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}
.stats-card > .card-header .stat-chip {
    margin-right: 2.35rem;
}
.stats-card .card-body { padding: 1rem; }
.stats-card-copy { color: var(--muted); font-size: .84rem; margin: 0; }
.stats-grid { display: grid; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.stats-masonry { display: grid; gap: 1rem; }
.chart-frame {
    position: relative;
    width: 100%;
    min-height: 17rem;
    height: 17rem;
}
.chart-frame canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
.chart-frame--line {
    min-width: 42rem;
    height: 20rem;
}
.chart-frame--sm {
    min-height: 15rem;
    height: 15rem;
}
.chart-frame--buckets {
    min-height: 14.5rem;
    height: 14.5rem;
}
.chart-frame--difficulty {
    min-height: 12rem;
    height: 12rem;
}
.chart-frame--popularity {
    min-height: 12rem;
    height: 12rem;
    max-width: 28rem;
    margin: 0 auto;
}
.chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .15rem;
}
.chart-scroll::-webkit-scrollbar { height: .45rem; }
.chart-scroll::-webkit-scrollbar-thumb {
    background: #d8d0bf;
    border-radius: 999px;
}
.stats-section-label {
    display: block;
    margin: .7rem 0 .4rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--green-900);
    font-size: .72rem;
    font-weight: 600;
}
.stats-breakdown {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.stats-breakdown-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    min-height: 2.7rem;
    padding: .38rem .55rem;
    border-radius: 8px;
    background: var(--cream-tile);
}
.stats-breakdown-main { min-width: 0; }
.stats-breakdown-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.18;
}
.stats-breakdown-sub {
    display: block;
    margin-top: .05rem;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.15;
}
.stats-breakdown-value {
    font-family: 'Oswald', sans-serif;
    color: var(--green-700);
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
}
.stats-split { display: grid; gap: 1rem; }
.stats-card--compact .stats-split { gap: .8rem; }
.stats-table {
    width: 100%;
    font-size: .86rem;
}
.stats-table th {
    color: var(--muted);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .68rem;
    font-weight: 600;
    padding: .45rem .35rem;
    border-bottom: 1px solid var(--line);
}
.stats-table td {
    padding: .55rem .35rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.stats-table tr:last-child td { border-bottom: 0; }
.stats-color-dot {
    display: inline-block;
    width: .58rem;
    height: .58rem;
    margin-right: .35rem;
    border-radius: 50%;
    vertical-align: .02rem;
}
.stats-empty {
    padding: 1.4rem 1rem;
    text-align: center;
    color: var(--muted);
    background: var(--cream-tile);
    border-radius: var(--radius-sm);
}
.stats-match-select { max-width: 100%; }
.stats-popularity-head {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 1rem;
}
.stats-popularity-head .stats-card-copy {
    white-space: nowrap;
}
.stats-popularity-meta {
    color: var(--muted);
    font-size: .82rem;
}
.stats-inline-note {
    color: var(--muted);
    font-size: .78rem;
    margin-top: .55rem;
}

@media (min-width: 768px) {
    .app-install-banner__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .app-install-banner__actions {
        flex: 0 0 auto;
    }
    .stats-grid--two { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
    .stats-card .card-body { padding: 1.15rem; }
    .stats-split { grid-template-columns: minmax(0, 1fr) minmax(16rem, .8fr); align-items: start; }
    .stats-popularity-head {
        align-items: stretch;
    }
    .chart-frame--line { height: 22rem; }
}

@media (min-width: 992px) {
    .stats-grid--wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
    .stats-grid--bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-masonry {
        display: block;
        column-count: 2;
        column-gap: 1rem;
    }
    .stats-masonry > .stats-card {
        display: inline-block;
        width: 100%;
        margin: 0 0 1rem;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

@media (min-width: 1400px) {
    .page-shell { max-width: 1360px; }
    .stats-grid--two { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
    .stats-grid--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .stats-grid--bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chart-frame { min-height: 19rem; }
    .chart-frame--line { height: 24rem; }
    .chart-frame--difficulty {
        min-height: 12rem;
        height: 12rem;
    }
    .chart-frame--popularity {
        min-height: 12rem;
        height: 12rem;
    }
}

@media (max-width: 767.98px) {
    .stats-summary { margin-bottom: 1rem !important; }
    .stats-summary .stat-tile .card-body { min-height: 7.4rem; }
    .stats-summary .stat-value { font-size: 1.45rem; }
    .stats-card .card-header {
        font-size: .78rem;
        line-height: 1.25;
    }
    .chart-frame { min-height: 15.5rem; }
    .chart-frame--line {
        min-width: 38rem;
        height: 18.5rem;
    }
    .chart-frame--buckets {
        min-height: 16rem;
        height: 16rem;
    }
    .chart-frame--difficulty {
        min-height: 11rem;
        height: 11rem;
    }
    .chart-frame--popularity {
        min-height: 11.5rem;
        height: 11.5rem;
    }
    .stats-table { font-size: .8rem; }
    .stats-popularity-head .stats-card-copy { white-space: normal; }
    .stats-breakdown-title { white-space: normal; }
}
