/* Extracted from templates/tournaments/tournament_view.html (Phase 3.1). Page-local styles; global rules belong in the design system sheets. */
    .tournament-hero {
        background: linear-gradient(135deg, #0f2738 0%, var(--brand-1) 25%, var(--brand-1-light) 60%, var(--brand-2) 100%);
        margin: 0 0 1.25rem 0;
        padding: 2.5rem 2rem;
        border-radius: 16px;
        color: white;
        position: relative;
        overflow: hidden;
    }

    @media (max-width: 768px) {
        .tournament-hero { margin: 0 0 1rem 0; padding: 1.5rem 1rem; border-radius: 12px; }
    }

    .tournament-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 60%;
        height: 200%;
        background: radial-gradient(ellipse, rgba(var(--mint-rgb),0.18) 0%, transparent 60%);
        pointer-events: none;
    }
    
    .hero-content {
        position: relative;
        z-index: 1;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .hero-left { flex: 1; min-width: 280px; }
    
    .hero-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.4rem 0.9rem;
        border-radius: 999px;
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: 0.3px;
    }
    
    .badge-format {
        background: rgba(255, 255, 255, 0.18);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    
    .badge-status-setup {
        background: rgba(156, 163, 175, 0.25);
        color: #e5e7eb;
        border: 1px solid rgba(156, 163, 175, 0.35);
    }
    
    .badge-status-in_progress {
        background: rgba(var(--mint-rgb), 0.25);
        color: var(--mint-light);
        border: 1px solid rgba(var(--mint-rgb), 0.4);
    }
    
    .badge-status-completed {
        background: rgba(16, 185, 129, 0.25);
        color: #6ee7b7;
        border: 1px solid rgba(16, 185, 129, 0.35);
    }
    
    .hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
        font-weight: 800;
        margin: 0 0 1rem 0;
        line-height: 1.15;
        letter-spacing: -0.03em;
        text-shadow: 0 2px 12px rgba(0,0,0,0.2);
    }
    
    .hero-status-ribbon {
        display: inline-block;
        padding: 0.5rem 1.25rem;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        margin-bottom: 1rem;
    }
    
    .hero-status-ribbon.setup { background: rgba(255,255,255,0.2); color: white; }
    .hero-status-ribbon.in_progress { background: rgba(var(--mint-rgb),0.4); color: white; box-shadow: 0 0 20px rgba(var(--mint-rgb),0.3); }
    .hero-status-ribbon.completed { background: rgba(16,185,129,0.4); color: white; }
    
    .hero-actions-col {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        flex-shrink: 0;
    }
    
    .hero-actions-col .btn { white-space: nowrap; }

    .watch-live-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .watch-live-dot {
        width: 0.55rem;
        height: 0.55rem;
        border-radius: 50%;
        background: var(--danger);
        box-shadow: 0 0 0 0 rgba(239,68,68,0.6);
        animation: watch-live-pulse 1.6s infinite;
    }
    @keyframes watch-live-pulse {
        0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
        70% { box-shadow: 0 0 0 0.5rem rgba(239,68,68,0); }
        100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    }
    
    .hero-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 1.75rem;
        font-size: 0.95rem;
        opacity: 0.95;
    }
    
    .hero-meta-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .hero-meta-item svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        opacity: 0.9;
    }
    
    .tv-cta-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    
    .tv-cta-bar .btn {
        font-weight: 600;
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
    }
    
    .champion-banner {
        background: var(--t-status-success-bg);
        border: 2px solid var(--t-status-success-border);
        border-radius: 16px;
        padding: 1.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
        position: relative;
        overflow: hidden;
    }
    
    .champion-banner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--mint), var(--mint-dark));
    }
    
    .champion-trophy {
        font-size: 3rem;
        margin-bottom: 0.75rem;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }
    
    .champion-title {
        color: var(--t-status-success-text);
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2.5px;
        margin-bottom: 0.5rem;
    }
    
    .champion-name {
        color: var(--t-heading);
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 800;
        margin: 0;
    }
    
    /* Legacy stat-grid kept for other pages that may reference it */
    .stat-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    @media (max-width: 768px) {
        .stat-grid { grid-template-columns: 1fr; }
    }
    
    .content-card {
        background: var(--t-surface);
        padding: 1.5rem;
        border-radius: 14px;
        margin-bottom: 1.5rem;
        border: 1px solid var(--t-border);
        transition: border-color 0.2s;
    }
    
    .content-card:hover {
        border-color: var(--t-border-strong);
    }
    
    .card-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--t-border);
    }
    
    .card-header svg {
        color: var(--mint);
    }
    
    .card-title {
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--t-heading);
        margin: 0;
    }
    
    .participants-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .participant-card {
        background: var(--t-surface-elevated);
        padding: 1rem 1.25rem;
        border-radius: 12px;
        border: 1px solid var(--t-border);
        display: flex;
        align-items: center;
        gap: 0.75rem;
        transition: border-color 0.2s, transform 0.2s;
    }
    
    .participant-card:hover {
        border-color: var(--mint);
        transform: translateX(3px);
    }
    
    .participant-card.champion {
        background: var(--t-status-success-bg);
        border-color: var(--t-status-success-border);
    }
    
    .participant-seed {
        background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-1-light) 100%);
        color: white;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .participant-name {
        color: var(--t-text);
        font-weight: 600;
    }
    .participant-name--link { text-decoration: none; }
    .participant-name--link:hover { text-decoration: underline; }
    
    .pools-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
    
    .pool-card {
        background: var(--t-surface-elevated);
        padding: 1.25rem;
        border-radius: 14px;
        border: 1px solid var(--t-border);
    }
    
    .pool-title {
        color: var(--t-heading);
        font-weight: 700;
        font-size: 1rem;
        margin: 0 0 1rem 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--t-border);
    }
    
    .standings-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        margin-bottom: 1rem;
    }

    .standings-table th {
        background: var(--t-surface);
        color: var(--t-text-muted);
        padding: 0.6rem 0.5rem;
        text-align: left;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid var(--t-border);
    }

    .standings-table td {
        padding: 0.65rem 0.5rem;
        border-bottom: 1px solid var(--t-border);
        color: var(--t-text);
    }

    .standings-table th:first-child,
    .standings-table td:first-child {
        width: 12%;
        text-align: center;
    }

    .standings-table th:nth-child(2),
    .standings-table td:nth-child(2) {
        width: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .standings-table th:nth-child(n+3),
    .standings-table td:nth-child(n+3) {
        width: 18%;
        text-align: center;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }
    
    .standings-table tr:hover {
        background: var(--t-hover-bg);
    }

    .player-link {
        color: inherit;
        text-decoration: none;
    }
    .player-link:hover {
        text-decoration: underline;
    }
    
    .standings-table .rank-1 {
        background: var(--t-status-success-bg);
    }
    
    .standings-table .rank-2 {
        background: var(--t-surface-elevated);
    }
    
    .finals-standings-card {
        margin-bottom: 1rem;
    }
    .finals-standings-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }
    .finals-standings-list-podium .finals-standings-item {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .finals-standings-item {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 0.72rem 0.95rem;
        border-radius: 0.65rem;
        font-weight: 600;
        flex-wrap: wrap;
        border: 1px solid var(--t-border-strong);
        background: var(--t-surface);
        transition: border-color 0.2s ease, transform 0.2s ease;
    }
    .finals-standings-item:hover {
        border-color: var(--t-border);
        transform: translateX(2px);
    }
    .finals-standings-rank-1 {
        background: linear-gradient(135deg, rgba(212,175,55,0.2) 0%, rgba(184,134,11,0.15) 100%);
        border-color: rgba(212,175,55,0.48);
        color: var(--t-text);
    }
    .finals-standings-rank-2 {
        background: linear-gradient(135deg, rgba(192,192,192,0.2) 0%, rgba(169,169,169,0.15) 100%);
        border-color: rgba(192,192,192,0.45);
        color: var(--t-text);
    }
    .finals-standings-rank-3 {
        background: linear-gradient(135deg, rgba(205,127,50,0.2) 0%, rgba(184,115,51,0.15) 100%);
        border-color: rgba(205,127,50,0.45);
        color: var(--t-text);
    }
    .finals-standings-medal {
        width: 1.25rem;
        height: 1.25rem;
        border-radius: 50%;
        flex-shrink: 0;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 2px rgba(0,0,0,0.08);
    }
    .finals-standings-rank-1 .finals-standings-medal { background: linear-gradient(135deg, #ffd700, #daa520); }
    .finals-standings-rank-2 .finals-standings-medal { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); }
    .finals-standings-rank-3 .finals-standings-medal { background: linear-gradient(135deg, #cd7f32, #b87333); }
    .finals-standings-place {
        min-width: 2.2rem;
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--t-text-muted);
    }
    .finals-standings-name {
        flex: 1;
        min-width: 180px;
        font-weight: 700;
        color: var(--t-heading);
    }
    .finals-standings-metrics {
        margin-left: auto;
        display: inline-flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        justify-content: flex-end;
    }
    .finals-metric-chip {
        font-size: 0.71rem;
        font-weight: 700;
        color: var(--t-text-muted);
        background: color-mix(in srgb, var(--t-surface-elevated) 76%, transparent);
        border: 1px solid var(--t-border);
        border-radius: 999px;
        padding: 0.18rem 0.5rem;
    }
    .finals-metric-chip-main {
        color: var(--t-heading);
        border-color: var(--t-border-strong);
    }
    .finals-metric-chip-pd.is-positive {
        color: var(--t-status-success-text);
        border-color: var(--t-status-success-border);
        background: var(--t-status-success-bg);
    }
    .finals-metric-chip-pd.is-negative {
        color: var(--t-status-danger-text);
        border-color: var(--t-status-danger-border);
        background: var(--t-status-danger-bg);
    }
    .finals-metric-chip-pd.is-even {
        color: var(--t-text-muted);
    }
    .finals-metric-chip-elim {
        color: var(--t-text-muted);
        font-style: italic;
        font-weight: 600;
        border-style: dashed;
    }
    .finals-standings-rank-rest {
        background: var(--t-surface);
        border: 1px solid var(--t-border-strong);
    }
    .finals-standings-rank-rest .finals-standings-medal {
        background: linear-gradient(135deg, var(--t-border), var(--t-border-strong));
    }
    .finals-standings-toggle {
        margin-top: 0.65rem;
    }
    .finals-standings-toggle summary {
        cursor: pointer;
        color: var(--t-primary);
        font-size: 0.8rem;
        font-weight: 700;
        list-style: none;
        user-select: none;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        background: var(--t-surface-elevated);
        border: 1px solid var(--t-border);
        border-radius: 999px;
        padding: 0.3rem 0.75rem;
    }
    .finals-standings-toggle summary::after {
        content: '▾';
        font-size: 0.75rem;
        transform: translateY(-1px);
        opacity: 0.85;
        transition: transform 0.2s ease;
    }
    .finals-standings-toggle[open] summary::after {
        transform: rotate(180deg) translateY(1px);
    }
    .finals-standings-toggle summary::-webkit-details-marker {
        display: none;
    }
    .finals-standings-list-full {
        margin-top: 0.6rem;
    }
    .finals-standings-note {
        margin-top: 0.7rem;
        color: var(--t-text-muted);
        font-size: 0.78rem;
        line-height: 1.4;
    }
    @media (max-width: 820px) {
        .finals-standings-metrics {
            margin-left: 0;
            width: 100%;
            justify-content: flex-start;
        }
    }
    .standings-table .advance-row {
        background: var(--t-status-success-bg);
    }
    
    .pool-matches-title {
        color: var(--t-text-muted);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 1rem 0 0.5rem 0;
    }
    
    .pool-round-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--t-text);
        font-size: 0.8rem;
        font-weight: 600;
        margin: 1rem 0 0.5rem 0;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--t-border);
    }
    
    .pool-round-header:first-of-type {
        margin-top: 0.5rem;
    }
    
    .pool-round-badge {
        background: var(--brand-1);
        color: white;
        padding: 0.2rem 0.5rem;
        border-radius: 6px;
        font-size: 0.68rem;
        font-weight: 600;
    }
    
    .match-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.65rem 0.75rem;
        background: var(--t-surface);
        margin-bottom: 0.4rem;
        border-radius: 10px;
        border: 1px solid var(--t-border);
        font-size: 0.85rem;
        transition: border-color 0.2s;
    }
    
    .match-row:hover {
        border-color: var(--t-border-strong);
    }
    
    .match-row.completed {
        background: var(--t-status-success-bg);
        border-color: var(--t-status-success-border);
    }
    
    .match-team {
        flex: 1;
        min-width: 0;
        font-weight: 500;
        color: var(--t-text);
    }

    .match-team.match-team-right {
        text-align: right;
    }

    .match-team.winner {
        font-weight: 700;
        color: var(--t-status-success-text);
    }
    
    .match-vs {
        color: var(--t-text-muted);
        padding: 0 0.5rem;
        font-size: 0.7rem;
    }
    
    .match-score {
        background: var(--brand-1);
        color: white;
        padding: 0.2rem 0.6rem;
        border-radius: 6px;
        font-weight: 700;
        font-size: 0.8rem;
    }
    .match-forfeit-badge {
        display: inline-block;
        font-size: 0.6rem;
        font-weight: 700;
        color: #fff;
        background: #dc2626;
        padding: 0.08rem 0.35rem;
        border-radius: 3px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        vertical-align: middle;
        margin-left: 0.25rem;
    }
    .match-court {
        background: rgba(139,92,246,0.15);
        color: #a78bfa;
        padding: 0.15rem 0.5rem;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 600;
        margin-left: 0.5rem;
    }
    .registration-closed-badge {
        display: inline-block;
        background: var(--t-status-error-bg, #fee2e2);
        color: var(--t-status-error-text, #dc2626);
        padding: 0.5rem 1.25rem;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.95rem;
    }
    .registration-upcoming-badge {
        display: inline-block;
        background: var(--t-status-upcoming-bg, #fef3c7);
        color: var(--t-status-upcoming-text, #d97706);
        padding: 0.5rem 1.25rem;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.95rem;
    }
    .registration-meta {
        font-size: 0.82rem;
        color: var(--t-text-muted);
        margin-top: 0.25rem;
    }

    .tournament-info-bar {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    .tournament-info-description {
        flex: 1;
        min-width: 220px;
        background: var(--t-surface);
        border: 1px solid var(--t-border);
        border-radius: 12px;
        padding: 1rem 1.25rem;
        display: flex;
        align-items: center;
    }
    .tournament-info-description p {
        color: var(--t-text);
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.55;
        white-space: pre-line;
    }
    .tournament-info-stats {
        display: flex;
        gap: 0.75rem;
        flex-shrink: 0;
    }
    .tournament-info-stat {
        background: var(--t-surface);
        border: 1px solid var(--t-border);
        border-radius: 12px;
        padding: 0.85rem 1.25rem;
        text-align: center;
        min-width: 90px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .tournament-info-stat-value {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--t-heading);
        line-height: 1;
    }
    .tournament-info-stat-label {
        font-size: 0.68rem;
        font-weight: 600;
        color: var(--t-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-top: 0.25rem;
    }
    @media (max-width: 600px) {
        .tournament-info-bar { flex-direction: column; }
        .tournament-info-stats { width: 100%; }
        .tournament-info-stat { flex: 1; }
    }
    
    .division-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .division-tab {
        padding: 0.5rem 1rem;
        border-radius: 10px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        border: 1px solid var(--t-border);
        background: var(--t-surface);
        color: var(--t-text-secondary);
        transition: all 0.2s;
    }

    .division-tab:hover {
        background: var(--t-surface-elevated);
        color: var(--t-text);
    }

    .division-tab.active {
        background: var(--mint);
        color: var(--brand-1);
        border-color: var(--mint);
    }

    /* Division accordion */
    .division-accordion {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }
    .division-accordion-item {
        background: var(--t-surface);
        border: 1px solid var(--t-border);
        border-radius: 14px;
        overflow: hidden;
        transition: border-color 0.2s;
    }
    .division-accordion-item:hover {
        border-color: var(--t-border-strong);
    }
    .division-accordion-item.is-open {
        border-color: var(--mint);
    }
    .division-accordion-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        background: none;
        border: none;
        cursor: pointer;
        text-align: left;
        color: var(--t-text);
        transition: background 0.15s;
    }
    .division-accordion-trigger:hover {
        background: var(--t-hover-bg);
    }
    .division-accordion-chevron {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        color: var(--t-text-muted);
        transition: transform 0.25s ease;
    }
    .is-open .division-accordion-chevron {
        transform: rotate(90deg);
    }
    .division-accordion-name {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--t-heading);
        flex: 1;
        min-width: 0;
    }
    .division-accordion-meta {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .division-accordion-badge {
        font-size: 0.72rem;
        font-weight: 600;
        padding: 0.2rem 0.6rem;
        border-radius: 6px;
        white-space: nowrap;
    }
    .division-accordion-badge-format {
        background: var(--t-surface-elevated);
        color: var(--t-text-muted);
        border: 1px solid var(--t-border);
    }
    .division-accordion-badge-champion {
        background: var(--t-status-success-bg);
        color: var(--t-status-success-text);
        border: 1px solid var(--t-status-success-border);
    }
    .division-accordion-badge-participants {
        background: var(--t-surface-elevated);
        color: var(--t-text-muted);
        border: 1px solid var(--t-border);
    }
    .division-accordion-body {
        display: none;
        padding: 0 1.25rem 1.25rem;
    }
    .is-open .division-accordion-body {
        display: block;
    }
    @media (max-width: 600px) {
        .division-accordion-trigger {
            flex-wrap: wrap;
            gap: 0.5rem;
            padding: 0.85rem 1rem;
        }
        .division-accordion-meta {
            width: 100%;
            justify-content: flex-start;
            padding-left: 2rem;
        }
    }
    
    @media (max-width: 768px) {
        .tournament-hero {
            padding: 1.5rem;
        }
        .hero-title {
            font-size: 1.75rem;
        }
        .hero-meta {
            gap: 1rem;
        }
        .pools-grid {
            grid-template-columns: 1fr;
        }
    }

    /* ── Team pool standings grid ────────────────────────────────────────── */
    .team-pool-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
        padding: 0.25rem 0;
    }
    .team-pool-label {
        font-size: 0.74rem;
        font-weight: 700;
        color: var(--t-text-muted);
        text-transform: uppercase;
        margin: 0 0 0.5rem;
    }
    .team-pool-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        font-size: 0.82rem;
    }
    .team-pool-table th {
        text-align: left;
        padding: 0.35rem 0.5rem;
        font-size: 0.69rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--t-text-muted);
        border-bottom: 1px solid var(--t-border);
    }
    .team-pool-table td {
        padding: 0.4rem 0.5rem;
        border-bottom: 1px solid var(--t-border);
    }
    .team-pool-table th.tc,
    .team-pool-table td.tc {
        text-align: center;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }
    .team-pool-table th:first-child,
    .team-pool-table td:first-child {
        width: 10%;
    }
    .team-pool-table th:nth-child(n+3),
    .team-pool-table td:nth-child(n+3) {
        width: 13%;
    }
    .team-pool-table th:nth-child(2),
    .team-pool-table td:nth-child(2) {
        width: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .team-pool-table .pool-rank {
        color: var(--t-text-muted);
        font-size: 0.75rem;
    }
    .team-pool-table .team-name-cell {
        font-weight: 600;
    }
    .team-pool-table .team-name-cell .team-color-dot {
        margin-right: 0.4rem;
        vertical-align: middle;
    }
    .team-color-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
        display: inline-block;
    }

    /* ── Team match card system ─────────────────────────────────────────── */
    .tm-section-label {
        font-size: 0.74rem;
        font-weight: 700;
        color: var(--t-text-muted);
        text-transform: uppercase;
        margin: 0 0 0.5rem;
    }
    .tm-stack {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .tm-stack-mb {
        margin-bottom: 1rem;
    }
    .tm-card {
        border: 1px solid var(--t-border);
        border-radius: 0.5rem;
        overflow: hidden;
    }
    .tm-card.is-completed {
        border-color: var(--t-status-success-border);
    }
    .tm-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
        background: var(--t-surface-elevated);
        border-bottom: 1px solid var(--t-border);
    }
    .tm-card-header-label {
        font-weight: 600;
        color: var(--t-text-muted);
        text-transform: uppercase;
        font-size: 0.68rem;
    }
    .tm-completed-badge {
        font-size: 0.68rem;
        color: var(--t-status-success-text);
        font-weight: 600;
    }
    .tm-team-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.55rem 0.75rem;
    }
    .tm-team-row.is-winner {
        background: var(--t-status-success-bg);
        font-weight: 700;
    }
    .tm-team-name {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.82rem;
    }
    .tm-win-check {
        color: var(--t-status-success-text);
        margin-left: 0.25rem;
    }
    .tm-score {
        font-weight: 700;
        font-size: 0.85rem;
    }
    .tm-score-dim {
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--t-text-muted);
    }
    .tm-divider {
        height: 1px;
        background: var(--t-border);
    }
    .tm-sub-matches {
        border-top: 1px solid var(--t-border);
        padding: 0.4rem 0.75rem;
        background: var(--t-surface-elevated);
    }
    .tm-sub-label {
        font-size: 0.68rem;
        font-weight: 700;
        color: var(--t-text-muted);
        text-transform: uppercase;
        margin: 0 0 0.3rem;
    }
    .tm-sub-row {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.2rem 0;
        font-size: 0.78rem;
    }
    .tm-sub-row:not(:last-child) {
        border-bottom: 1px solid var(--t-border);
    }
    .tm-sub-slot-cell {
        flex: 1;
        min-width: 0;
    }
    .tm-sub-slot {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--t-text-secondary);
        font-weight: 500;
    }
    .tm-sub-players {
        display: block;
        font-size: 0.68rem;
        color: var(--t-text-muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-top: 0.08rem;
    }
    .tm-sub-row { align-items: flex-start; }
    .tm-sub-score {
        font-weight: 600;
        padding-top: 0.05rem;
    }
    .tm-sub-score.is-winner {
        font-weight: 700;
        color: var(--t-status-success-text);
    }
    .tm-sub-dash {
        color: var(--t-text-muted);
        font-size: 0.65rem;
        padding-top: 0.05rem;
    }
    .tm-sub-pending {
        font-size: 0.72rem;
        color: var(--t-text-muted);
        font-style: italic;
        padding-top: 0.05rem;
    }
    .tm-score-label {
        font-size: 0.62rem;
        font-weight: 600;
        color: var(--t-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-left: 0.2rem;
        align-self: center;
    }
    .tm-sub-toggle {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.3rem 0.75rem;
        cursor: pointer;
        font-size: 0.68rem;
        color: var(--t-text-muted);
        background: var(--t-surface-elevated);
        list-style: none;
        border-top: 1px solid var(--t-border);
        transition: color 0.15s, background 0.15s;
    }
    .tm-sub-toggle::-webkit-details-marker { display: none; }
    .tm-sub-toggle:hover { color: var(--t-text-secondary); background: var(--t-hover-bg); }
    .tm-sub-chevron { flex-shrink: 0; transition: transform 0.2s ease; }
    details.tm-sub-details[open] .tm-sub-chevron { transform: rotate(180deg); }
    .tm-tiebreaker-badge {
        font-size: 0.6rem;
        font-weight: 700;
        text-transform: uppercase;
        padding: 1px 5px;
        border-radius: 999px;
        background: var(--t-status-warning-bg);
        color: var(--t-status-warning-text);
        border: 1px solid var(--t-status-warning-border);
        flex-shrink: 0;
    }

    /* ── Finals standings name with team color ──────────────────────────── */
    .finals-standings-name-team {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

        .tplayer-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
        .tplayer-table th {
            text-align: left; padding: 0.6rem 0.5rem;
            font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
            color: var(--t-text-muted); border-bottom: 2px solid var(--t-border);
            letter-spacing: 0.04em;
        }
        .tplayer-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--t-border); }
        .tplayer-table tbody tr:nth-child(even) td { background: var(--t-table-row-alt, rgba(0,0,0,0.015)); }
        .tplayer-table tr:hover td { background: var(--t-table-row-hover, rgba(117, 201, 167, 0.05)); }
        .tplayer-rank { font-weight: 800; width: 30px; text-align: center; }
        .tplayer-rank-1 .tplayer-rank { color: var(--t-status-warning-text, #b45309); }
        .tplayer-rank-2 .tplayer-rank { color: var(--t-text-muted); }
        .tplayer-rank-3 .tplayer-rank { color: var(--t-text-secondary, #92400e); }
        .tplayer-cell { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
        .tplayer-name {
            font-weight: 600;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .tplayer-team-chip {
            display: inline-flex; align-items: center; gap: 0.35rem;
            padding: 0.15rem 0.5rem;
            font-size: 0.7rem; font-weight: 600;
            color: var(--t-text-secondary);
            background: var(--t-surface-elevated, rgba(0,0,0,0.04));
            border: 1px solid var(--t-border);
            border-radius: var(--radius-pill, 999px);
            white-space: nowrap; flex-shrink: 0;
        }
        .tplayer-team-dot { width: 10px; height: 10px; border-radius: 2px; }
        .tplayer-diff-pos { color: var(--t-status-success-text); }
        .tplayer-diff-neg { color: var(--t-status-danger-text); }
        .tplayer-split { font-variant-numeric: tabular-nums; font-weight: 600; }
        .tplayer-split-mx { color: var(--t-status-success-text); }
        .tplayer-split-sg { color: var(--t-text-secondary, #4b5563); }
        .tplayer-legend { margin-top: 0.75rem; font-size: 0.75rem; color: var(--t-text-muted); }
        .tplayer-fullpage-link {
            display: inline-flex; align-items: center; gap: 0.25rem;
            font-size: 0.78rem; font-weight: 600;
            color: var(--t-status-success-text);
            text-decoration: none;
            margin-left: auto;
        }
        .tplayer-fullpage-link:hover { text-decoration: underline; }
        .tplayer-more-hint {
            margin-top: 0.5rem;
            font-size: 0.78rem;
            color: var(--t-text-muted);
            text-align: center;
        }
        .tplayer-more-hint a {
            color: var(--t-status-success-text);
            font-weight: 600;
            text-decoration: none;
        }
        .tplayer-more-hint a:hover { text-decoration: underline; }
        
