.event-poster-profile {
        width: 160px;
        height: 160px;
        border-radius: 22px;
        object-fit: contain;
        background: #f8fafc;
        border: 4px solid #fff;
        box-shadow: 0 10px 25px rgba(15, 39, 68, 0.14);
        padding: 6px;
    }

    .event-card-image {
        width: 100%;
        height: 170px;
        object-fit: contain;
        background: #f8fafc;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        padding: 6px;
    }

    .event-chip {
        display: inline-block;
        margin-top: 8px;
        padding: 5px 10px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
    }

    .event-chip.open {
        background: rgba(16, 185, 129, 0.12);
        color: #047857;
    }

    .event-chip.closed {
        background: rgba(239, 68, 68, 0.12);
        color: #b91c1c;
    }

    .event-selector-search {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .team-filter-card {
        transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
        position: relative;
        isolation: isolate;
        border: 1px solid transparent; 
    }

    .team-filter-card:hover {
        transform: translateY(-3px);
        border-color: #9fcbff;
        box-shadow: 0 16px 34px rgba(30, 64, 175, 0.14);
    }

    .team-filter-card::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(147, 197, 253, 0.22));
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: -1;
    }

    .team-filter-card:hover::after {
        opacity: 1;
    }

    /* Custom Event Selector Dropsown */
    .custom-event-selector {
        position: relative;
        width: 100%;
        margin-bottom: 24px;
    }

    .ces-trigger {
        width: 100%;
        height: 60px;
        background: #ffffff;
        border: 2px solid #e2e8f0;
        border-radius: 16px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        font-family: inherit;
        font-size: 16px;
        font-weight: 600;
        color: #1e293b;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    }

    .ces-trigger:hover {
        border-color: #93c5fd;
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
        transform: translateY(-2px);
    }

    .custom-dropdown-container.active .ces-trigger {
        border-color: #3b82f6;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
        background: #f8fafc;
    }

    .ces-trigger-icon {
        color: #64748b;
        font-size: 18px;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .custom-dropdown-container.active .ces-trigger-icon {
        color: #3b82f6;
    }

    .ces-dropdown {
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 20px;
        padding: 12px;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.02);
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        transform-origin: top center;
    }

    .ces-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .ces-search-box {
        position: relative;
        margin-bottom: 12px;
    }

    .ces-search-box i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #64748b;
        font-size: 16px;
        pointer-events: none;
    }

    .ces-search-box input {
        width: 100%;
        height: 52px;
        background: #f1f5f9;
        border: 2px solid transparent;
        border-radius: 12px;
        padding: 0 16px 0 44px;
        font-family: inherit;
        font-size: 15px;
        color: #0f172a;
        transition: all 0.2s ease;
    }

    .ces-search-box input:focus {
        outline: none;
        background: #ffffff;
        border-color: #3b82f6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    }

    .ces-search-box input::placeholder {
        color: #94a3b8;
    }

    .ces-list {
        max-height: 320px;
        overflow-y: auto;
        padding-right: 4px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Custom Scrollbar for Dropdown List */
    .ces-list::-webkit-scrollbar {
        width: 6px;
    }

    .ces-list::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 8px;
    }

    .ces-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 8px;
    }

    .ces-list::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

    .ces-option {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: #ffffff;
        border: 1px solid transparent;
        border-radius: 12px;
        text-decoration: none;
        color: inherit;
        transition: all 0.2s ease;
    }

    .ces-option:hover {
        background: #f8fafc;
        border-color: #e2e8f0;
        transform: translateX(4px);
    }

    .ces-option:active {
        background: #f1f5f9;
        transform: translateX(2px);
    }

    .ces-option-content {
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
    }

    .ces-option-icon {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border-radius: 10px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border: 1px solid #e2e8f0;
    }

    .ces-option-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .ces-option-placeholder {
        color: #64748b;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    }

    .ces-option-text {
        flex: 1;
        min-width: 0;
    }

    .ces-event-name {
        font-weight: 700;
        font-size: 15px;
        color: #1e293b;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: left;
    }

    .ces-event-cat {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
        text-align: left;
    }

    .ces-empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 20px;
        color: #64748b;
        gap: 10px;
    }

    .ces-empty-state i {
        font-size: 32px;
        color: #cbd5e1;
    }

    .event-desc {
        margin-top: 18px;
        padding: 18px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        line-height: 1.65;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Allow horizontal scrolling on the events page when needed */
    /* REMOVED: Unconstrained body scrolling breaks dashboard structure. Use element overflow. */

    /* Modal Styles for Team Info */
    .team-ds-modal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        z-index: 9999;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(4px);
        padding: 15px;
    }

    .team-ds-modal.active {
        display: flex;
        animation: fadeInModal 0.2s ease;
    }

    .team-ds-modal-content {
        background: #fff;
        width: 100%;
        max-width: 900px;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        position: relative;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .team-ds-modal-header {
        padding: 18px 24px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .team-ds-modal-title {
        font-size: 16px;
        font-weight: 700;
        color: #64748b;
    }

    .team-ds-close {
        background: none;
        border: none;
        font-size: 24px;
        color: #94a3b8;
        cursor: pointer;
        line-height: 1;
    }

    .team-ds-close:hover {
        color: #ef4444;
    }

    .team-ds-modal-body {
        padding: 24px;
        overflow-y: auto;
        flex: 1;
    }

    .team-ds-info-wrap {
        text-align: center;
        margin-bottom: 24px;
    }

    .team-ds-logo-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 6px;
    }

    .team-ds-logo {
        width: 44px;
        height: 44px;
        object-fit: contain;
    }

    .team-ds-name {
        font-size: 24px;
        font-weight: 600;
        color: #334155;
    }

    .team-ds-subtitle {
        font-size: 14px;
        color: #64748b;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .team-ds-stats {
        font-size: 13px;
        font-weight: 600;
        color: #334155;
    }

    .team-ds-table-wrap {
        overflow-x: auto;
        background: #ffffff;
        border: 1px solid #dbe6f3;
        border-radius: 12px;
        margin-top: 10px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
    }

    .team-ds-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 760px;
        color: #334155;
    }

    .team-ds-table th {
        padding: 12px 10px;
        font-size: 13px;
        font-weight: 700;
        border-bottom: 1px solid #cbd5e1;
        background: #0f2744;
        color: #ffffff;
        text-align: center;
    }

    .team-ds-table td {
        padding: 10px;
        font-size: 13px;
        border-bottom: 1px solid #e2e8f0;
        text-align: center;
        background: #fff;
        color: #334155;
    }

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

    .team-ds-table td.ts-player-col {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .team-ds-table .ts-head-icon {
        width: 16px;
        height: 16px;
        vertical-align: middle;
        filter: brightness(0) invert(1);
    }

.ts-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.ts-photo-placeholder {
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

    .ts-player-name {
        text-transform: uppercase;
        font-weight: 500;
    }

    @keyframes fadeInModal {
        from {
            opacity: 0;
            transform: scale(0.98);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .event-participant-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 18px;
        margin-top: 16px;
        min-width: 0;
        max-width: 100%;
    }

    .event-participant-card {
        border: 1px solid #dbe6f3;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        background: #fff;
        max-width: 100%;
    }

    .event-participant-head {
        background: #0f172a;
        color: #fff;
        padding: 10px 12px;
        font-weight: 700;
        font-size: 14px;
    }

    .event-participant-table {
        width: 100%;
        border-collapse: collapse;
    }

    .event-participant-table th,
    .event-participant-table td {
        padding: 8px 10px;
        border-bottom: 1px solid #edf2f7;
        font-size: 13px;
    }

    .event-participant-table th {
        text-align: left;
        background: #f8fafc;
    }

    .event-team-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .event-team-logo {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid #dbe6f3;
    }

    .event-team-info-link {
        color: #2563eb;
        text-decoration: none;
    }

    .event-standing-wrap {
        overflow-x: auto;
        margin-top: 14px;
        border: 2px solid #c8d7eb;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
    }

    .event-standing-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 980px;
    }

    .event-standing-table th,
    .event-standing-table td {
        padding: 10px 10px;
        border-bottom: 2px solid #d9e3f1;
        font-size: 13px;
        text-align: center;
    }

    .event-standing-table thead th {
        background: #0f172a;
        color: #fff;
        border-bottom: 2px solid #94a3b8;
    }

    .event-standing-table th:nth-child(2),
    .event-standing-table td:nth-child(2) {
        text-align: left;
    }

    .event-card-note {
        margin: 8px 0 0 0;
        color: #475569;
        font-size: 12px;
    }

    .card-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        height: 22px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 700;
        padding: 0 8px;
        border: 1px solid transparent;
    }

    .card-badge.red {
        background: #fee2e2;
        color: #b91c1c;
        border-color: #fecaca;
    }

    .card-badge.yellow {
        background: #fef9c3;
        color: #a16207;
        border-color: #fde68a;
    }

    .card-badge.green {
        background: #dcfce7;
        color: #166534;
        border-color: #bbf7d0;
    }

    .match-seq {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .match-pill-link {
        text-decoration: none;
        display: inline-flex;
    }

    .match-pill-link:focus-visible {
        outline: 2px solid #1d4ed8;
        outline-offset: 2px;
        border-radius: 6px;
    }

    .match-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 20px;
        border-radius: 5px;
        padding: 0 5px;
        font-size: 11px;
        font-weight: 700;
        color: #fff;
    }

    .match-pill.win {
        background: #16a34a;
    }

    .match-pill.lose {
        background: #dc2626;
    }

    .match-pill.draw {
        background: #d97706;
    }

    .suspend-pill {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
    }

    .suspend-pill.active {
        background: rgba(239, 68, 68, 0.14);
        color: #991b1b;
    }

    .suspend-pill.done {
        background: rgba(16, 185, 129, 0.14);
        color: #065f46;
    }

    .event-section-divider {
        margin: 34px 0 22px;
        border-top: 7px dashed #9fb7d8;
        padding-top: 20px;
        padding-bottom: 12px;
    }

    .event-bracket-wrap {
        margin-top: 14px;
        background: radial-gradient(circle at 20% 0%, #f8fbff 0%, #eef4fb 48%, #e9f1f9 100%);
        border: 1px solid #dbe5f3;
        border-radius: 16px;
        padding: 18px;
    }

    .event-image-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
        color: #475569;
        border-radius: inherit;
    }

    .event-image-placeholder.profile {
        width: 160px;
        height: 160px;
        border-radius: 22px;
        border: 4px solid #fff;
        box-shadow: 0 10px 25px rgba(15, 39, 68, 0.14);
    }

    .event-image-placeholder.card {
        height: 170px !important;
        min-height: 170px;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        padding: 6px;
        margin-bottom: 0;
    }

    .event-image-placeholder i {
        font-size: 24px;
    }

    .event-bracket-title {
        margin: 0 0 8px 0;
        color: #1e293b;
    }

    .event-bracket-note {
        margin: 0 0 10px 0;
        color: #64748b;
        font-size: 12px;
    }

    .mobile-only {
        display: none;
    }

    .evb-stage-label {
        font-weight: 800;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #2563eb;
        margin: 16px 0 6px;
        padding-left: 4px;
    }

    .evb-stage-label:first-child {
        margin-top: 0;
    }

    .evb-canvas {
        position: relative;
        min-height: 540px;
    }

    .evb-match {
        position: absolute;
        width: 260px;
        background: #fff;
        border: 1px solid #d1d5db;
        border-radius: 16px;
        overflow: visible;
        box-shadow: 0 10px 28px rgba(15, 39, 68, .08);
        transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    }

    .evb-match:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 34px rgba(15, 39, 68, .12);
        border-color: #93c5fd;
    }

    .evb-match-ranked {
        border-width: 2px;
        border-color: #f59e0b;
        overflow: visible;
    }

    .evb-match-ranked .evb-row:first-child .evb-score {
        border-top-right-radius: 14px;
    }

    .evb-match-ranked .evb-row:last-child .evb-score {
        border-bottom-right-radius: 14px;
    }

    .evb-row {
        display: grid;
        grid-template-columns: 1fr 50px;
        border-bottom: 1px solid #e5e7eb;
        transition: background .2s ease;
        align-items: stretch;
        min-height: 50px;
        overflow: hidden;
    }

    .evb-row:first-child {
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .evb-row:last-child {
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
        border-bottom: none;
    }

    .evb-row.win {
        background: rgba(37, 99, 235, 0.04);
        color: #0f172a;
    }

    .evb-row.lose {
        background: #fff;
    }

    .evb-row.linked-highlight {
        background: linear-gradient(90deg, #166534 0%, #15803d 45%, #16a34a 100%) !important;
        color: #fff !important;
    }

    .evb-name {
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;
    }

    .evb-score {
        text-align: center;
        padding: 10px 0;
        font-weight: 800;
        font-size: 20px;
        background: #f8fafc;
        border-left: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        min-height: 100%;
    }

    .evb-score.green {
        color: #065f46;
    }

    .evb-score.red {
        color: #b91c1c;
    }

    .evb-row.win .evb-name {
        color: #0f172a;
    }

    .evb-row.win .evb-score.green {
        background: #065f46;
        color: #fff !important;
        border-left-color: #065f46;
    }

    .evb-row:hover .evb-name,
    .evb-row.linked-highlight .evb-name {
        color: #fff !important;
    }

    .evb-row:hover .evb-score.red {
        color: #b91c1c !important;
    }

    .evb-row.linked-highlight .evb-score {
        color: #fff !important;
    }

    .evb-rank {
        position: absolute;
        right: -62px;
        width: 44px;
        text-align: center;
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        border-radius: 6px;
        padding: 4px 0;
        box-shadow: 0 8px 14px rgba(15, 39, 68, .18);
        z-index: 3;
    }

    .evb-rank.first {
        top: 8px;
        background: #2563eb;
    }

    .evb-rank.second {
        top: 44px;
        background: #334155;
    }

    .evb-rank.third {
        top: 8px;
        background: #0f766e;
    }

    .evb-rank.fourth {
        top: 44px;
        background: #7c2d12;
    }

    .evb-line {
        position: absolute;
        border-color: #cbd5e1;
        border-style: solid;
        border-width: 0;
    }

    .evb-line.gold {
        border-color: #2563eb;
    }

    .evb-team {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .evb-team-link {
        display: inline-flex;
        color: inherit;
        text-decoration: none;
    }

    .evb-team-link:hover .evb-team-name {
        text-decoration: underline;
    }

    .evb-team-logo {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid rgba(148, 163, 184, .7);
        background: #fff;
        flex-shrink: 0;
    }

    .evb-team-logo-placeholder {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #e2e8f0;
        color: #64748b;
        font-size: 0.7rem;
    }

    @media (max-width: 1100px) {
        .evb-canvas {
            min-height: unset;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-width: 640px;
            padding-right: 48px;
            box-sizing: border-box;
        }

        .evb-match {
            position: relative;
            width: 100%;
            left: auto !important;
            top: auto !important;
        }

        .evb-line {
            display: none;
        }

        .mobile-only {
            display: block;
        }

        .evb-rank {
            display: inline-block;
            right: -38px !important;
            width: 34px;
            font-size: 0.62rem;
            box-shadow: none;
            pointer-events: none;
        }
    }

    .top-scorer-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        gap: 14px;
        padding-top: 10px;
        padding-bottom: 12px;
        position: relative;
    }

    .top-scorer-grid::-webkit-scrollbar {
        height: 6px;
    }

    .top-scorer-grid::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    .top-scorer-card {
        flex: 0 0 160px;
        background: #e9eff5;
        border: 3px solid #c0d0e4;
        border-radius: 12px;
        padding: 12px;
        text-align: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        position: relative;
        overflow: hidden;
        cursor: pointer;
        text-decoration: none;
        color: inherit;
        transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background .24s ease;
    }

    .top-scorer-card::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .45) 45%, rgba(255, 255, 255, 0) 70%);
        transform: translateX(-130%);
        opacity: 0;
        pointer-events: none;
    }

    .top-scorer-card:hover {
        transform: translateY(-8px);
        border-color: #60a5fa;
        background: #f4f8ff;
        box-shadow: 0 14px 26px rgba(15, 39, 68, 0.16);
        z-index: 3;
    }

    .top-scorer-card:hover::after {
        opacity: 1;
        animation: scorerShine .72s ease;
    }

.top-scorer-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform .24s ease, filter .24s ease, box-shadow .24s ease;
}

.top-scorer-photo-placeholder {
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

    .top-scorer-card:hover .top-scorer-photo {
        transform: scale(1.04);
        filter: saturate(1.08);
        box-shadow: 0 10px 20px rgba(15, 39, 68, 0.16);
    }

    .top-scorer-name {
        font-size: 13px;
        font-weight: 600;
        color: #334155;
        margin-bottom: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: color .2s ease;
    }

    .top-scorer-card:hover .top-scorer-name {
        color: #0f2744;
    }

    .top-scorer-team {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 11px;
        color: #64748b;
        margin-bottom: 8px;
    }

    .top-scorer-team-logo {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        object-fit: cover;
    }

    .top-scorer-goals {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 16px;
        font-weight: 700;
        color: #475569;
        transition: transform .22s ease, color .22s ease;
    }

    .top-scorer-card:hover .top-scorer-goals {
        transform: scale(1.05);
        color: #1d4ed8;
    }

    @keyframes scorerShine {
        from {
            transform: translateX(-130%);
        }

        to {
            transform: translateX(130%);
        }
    }

    @media (max-width: 768px) {
        /* ── Wide tables: horizontal scroll ───────────────────────────── */
        .event-standing-wrap,
        .event-participant-card {
            margin-left: -16px;
            margin-right: -16px;
            border-left: none;
            border-right: none;
            border-radius: 0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .event-standing-table,
        .event-participant-table {
            min-width: max-content;
        }

        .event-standing-table th,
        .event-standing-table td,
        .event-participant-table th,
        .event-participant-table td {
            white-space: nowrap;
        }

        /* ── Header action buttons: wrap into rows ────────────────────── */
        .header-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-start;
        }

        .header-actions .btn-primary,
        .header-actions .btn-secondary {
            font-size: 11px;
            padding: 8px 14px;
        }

        /* ── Section tabs / pills: allow wrapping ────────────────────── */
        .section-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        /* ── Event profile card: stack vertically ────────────────────── */
        .team-profile-identity {
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 16px;
        }

        .team-profile-text {
            text-align: center;
        }

        /* ── Team meta grid: 2 columns on mobile ─────────────────────── */
        .team-meta-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 12px;
        }

        /* ── Event profile image: slightly smaller on mobile ─────────── */
        .event-poster-profile,
        .event-image-placeholder.profile {
            width: 130px;
            height: 130px;
        }

        /* ── Modal: full-width with smaller padding ──────────────────── */
        .team-ds-modal-content {
            max-width: 100%;
            border-radius: 12px;
        }

        .team-ds-modal-body {
            padding: 16px;
        }

        .team-ds-table {
            min-width: 640px;
        }

        /* ── Bracket: horizontal layout with scroll ─────────────── */
        .event-bracket-wrap {
            margin-left: -16px;
            margin-right: -16px;
            border-left: none;
            border-right: none;
            border-radius: 0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding: 16px;
        }

        .evb-canvas {
            display: block !important;
            min-height: 520px;
            min-width: 640px;
            padding-right: 48px;
            box-sizing: border-box;
        }

        .evb-match {
            position: absolute !important;
            width: 240px !important;
        }

        .evb-line {
            display: block !important;
        }

        .evb-rank {
            position: absolute !important;
            right: -38px !important;
            width: 34px;
            font-size: 0.62rem;
            box-shadow: none;
        }

        /* ── Participant grid: single column on small mobile ─────────── */
        .event-participant-grid {
            grid-template-columns: 1fr;
        }
    }

    /* ── Extra small phones (< 480px) ─────────────────────────────────── */
    @media (max-width: 480px) {
        /* Team meta: full single column */
        .team-meta-grid {
            grid-template-columns: 1fr !important;
        }

        /* Profile image even smaller */
        .event-poster-profile,
        .event-image-placeholder.profile {
            width: 100px;
            height: 100px;
        }

        /* Section title smaller */
        .team-name-display {
            font-size: 1.5rem;
        }

        /* Event description: tighter padding */
        .event-desc {
            padding: 16px 14px;
        }

        /* Top scorer cards: slightly narrower */
        .top-scorer-card {
            flex: 0 0 130px;
        }

        /* Bracket canvas: ensure enough height */
        .evb-canvas {
            min-height: 500px;
            min-width: 620px;
            padding-right: 40px;
        }

        .evb-rank {
            right: -30px !important;
            width: 26px;
            font-size: 0.52rem;
        }

        /* Text break protection */
        h4, h3, h2, h1 {
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
    }

    @media (max-width: 768px) {
        .event-bracket-wrap {
            margin-left: 0;
            margin-right: 0;
            border-left: 1px solid #dbe5f3;
            border-right: 1px solid #dbe5f3;
            border-radius: 16px;
            overflow-x: visible;
            padding: 16px;
        }

        .evb-canvas {
            width: 100%;
            min-width: 0 !important;
            min-height: auto !important;
            display: flex !important;
            flex-direction: column;
            gap: 16px;
            padding-right: 40px !important;
            box-sizing: border-box;
        }

        .evb-match {
            position: relative !important;
            left: auto !important;
            top: auto !important;
            width: 100% !important;
            margin-bottom: 0;
            overflow: visible;
        }

        .evb-line {
            display: none !important;
        }

        .mobile-only {
            display: block;
        }

        .evb-stage-label {
            margin-top: 16px;
            margin-bottom: 4px;
        }

        .evb-stage-label:first-child {
            margin-top: 0;
        }

        .evb-match-ranked {
            position: relative !important;
            border: none !important;
            border-radius: 14px !important;
            box-shadow: 0 8px 18px rgba(15, 39, 68, 0.08) !important;
            background: transparent !important;
            overflow: visible !important;
            isolation: isolate;
        }

        .evb-match-ranked::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 14px;
            background: #f59e0b;
            pointer-events: none;
            z-index: 0;
        }

        .evb-match-ranked::after {
            content: "";
            position: absolute;
            inset: 1px;
            border-radius: 13px;
            background: #ffffff;
            pointer-events: none;
            z-index: 0;
        }

        .evb-match-ranked .evb-row,
        .evb-match-ranked .evb-rank {
            position: relative;
            z-index: 1;
        }

        .evb-match-ranked .evb-row:first-child {
            border-top-left-radius: 14px;
            border-top-right-radius: 14px;
        }

        .evb-match-ranked .evb-row:last-child {
            border-bottom-left-radius: 14px;
            border-bottom-right-radius: 14px;
        }

        .evb-match-ranked .evb-row:first-child .evb-name {
            border-top-left-radius: 14px;
        }

        .evb-match-ranked .evb-row:last-child .evb-name {
            border-bottom-left-radius: 14px;
        }

        .evb-match-ranked .evb-row:first-child .evb-score {
            border-top-right-radius: 14px;
        }

        .evb-match-ranked .evb-row:last-child .evb-score {
            border-bottom-right-radius: 14px;
        }

        .evb-rank {
            position: absolute !important;
            right: -28px !important;
            width: 24px !important;
            padding: 3px 0 !important;
            font-size: 0.48rem !important;
            box-shadow: none !important;
            pointer-events: none;
        }

        .evb-rank.first {
            top: 35px !important;
        }

        .evb-rank.third {
            top: 23px !important;
        }

        .evb-rank.second {
            top: 73px !important;
        }

        .evb-rank.fourth {
            top: 61px !important;
        }

        .evb-name {
            padding: 10px 12px;
            font-size: 0.88rem;
        }

        .evb-score {
            padding: 10px 0;
            font-size: 1.05rem;
        }

        .evb-row {
            grid-template-columns: 1fr 40px;
        }
    }
