.legend-items {
    display: grid;
    /* grid-template-columns set dynamically via JavaScript based on number of conferences */
    gap: 20px 30px;
    margin-top: 10px;
}

.legend-conference-header {
    font-size: 16px;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: var(--bg-secondary, #f0f0f0);
    border-radius: 4px;
    color: var(--text-primary, #212529);
}

.legend-conference-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.legend-division-column {
    display: flex;
    flex-direction: column;
}

.legend-division-header {
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 5px;
    padding-left: 8px;
    color: var(--text-secondary, #6c757d);
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 2px 0;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 13px;
}

.legend-item:hover {
    background-color: var(--hover-bg, rgba(0, 0, 0, 0.05));
    transform: translateX(3px);
}

.legend-item.legend-hovered {
    background-color: var(--hover-bg, rgba(0, 0, 0, 0.1));
    font-weight: bold;
    transform: translateX(5px);
}
[data-theme="dark"] .legend-item.legend-hovered {
    color: #ffffff !important; /* White text for WCAG AA contrast on blue background */
}
[data-theme="dark"] .legend-item.legend-hovered .legend-label {
    color: #ffffff !important; /* White text for WCAG AA contrast on blue background */
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-item.legend-hovered .legend-color {
    width: 24px;
    height: 24px;
    border-width: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-label {
    font-size: 13px;
}


/* Table row highlighting */
table tbody tr.team-hovered {
    background-color: var(--hover-bg, rgba(0, 123, 255, 0.1)) !important;
    font-weight: 600;
}

/* Ensure hovered rows maintain proper text contrast on colored backgrounds */
table tbody tr.team-hovered.playoff-exact-100 td,
table tbody tr.team-hovered.playoff-exact-100 td a,
table tbody tr.team-hovered.playoff-high td,
table tbody tr.team-hovered.playoff-high td a {
    color: #000000 !important; /* Black text on green backgrounds */
}
table tbody tr.team-hovered.playoff-exact-50 td,
table tbody tr.team-hovered.playoff-exact-50 td a {
    color: #ffffff !important; /* White text on dark gray background */
}

table tbody tr.team-hovered td {
    border-top: 2px solid var(--link-color, #007bff);
    border-bottom: 2px solid var(--link-color, #007bff);
}

/* Nav pane highlighting */
.nav-hovered {
    background-color: var(--hover-bg, rgba(0, 123, 255, 0.15)) !important;
    font-weight: bold;
    border-left: 3px solid var(--link-color, #007bff) !important;
}

.playoff-change.positive::before {
    content: "+ ";
    color: #000000;
}
.playoff-change.positive {
    color: #000000;
}
.playoff-change.negative::before {
    content: "- ";
    color: #000000;
}
.playoff-change.negative {
    color: #000000;
}
.last-game {
    white-space: nowrap;
}
.league-note {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    font-size: 1rem; /* Ensure readable text size (was h6 which is too small) */
    line-height: 1.6;
    color: var(--text-primary);
}
.league-note h3 {
    margin-top: 0;
    color: #495057;
}
.league-note p {
    margin-bottom: 0;
    line-height: 1.6;
}

.big-games-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.big-games-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
}

.big-games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.big-game-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.game-date {
    font-weight: 600;
    color: #495057;
}

.importance-badge {
    background-color: #155724; /* Darker green for WCAG AA: #28a745 -> #155724 (4.5:1 with white text) */
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.game-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.team.home-team {
    align-items: flex-end;
    text-align: right;
}

.team-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #212529;
    margin-bottom: 4px;
}

.team-name a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-name a:hover {
    color: #3498db;
}

.team-stats {
    font-size: 0.9em;
    color: #495057; /* Darker gray for better contrast: #6c757d -> #495057 (7.0:1 on white) */
}

.vs {
    font-weight: bold;
    color: #495057; /* Darker gray for better contrast: #6c757d -> #495057 (7.0:1 on white) */
    margin: 0 10px;
    font-size: 1.2em;
}

.game-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.reason-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.view-btn {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.view-btn:hover {
    background: var(--hover-bg) !important;
    color: var(--hover-text) !important;
    border-color: var(--hover-bg) !important;
}

.chart-wrapper canvas,
.charts-container canvas {
    touch-action: pan-x pan-y pinch-zoom;
    -ms-touch-action: pan-x pan-y pinch-zoom;
}

/* Theme toggle sun icon - no color property to use emoji's natural yellow */
.theme-toggle-icon.sun {
    left: 8px;
    /* No color property - emoji uses natural yellow color for better contrast */
}

/* Team links in standings table - match table data color but bold */
table tbody td a {
    color: var(--text-primary) !important;
    font-weight: bold;
    text-decoration: none;
}

/* Dark mode: team links should be black to match table text */
[data-theme="dark"] table tbody td a {
    color: #000000 !important;
}

table tbody td a:hover {
    text-decoration: underline;
}

.playoff-change.positive::before {
    content: "+ ";
    color: #000000;
}
.playoff-change.positive {
    color: #000000;
}
.playoff-change.negative::before {
    content: "- ";
    color: #000000;
}
.playoff-change.negative {
    color: #000000;
}
.last-game {
    white-space: nowrap;
}
.league-note {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Biggest Movers section styles */
.big-movers-section {
    margin-top: 30px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.big-movers-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.big-movers-section h4 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.movers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.movers-section {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.movers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mover-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    background: var(--bg-primary);
    border-left: 4px solid;
    transition: background 0.3s ease, transform 0.2s ease;
}

.mover-item:hover {
    transform: translateX(5px);
}

.mover-item.positive {
    border-left-color: #28a745;
}

.mover-item.negative {
    border-left-color: #dc3545;
}

.mover-item .team-info {
    flex: 1;
}

.mover-item .team-info strong {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.mover-item .team-info strong a {
    color: var(--link-color, #007bff);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mover-item .team-info strong a:hover {
    color: var(--link-hover, #0056b3);
    text-decoration: underline;
}

.mover-item .change-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.mover-item .change {
    font-weight: bold;
    font-size: 1.1em;
}

.mover-item.positive .change {
    color: #155724; /* Darker green for WCAG AA: #28a745 -> #155724 (4.5:1 on white) */
}

[data-theme="dark"] .mover-item.positive .change {
    color: #4ade80; /* Light green for WCAG AA contrast (4.5:1+) on dark background */
}

.mover-item.negative .change {
    color: #dc3545;
}

[data-theme="dark"] .mover-item.negative .change {
    color: #f87171; /* Light red for WCAG AA contrast (4.5:1+) on dark background */
}

.mover-item .current {
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Big Games section styles */
.big-games-section {
    margin-top: 30px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.big-games-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

/* Question mark links in section headings - ensure proper contrast in both modes */
.big-games-section h3 sup a,
.big-movers-section h3 sup a {
    color: #495057 !important; /* Dark gray for light mode (7.0:1 on white) */
}

[data-theme="dark"] .big-games-section h3 sup a,
[data-theme="dark"] .big-movers-section h3 sup a {
    color: #b0b0b0 !important; /* Light gray for dark mode (4.5:1+ on #1a1a1a) */
}

.big-games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.big-game-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.game-date {
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.importance-badge {
    background-color: #155724; /* Darker green for WCAG AA: #28a745 -> #155724 (4.5:1 with white text) */
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.game-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.team.home-team {
    align-items: flex-end;
    text-align: right;
}

.team-name {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.team-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-name a:hover {
    color: var(--hover-bg);
}

.team-stats {
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.team-logo-small {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    margin-bottom: 0.5rem;
}

.vs {
    font-weight: bold;
    color: var(--text-secondary);
    margin: 0 10px;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.game-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.reason-tag {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Responsive Big Games - adjust grid for smaller screens */
@media (max-width: 768px) {
    .big-games-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    }
    .big-game-card:nth-child(n+7) {
        display: none; /* Show only 6 games on mobile (3 rows of 2) */
    }
}
@media (min-width: 769px) and (max-width: 1200px) {
    .big-game-card:nth-child(n+10) {
        display: none; /* Show 9 games on tablets (even rows) */
    }
}
/* Desktop shows all 15 games (auto-adjusts to 3-5 columns based on width) */
.place-chance {
    text-align: center;
    font-size: 0.75em;
    color: #000000;
    padding: 2px 4px;
}
.place-header {
    font-size: 0.75em;
    padding: 4px 2px;
    white-space: nowrap;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table th {
    font-size: 0.85em;
    padding: 6px 4px;
    white-space: nowrap;
}
th.wrap-playoff {
    white-space: normal;
    word-wrap: break-word;
    min-width: 50px;
    max-width: 70px;
    text-align: center;
}
th.wrap-championship {
    white-space: normal;
    word-wrap: break-word;
    min-width: 60px;
    max-width: 100px;
    text-align: center;
}
th.wrap-rpi {
    white-space: normal;
    word-wrap: break-word;
    min-width: 35px;
    max-width: 45px;
    text-align: center;
}

th.wrap-sos {
    white-space: normal;
    word-wrap: break-word;
    min-width: 35px;
    max-width: 45px;
    text-align: center;
}
table td {
    font-size: 0.75em;
    padding: 4px 4px;
}
.playoff-advancement-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.playoff-advancement-table th,
.playoff-advancement-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
    white-space: nowrap;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}
.playoff-advancement-table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: bold;
    text-align: center;
}
.playoff-advancement-table tbody td {
    text-align: center;
    color: var(--text-primary);
}
.playoff-advancement-table tbody td:first-child {
    text-align: left;
}
/* Dark mode: playoff advancement table should use white text for all cells including team links */
[data-theme="dark"] .playoff-advancement-table tbody td {
    color: #ffffff !important;
}
[data-theme="dark"] .playoff-advancement-table tbody td a {
    color: #ffffff !important;
}
.championship-odds {
    text-align: center;
    font-size: 0.75em;
    color: #000000;
    padding: 2px 4px;
    font-weight: normal;
}
.championship-change {
    text-align: center;
    font-size: 0.75em;
    padding: 2px 4px;
    font-weight: normal;
    color: #000000;
}
.championship-change.positive::before {
    content: "+ ";
    color: #000000;
}
.championship-change.positive {
    color: #000000;
}
.championship-change.negative::before {
    content: "- ";
    color: #000000;
}
.championship-change.negative {
    color: #000000;
}
#playoff-circular-viz {
    position: relative;
    min-height: 400px;
}
.viz-tooltip {
    font-size: 0.9em;
    line-height: 1.4;
}
.viz-tooltip strong {
    display: block;
    margin-bottom: 4px;
}
.playoff-series-section {
    --bracket-connector: var(--text-secondary);
    margin-top: 30px;
    margin-bottom: 2rem;
    max-width: 100%;
    min-width: 0;
}
[data-theme="dark"] .playoff-series-section {
    --bracket-connector: #c8c8c8;
}
[data-theme="dark"] .bracket-match {
    border-color: #8a8a8a;
}
.playoff-series-section h2 {
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}
.playoff-series-note {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}
.playoff-series-round {
    margin-bottom: 1.5rem;
}
.playoff-series-round h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin: 0 0 0.75rem 0;
}
.playoff-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}
.playoff-series-team-chips {
    display: grid;
    grid-template-columns: repeat(var(--playoff-chip-count, 1), minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}
.playoff-series-team-chips .playoff-series-card {
    min-width: 0;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
}
.playoff-series-team-chips .playoff-series-team img {
    width: 40px;
    height: 40px;
}
.playoff-series-team-chips .playoff-series-team.nhl img {
    width: 48px;
    height: 48px;
}
.playoff-series-team-chips .playoff-series-games {
    font-size: 0.8rem;
}
.playoff-series-bye {
    display: flex;
    flex-direction: column;
}
.playoff-series-bye-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.playoff-series-empty {
    border-style: dashed;
    box-shadow: none;
    opacity: 0.45;
}
@media (max-width: 700px) {
    .playoff-series-team-chips {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
.playoff-series-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px var(--shadow);
}
.playoff-series-card.in_progress {
    border-color: var(--text-primary);
}
.playoff-series-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.playoff-series-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.playoff-series-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    white-space: nowrap;
}
.playoff-series-status.in_progress {
    background: var(--text-primary);
    color: var(--bg-primary);
}
.playoff-series-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.playoff-series-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: var(--text-primary);
}
.playoff-series-team img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.playoff-series-team.nhl img {
    width: 56px;
    height: 56px;
}
.playoff-series-team .abbr {
    font-weight: 700;
}
.playoff-series-matchup .vs {
    font-weight: 700;
    color: var(--text-secondary);
    flex: 0 0 auto;
}
.playoff-series-score-line {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.playoff-series-games {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}
.playoff-series-games li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.playoff-series-games .game-num {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--text-primary);
}
.playoff-series-games .game-matchup {
    flex: 1;
    min-width: 0;
}
.playoff-series-games .game-score {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}
.playoff-series-games .badge {
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 4px;
}
@media (max-width: 768px) {
    .playoff-series-team img {
        width: 40px;
        height: 40px;
    }
    .playoff-series-team.nhl img {
        width: 48px;
        height: 48px;
    }
}

.playoff-bracket-wrap {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-bottom: 8px;
    box-sizing: border-box;
}
.playoff-bracket {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 24px;
    width: max-content;
    min-width: min-content;
    margin-inline: 0;
    transform-origin: top left;
    transform: scale(var(--bracket-scale, 1));
}
.playoff-bracket-split {
    flex-direction: row;
    align-items: center;
    gap: 0;
}
.bracket-final-column {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.bracket-final-anchor {
    position: relative;
}
.playoff-bracket-split > .bracket-final-column {
    margin: 0 18px;
    align-self: stretch;
    display: grid;
    grid-template-rows: 1fr auto minmax(min-content, 1fr);
    justify-items: center;
}
.playoff-bracket-split > .bracket-final-column > .bracket-final-anchor {
    grid-row: 2;
}
.playoff-bracket-split > .bracket-final-column > .bracket-champion {
    grid-row: 3;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 196px;
    max-width: 196px;
    overflow: visible;
}
.playoff-bracket-split > .bracket-final-column .bracket-match::before,
.playoff-bracket-split > .bracket-final-column .bracket-match::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 18px;
    border-top: 2px solid var(--bracket-connector);
}
.playoff-bracket-split > .bracket-final-column .bracket-match::before {
    left: -18px;
}
.playoff-bracket-split > .bracket-final-column .bracket-match::after {
    right: -18px;
}
.bracket-node {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.bracket-node.rtl {
    flex-direction: row-reverse;
}
.bracket-children {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: stretch;
    position: relative;
    padding-right: 14px;
}
.bracket-children > .bracket-node {
    justify-content: flex-end;
    width: 100%;
    box-sizing: border-box;
}
.bracket-node.rtl > .bracket-children {
    padding-right: 0;
    padding-left: 14px;
}
.bracket-node.has-children > .bracket-children::after {
    content: "";
    position: absolute;
    right: 0;
    top: 12%;
    bottom: 12%;
    border-right: 2px solid var(--bracket-connector);
}
.bracket-node.rtl.has-children > .bracket-children::after {
    right: auto;
    left: 0;
    border-right: none;
    border-left: 2px solid var(--bracket-connector);
}
.bracket-match {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 148px;
    min-width: 148px;
    max-width: 148px;
    box-sizing: border-box;
    margin: 6px 0;
    flex-shrink: 0;
    box-shadow: 0 2px 4px var(--shadow);
    overflow: visible;
}
.bracket-match-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    padding: 4px 8px 2px;
    white-space: normal;
    line-height: 1.2;
    border-radius: 5px 5px 0 0;
    background: var(--bg-primary);
}
.bracket-line:last-of-type {
    border-radius: 0 0 5px 5px;
}
.bracket-node.has-children > .bracket-match,
.bracket-node.has-children > .bracket-final-column {
    margin-left: 14px;
}
.bracket-node.rtl.has-children > .bracket-match,
.bracket-node.rtl.has-children > .bracket-final-column {
    margin-left: 0;
    margin-right: 14px;
}
.bracket-node.has-children > .bracket-match::before,
.bracket-node.has-children > .bracket-final-column .bracket-match::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    width: 14px;
    border-top: 2px solid var(--bracket-connector);
}
.bracket-node.rtl.has-children > .bracket-match::before,
.bracket-node.rtl.has-children > .bracket-final-column .bracket-match::before {
    left: auto;
    right: -14px;
}
.bracket-match.rtl .bracket-line {
    flex-direction: row-reverse;
}
.bracket-match.featured {
    width: 196px;
    min-width: 196px;
    max-width: 196px;
    border-width: 2px;
}
.bracket-match.featured .bracket-match-label {
    font-size: 0.8rem;
    padding: 6px 10px 4px;
}
.bracket-match.featured .bracket-line {
    padding: 8px 12px;
    gap: 8px;
}
.bracket-match.featured .bracket-line img {
    width: 32px;
    height: 32px;
}
.bracket-match.featured .bracket-line img.nhl {
    width: 40px;
    height: 40px;
}
.bracket-match.featured .bracket-line .abbr,
.bracket-match.featured .bracket-line .w {
    font-size: 1.15rem;
}
.bracket-champion {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 196px;
    max-width: 196px;
    box-sizing: border-box;
    text-align: center;
    pointer-events: auto;
    overflow: visible;
}
.bracket-champion a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
}
.bracket-champion img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.bracket-champion img.nhl {
    width: 88px;
    height: 88px;
}
.bracket-champion-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: break-word;
}
.bracket-champion-label {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
}
.bracket-match.in_progress {
    border-color: var(--text-primary);
}
.playoff-bracket.has-scope .bracket-match:not(.out-of-scope) {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--text-primary), 0 2px 4px var(--shadow);
    z-index: 1;
}
.playoff-bracket.has-scope .bracket-match.out-of-scope {
    opacity: 0.38;
}
.playoff-bracket.has-scope .bracket-match.out-of-scope .bracket-line img {
    filter: grayscale(0.65);
}
.playoff-series-card.out-of-scope {
    opacity: 0.4;
}
[data-theme="dark"] .playoff-bracket.has-scope .bracket-match:not(.out-of-scope) {
    box-shadow: 0 0 0 2px #c8c8c8, 0 2px 4px var(--shadow);
}
.bracket-match-chip {
    display: none;
    position: fixed;
    z-index: 500;
    width: 280px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow: auto;
    pointer-events: auto;
}
.bracket-match-chip.is-open {
    display: block;
}
.bracket-match-chip .playoff-series-card {
    margin: 0;
    box-shadow: 0 8px 24px var(--shadow);
    opacity: 1;
}
.bracket-match-chip .playoff-series-team img {
    width: 40px;
    height: 40px;
}
.bracket-match-chip .playoff-series-team.nhl img {
    width: 48px;
    height: 48px;
}
.bracket-match-chip .playoff-series-games {
    font-size: 0.8rem;
}
.bracket-line {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    text-decoration: none;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
}
.bracket-line img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}
.bracket-line img.nhl {
    width: 26px;
    height: 26px;
}
.bracket-line .abbr {
    font-weight: 700;
    flex: 1;
    min-width: 0;
}
.bracket-line .w {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.bracket-line.winner {
    background: var(--bg-secondary);
}
.playoff-series-unplaced-heading {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin: 1.25rem 0 0.75rem;
}
