/* Push App — World Cup 2026 premium dark tournament UI */

:root {
    --bg: #07111f;
    --bg-warm: #0b1630;
    --navy: #14264a;
    --navy-deep: #07111f;
    --navy-soft: #1e3a6e;
    --surface: #101e36;
    --surface-muted: #162642;
    --surface-elevated: #1a2f52;
    --input-bg: #162642;
    --white: #f8fafc;
    --heading: #f8fafc;
    --on-gold: #0b1630;
    --border: rgba(159, 176, 204, 0.14);
    --border-strong: rgba(159, 176, 204, 0.28);
    --text: #f8fafc;
    --text-muted: #9fb0cc;
    --link: #6eb5ff;
    --green: #22b573;
    --green-bg: rgba(34, 181, 115, 0.14);
    --red: #e43d4f;
    --red-bg: rgba(228, 61, 79, 0.14);
    --coral: #ff6b5b;
    --blue: #2563eb;
    --blue-bg: rgba(37, 99, 235, 0.14);
    --gold: #f7c600;
    --yellow: #f7c600;
    --yellow-bg: rgba(247, 198, 0, 0.14);
    --orange: #f59e0b;
    --orange-bg: rgba(245, 158, 11, 0.12);
    --live: #3b82f6;
    --wc-stripe: linear-gradient(
        90deg,
        var(--green) 0%,
        var(--green) 20%,
        rgba(248, 250, 252, 0.9) 20%,
        rgba(248, 250, 252, 0.9) 40%,
        var(--red) 40%,
        var(--red) 60%,
        var(--blue) 60%,
        var(--blue) 80%,
        var(--gold) 80%,
        var(--gold) 100%
    );
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --container: 1200px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 90% 55% at 85% -5%, rgba(37, 99, 235, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 45% at 0% 100%, rgba(20, 38, 74, 0.85), transparent 50%),
        radial-gradient(ellipse 50% 35% at 50% 40%, rgba(247, 198, 0, 0.06), transparent 60%),
        linear-gradient(165deg, var(--bg-warm) 0%, var(--bg) 45%, #050c18 100%);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* —— Header / brand —— */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 22, 48, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.app-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: 56px;
}

@media (min-width: 992px) {
    .app-header__inner {
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-md);
        min-height: 64px;
    }
}

.app-header__stripe {
    height: 3px;
    background: var(--wc-stripe);
}

.app-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--white);
    min-width: 40px;
}

.app-brand:hover {
    text-decoration: none;
    opacity: 0.95;
}

.app-brand__logo {
    display: block;
    flex-shrink: 0;
    width: auto;
    object-fit: contain;
}

.app-brand__logo--desktop {
    display: none;
    height: 40px;
    max-width: min(220px, 42vw);
}

.app-brand__logo--mobile {
    height: 40px;
    width: 40px;
}

@media (min-width: 992px) {
    .app-brand__logo--desktop {
        display: block;
        height: 40px;
        width: auto;
        max-width: min(200px, 22vw);
    }

    .app-brand__logo--mobile {
        display: none;
    }
}

@media (max-width: 991px) {
    .app-brand__logo--desktop {
        display: none;
    }

    .app-brand__logo--mobile {
        display: block;
    }
}

/* Legacy CSS mark (fallback if referenced elsewhere) */
.brand-mark {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.brand-mark__ball {
    position: absolute;
    left: 2px;
    top: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--white), var(--yellow) 45%, var(--orange));
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset -2px -3px 0 rgba(0, 0, 0, 0.15);
}

.brand-mark__arm {
    position: absolute;
    right: 0;
    top: 2px;
    width: 14px;
    height: 28px;
    border-radius: 7px 7px 4px 4px;
    background: linear-gradient(180deg, var(--green), #067a3d);
    transform: rotate(-18deg);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.brand-mark__arm::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 10px;
    border-radius: 50%;
    background: var(--coral);
}

/* —— Navigation —— */

.nav-icon {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    opacity: 0.9;
}

.app-nav--primary {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 var(--space-sm);
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    margin-left: auto;
}

.app-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.app-nav__label {
    line-height: 1.2;
}

.app-nav__link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.app-nav__link.is-active {
    color: var(--on-gold);
    background: var(--gold);
    border-color: rgba(247, 198, 0, 0.5);
    box-shadow: 0 2px 12px rgba(247, 198, 0, 0.3);
}

.app-nav__link.is-active .nav-icon {
    opacity: 1;
}

.app-nav__link--badge {
    position: relative;
}

.app-header__profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(247, 198, 0, 0.35);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-header__profile:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.2);
    text-decoration: none;
}

.app-header__profile .avatar {
    border: none;
    box-shadow: none;
}

.app-nav-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 44px;
    height: 44px;
    padding: 0 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.app-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(247, 198, 0, 0.4);
}

.app-nav-toggle__label {
    display: none;
}

.app-nav-toggle__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 2px #0b1630;
}

body.app-nav-open .app-nav-toggle {
    border-color: var(--gold);
    background: rgba(247, 198, 0, 0.12);
}

.app-nav-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.app-nav-panel:not([hidden]) {
    pointer-events: auto;
}

.app-nav-panel__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    background: rgba(4, 10, 20, 0.72);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.app-nav-panel__sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0b1630 0%, var(--surface) 100%);
    border-left: 1px solid var(--border-strong);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.app-nav-panel:not([hidden]) .app-nav-panel__sheet {
    transform: translateX(0);
}

.app-nav-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.app-nav-panel__title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.app-nav-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.app-nav-panel__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.app-nav--drawer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 var(--space-md) var(--space-md);
}

.app-nav--drawer .app-nav__link {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    white-space: normal;
}

.app-nav-drawer__section-label {
    margin: var(--space-md) var(--space-md) var(--space-xs);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.app-nav-drawer__section-label:first-child {
    margin-top: var(--space-sm);
}

.app-nav-drawer__primary {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-nav-panel__footer {
    margin-top: auto;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.app-nav-panel__profile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
}

.app-nav-panel__profile:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.app-nav-panel__profile-name {
    display: block;
    font-weight: 700;
    color: var(--heading);
}

.app-nav-panel__profile-handle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-header__logout {
    display: none;
}

.logout-form {
    margin: 0;
}

.logout-form--panel {
    width: 100%;
}

.logout-form__btn--full {
    width: 100%;
}

.logout-form__btn--compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    border: 1px solid rgba(228, 61, 79, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(228, 61, 79, 0.12);
    color: #ff8a96;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.logout-form__btn--compact:hover {
    background: rgba(228, 61, 79, 0.2);
    color: #ffb3bb;
    border-color: rgba(228, 61, 79, 0.5);
}

.logout-form__btn--compact .app-nav__label {
    display: none;
}

.app-nav__link--logout {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(228, 61, 79, 0.12);
    color: #ff8a96;
    cursor: pointer;
    font-family: inherit;
}

.app-nav__link--logout:hover {
    background: rgba(228, 61, 79, 0.2);
    color: #ffb3bb;
    border-color: rgba(228, 61, 79, 0.35);
}

body.app-nav-open {
    overflow: hidden;
}

@media (min-width: 992px) {
    .app-header__logout {
        display: block;
    }

    .app-nav--primary {
        display: flex;
    }

    .app-nav--primary .app-nav__link {
        padding: 0.45rem 0.65rem;
        font-size: 0.8125rem;
    }

    .app-nav-toggle {
        padding: 0 0.85rem;
    }

    .app-nav-toggle__label {
        display: inline;
    }

    .app-nav-drawer__primary,
    .app-nav-drawer__section-label:first-of-type {
        display: none;
    }
}

@media (max-width: 991px) {
    .app-nav-toggle {
        padding: 0;
        width: 44px;
    }

    .app-nav-toggle .nav-icon {
        margin: 0;
    }
}

/* —— Buttons —— */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.55rem 1.1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.btn:hover {
    text-decoration: none;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--gold), #d4a900);
    color: var(--on-gold);
    box-shadow: 0 4px 16px rgba(247, 198, 0, 0.3);
}

.btn--primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(247, 198, 0, 0.4);
}

.btn--predict {
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn--edit {
    background: linear-gradient(135deg, var(--gold), #d4a900);
    color: var(--on-gold);
    box-shadow: 0 4px 14px rgba(247, 198, 0, 0.3);
}

.btn--view {
    background: var(--navy-soft);
    color: var(--white);
}

.btn--nav {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

/* —— Layout —— */

.app-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg);
}

.app-footer {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.app-footer strong {
    color: var(--heading);
}

/* —— Messages —— */

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg);
}

.message {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
}

.message--error {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red);
}

/* —— Tournament hero (dashboard) —— */

.tournament-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    background:
        linear-gradient(145deg, rgba(11, 22, 48, 0.97) 0%, rgba(20, 38, 74, 0.98) 55%, rgba(18, 58, 107, 0.95) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: var(--space-lg);
    align-items: center;
}

.tournament-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wc-stripe);
    z-index: 2;
}

.tournament-hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 80% at 100% 50%, rgba(37, 99, 235, 0.18), transparent 60%),
        radial-gradient(ellipse 40% 50% at 0% 100%, rgba(247, 198, 0, 0.08), transparent 55%);
}

@media (min-width: 768px) {
    .tournament-hero {
        grid-template-columns: 1fr minmax(200px, 280px);
        padding: var(--space-xl) var(--space-xl);
        gap: var(--space-xl);
    }
}

.tournament-hero__content {
    position: relative;
    z-index: 1;
}

.tournament-hero__eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: rgba(247, 198, 0, 0.1);
    color: var(--gold);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(247, 198, 0, 0.28);
}

.tournament-hero h1 {
    margin: 0 0 var(--space-sm);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--heading);
}

.tournament-hero__name {
    color: var(--gold);
}

.tournament-hero__tagline {
    margin: 0;
    font-size: 1.02rem;
    color: var(--text-muted);
    max-width: 44ch;
    line-height: 1.55;
}

.tournament-hero__notice {
    margin: var(--space-md) 0 0;
    padding: var(--space-md) var(--space-md);
    background: rgba(16, 30, 54, 0.65);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.88);
    border-left: 3px solid var(--gold);
    max-width: 48ch;
    backdrop-filter: blur(8px);
}

.tournament-hero__visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tournament-hero__logo-img {
    display: block;
    width: min(280px, 48vw);
    height: auto;
    max-height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

@media (max-width: 767px) {
    .tournament-hero {
        text-align: left;
    }

    .tournament-hero__visual {
        order: -1;
        margin-bottom: var(--space-xs);
    }

    .tournament-hero__logo-img {
        width: min(180px, 58vw);
        max-height: 180px;
    }
}

/* Page header (matches list) */
.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(125deg, #0b1630 0%, var(--navy) 50%, #1a4080 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--white);
    box-shadow: var(--shadow);
}

.page-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wc-stripe);
    opacity: 0.9;
}

.page-hero::after {
    content: none;
}

.page-hero h1 {
    margin: 0;
    font-size: 1.75rem;
    position: relative;
    z-index: 1;
}

.page-hero p {
    margin: var(--space-sm) 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* —— Dashboard grid —— */

.dashboard-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-grid--primary {
        grid-template-columns: 1.55fr 1fr;
    }

    .dashboard-grid--secondary {
        grid-template-columns: 1fr 1fr;
    }
}

.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.dashboard-matches-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.matches-list--dashboard {
    gap: var(--space-sm);
}

.empty-state--compact {
    padding: var(--space-md);
    margin: 0;
    font-size: 0.95rem;
    text-align: left;
}

/* —— Cards —— */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.card__body {
    padding: var(--space-lg);
}

.card--compact .card__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(90deg, var(--navy-deep), var(--navy));
    color: var(--white);
    border-bottom: 1px solid var(--border);
}

.section-header__title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-header__link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--yellow);
    text-decoration: none;
}

.section-header__link:hover {
    color: var(--white);
    text-decoration: underline;
}

.section-header__meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.72);
    letter-spacing: 0.04em;
}

/* —— Stat cards —— */

.stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.stat-card--debt {
    background: var(--red-bg);
    border-color: rgba(230, 57, 70, 0.2);
}

.stat-card--debt .stat-card__value {
    color: var(--red);
}

.stat-card--green {
    background: var(--green-bg);
    border-color: rgba(13, 159, 79, 0.2);
}

.stat-card--green .stat-card__value {
    color: var(--green);
}

.stat-card--blue {
    background: var(--blue-bg);
    border-color: rgba(37, 99, 235, 0.2);
}

.stat-card--blue .stat-card__value {
    color: var(--blue);
}

.stat-card--gold {
    background: var(--yellow-bg);
    border-color: rgba(244, 180, 0, 0.35);
}

.stat-card--gold .stat-card__value {
    color: var(--gold);
}

.stat-card--orange {
    background: var(--orange-bg);
    border-color: rgba(249, 115, 22, 0.25);
}

.stat-card--orange .stat-card__value {
    color: var(--orange);
}

.stat-card__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.stat-card__value--danger {
    color: var(--red);
}

.stat-card__value--accent {
    color: var(--green);
}

.stat-card__sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-grid {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(2, 1fr);
}

.stat-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 480px) {
    .stat-grid,
    .stat-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* —— Mini lists —— */

.mini-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0;
}

.mini-list li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.mini-list li:first-child {
    border-top: none;
}

.mini-list__meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* —— Form chips —— */

.form-chips {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.form-chip {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.form-chip--w {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(13, 159, 79, 0.3);
}

.form-chip--l {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

/* —— Match cards (tournament fixtures) —— */

.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
}

.match-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--wc-stripe);
    opacity: 0.95;
}

.match-card + .match-card {
    margin-top: var(--space-md);
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.match-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    padding-top: 4px;
}

.match-card__badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(247, 198, 0, 0.15);
    color: var(--gold);
    border: 1px solid rgba(247, 198, 0, 0.3);
    font-weight: 700;
    font-size: 0.7rem;
}

.match-card__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-md);
}

.match-card__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-align: center;
}

.match-card__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--heading);
}

.match-card__short {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.match-card__center {
    text-align: center;
    min-width: 72px;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(37, 99, 235, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.25);
}

.match-card__status {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}

.match-card__score-preview {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

.match-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border);
    gap: var(--space-md);
    flex-wrap: wrap;
}

.prediction-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prediction-pill--not_predicted {
    background: rgba(159, 176, 204, 0.12);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.prediction-pill--predicted {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(34, 181, 115, 0.35);
}

.prediction-pill--locked {
    background: var(--blue-bg);
    color: #7eb8ff;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.prediction-pill--finished {
    background: var(--surface-muted);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Crest placeholders */
.crest {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface-elevated);
    border: 2px solid rgba(247, 198, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.crest__ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed var(--yellow);
    opacity: 0.7;
}

.crest__code {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.crest--has-flag {
    overflow: hidden;
    padding: 0;
}

.crest__flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* —— Community highlights —— */

.highlight-grid {
    display: grid;
    gap: var(--space-md);
}

@media (min-width: 640px) {
    .highlight-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.highlight-card {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(16, 30, 54, 0.55);
    border-left-width: 3px;
}

.highlight-card--danger {
    border-left-color: var(--red);
}

.highlight-card--success {
    border-left-color: var(--green);
}

.highlight-card--accent {
    border-left-color: var(--gold);
}

.highlight-card--neutral {
    border-left-color: var(--blue);
}

.highlight-card__label {
    margin: 0 0 var(--space-sm);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.highlight-card__player {
    margin-bottom: var(--space-xs);
}

.highlight-card__detail {
    margin: var(--space-sm) 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.highlight-card__empty {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--heading);
}

/* —— Leaderboard —— */

/* —— Avatars & public profiles —— */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--blue), var(--navy));
    color: var(--white);
    font-weight: 800;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(26, 39, 68, 0.15);
}

.avatar--xs {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
}

.avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
}

.avatar--md {
    width: 44px;
    height: 44px;
    font-size: 0.8rem;
}

.avatar--lg {
    width: 88px;
    height: 88px;
    font-size: 1.35rem;
    border-width: 3px;
}

.avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar__initials {
    line-height: 1;
    letter-spacing: 0.02em;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.leaderboard-player {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.leaderboard-player:hover {
    text-decoration: none;
    color: var(--gold);
}

.leaderboard-player:hover .leaderboard-player__name {
    color: var(--gold);
}

.leaderboard-player__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.leaderboard-player__name {
    font-weight: 700;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-player__handle {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.prediction-player {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.prediction-player:hover {
    text-decoration: none;
    color: var(--gold);
}

.prediction-player:hover .leaderboard-player__name {
    color: var(--gold);
}

.prediction-player__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-hero.card {
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
}

.profile-hero.card::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--wc-stripe);
}

.profile-hero__body {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-lg);
}

.profile-hero__name {
    margin: 0 0 var(--space-xs);
    font-size: 1.75rem;
    color: var(--heading);
}

.profile-hero__handle {
    margin: 0;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-hero__rank {
    margin: var(--space-sm) 0 0;
    font-weight: 700;
    color: var(--gold);
}

.profile-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.profile-hero__edit {
    margin-top: 0;
}

.profile-hero__logout .logout-form__btn--compact .app-nav__label {
    display: inline;
}

.profile-history-hint {
    margin-top: 0;
    margin-bottom: 1rem;
}

.profile-history-more {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.profile-ranks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.profile-rank-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-muted);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--heading);
}

.player-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: stretch;
}

.player-search-form__input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--input-bg);
    color: var(--text);
}

.player-search-form__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.player-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.player-search-result {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.player-search-results li:first-child .player-search-result {
    border-top: none;
    padding-top: 0;
}

.player-search-result:hover {
    text-decoration: none;
    color: var(--blue);
}

.player-search-result__name {
    display: block;
    font-weight: 700;
    color: var(--heading);
}

.player-search-result__handle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.player-search-result__meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.profile-settings-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.profile-settings-form label {
    display: block;
    margin-top: var(--space-md);
    font-weight: 600;
}

.profile-settings-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.page-hero__actions {
    margin-top: var(--space-md);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.leaderboard-row:first-of-type {
    border-top: none;
}

.leaderboard-row__rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    background: var(--surface-muted);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 50%;
}

.leaderboard-row:first-of-type .leaderboard-row__rank {
    background: var(--gold);
    color: var(--on-gold);
    border-color: transparent;
}

.leaderboard-row__value {
    font-weight: 800;
    color: var(--gold);
}

.leaderboard-footnote {
    margin-top: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.leaderboard-category {
    margin-top: var(--space-xl);
}

.leaderboard-category__title {
    margin: 0 0 var(--space-xs);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: -0.02em;
}

.leaderboard-category__intro {
    margin: 0 0 var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 60ch;
}

.leaderboard-category__grid {
    margin-top: 0;
}

.section-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

/* —— Quick workout log —— */

body.workout-modal-open {
    overflow: hidden;
}

.workout-fab {
    position: fixed;
    right: var(--space-md);
    bottom: var(--space-md);
    z-index: 900;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--gold), #d4a800);
    color: var(--on-gold);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.workout-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(247, 198, 0, 0.35);
}

.workout-quick-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: rgba(8, 14, 28, 0.82);
    backdrop-filter: blur(4px);
}

.workout-quick-modal-backdrop.is-hidden {
    display: none;
}

.workout-quick-modal-dialog {
    position: relative;
    width: min(100%, 400px);
    padding: var(--space-lg);
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.workout-quick-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.workout-quick-modal__close:hover {
    color: var(--heading);
}

.workout-quick-modal__title {
    margin: 0 0 var(--space-sm);
    font-size: 1.25rem;
    color: var(--heading);
}

.workout-quick-modal__debt {
    margin: 0 0 var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.workout-quick-modal__debt strong {
    color: var(--red);
    font-weight: 800;
}

.workout-quick-form label {
    display: block;
    margin: var(--space-sm) 0 var(--space-xs);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.workout-quick-form__presets {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.workout-quick-form__preset.is-active,
.workout-quick-form__preset:focus-visible {
    border-color: var(--gold);
    color: var(--gold);
}

.workout-quick-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

@media (min-width: 768px) {
    .workout-fab {
        display: none;
    }
}

/* —— Group stats (dashboard) —— */

.group-stats-grid .stat-card {
    background: rgba(16, 30, 54, 0.55);
}

@media (min-width: 768px) {
    .group-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .group-stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.group-miss-callout {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    background: rgba(16, 30, 54, 0.55);
}

.group-miss-callout__label {
    margin: 0 0 var(--space-sm);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.group-miss-callout__player {
    margin-bottom: var(--space-xs);
}

.group-miss-callout__detail {
    margin: var(--space-sm) 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.group-miss-callout__empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* —— Auth / login —— */

.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
}

.auth-page__bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(34, 181, 115, 0.08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.1), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(247, 198, 0, 0.05), transparent 50%);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--green), var(--yellow), var(--red), var(--blue));
}

.auth-card__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.auth-card__logo {
    display: block;
    width: auto;
    object-fit: contain;
}

.auth-card__logo--desktop {
    display: none;
    height: 44px;
    max-width: 100%;
}

.auth-card__logo--mobile {
    height: 48px;
    width: 48px;
}

@media (min-width: 480px) {
    .auth-card__logo--desktop {
        display: block;
    }

    .auth-card__logo--mobile {
        display: none;
    }
}

.auth-card h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--heading);
}

.auth-card__app-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--heading);
}

.auth-card p {
    margin: 0 0 var(--space-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: var(--space-xs);
}

.auth-form input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin-bottom: var(--space-md);
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface-muted);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--surface-elevated);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.2);
}

.auth-form .btn {
    width: 100%;
    margin-top: var(--space-sm);
}

/* —— Matches list —— */

.matches-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.match-card__scoreline {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
}

.match-card__scoreline strong {
    color: var(--heading);
    font-size: 1.05rem;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-xl);
    background: var(--surface);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.empty-state code {
    background: var(--yellow-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* —— Match list date groups —— */

.date-separator {
    margin: var(--space-xl) 0 var(--space-md);
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--gold);
}

.date-separator:first-of-type {
    margin-top: 0;
}

.match-filter-notice {
    margin: 0 0 var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--yellow-bg);
    border: 1px solid rgba(247, 198, 0, 0.25);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 600;
}

.match-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.match-active-filters__clear {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue);
}

.match-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.match-layout__main {
    flex: 1;
    min-width: 0;
}

.match-filter-sidebar {
    display: none;
}

.match-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--heading);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.match-filter-toggle:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.match-filter-toggle__icon {
    font-size: 1.1rem;
    line-height: 1;
}

.match-filter-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.match-filter-panel__heading {
    margin: 0 0 var(--space-sm);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.match-filter-panel__quick {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.match-filter-chip {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: var(--input-bg);
    color: var(--heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

a.match-filter-chip:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.match-filter-chip.is-active {
    border-color: var(--gold);
    background: var(--yellow-bg);
    color: var(--gold);
}

.date-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
}

.date-filter-list__item + .date-filter-list__item {
    border-top: 1px solid var(--border);
}

.date-filter-list__link {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 0.5rem;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: var(--text);
}

.date-filter-list__link:hover {
    background: var(--surface);
}

.date-filter-list__link.is-active {
    background: var(--yellow-bg);
    font-weight: 700;
}

.date-filter-list__date {
    grid-column: 1;
    font-weight: 600;
    color: var(--heading);
}

.date-filter-list__weekday {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.date-filter-list__count {
    grid-column: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.date-filter-list__empty,
.team-filter-list__empty {
    padding: var(--space-md);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.team-search__input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
}

.team-search__input {
    background: var(--input-bg);
    color: var(--text);
}

.team-search__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.team-filter-list {
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
}

.team-filter-list__item + .team-filter-list__item {
    border-top: 1px solid var(--border);
}

.team-filter-list__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: var(--heading);
    font-weight: 600;
}

.team-filter-list__link:hover {
    background: var(--surface);
}

.team-filter-list__link.is-active {
    background: var(--yellow-bg);
}

.team-filter-list__short {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
}

.match-filter-panel__reset {
    margin: 0;
}

.match-filter-fallback {
    margin-top: var(--space-lg);
}

.match-filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 1500;
}

.match-filter-drawer.is-hidden {
    display: none;
}

.match-filter-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 39, 68, 0.45);
}

.match-filter-drawer__sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88vh;
    overflow-y: auto;
    padding: var(--space-md) var(--space-lg) var(--space-xl);
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.match-filter-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.match-filter-drawer__title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--heading);
}

.match-filter-drawer__close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--heading);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

body.match-filter-drawer-open {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 768px) {
    .match-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .match-filter-sidebar {
        display: block;
        flex: 0 0 260px;
        position: sticky;
        top: var(--space-md);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        padding: var(--space-md);
        background: var(--surface);
        border: 2px solid var(--border);
        border-radius: var(--radius);
    }

    .match-filter-toggle {
        display: none;
    }

    .match-filter-drawer {
        display: none !important;
    }
}

/* —— Activity feed —— */

.activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-item:first-child {
    padding-top: 0;
}

.activity-icon {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1.4;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content__message {
    margin: 0;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.4;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.activity-meta__link {
    font-weight: 600;
    color: var(--blue);
}

.activity-empty {
    padding: var(--space-md);
    color: var(--text-muted);
    text-align: center;
    list-style: none;
}

.activity-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.activity-filter-tabs__tab {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.activity-filter-tabs__tab:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.activity-filter-tabs__tab.is-active {
    border-color: var(--gold);
    background: var(--yellow-bg);
    color: var(--gold);
}

/* —— Notifications —— */

.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    margin-left: auto;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.app-nav--drawer .notification-badge {
    margin-left: auto;
}

.notification-reminder-card .section-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.notification-reminder__summary {
    margin: 0;
    color: var(--heading);
    font-weight: 600;
}

.notification-reminder__list {
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
}

.notification-reminder__list li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border);
}

.notification-reminder__list li:last-child {
    border-bottom: none;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item--unread {
    background: var(--yellow-bg);
    margin: 0 calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    border-radius: var(--radius-sm);
}

.notification-item__title {
    display: block;
    color: var(--heading);
    margin-bottom: 0.25rem;
}

.notification-item__message {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

.notification-item__meta {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.notification-item__link {
    display: inline-block;
    margin-top: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 600;
}

.notification-empty {
    margin: 0;
    padding: var(--space-md);
    text-align: center;
    color: var(--text-muted);
}

.notification-actions {
    margin: 0;
    flex-shrink: 0;
}

.card .section-header.notification-actions-wrap,
.card > .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

/* —— Breadcrumb —— */

.breadcrumb {
    margin: 0 0 var(--space-lg);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--blue);
}

.breadcrumb span {
    margin: 0 0.35rem;
}

/* —— Match detail —— */

.match-detail__teams {
    margin-top: var(--space-md);
}

.match-detail__final {
    margin-top: var(--space-xs);
    font-weight: 800;
    color: var(--heading);
    font-size: 1rem;
}

.match-detail__your-score {
    margin: 0 0 var(--space-md);
    font-size: 1rem;
}

.match-detail__muted {
    color: var(--text-muted);
    margin: 0 0 var(--space-md);
}

.match-detail__form-wrap {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border);
}

.notice-box {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 0;
}

.notice-box--locked {
    background: var(--blue-bg);
    border-left: 4px solid var(--blue);
    color: var(--text);
}

.notice-box--private {
    background: var(--yellow-bg);
    border-left: 4px solid var(--gold);
    color: var(--text);
}

/* —— Prediction form —— */

.prediction-form__scores {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.prediction-form__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    min-width: 100px;
}

.prediction-form__team label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--heading);
}

.prediction-form__input {
    width: 72px;
    padding: 0.65rem;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--heading);
}

.prediction-form__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.prediction-form__sep {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
}

.prediction-form__hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-md);
}

.prediction-form__error {
    display: block;
    color: var(--red);
    font-size: 0.8rem;
    font-weight: 600;
}

/* —— Predictions table (after lock) —— */

.predictions-table-wrap {
    overflow-x: auto;
}

.predictions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.predictions-table th,
.predictions-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.predictions-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-muted);
}

.predictions-table__row--you {
    background: var(--green-bg);
}

.predictions-table__you {
    font-size: 0.8rem;
    color: var(--green);
    font-weight: 600;
}

.predictions-table__perfect {
    color: var(--green);
    font-weight: 700;
}

/* —— Rules page —— */

.rules-content {
    font-size: 0.95rem;
}

.rules-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text);
}

.rules-list li {
    margin-bottom: var(--space-sm);
}

.rules-list li:last-child {
    margin-bottom: 0;
}

.rules-subheading {
    margin: 0 0 var(--space-sm);
    font-size: 1rem;
    color: var(--heading);
}

.rules-formula {
    padding: var(--space-sm) var(--space-md);
    background: var(--yellow-bg);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
}

.rules-toc__title {
    margin: 0 0 var(--space-sm);
    font-weight: 700;
    color: var(--heading);
}

.rules-toc__list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
}

.rules-toc__list a {
    color: var(--link);
    font-weight: 600;
    text-decoration: none;
}

.rules-toc__list a:hover {
    text-decoration: underline;
}

.debt-bucket-row--overdue td {
    color: var(--red);
}

.h2h-daily-remaining {
    margin: 0 0 var(--space-md);
}

.h2h-daily-limit {
    margin-bottom: var(--space-md);
}

.h2h-section--daily-limit .h2h-free-form,
.h2h-section--daily-limit .action-token-form--challenge {
    opacity: 0.55;
    pointer-events: none;
}

/* —— PWA install banner —— */

.pwa-install-banner {
    position: sticky;
    top: 0;
    z-index: 120;
    background: linear-gradient(90deg, var(--navy-deep), var(--navy));
    border-bottom: 1px solid rgba(247, 198, 0, 0.35);
}

.pwa-install-banner__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
}

.pwa-install-banner__text {
    margin: 0;
    flex: 1 1 12rem;
    font-size: 0.9rem;
    color: var(--text);
}

.pwa-install-banner__ios {
    margin: 0;
    flex: 1 1 100%;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pwa-install-banner__actions {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* —— PWA standalone polish —— */

@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .app-header {
        padding-top: max(var(--space-xs), env(safe-area-inset-top));
    }

    .app-main {
        min-height: calc(100dvh - 8rem);
    }
}

.stat-grid--2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

/* —— Workouts page —— */

.workout-form__field {
    margin-bottom: var(--space-md);
}

.workout-form__field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: var(--space-xs);
}

.workout-form__note {
    width: 100%;
    max-width: 320px;
    padding: 0.65rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
}

.workout-form__note:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.workout-history-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
}

@media (min-width: 480px) {
    .workout-history-list li {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .dashboard-grid--stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Rewards wheel (canvas) — alignment tuning: edit variables on .reward-wheel-shell */

body.reward-modal-open {
    overflow: hidden;
}

.reward-wheel-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: rgba(18, 27, 50, 0.82);
    backdrop-filter: blur(4px);
}

.reward-wheel-modal-backdrop.is-hidden {
    display: none;
}

.reward-wheel-modal-dialog {
    position: relative;
    width: min(420px, 96vw);
    max-height: 94vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.reward-confetti {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.reward-confetti__piece {
    position: absolute;
    top: -12px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.95;
    animation: reward-confetti-fall linear forwards;
}

@keyframes reward-confetti-fall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--confetti-drift, 0), 110vh) rotate(720deg);
        opacity: 0;
    }
}

.reward-modal-dismiss {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--heading);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.reward-modal-dismiss:hover {
    background: var(--border);
}

.reward-modal-title {
    margin: 0;
    font-size: 1.35rem;
    color: var(--heading);
}

.reward-modal-subtitle {
    margin: var(--space-xs) 0 var(--space-md);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.reward-wheel-shell-outer {
    width: 100%;
    display: flex;
    justify-content: center;
}

.reward-wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--wheel-stage-width, min(320px, 78vw));
    max-width: 380px;
    margin: 0 auto;
}

.reward-wheel-pointer-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: var(--wheel-pointer-height, 26px);
    width: 100%;
    margin-bottom: var(--wheel-pointer-gap, 2px);
}

.reward-wheel-pointer {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid var(--navy);
    filter: drop-shadow(0 2px 3px rgba(26, 39, 68, 0.3));
    pointer-events: none;
}

.reward-wheel-shell {
    /* Tune alignment here (CSS): */
    --wheel-size: min(320px, 78vw);
    --wheel-ring: 6px;
    --wheel-hub-size: 60%;
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    max-width: 380px;
    max-height: 380px;
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    box-shadow: 0 0 0 var(--wheel-ring) var(--navy), var(--shadow-lg);
    box-sizing: border-box;
}

.reward-wheel-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.reward-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: var(--wheel-hub-size);
    height: var(--wheel-hub-size);
    min-width: 56px;
    min-height: 56px;
    max-width: 120px;
    max-height: 120px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--input-bg);
    border: 4px solid var(--navy);
    color: var(--heading);
    font-family: inherit;
    font-weight: 900;
    font-size: clamp(0.65rem, 2.5vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.25);
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reward-wheel-center:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 6px 18px rgba(26, 39, 68, 0.3);
}

.reward-wheel-center:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(0.98);
}

.reward-wheel-center:disabled,
.reward-wheel-center.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.reward-legend__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reward-legend__list--page {
    display: grid;
    gap: var(--space-xs);
}

.reward-legend__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text);
}

.reward-legend__item strong {
    color: var(--heading);
}

.reward-legend__swatch {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.reward-result-description {
    margin: var(--space-xs) 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-soft);
}

.reward-wheel-result {
    min-height: 1.35rem;
    margin: var(--space-md) 0 0;
    padding: 0 var(--space-sm);
    color: var(--heading);
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
    max-width: 380px;
}

.reward-test-actions {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    max-width: 380px;
}

.reward-test-result {
    margin: 0;
    text-align: center;
    font-weight: 700;
    color: var(--navy-soft);
}

.btn--test-spin {
    background: var(--navy);
    color: var(--white);
    border: 1px solid var(--navy);
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.22);
}

.btn--test-spin:hover {
    background: var(--navy-soft);
    text-decoration: none;
}

.reward-result-card {
    width: 100%;
    max-width: 380px;
    margin: var(--space-md) 0 0;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(244, 180, 0, 0.45);
    background: var(--yellow-bg);
    text-align: center;
}

.reward-modal-close {
    margin-top: var(--space-lg);
    min-width: 160px;
}

.reward-modal-close[hidden],
.reward-modal-close.is-hidden {
    display: none;
}

.reward-result-card strong {
    display: block;
    margin-top: var(--space-xs);
    color: var(--heading);
    font-size: 1.25rem;
}

.reward-result-card p {
    margin: var(--space-sm) 0 0;
    color: var(--text);
    font-size: 0.95rem;
}

.reward-result-card.is-waiting {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.reward-result-card.is-revealed {
    opacity: 1;
    visibility: visible;
    max-height: none;
    transition: opacity 0.35s ease;
}

@media (max-width: 480px) {
    .reward-wheel-shell {
        --wheel-size: min(280px, 82vw);
    }

    .reward-wheel-stage {
        --wheel-stage-width: min(280px, 82vw);
    }
}

/* —— Dark theme: inputs & focus (shared) —— */

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="email"],
textarea,
select {
    color: var(--text);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.message--success {
    border-color: rgba(34, 181, 115, 0.45);
    background: var(--green-bg);
    color: var(--green);
}

.breadcrumb a:hover {
    color: var(--gold);
}

.player-search-result:hover .player-search-result__name {
    color: var(--gold);
}

.match-filter-drawer__backdrop {
    background: rgba(4, 10, 20, 0.72);
}

.date-filter-list__link.is-active,
.team-filter-list__link.is-active {
    background: var(--yellow-bg);
}

.date-filter-list__link.is-active .date-filter-list__date {
    color: var(--gold);
}

.notification-item--unread {
    background: var(--yellow-bg);
    border: 1px solid rgba(247, 198, 0, 0.2);
}

.notification-item__title {
    color: var(--heading);
}

.stat-card {
    background: var(--surface-muted);
}

.stat-card--debt {
    border-color: rgba(228, 61, 79, 0.35);
}

.stat-card--green {
    border-color: rgba(34, 181, 115, 0.35);
}

@media (max-width: 767px) {
    .card:hover,
    .match-card:hover {
        transform: none;
    }
}

/* —— Token / Actions gameplay —— */

.token-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.token-swatch--common { background: #9ca3af; }
.token-swatch--rare { background: #3b82f6; }
.token-swatch--epic { background: #a855f7; }
.token-swatch--legendary { background: #f97316; }

.token-inventory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.token-inventory-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.token-inventory-item--common { color: #b0b8c4; }
.token-inventory-item--rare { color: #60a5fa; }
.token-inventory-item--epic { color: #c084fc; }
.token-inventory-item--legendary { color: #fb923c; }

.token-rarity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-use-form,
.action-token-block {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.action-use-form:last-child,
.action-token-block:last-child {
    border-bottom: none;
}

.action-token-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    max-width: 36rem;
}

.action-token-form--challenge {
    max-width: 28rem;
}

.action-token-form__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.action-token-form__field {
    width: 100%;
}

.action-token-form__field--narrow {
    max-width: 10rem;
}

.action-token-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-top: 0.15rem;
}

.action-select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 2.5rem 0.55rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    line-height: 1.35;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239FB0CC' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px 8px;
    color: var(--heading);
    appearance: none;
    cursor: pointer;
}

.action-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.action-input {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--heading);
}

.action-input--narrow {
    max-width: 10rem;
}

.action-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.18);
}

.match-filter-chip--golden.is-active {
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.55);
    background: rgba(249, 115, 22, 0.12);
}

.wheel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.match-card--golden {
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25);
}

.match-card__badge--golden {
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.45);
}

.match-card__badge--locked {
    color: var(--text-muted);
}

.match-card__badge--picks {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
}

.challenge-row {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.challenge-row--group {
    padding: var(--space-md) 0;
}

.challenge-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.challenge-row__form {
    display: inline;
}

.h2h-section {
    margin-bottom: var(--space-lg);
}

.h2h-section__intro {
    margin-top: 0;
}

.h2h-subheading {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.h2h-match-picker {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.65rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
}

.h2h-match-picker__item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    line-height: 1.35;
    cursor: pointer;
}

.h2h-match-picker__item input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.h2h-match-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.h2h-rivalry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: var(--space-sm);
}

.h2h-rivalry-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease;
}

.h2h-rivalry-card:hover {
    border-color: rgba(247, 198, 0, 0.45);
}

.h2h-rivalry-card__name {
    font-weight: 700;
    color: var(--heading);
}

.h2h-rivalry-card__record,
.h2h-rivalry-card__status {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.h2h-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.h2h-detail-list__item {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.h2h-detail-list__item:last-child {
    border-bottom: none;
}

.h2h-detail-list__score {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.h2h-bet-mode {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0;
}

.h2h-bet-mode__option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0;
    cursor: pointer;
}

.h2h-bet-mode__option + .h2h-bet-mode__option {
    border-top: 1px solid var(--border);
}

.h2h-bet-mode__option input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.h2h-bet-mode__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.h2h-bet-mode__title {
    font-weight: 700;
    color: var(--heading);
    font-size: 0.9rem;
}

.h2h-bet-mode__desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.h2h-stake-hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
}

.h2h-bet-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    vertical-align: middle;
}

.h2h-banter {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    font-style: italic;
    color: #fcd34d;
}

.match-card__badge--token {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    font-size: 0.72rem;
}

.reward-wheel-shell--legendary {
    border-color: rgba(249, 115, 22, 0.45);
}

.invite-friends-card {
    margin-top: var(--space-lg);
}

.invite-friends-card__lead {
    margin: 0 0 var(--space-md);
    color: var(--text-muted);
    line-height: 1.5;
}

.invite-friends-card__label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--heading);
}

.invite-friends-card__url-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: stretch;
}

.invite-friends-card__url {
    flex: 1 1 14rem;
    min-width: 0;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    border: 2px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(7, 17, 31, 0.55);
    color: #bae6fd;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.invite-friends-card__url:focus {
    outline: 2px solid rgba(56, 189, 248, 0.45);
    outline-offset: 2px;
}

.invite-friends-card__copy {
    flex: 0 0 auto;
    align-self: stretch;
    white-space: nowrap;
}

.invite-friends-card__meta {
    margin-top: var(--space-md);
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .invite-friends-card__copy {
        flex: 1 1 100%;
        justify-content: center;
    }
}

.auth-card--wide {
    max-width: 28rem;
}

.auth-card__footer {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.auth-form__error {
    margin: -0.35rem 0 0.75rem;
    font-size: 0.82rem;
    color: #f87171;
}

.auth-form input[type="file"] {
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- UX polish: live matches, urgency, wow moments --- */

.match-card--live {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
    animation: live-card-pulse 2.4s ease-in-out infinite;
}

.match-detail--live {
    border-color: rgba(239, 68, 68, 0.45);
}

@keyframes live-card-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15); }
    50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.25); }
}

.match-card__live-pill {
    display: inline-block;
    margin-bottom: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    animation: live-pill-blink 1.4s ease-in-out infinite;
}

@keyframes live-pill-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.match-card__lock-urgency {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fbbf24;
}

.app-nav-toggle__badge--predict {
    background: #ef4444;
}

.app-nav-toggle__badge--reward {
    background: #f59e0b;
}

.weekly-winners-strip {
    margin-bottom: var(--space-lg);
    border-color: rgba(249, 115, 22, 0.35);
}

.weekly-winners-strip__label {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.weekly-winners-strip__grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .weekly-winners-strip__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.weekly-winners-strip__title {
    display: block;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.weekly-winners-strip__name {
    font-weight: 600;
}

.weekly-winners-strip__prize {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: #fb923c;
}

.spin-banner {
    margin-bottom: var(--space-lg);
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(249, 115, 22, 0.06));
}

.spin-banner__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.spin-banner__eyebrow {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fbbf24;
}

.spin-banner__title {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.onboarding-card {
    margin-bottom: var(--space-lg);
    border-color: rgba(59, 130, 246, 0.35);
}

.onboarding-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.onboarding-card__title {
    margin: 0;
    font-size: 1.1rem;
}

.onboarding-card__dismiss {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.onboarding-card__steps {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.onboarding-card__steps li + li {
    margin-top: 0.45rem;
}

.debt-progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.debt-progress__track {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.debt-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    max-width: 100%;
}

.notice-box--interest {
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.predict-today-bar {
    position: sticky;
    bottom: 0.75rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
}

.predict-today-bar__text {
    font-size: 0.92rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.activity-item__avatar {
    flex-shrink: 0;
}

.activity-inline-icon {
    margin-right: 0.25rem;
}

.leaderboard-viewer-pin {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
    font-size: 0.9rem;
}

.leaderboard-viewer-pin__link {
    margin-left: 0.5rem;
}

.notification-group__title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
}

.notification-group__title:first-child {
    margin-top: 0;
}

.h2h-versus__players {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.h2h-versus__player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.h2h-versus__name {
    font-weight: 700;
}

.h2h-versus__record {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-muted);
}

.h2h-versus__record--win {
    color: #fbbf24;
}

.h2h-versus__vs {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.h2h-versus__ties {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.h2h-versus__debt {
    margin: 1rem 0;
    text-align: center;
}

.h2h-versus__cta {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.settlement-reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.settlement-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.settlement-reveal__result--perfect {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.settlement-reveal__result--penalty {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message--fade-out {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
