
    :root {
        /* Softer neutral backdrop; no yellow/green stripes */
        --bg-gradient: radial-gradient(circle at 20% 20%, rgba(226, 232, 240, 0.7), rgba(226, 232, 240, 0.3)), radial-gradient(circle at 80% 35%, rgba(209, 213, 219, 0.55), rgba(209, 213, 219, 0.15)), linear-gradient(180deg, #f7f8fb 0%, #eceff4 100%);
        --card-bg: #ffffff;
        --card-border: #e2e8f0;
        --accent: #2563eb;
        --accent-soft: #e0e7ff;
        --muted: #6b7280;
        --text-main: #0f172a;
        --gold: #c59f4a;
        --silver: #6b7280;
        --bronze: #c25a14;
        --header-ink: #374151;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: var(--app-font);
        background: var(--bg-gradient);
        color: var(--text-main);
        min-height: 100vh;
        position: relative;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
    }

    body::before,
    body::after {
        content: '';
        position: fixed;
        border-radius: 50%;
        opacity: 0.35;
        filter: blur(18px);
        z-index: 0;
        pointer-events: none;
        animation: glowFloat 26s ease-in-out infinite;
    }

    body::before {
        width: 520px;
        height: 520px;
        background: radial-gradient(circle, rgba(226, 232, 240, 0.35) 0, transparent 70%);
        top: -180px;
        right: -200px;
    }

    body::after {
        width: 420px;
        height: 420px;
        background: radial-gradient(circle, rgba(209, 213, 219, 0.35) 0, transparent 70%);
        bottom: -150px;
        left: -200px;
        animation-delay: -11s;
    }

    @keyframes glowFloat {

        0%,
        100% {
            transform: translate3d(0, 0, 0) scale(1);
        }

        33% {
            transform: translate3d(24px, -18px, 0) scale(1.05);
        }

        66% {
            transform: translate3d(-18px, 18px, 0) scale(0.97);
        }
    }

    .landing-page-wrapper {
        min-height: 100vh;
        padding: 18px 12px 12px;
        position: relative;
        z-index: 1;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .landing-card {
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .landing-card-inner {
        flex: 1 1 auto;
        max-width: 1180px;
        margin: 0 auto;
        width: 100%;
        padding: 18px 18px 20px;
        border-radius: 20px;
        border: 1px solid var(--card-border);
        background: radial-gradient(circle at 20% 24%, #ffffff 0, #f1f5f9 42%, #f8fafc 100%);
        box-shadow:
            0 14px 36px rgba(148, 163, 184, 0.28),
            0 0 0 1px rgba(226, 232, 240, 0.9);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: none;
    }

    .landing-card-inner::before {
        position: absolute;
        right: 40px;
        top: 30px;
        font-size: 0.7rem;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: #9ca3af;
        font-weight: 700;
        pointer-events: none;
    }

    .landing-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 14px;
        animation: headerDrop 0.4s ease-out;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 10px;
        flex-shrink: 0;
    }

    @keyframes headerDrop {
        from {
            opacity: 0;
            transform: translateY(-14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .landing-title h4 {
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: #2563eb;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .landing-title h4::before {
        content: '📰';
        font-size: 1.2rem;
    }


    .landing-title h2 {
        font-size: 1.85rem;
        font-weight: 900;
        color: #0f172a;
        margin-bottom: 6px;
        letter-spacing: -0.03em;
        line-height: 1.05;
    }

    .landing-title small {
        color: var(--muted);
        font-size: 0.88rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-width: 640px;
    }

    .landing-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .group-pills {
        display: inline-flex;
        gap: 0;
        align-items: stretch;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background: #f9fafb;
        box-shadow: 0 8px 18px rgba(148, 163, 184, 0.25);
        overflow: hidden;
    }

    .group-pills .btn {
        border-radius: 0;
        border: 0;
        padding: 5px 12px;
        font-size: 0.78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        position: relative;
        color: #6b7280;
        background: transparent;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 74px;
        transition: all 0.18s ease;
    }

    .banner-hero {
        position: relative;
        padding: 0;
        border-bottom: 0;
        margin-bottom: 18px;
    }

    .banner-image {
        width: 100%;
        height: 260px;
        min-height: 230px;
        max-height: 360px;
        border-radius: 18px;
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        background-color: #0f172a;
    }

    .banner-overlay {
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
        padding: 8px 10px;
        background: rgba(15, 23, 42, 0.24);
        border-radius: 12px;
        backdrop-filter: blur(6px);
    }

    .group-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 12px;
    }

    .group-pills .btn+.btn {
        border-left: 1px solid #e5e7eb;
    }

    .group-pills .btn-outline-primary {
        box-shadow: none;
    }

    .group-pills .btn-outline-primary:hover {
        color: #111827;
        background: #edf2ff;
    }

    .group-pills .btn-primary {
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #4f46e5);
        box-shadow:
            0 0 0 1px rgba(37, 99, 235, 0.4),
            0 12px 24px rgba(37, 99, 235, 0.55);
    }

    .group-pills .btn-primary:hover {
        filter: brightness(1.04);
    }

    .login-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
        font-weight: 700;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background: #ffffff;
        color: #111827;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 18px rgba(156, 163, 175, 0.35);
        transition: all 0.18s ease;
        white-space: nowrap;
        position: relative;
        overflow: hidden;
    }

    .login-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 60%);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .login-btn:hover {
        color: #1d4ed8;
        border-color: #2563eb;
        transform: translateY(-1px);
        box-shadow:
            0 0 0 1px rgba(37, 99, 235, 0.35),
            0 16px 26px rgba(148, 163, 184, 0.5);
    }

    .login-btn:hover::before {
        opacity: 1;
    }

    .summary-row {
        margin-bottom: 14px;
        margin-top: 4px;
        animation: summaryFade 0.4s ease-out 0.05s both;
        flex-shrink: 0;
    }

    @keyframes summaryFade {
        from {
            opacity: 0;
            transform: translateY(12px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .summary-card {
        background: #ffffff;
        border-radius: 16px;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        transition: all 0.22s ease;
        position: relative;
        overflow: hidden;
        height: 100%;
        box-shadow:
            0 12px 24px rgba(148, 163, 184, 0.25),
            0 0 0 1px rgba(226, 232, 240, 0.85);
    }

    .summary-card.clickable {
        cursor: pointer;
    }

    .summary-card::before {
        content: '';
        position: absolute;
        inset: -40%;
        background:
            radial-gradient(circle at top left, rgba(191, 219, 254, 0.4), transparent 55%),
            radial-gradient(circle at bottom right, rgba(254, 243, 199, 0.4), transparent 55%);
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
    }

    .summary-card:hover {
        transform: translateY(-2px) translateZ(0);
        box-shadow:
            0 20px 40px rgba(148, 163, 184, 0.4),
            0 0 0 1px rgba(59, 130, 246, 0.35);
        border-color: rgba(59, 130, 246, 0.6);
    }

    .summary-card:hover::before {
        opacity: 1;
    }

    .summary-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.18em;
        color: #9ca3af;
        margin-bottom: 6px;
        font-weight: 700;
    }

    .summary-value {
        font-size: 1.6rem;
        font-weight: 800;
        color: #0f172a;
        margin-bottom: 2px;
        line-height: 1.08;
        display: flex;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
    }

    .summary-sub {
        font-size: 0.85rem;
        color: var(--muted);
        line-height: 1.4;
    }

    .winners-table-wrapper {
        background: #ffffff;
        border-radius: 18px;
        border: 1px solid #e5e7eb;
        overflow: hidden;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        box-shadow:
            0 18px 36px rgba(148, 163, 184, 0.32),
            0 0 0 1px rgba(226, 232, 240, 0.9);
        animation: tableReveal 0.4s ease-out 0.1s both;
        margin-top: 2px;
    }

    @keyframes tableReveal {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #liveTallyWrapper {
        background: linear-gradient(135deg, #f5f7fb 0%, #e9ecf3 60%, #dde3ed 100%);
        border-color: rgba(148, 163, 184, 0.35);
    }

    #liveTallyWrapper .winners-table thead th {
        background: #ffffff !important;
        color: #4b5563;
        border-bottom: 1px solid #e5e7eb;
    }

    #liveTallyWrapper .winners-table thead th::after {
        display: none !important;
    }

    #liveTallyWrapper .winners-toolbar {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(4px);
        border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    }

    #liveTallyWrapper .winners-heading,
    #liveTallyWrapper .winners-subtext {
        color: #1f2937;
        text-shadow: none;
    }

    #eventsRecordedPanel {
        background: linear-gradient(135deg, #f5f7fb 0%, #e9ecf3 60%, #dde3ed 100%);
        border-color: rgba(148, 163, 184, 0.35);
    }

    #eventsRecordedPanel .winners-toolbar {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(4px);
        border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    }

    #eventsRecordedPanel .winners-heading,
    #eventsRecordedPanel .winners-subtext {
        color: #1f2937;
        text-shadow: none;
    }

    #medalBreakdownPanel {
        background: linear-gradient(135deg, #f5f7fb 0%, #e9ecf3 60%, #dde3ed 100%);
        border-color: rgba(148, 163, 184, 0.35);
    }

    #medalBreakdownPanel .winners-toolbar {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(4px);
        border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    }

    #medalBreakdownPanel .winners-heading,
    #medalBreakdownPanel .winners-subtext {
        color: #1f2937;
        text-shadow: none;
    }

    #teamDashboardPanel {
        background: linear-gradient(135deg, #f5f7fb 0%, #e9ecf3 60%, #dde3ed 100%);
        border-color: rgba(148, 163, 184, 0.35);
    }

    #teamDashboardPanel .winners-toolbar {
        background: rgba(255, 255, 255, 0.24);
        backdrop-filter: blur(4px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    }

    #teamDashboardPanel .winners-heading,
    #teamDashboardPanel .winners-subtext {
        color: #1f2937;
        text-shadow: none;
    }

    /* Events modal header tint */
    #eventsRecordedModal .modal-content {
        background: linear-gradient(135deg, #f5f7fb 0%, #e9ecf3 60%, #dde3ed 100%);
    }

    #eventsRecordedModal .modal-header,
    #eventsRecordedModal .modal-body {
        background: transparent;
    }

    .medal-icon {
        font-size: 1.25em;
        margin-right: 6px;
        vertical-align: middle;
    }

    .winners-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        background: linear-gradient(to right, #eff6ff, #f9fafb);
        border-bottom: 1px solid #e5e7eb;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    .winners-toolbar-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .winners-heading {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 800;
        letter-spacing: -0.01em;
        color: #111827;
    }

    .winners-subtext {
        margin: 0;
        color: var(--muted);
        font-size: 0.8rem;
    }

    .winners-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        font-size: 0.78rem;
        font-weight: 600;
        color: #111827;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(148, 163, 184, 0.2);
    }

    .filter-chip-primary {
        border-color: rgba(37, 99, 235, 0.4);
        background: #e0edff;
        color: #1d4ed8;
    }

    .filter-chip-accent {
        border-color: rgba(56, 189, 248, 0.5);
        background: #e0f2fe;
        color: #0369a1;
    }

    .filter-chip-muted {
        border-color: #e5e7eb;
        color: var(--muted);
        background: #f9fafb;
    }

    .team-logo {
        width: 48px;
        height: 48px;
        object-fit: cover;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        padding: 0;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    }

    .medal-filter-link,
    .medal-filter {
        font-weight: 800;
        text-decoration: none;
    }

    /* Medal filter chips with matching fills */
    .filter-chip.medal-filter[data-medal="Gold"] {
        background: linear-gradient(180deg, rgba(255, 249, 196, 0.95), rgba(255, 236, 158, 0.8));
        border-color: rgba(255, 193, 7, 0.5);
        color: var(--gold);
    }

    .filter-chip.medal-filter[data-medal="Silver"] {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(229, 231, 235, 0.82));
        border-color: rgba(160, 174, 192, 0.5);
        color: var(--silver);
    }

    .filter-chip.medal-filter[data-medal="Bronze"] {
        background: linear-gradient(180deg, rgba(255, 228, 203, 0.92), rgba(252, 196, 142, 0.78));
        border-color: rgba(226, 137, 44, 0.5);
        color: var(--bronze);
    }

    .medal-filter-link[data-medal="Gold"],
    .medal-filter[data-medal="Gold"],
    .medal-filter-link[data-medal="Silver"],
    .medal-filter[data-medal="Silver"],
    .medal-filter-link[data-medal="Bronze"],
    .medal-filter[data-medal="Bronze"] {
        color: #374151;
    }

    .medal-filter-link[data-medal="All"] {
        color: var(--accent);
    }

    .col-gold {
        background: linear-gradient(180deg, rgba(255, 249, 196, 0.95), rgba(255, 236, 158, 0.75));
        color: var(--gold);
    }

    .col-silver {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(229, 231, 235, 0.75));
        color: var(--silver);
    }

    .col-bronze {
        background: linear-gradient(180deg, rgba(255, 228, 203, 0.9), rgba(252, 196, 142, 0.7));
        color: var(--bronze);
    }

    .medal-head-gold,
    .medal-head-silver,
    .medal-head-bronze,
    .winners-table thead th.col-gold,
    .winners-table thead th.col-silver,
    .winners-table thead th.col-bronze {
        font-weight: 800;
        border-bottom: 1px solid #e5e7eb;
    }

    .medal-head-gold,
    .winners-table thead th.col-gold {
        background: linear-gradient(180deg, #f5f7fb, #e9ecf3);
        color: var(--header-ink);
    }

    .medal-head-silver,
    .winners-table thead th.col-silver {
        background: linear-gradient(180deg, #f5f7fb, #e9ecf3);
        color: var(--header-ink);
    }

    .medal-head-bronze,
    .winners-table thead th.col-bronze {
        background: linear-gradient(180deg, #f5f7fb, #e9ecf3);
        color: var(--header-ink);
    }

    .medal-icon {
        font-size: 1.05rem;
        margin-right: 4px;
        vertical-align: middle;
    }

    /* Keep the base color on hover (no wash-out) */
    .winners-table tbody tr:hover td.col-gold {
        background: linear-gradient(180deg, rgba(255, 249, 196, 0.95), rgba(255, 236, 158, 0.75));
    }
    .winners-table tbody tr:hover td.col-silver {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(229, 231, 235, 0.75));
    }
    .winners-table tbody tr:hover td.col-bronze {
        background: linear-gradient(180deg, rgba(255, 228, 203, 0.9), rgba(252, 196, 142, 0.7));
    }

    .has-medal-row {
        background: linear-gradient(90deg, rgba(240, 249, 255, 0.55), rgba(238, 242, 255, 0.65));
    }

    .has-medal-row:hover {
        background: linear-gradient(90deg, rgba(224, 242, 255, 0.7), rgba(224, 231, 255, 0.78));
    }

    .clear-filter-btn {
        border-radius: 999px;
        font-weight: 600;
        padding: 6px 14px;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.14em;
    }

    .table-responsive {
        flex: 0 1 auto;
        overflow-y: visible;
    }

    .winners-table {
        margin: 0;
        width: 100%;
        border-collapse: collapse;
    }

    .winners-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .winners-table thead th {
        background: linear-gradient(to bottom, #f3f4f6 0%, #e5e7eb 100%);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.16em;
        font-weight: 700;
        color: #4b5563;
        border-bottom: 1px solid #e5e7eb;
        padding: 9px 10px;
        white-space: nowrap;
        border-top: none;
        position: relative;
    }

    .winners-table thead th::after {
        content: '';
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 2px;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(209, 213, 219, 0.9), transparent);
        opacity: 0.8;
    }

    .winners-table tbody tr {
        background: #ffffff;
        transition: background-color 0.16s ease, transform 0.08s ease;
    }

    .winners-table tbody td {
        padding: 9px 10px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.88rem;
        color: #111827;
    }

    .winners-table tbody tr:hover {
        background: #f9fafb;
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(148, 163, 184, 0.45);
    }

    .winners-table tbody tr:last-child td {
        border-bottom: none;
    }

    .winners-table tbody tr.no-results-row,
    .winners-table tbody tr.no-results-row:hover {
        background: #ffffff;
        box-shadow: none;
        transform: none;
    }

    .chip-medal {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
        border-radius: 999px;
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        min-width: 86px;
        transition: all 0.2s ease;
        box-shadow: none;
    }

    .chip-medal:hover {
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    }

    .chip-gold {
        background: #fef3c7;
        color: #b45309;
        border: 1px solid #f59e0b;
    }

    .chip-silver {
        background: #e5e7eb;
        color: #374151;
        border: 1px solid #9ca3af;
    }

    .chip-bronze {
        background: #f6d7c3;
        color: #92400e;
        border: 1px solid #b45309;
    }

    .footer-note {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px dashed #e5e7eb;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        font-size: 0.78rem;
        color: var(--muted);
        font-weight: 500;
        gap: 8px;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    .footer-note span {
        text-align: right;
    }

    .municipality-picker {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 12px 14px;
        margin-bottom: 12px;
    }

    .municipality-picker-label {
        font-weight: 700;
        color: #111827;
        margin-bottom: 6px;
        display: block;
        font-size: 0.86rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .municipality-picker-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }

    .municipality-picker select {
        min-width: 220px;
        background-color: #ffffff;
        border-color: #d1d5db;
        color: #111827;
    }

    .municipality-picker select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
    }

    .municipality-empty {
        text-align: center;
        color: var(--muted);
        padding: 10px 0;
    }

    .modal-content {
        background: #ffffff;
        color: #111827;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        box-shadow:
            0 26px 70px rgba(148, 163, 184, 0.6),
            0 0 0 1px rgba(226, 232, 240, 0.9);
    }

    .modal-header {
        border-bottom-color: #e5e7eb;
        background: #f9fafb;
    }

    .modal-title {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #111827;
    }

    .modal-body {
        background: #ffffff;
    }

    .modal-footer {
        border-top-color: #e5e7eb;
        background: #f9fafb;
    }

    .modal .table thead th {
        background: #f3f4f6;
        border-bottom-color: #e5e7eb;
        color: #4b5563;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
    }

    .modal .table tbody td {
        border-bottom-color: #e5e7eb;
        color: #111827;
        font-size: 0.9rem;
    }

    .modal .btn-light {
        background-color: #ffffff;
        border-color: #e5e7eb;
        color: #111827;
    }

    .modal .btn-light:hover {
        background-color: #f3f4f6;
        border-color: #d1d5db;
    }

    /* Loader – soft light overlay */
    .loader-wrapper {
        position: fixed;
        inset: 0;
        z-index: 50;
        background: radial-gradient(circle at top left, #dbeafe 0, #eff6ff 40%, #f9fafb 100%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .loader {
        position: relative;
        width: 120px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .loader-bar {
        width: 14px;
        height: 14px;
        border-radius: 999px;
        background: linear-gradient(135deg, #60a5fa, #4f46e5);
        box-shadow: 0 0 10px rgba(96, 165, 250, 0.85);
        animation: pulseBars 0.9s infinite ease-in-out;
    }

    .loader-bar:nth-child(2) {
        animation-delay: 0.08s;
    }

    .loader-bar:nth-child(3) {
        animation-delay: 0.16s;
    }

    .loader-bar:nth-child(4) {
        animation-delay: 0.24s;
    }

    .loader-bar:nth-child(5) {
        animation-delay: 0.32s;
    }

    .loader-ball {
        position: absolute;
        left: 0;
        width: 14px;
        height: 14px;
        border-radius: 999px;
        background: radial-gradient(circle at top left, #fb923c, #facc15);
        box-shadow: 0 0 12px rgba(251, 146, 60, 0.9);
        animation: slideBall 1.2s infinite cubic-bezier(0.55, 0.15, 0.35, 0.85);
    }

    @keyframes pulseBars {

        0%,
        100% {
            transform: translateY(0) scale(0.9);
            opacity: 0.4;
        }

        40% {
            transform: translateY(-6px) scale(1.1);
            opacity: 1;
        }
    }

    @keyframes slideBall {
        0% {
            transform: translateX(0);
        }

        50% {
            transform: translateX(106px);
        }

        100% {
            transform: translateX(0);
        }
    }

    @media (max-width: 991.98px) {
        .landing-page-wrapper {
            padding: 18px 10px;
        }

        .landing-card-inner {
            padding: 20px 18px 20px;
        }

        .landing-header {
            flex-direction: column;
            align-items: flex-start;
            margin-bottom: 18px;
        }

        .landing-title h2 {
            font-size: 1.9rem;
        }

        .group-pills {
            width: 100%;
            justify-content: space-between;
        }

        .group-pills .btn {
            flex: 1;
            min-width: 0;
        }

        .summary-value {
            font-size: 1.7rem;
        }

        .winners-table thead th {
            font-size: 0.7rem;
            padding-inline: 10px;
        }

        .winners-table tbody td {
            padding-inline: 10px;
            font-size: 0.85rem;
        }

        .winners-toolbar {
            align-items: flex-start;
        }

        .winners-actions {
            width: 100%;
            justify-content: flex-start;
        }

        .landing-card-inner::before {
            right: 22px;
            top: 20px;
        }

        .footer-note {
            justify-content: center;
            text-align: center;
        }
    }

    @media (max-width: 576px) {
        .landing-card-inner {
            padding-inline: 14px;
            max-height: none;
        }

        .landing-title h2 {
            font-size: 1.6rem;
        }

        .landing-title small {
            font-size: 0.85rem;
            -webkit-line-clamp: 3;
        }

        .landing-actions {
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }

        .group-pills {
            order: 1;
        }

        .banner-overlay {
            flex-direction: column;
            align-items: stretch;
        }

        .group-bar {
            flex-direction: column;
            align-items: stretch;
        }

        .login-btn {
            width: 100%;
            justify-content: center;
        }

        .team-logo {
            width: 40px;
            height: 40px;
        }

        .banner-image {
            height: 220px;
            min-height: 200px;
            max-height: 260px;
        }

        #liveTallyWrapper .winners-table {
            table-layout: fixed;
            width: 100%;
        }

        #liveTallyWrapper .winners-table th,
        #liveTallyWrapper .winners-table td {
            padding: 6px 5px;
            font-size: 0.82rem;
        }

        #liveTallyWrapper .winners-table th:first-child,
        #liveTallyWrapper .winners-table td:first-child {
            width: 12%;
        }

        #liveTallyWrapper .winners-table th:nth-child(n+2),
        #liveTallyWrapper .winners-table td:nth-child(n+2) {
            width: 22%;
        }

        /* Fine tune per column for 5-column layout */
        #liveTallyWrapper .winners-table th:nth-child(1),
        #liveTallyWrapper .winners-table td:nth-child(1) {
            width: 10%;
        }

        #liveTallyWrapper .winners-table th:nth-child(2),
        #liveTallyWrapper .winners-table td:nth-child(2) {
            width: 26%;
        }

        #liveTallyWrapper .winners-table th:nth-child(3),
        #liveTallyWrapper .winners-table td:nth-child(3) {
            width: 24%;
        }

        #liveTallyWrapper .winners-table th:nth-child(4),
        #liveTallyWrapper .winners-table td:nth-child(4) {
            width: 20%;
        }

        #liveTallyWrapper .winners-table th:nth-child(5),
        #liveTallyWrapper .winners-table td:nth-child(5) {
            width: 20%;
        }

        #liveTallyWrapper .winners-table th {
            letter-spacing: 0.04em;
            word-spacing: 0.25em;
            background: #ffffff !important;
            color: #4b5563;
            border-bottom: 1px solid #e5e7eb;
        }

        #liveTallyWrapper .winners-table thead th::after {
            display: none !important;
        }

        .chip-medal {
            min-width: 78px;
            padding-inline: 16px;
            font-size: 0.68rem;
        }

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

        .winners-actions .clear-filter-btn {
            width: 100%;
            text-align: center;
        }

        .landing-card-inner::before {
            display: none;
        }

        .winners-table thead th .medal-label {
            display: none;
        }

        .winners-table thead th.col-gold .medal-icon,
        .winners-table thead th.col-silver .medal-icon,
        .winners-table thead th.col-bronze .medal-icon {
            font-size: 1.1rem;
            margin-right: 0;
        }
    }
@media (max-width: 576px) {

    .group-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 10px;
    }

    .group-bar .login-btn {
        order: 1;
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 12px;
        border-radius: 999px;
        font-size: 0.85rem;
    }
    .group-bar .group-pills {
        order: 2;
        width: 100%;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;

        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .group-bar .group-pills .btn {
        width: 100%;
        text-align: center;
        border-radius: 999px;
        font-size: 0.85rem;
        padding: 8px 10px;
    }
}
/* =========================
   1) MOBILE: LOGIN + GROUP TABS
   ========================= */
@media (max-width: 576px) {

    /* Put login on top, full width */
    .group-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 12px;
    }

    .group-bar .login-btn {
        order: 1;
        display: block;
        width: 100%;
        text-align: center;
        padding: 9px 12px;
        border-radius: 999px;
        font-size: 0.85rem;
    }

    /* Group pills under it */
    .group-bar .group-pills {
        order: 2;
        width: 100%;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;

        /* layout:
           OVERALL (center, small)
           ELEMENTARY  SECONDARY
           PARAGAMES (full width)
        */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 6px;
    }

    .group-bar .group-pills .btn {
        width: 100%;
        border-radius: 999px;
        font-size: 0.80rem;
        padding: 6px 4px;
        text-align: center;
    }

    /* OVERALL – small, centered, own row */
    .group-bar .group-pills .btn:nth-child(1) {
        grid-column: 1 / 3;       /* span 2 cols */
        max-width: 170px;
        justify-self: center;
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* PARAGAMES – full width bottom row */
    .group-bar .group-pills .btn:nth-child(4) {
        grid-column: 1 / 3;
    }
}

/* =========================
   2) MOBILE: LONG TEAM NAMES IN TABLE
   ========================= */
@media (max-width: 576px) {

    /* Make first column (TEAM) wider and allow wrapping */
    .winners-table thead th:first-child,
    .winners-table tbody td:first-child {
        width: 60%;
        max-width: 220px;
    }

    .winners-table tbody td:first-child a {
        align-items: center;
    }

    .winners-table tbody td:first-child .team-logo {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
    }

    .winners-table tbody td:first-child span {
        display: block;
        font-size: 0.78rem;
        line-height: 1.2;
        word-break: break-word;   /* long names wrap nicely */
    }

    /* Medal columns: smaller + centered */
    .winners-table thead th:nth-child(2),
    .winners-table thead th:nth-child(3),
    .winners-table thead th:nth-child(4),
    .winners-table thead th:nth-child(5) {
        width: 10%;
        font-size: 0.7rem;
        padding: .35rem .2rem;
    }

    .winners-table tbody td {
        font-size: 0.8rem;
        padding: .4rem .25rem;
    }
}
